March 18, 2005

Misunderstoodimated

The Chronicle of HE has a new article asking academics to describe what they regard as the most misunderstood concepts in their fields (thanks to Cliopatria). My own entry would be the difference between bias and opinion, two quite different concepts which are now hopelessly and destructively confused in popular discourse. Other suggestions welcome.

Posted by Alan Allport at March 18, 2005 08:17 PM
Comments

In my case it's the use of integers as constants when objects are persisted to a database. This is a holdover from old C enums that most developers have never seen any reason to change. The problem is that when you're able to toss around constants like DELETED, DO_NOT_REMOVE, or STATUS_UNKNOWN in your application, persisting them as meaningless ints means the poor schmos deploying and customizing the app end up staring at "7" and wondering whether tham means "do not remove", "already deleted" or "go throttle the developer who wrote this".

The irony is that the use of integers is an old performance enhancement thing that hasn't been useful for database performance for decades. The longest string constant will get converted into some some hashcode and dumped into a bucket where it can be consulted as quickly as an integer would. The only difference is whether you want the deployment folks to hate you or not.

Posted by: Ben Brumfield at March 20, 2005 10:10 PM

A more commonly cited set of confused concepts are inheritance, encapsulation, and when to use each.

java.util.Properties is a notorious example of the use of inheritance when encapsulation is far more appropriate.

Posted by: Ben Brumfield at March 21, 2005 06:55 AM

That OO stuff is fascinating. I wish I had enough time these days to sit down with Design Patterns on a rainy Sunday and geek out.

Posted by: Alan Hogue at March 21, 2005 09:29 AM