Recent Posts
Recent Comments
- python – Testing email sending-ThrowExceptions – ThrowExceptions on PostHoc: Testing Apps that Send Email
- The Silent Enemy: Failure to Report Exceptions | Thinking Matters on The Purpose of Error Reporting
- Colin James III (The Most Rev'd, Ret.) on Not-So-EasyChair Hints
- gizmos and gadgets on The Only Class You Need for CSV Files
- kswenson on The Only Class You Need for CSV Files
Archives
- April 2023
- January 2023
- December 2022
- November 2022
- May 2021
- April 2021
- February 2021
- December 2020
- April 2020
- February 2020
- November 2019
- October 2019
- June 2019
- May 2019
- February 2019
- January 2019
- November 2018
- June 2018
- May 2018
- April 2018
- February 2018
- January 2018
- December 2017
- November 2017
- July 2017
- June 2017
- May 2017
- March 2017
- January 2017
- June 2016
- March 2016
- February 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- June 2015
- April 2015
- January 2015
- November 2014
- October 2014
- September 2014
- July 2014
- May 2014
- April 2014
- February 2014
- January 2014
- October 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
Meta
Category Archives: practice
Code Only What You Need
Only commit to code that which needs to committed to code. Only write what needs to be written. How hard can that be? You might be surprised, but there are developers out there that are so enamored with the code … Continue reading
Posted in Coding, Design, practice Tagged architecture, code, code bloat, code quality, YAGNI Leave a comment
Don’t Use java.util.Optional
This is a class that attempts to replace null with different way to check for null. While I can imagine some very rare cases that this could be useful, in general it is more complicated, slower, and takes more memory … Continue reading
Holographic Testing Technique
I write a lot of code, and I want there to be solid tests on that code. Creating tests can be tedious, and that prevents many good tests from being written. Also, because tests can be fragile, maintaining those tests … Continue reading
Posted in Coding, Example Code, practice Tagged development method, errors, holographic testing, programming, testing Leave a comment
Factoring Functionality: Who Needs to Know?
There are many ways you can break the functionality of a program into blocks that are manageable: some right, some wrong. This post promotes a simple principle. The primary way should be around “who needs to know.”
Posted in Coding, Design, practice Tagged business calendar, code style, encapsulation, factoring, private, public Leave a comment
Don’t Erase Wrong Data
Data validation is a tricky area for usability. On one hand you help the user by catching possible error early. On the other hand, the validation check can not be perfect, so there are important errors to avoid.
Safe API Upgrade
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.
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.
Posted in Coding, Design, practice Tagged data handling, data structures, streams, web Leave a comment
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?
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.”
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 … Continue reading →