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
- 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
Tag Archives: Java
Constant Abuse 2
Some programmers believe that constants are the source of all goodness, because it means in the future that everything will be malliable. Particularly programmers paid by the hour. This is a mistake. Readibility suffers if constants are abused. I am … Continue reading
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 … Continue reading
Posted in Coding, practice Tagged build, Java, methodology, project management, projects Leave a comment
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.
Don't Fear the Lowly Static Method
When people first learn object oriented programming (is there any other way) they seem to want to abandon all non-member methods (such as static methods) as being anti-object-oriented. This is foolish. There are times for objects, and times for static … Continue reading
Never Use StringTokenizer
You should Never Use StringTokenizer. That is a strong statement. It is a bit of an exaggeration. But in my experience, every case where StringTokenizer has been used that I have seen, has been an abuse of the original concept, … Continue reading
Public or Private Member Variables?
When is it OK to make member variables public?
Method Exception Signature
In short, all interface methods, if they throw anything, should be declared to throw ‘java.lang.Exception’ and never a specialized exception class. Find this surprising? then please read on. The original goal to allow methods to declare the type of exceptions … Continue reading
Posted in Coding, Design Tagged changes, declarations, errors, exceptions, Java, structure, types 3 Comments
File Path Manipulation
Three guidelines that make sense when handling files and paths. Never Use Backslash in File Paths Don’t use File.pathSeparator Converting slashes from the user
#27 Don't Declare Variables at the Top
Somewhere long ago you attended a course that said that all variables should be declared at the top of the method. Modern languages allow you to declare the variable at the point in the code that it is initialized and … Continue reading
Posted in Coding, Example Code Tagged compiler warnings, initialization, Java, structure Leave a comment
#25 Never Convert Exception to String before Display Time
Proper handling of exceptions means that you keep it as an Exception object through all processes, particularly wrapping with another exception. A common error I see programmers doing is to convert the Exception to a String and use that as … Continue reading