Hacker News new | past | comments | ask | show | jobs | submit login

IMHO #11 could be added as "unindented code". I was going to a guy's code yesterday and I felt very _irritated_ to read it, that i ended up spending 15min indenting it myself. I'm sure a lot of people don't like unindented code.

and I totally agree with #1, it's very true for me. And especially when I've used some framework and the framework has been updated to a newer version with lots of goodies, i feel lazy to maintain code that been written in older version of the framework. (and even more lazier to update it to the new framework if it requires lots of changes). I just leave it working fine in it's current state. Seems like thats what results in legacy software. So I now follow my new rule-- working on beta versions of frameworks so that i can leave it unmaintained for longer time and spend the time on new ideas.




I'll do you one better. Something I found in a legacy codebase: reverse camel case code. Imagine rEADING tHIS aLLdAY. I felt like I was being partially yelled at all day while debugging.


Do you not have an editor/IDE that can automatically format code for you? Both Visual Studio and Eclipse can do this, and editors like Vim or Emacs can too.


I have someone on my team who uses SlickEdit, and it messes up all the indentations when I look at the same code in Eclipse. I have to spend a few minutes reformatting it every time he makes changes to the code, and it's a real pain.


Have you tried ctrl+shift+f in Eclipse?


Just noticed your reply now. Thanks a lot! That'll save me a lot of time :-)


I knew a physicist who only programmed C++ in notepad. He was having some problem with some multiple-body simulation he was working on, and I took one look at his code and told him to paste it into Gedit or Notepad++ or something (since he was a die-hard anti-Emacs/Vim zealot.) He refused, couldn't figure it out, did an "exact transliteration" of his code into Python and suddenly it worked.


Also, some editors have their own rule for how many spaces a tab makes - some use 3 and some use 4 - or if you're like my designer co-worker, you manually use the space bar arbitrary. Gave me a big headache when looking for matching css selectors.




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

Search: