First consideration for any Application Programming Interface (API) is how it will evolve in the future. This critical interface must stand the test of time, and should whenever possible be both upgrade and downgrade compatible. Continue reading
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. Continue reading
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. Continue reading
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? Continue reading
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.”
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. Continue reading
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. Continue reading
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! Continue reading
The Urge to Merge
Concurrent development of software in a team relies on being able to merge the changes from each person successfully. Experienced developers will already know this, but there are theoretical limits on how effective merging can be. Continue reading
Grounding Design for the Real World
One common rabbit hole that programmers often fall into is creating designs for abstract capabilities that then prove to be useless in real life. To avoid this, we must focus on concrete real-world examples when designing capabilities. Continue reading