RSS

Category Archives: Uncategorized

JSON REST API – Exception Handling

All the world uses REST style web services, and returns data in JSON structures, because that is the best kind of API for an interactive, responsive JavaScript based user interface that runs in a browser. What are the best practices for what to send back when the server is unable to handle the request it was given? Read the rest of this entry »

Advertisements
 
Leave a comment

Posted by on September 16, 2015 in Uncategorized

 

Avoid Unnecessary Nesting

It is well recognized that long routines with a lot of nesting can create code that is difficult to read.  Even if indented correctly, it is hard over many lines to accurately match the indent amount, particularly if indented a lot.  Read the rest of this entry »

 
Leave a comment

Posted by on August 27, 2015 in Uncategorized

 

Outrageous Strange Cross-Site Security

In making a simple authentication service, I ran into a myriad of strange, incomprehensible requirements that someone obviously through was a good security idea, but essentially misses the mark, has all the marks of “design by committee,” and makes everything else difficult.  I am recording them here, because this seems like the kind of thing I am going to need to refer back to.

Read the rest of this entry »

 
Leave a comment

Posted by on August 17, 2015 in Uncategorized

 

Making an eBook with LaTeX

Having completely finished with the layout of my new book using XeLaTeX, I now want to make an eBook.  The error messages with LaTeX are always completely cryptic, so you normally have to debug by adding a single line of source and rebuilding to see if that break anything.   It is slow and tedious work, and this post contains a list of things I discovered using this method. Read the rest of this entry »

 
Leave a comment

Posted by on January 11, 2015 in Uncategorized

 

Java Servlet URL Parsing Best Practice

I write Java servlets a lot, and every single time I waste time trying to get the URL value that the servlet was invoked with in the right way.  The methods provided on HTTPServletRequest simply are no the right ones for all situation. Read the rest of this entry »

 
Leave a comment

Posted by on January 2, 2015 in Uncategorized

 

SVN Essentials

This post contains a quick reference to the commands you need to know to use Subversion (SVN).  I assume you already understand the concepts behind source management.  This quick reference is to the commands to use. Read the rest of this entry »

 
1 Comment

Posted by on October 20, 2014 in Uncategorized

 

Correctly Converting Integer to String

Learn to use Integer.toString(i) when you need a string that represents an integer.  This is always the most efficient way to convert, and it avoids some bad habits that can be expensive. Read the rest of this entry »

 
Leave a comment

Posted by on May 5, 2014 in Uncategorized