[pv] I’ve been pointed back

[pv] I’ve been pointed back to the pages of How To Write Unmaintainable Code – one of the pointers is on how to create variable names that are hard to understand:

Obscure film references : Use constant names like LancelotsFavouriteColour instead of blue and assign it hex value of $0204FB. The color looks identical to pure blue on the screen, and a maintenance programmer would have to work out 0204FB (or use some graphic tool) to know what it looks like. Only someone intimately familiar with Monty Python and the Holy Grail would know that Lancelot’s favorite color was blue. If a maintenance programmer can’t quote entire Monty Python movies from memory, he or she has no business being a programmer.

Leave a Reply

Your email address will not be published. Required fields are marked *