12
« on: July 09, 2012, 12:02:40 pm »
Things that piss me off the most are coders choosing to intentionally use an endianness that is non native on the system in question. Not only does it impact performance somewhat, it also makes code harder to read when you go against the grain. I can only guess that these kinds of people just couldn't wrap their head around little endian.
Zero length branches and jumps used to irritate me more, but then I realized that they were probably written around code that didn't make it to the final binary, either due to comments or assemble time mechanisms (like #ifdef / #ifndef in CPP).
Some of the dumber things I've seen I've chalked up to macros, such as code that performs arithmetic operations to build up a constant. Example:
lda #$0030
add #$0100
ora #$8000
instead of:
lda #$8130
The truly unforgivable sins are those that impact performance in a strong way without incurring some kind of other benefit. In particular, I despise code that is heavy on comparisons and branches where a lookup table and / or jump table would have been more appropriate (and smaller!).