Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

OK, I'll start: When I write code, I spend a fair amount of time on making sure it's readable (e.g. StyleCop compliant on the first pass, well-commented, human friendly abstractions) and it's not for aesthetics. It's so the next poor bastard who has to change it doesn't have to stay up all night inferring my intentions from a bunch of one-letter variables. There's usually no "back of the cabinet" where I can safely cut corners.

Relevant: http://media.gettyimages.com/photos/cooking-oil-containers-a...



And don't forget that "the next poor bastard" might be yourself, 6 months later, after having forgotten all the details about the code.


The place to cut might be somewhere else (like leaving out unnecessary features or abstractions).

The original post is just giving us a metaphor - you need to decide how it applies.


"unnecessary ... abstractions"

This is what I thought of when the artice said "visible toolmarks". An abstraction layer missing/not fully implementer exposing "ugly" plumbing code.


As a maintainer, I both adore and prefer one-letter variable names when appropriate - loop indices for old crufty array index oriented languages, temporary variables that all references can be seen on one page, that sort of thing.


Cool, you sound amazing. I'm tasked with maintaining an old part of the app now and would appreciate hearing how you feel this way


It's just Stockholm syndrome.

a one-letter variable name does communicate "this variable is of no consequence, it works like an index register works in assembly, and you should be able to prove it correct by inspection. Wish it had a "foreach"... "

plus, I read a lot of signals code - filters, tranforms, where the one-letter names are translations from formulae. It's "you can write Fortran in any language" code.

Celebrate the diversity.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: