Category Archives: Uncategorized

Let Me Save Incomplete Files

This is a usability problem that I have run into a number of times.   A programmer writes a UI screen to receive a long list of inputs in order to create an object in system.  Save is enabled only when … Continue reading

Posted in Coding, Design, Uncategorized | Tagged , , , | Leave a comment

Java TimerTask Implementation Pattern

When implementing a TimerTask class, there are a couple of things to remember.

Posted in Uncategorized | Leave a comment

Simple Rule for Exception

If you want a program that runs reliably, then there is a simple rule to follow about exception handling.   It is so simple, it can be stated in a single sentence:   if a method does not accomplish what it is … Continue reading

Posted in Uncategorized | Leave a comment

Poor Exception Handling Examples

Having just written about JSON error messages and exceptions, I did a small survey to see what others were doing, and I saw some of the most egregious examples of poor coding.   Sloppy exception handling makes programs that behave bad … Continue reading

Posted in Uncategorized | Leave a comment

Ultimate Java Exception Class

This is the third in a series about translatable exceptions (see Translatable Error Messages).  This post is about the class JSONException which contains the required features.

Posted in Coding, Design, Uncategorized | Tagged , , , | Leave a comment

Variable Arguments for Messages

We need to construct an object which has a template and a set of parameter data values.  Java offers a couple of ways to do this, and this post shows how the variable parameter mechanism works easily and conveniently for … Continue reading

Posted in Coding, Design, Uncategorized | Tagged , , , | 1 Comment

JSON Translatable Error Messages

Second in a series on translatable exceptions, this discusses how an error message should be returned as JSON from a web-service API so that it the calling program can display the error in the right language for the user.

Posted in Coding, Design, Uncategorized | Tagged , , , | 2 Comments

Translatable Error Messages

This is the first of a series of posts, I want to go over some of the groundwork of what it takes to make exceptions localizable into other languages. Nothing new here, but just want to explain clearly the requirements … Continue reading

Posted in Coding, Design, Uncategorized | Tagged , , | 3 Comments

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.

Posted in Coding, practice, Uncategorized | Tagged , , , | Leave a comment

Hints for ng-options

The documentation on Angular expressions is so sketchy that I really can’t work out what it means, so I have “decoded” what they say, and here is the two useful cases.

Posted in Coding, Uncategorized | Tagged , | Leave a comment