3 ms·
When I was younger and more naive I used to think almost every code I ever saw sucked, but especially if it had any of the following characteristics: - Indente
by arnorhs 16y ago
When I was younger and more naive I used to think almost every code I ever saw sucked, but especially if it had any of the following characteristics:
- Indented in another way than I preferred to or the format was in some way not the way I do it (camelCaps, spaces around parenthesis.
- The code was doing to much in a single line. Preventing readability, etc.
- It had inline HTML or just anything less than 100% separation of code and presentation.
- I didn't understand it
These days I almost never think anything sucks, even though it's written by some beginner right out of grad school. However there are exceptions and now the things that make my dislike some code might have something like:
- Big huge functions that do too much without splitting it up into smaller chunks
- Things done in many lines of code that can be done in a single line [in a simpler/faster way].
- Obvious slowdowns, such as way too many SQL queries than needed, for loops that go through 10,000 cycles when you can get the same result in 15 cycles, etc.
I'm guessing in the future it will be something else entirely that I will look at and vomit. And it will most probably be my own code.