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 this purpose. 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. Continue reading

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 of a localizable exception messages.
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. Continue reading

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

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 reading some code today which exemplifies this. Continue reading

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

GIT: Accented Characters in Filenames

If you are using file names with non-ASCII characters in them, then Git will sometimes behave funny.  There are some commands to know about. Continue reading

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

Pragmatic Exception Handling

If you already know the requirements and best practices for exception handling and error reporting, this post talks about some convenient guidelines to follow to make it easier to comply with the rules.
Continue reading

Posted in Coding | Tagged , | Leave a comment

Context Error Reporting

One of the biggest mistakes I see programmers make when writing an error message is to forget to include details about the context into the message.  The message effectively “assumes” that the reader knows the context, but that assumption is not always valid, and the error message can fail communicate. Continue reading

Posted in Coding, Design, Poor Error Msg | Tagged , , , , | Leave a comment

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

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

Caching for Chrome

One of the biggest questions I see posted on internet discussion boards is “Why didn’t Chrome get the recent file?”  By default, Chrome is more aggressive on it’s caching than either Mozilla or IE.  Here are some answers to these questions. Continue reading

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