RSS

Tag Archives: readability

Variable Names & Key Values

Constructing JSON in Java can be a bother.  The most standard JSON library requires objects to be created, and then called to put the members on there.  So much easier in JavaScript, but it is not Java script.  Still, one technique to improve the readability is to name the variable in java to match the key in JSON.   Simple concept, easy to do, I sometimes wonder why it is not obvious to all. Read the rest of this entry »

 
Leave a comment

Posted by on May 7, 2019 in Coding, Example Code

 

Tags: , , ,

#33 Eliminate Exceptional Cases before the Main Logic

When writing code, you naturally want the code to be readable so it can be maintained easily.  Generally, you try to reduce the cognitive load, and one recommendation is to handle exception cases that might occur up front, in a small, localized block of code, before falling through to the main block of logic. Read the rest of this entry »

 
Leave a comment

Posted by on December 31, 2012 in Coding, Example Code

 

Tags: , , ,