Factoring Functionality: Who Needs to Know?

There are many ways you can break the functionality of a program into blocks that are manageable: some right, some wrong.  This post promotes a simple principle.  The primary way should be around “who needs to know.” Continue reading

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

XML vs. JSON vs. YML

Here is a side by side comparison of the same data presented in three common formats.  How do they compare?  What are they good for? Continue reading

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

BibTeX: What Authors Need To Know

Books and article with cite other references.  LaTeX will format the references (bibliography) section quite well and quite automatically as long as it is given a BibTeX file to read the information from.   If you have a list of references that you want to cite, here is how to structure this as a BibTeX file. Continue reading

Posted in Example Code, LaTeX | Tagged , , , | Leave a comment

Good Error Messages Can Be Easy

Here is an error message I encountered one day.  It is frustrating, because obviously the code was checking something, but it is frustrating because you get no real clues what the problem really was, and a simple change would make the error more accurate and more useful. Continue reading

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

Don’t Erase Wrong Data

Data validation is a tricky area for usability.   On one hand you help the user by catching possible error early.  On the other hand, the validation check can not be perfect, so there are important errors to avoid. Continue reading

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

Safe API Upgrade

First consideration for any Application Programming Interface (API) is how it will evolve in the future.  This critical interface must stand the test of time, and should whenever possible be both upgrade and downgrade compatible.  Continue reading

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

What is wrong with this code?

It is code review time, and I offer a sample of Java code for you to critique.   Can you find the problems? Continue reading

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

Eliminate Useless Comments

Be careful what you ask for.   I was reviewing some code that had absolutely no comments. I asked the developer to add some comment.   So, indeed they did, however the comments added no value to the code at all.   There is no point in adding comments for comments’ sake.  In fact, useless comments make the code worse by adding lines without adding value.   Let’s talk about what a valuable comment is. Continue reading

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

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 all the inputs are filled in and verified valid.  This is a big problem. Continue reading

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

The Magic of MemFile

In the Purple Utilities Library is a class called MemFile which you can efficiently stream into and out of. Learn to use it properly can increase the efficiency of your programs when reading and writing data. Continue reading

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