RSS

Category Archives: practice

Eliminate Useless Comments

Be careful what you ask for.   I was reviewing some code that had absolutely no comments. I asked the developer to add some comment.   So, indeed they did, however the comments added no value to the code at all.   There is no point in adding comments for comments’ sake.  In fact, useless comments make the code worse by adding lines without adding value.   Let’s talk about what a valuable comment is. Read the rest of this entry »

 
Leave a comment

Posted by on October 18, 2019 in Coding, practice

 

Tags: , , , ,

The Magic of MemFile

In the Purple Utilities Library is a class called MemFile which you can efficiently stream into and out of. Learn to use it properly can increase the efficiency of your programs when reading and writing data. Read the rest of this entry »

 
Leave a comment

Posted by on October 2, 2019 in Coding, Design, practice

 

Tags: , , ,

Return Null or Exception?

I am writing a getter function, and the requested object can not be found.  Do I return null?   Or do I throw an exception?  The answer is “it depends.”  Sometimes both options are needed, but how to decide? Read the rest of this entry »

 
Leave a comment

Posted by on May 11, 2019 in Coding, Example Code, practice

 

Tags: , , ,

Write Bug Reports to Last

Encountered a bug report that cited a problem in “the new build.”   That is not good enough, because every week will bring a new “new build.”

Read the rest of this entry »

 
Leave a comment

Posted by on February 20, 2019 in practice

 

Tags: , ,

Constants and Errors

Still reviewing that code base and finding more bad patterns for use of constants, this time for error messages.   This is another “don’t do this” post. Read the rest of this entry »

 
Leave a comment

Posted by on November 27, 2018 in Coding, practice, Uncategorized

 

Tags: , , ,

Git Branching

I found a lot of the documentation is incomplete and only useful to those who already know how to do it.  Plus, they usually are based on unrealistic scenarios.  Here are the notes that are useful to me to make and control branches. Read the rest of this entry »

 
Leave a comment

Posted by on February 1, 2018 in Coding, practice

 

Tags: , , ,

Excessive Branch Use Causes Technical Debt and Increases Risk of Bugs

Agile practitioners already know that technical debt is that accumulation of unfinished work can cause projects to be late late late.  Building up a lot of technical debt is a problem because the debt needs to be payed before you can ship.  One way that debt can be accumulated is by profligate use of branches.  Avoid that at all costs! Read the rest of this entry »

 
1 Comment

Posted by on December 16, 2017 in Coding, Design, practice

 

Tags: , , , , ,