RSS

Category Archives: Coding

Lots of Folders != Project more Organized

Making a development project with lots of folders does not mean that the project is more organized.  However, there is a seemingly irresistible desire to make a folder for every possible purpose, and then put the one or two files that fit in there, all in the name of keeping the project organized.  This might make the programmer feel good, but it is a large pain for anyone new who has to join the project or review the source for any reason. Read the rest of this entry »

 
Leave a comment

Posted by on May 18, 2017 in Coding, practice

 

Tags: , ,

Avoid Unnecessary Conditional Nesting

Simply put: try to make your conditions as flat as possible.  This makes them generally easier for the humans to parse and understand.  Read the rest of this entry »

 
Leave a comment

Posted by on March 29, 2016 in Coding, practice

 

Tags: , ,

Two Kinds of Exceptions

An exception is a message from the system to the user about something that the program can not handle. There are a couple of main categories of exceptions: environmental and program logic. They warrant quite different treatment. Read the rest of this entry »

 
Leave a comment

Posted by on March 14, 2016 in Coding, Design, Poor Error Msg, practice

 

Tags: , , , ,

Brainless Getters & Setters are a Waste

Someone long ago set a pattern that all members should have a getter and setter method.  Some are persuaded that this is OO and this is encapsulation, so a lot of inexperienced programmers do this by default.  But this is a problem. Read the rest of this entry »

 
Leave a comment

Posted by on March 7, 2016 in Coding, Example Code, practice

 

Tags: , , , ,

Don’t Baby Your Builds

In a conversation this week, one developer insisted that a special build machine should be built to assure that the build is always comes out the same.  My response: if your project is building differently on different machines, then you have a much deeper problem. Read the rest of this entry »

 
Leave a comment

Posted by on March 5, 2016 in Coding, practice

 

Tags: , , , ,

HttpServletRequest Path Decoding

The documentation on HttpServletRequest is very poor, and this fills in a critical set of facts that you need to know to write a TomCat application. Read the rest of this entry »

 
Leave a comment

Posted by on February 23, 2016 in Coding

 

Tags:

Counting Source Lines

I rarely count the number of lines of source — but here is a quick script to do it. Read the rest of this entry »

 
Leave a comment

Posted by on February 22, 2016 in Coding

 

Tags: , ,