Skip to: Site menu | Main content

Email LinkedIn

Blog...

One field, One piece of data.

Today I ran across some old code that reminded me why being "clever" can get you into trouble. The code basically collects a bunch (over 30) data fields that are submitted via a web form. At the time the client was continually adding new data points. In an effort to make adding new data points easier we began to place a delimited list of key/value pairs into a single text field in the database. What a great idea! Now we don't have to add a new field to the table every time we add one to the form......Wrong! Today the client asked for the ability to sort/search on one of those data points. Something that should have been as easy as adding an ORDER BY clause to my query has turned into a refactoring job.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)