The Representative Line is one of my favorite ways of presenting a titanic (an adjective chosen for more than its synonymity with "frickin' huge") application. Today's single line of code comes from a large web-based application that John F has come to maintain. Like other Representative Lines, the more you look and analyze it, the more you know about the system and the pain that John and his colleagues go through each day. This line was discovered (actually 23 instances of it) while trying to fix a bug reported by a new user of the system ...

if (sLogin == "O'Reily") sLogin = "O''Reily";

And the new user? His name was Robert O'Hare.

 

 

Note: My appologies to those unfamiliar with database application development. I've left a brief explanation in the comments.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!