3 ms·
Ask HN: What Is Bad Code?
I was debugging my hobby project when I noticed several constructs like this:
1128: 14000001 b 112c
112c: 14000001 b 1130
1130: f85f03a8 ldur x8, [x29, #-16]
I couldn't help but think "What is bad code anyway?" If it runs and fails gracefully, is it good? Is it about maintainability? If it generates code like the above, is it bad or are a few wasted bytes nothing to worry about when working at a higher level?
What's your take on the distinctions we should make when reading and writing code?
- raytopia 3y agoI'd say as long as it serves its purpose it's good code. Easy to work with is another thing that's a lot harder to get right and will be debated about until the heat death of the universe.
- raytopia 3y agoPersonally I wish that people were more interested in documenting their code. Makes it a lot easier to work with.
- re-thc 3y agoSomething that you don't like and/or doesn't conform to the norms of society. Just like what is a bad person? "Bad" is fed to people culturally, via mass media, etc to stop certain behavior.
- deleted 3y ago[deleted]