• Home
  • About
    • About The Coder
    • Language List
  • The Rules
    • Rule #1: Clarity Trumps Everything
    • Rule #2: Source Code is for Humans
    • Rule #3: Don’t Ignore Warnings
    • Rule #4: Comment As You Go!
    • Rule #5: Always Use Parentheses
  • CS-101
  • Python-101
  • Guestbook

The Hard-Core Coder

~ I can't stop writing code!

The Hard-Core Coder

Tag Archives: Java

Always Implement toString

02 Tuesday Nov 2021

Posted by Wyrd Smythe in CS101

≈ 2 Comments

Tags

code clarity, computer code, computer languages, computer programming, Java, Python code, readable code, toString, __str__

Although I’m categorizing this one as really good advice, rather than as a rule, I think it should be viewed as basically a rule. I think it should be a rule in any object-oriented language that supports it natively (Java and Python, for example).

The advice (rule of thumb, say) is to always create a useful implementation of toString when you create a class. It makes your development and maintenance life ever so much better.

Continue reading →

DataCollector Factories

16 Thursday Apr 2020

Posted by Wyrd Smythe in Stories

≈ 1 Comment

Tags

computer programmer, computer programming, data, Java, software, software design, software development

Last time I introduced the DataCollector application, but didn’t have room to get into the use of factory classes. There isn’t often a need for a factory class, but they can be useful when you need to create objects at run-time without knowing their class until then.

The general approach involves a function that returns instances of a class based on run-time information. In some cases the instances are limited to a predetermined set of classes, in other cases it can any class the known to the code.

Continue reading →

DataCollector

29 Saturday Feb 2020

Posted by Wyrd Smythe in Stories

≈ 1 Comment

Tags

computer programmer, computer programming, data, Java, software, software design, software development

When I first posted about my DataBridge utility I mentioned the DataCollector, which was a Java-based framework for quickly building apps that interacted via web services with a third-party CRM services provider.

In this post I’ll introduce the DataCollector framework. For obvious proprietary reasons, this will be fairly generic, but I think the basic architecture is worth sharing. It’s a nice example of using factory classes.

Continue reading →

DataBridge Drivers

07 Friday Feb 2020

Posted by Wyrd Smythe in Stories

≈ Leave a comment

Tags

computer programmer, computer programming, data, Java, software, software design, software development

Last time I started the story of my DataBridge application — a Java-based tool for transferring and transforming tabular data, such as TAB, CSV, and XML files. It could also read from and write to ODBC tables.

The app itself was just a framework that implemented a basic IPO model to transfer data. The details were up to the Input, Process (in this case, Mapping), and Output, drivers loaded at run time.

Continue reading →

DataBridge

06 Monday Jan 2020

Posted by Wyrd Smythe in Stories

≈ Leave a comment

Tags

computer programmer, computer programming, data, Java, software, software design, software development

The last story was about PF.EXE, a file-processing utility I wrote for my own uses way back when. That one was a combination of C code and 8086 assembler, written for MS-DOS (worked fine in Windows), that read and wrote disc files. It had a toolkit of things it could do to them, depending on command line switches.

Many years later, using Java, I created more capable versions, the culmination of which was a suite called DataBridge. It turned out to be some of the most valuable work I ever did for The Company.

Continue reading →

HTML is not a programming language!

22 Monday Dec 2014

Posted by Wyrd Smythe in CS101

≈ 5 Comments

Tags

computer code, computer language, computer languages, CSS, data, data type, HTML, Java, JavaScript, programming language, variables

A webpage is a text document written in HTML. This document may also contain CSS and/or JavaScript, but it’s basically an HTML text document. You could write one — including the CSS and JavaScript — using just a pencil and paper.

Despite not needing a computer to write, all three are computer languages — they are languages used by, understood by, computers (and trained humans). However only one of those (JavaScript) is a programming language.

This is a brief explanation of which is which and why.

Continue reading →

Rule #3: Don’t Ignore Warnings

13 Tuesday May 2014

Posted by Wyrd Smythe in CS101

≈ Leave a comment

Tags

compiling code, computer programmer, computer programmers, computer programming, errors, Java, software development, warnings

There have been times when, working on other people’s code, one of the first things that pops up is that their code generates thousands of warnings. I’m not exaggerating the number; there have been at least two times I can recall where someone’s code set generated that many warnings. And both times, the code set wasn’t all that large (only tens of thousands of lines).

Which leads us to Rule #3: Don’t ignore warnings!

Continue reading →

Follow The Hard-Core Coder on WordPress.com

The Posts

  • Python String Translate
  • The Last Bug
  • Regular Expressions
  • Bits Bytes Chips Clocks
  • Loving the Lambda
  • Failure Tales
  • Naming Things (redux)
  • Calculating Entropy (in Python)
  • Building a Turing Machine
  • Python Tokenize

The Topics

  • Blog (4)
  • CS101 (35)
  • Fun (27)
  • Interesting (1)
  • Opinion (12)
  • Python (24)
  • Stories (15)

The Month

January 2023
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  
« Oct    

The Past

Posts

RSS Feed

Comments

RSS Feed

Enter your email address to follow The Hard-Core Coder and get email when there is a new post.

The Main Blog

Visit Logos con carne

Lots of wyrds... with meat!

The Author

Wyrd Smythe

Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts.

View Full Profile →

Create a website or blog at WordPress.com

  • Follow Following
    • The Hard-Core Coder
    • Already have a WordPress.com account? Log in now.
    • The Hard-Core Coder
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar