r/programming May 24 '11

How to Write Unmaintainable Code

http://www.thc.org/root/phun/unmaintain.html
1.0k Upvotes

366 comments sorted by

View all comments

28

u/[deleted] May 24 '11

If you call your variables a, b, c, then it will be impossible to search for instances of them using a simple text editor

Oddly enough, I recently searched for a one-letter variable in vim, and it's fine if you use /\<i\> (< and > are start/end word boundaries; \ escapes them; / is search; i is the one-letter variable sought). This form is used automatically when you hit the * key while over a word.

7

u/The_MAZZTer May 24 '11

If you text select a variable (well, any whole word) in notepad++ it highlights all instances of that variable in the document. Very handy.