28 Jul Meme Monday For August
Next Monday is the first Monday of the month, which means one thing: Meme Monday!
This time around we are looking for people to blog about the worst pieces of code they have seen. They can submit something written by themselves, by a coworker, or by a vendor (wink, wink, nudge, nudge). Anything is fair game, just be respectful when you do your posts. The point of Meme Monday is not to belittle, it is to encourage you to get some writing done. So, what would constitute a piece of “crappy code”? Great question!
Here is my example:
CREATE TABLE [Table1] (col1 nvarchar(50), col2 nvarchar(50))
Why would the above code be crap? Well, for starters, the name of the table is ‘Table’, which is probably not very helpful for people to understand anything about what the data inside the table represents. Likewise for the use of ‘col1′ and ‘col2′ for column names. Those are not very descriptive, and most likely representative of a database design that is not normalized. Lastly, the nvarchar(50) is typically an indication that someone built the table by accepting default values inserted by a tool (such as Visual Studio).