Most upvoted comment
Most popular programming book on Reddit. rank no. 1
Just got fired from my dream company in 2 months for performance reasons , after preparing for almost half an year(r/cscareerquestions)
You ‘gamed’ the interview, but not the job.
For companies who care about code-quality and maintainability, a single ‘messy’ coder can cause hell, and be of negative value (a cost). As one who is meticulous with their code quality, nothing is more infuriating than working with someone who lacks attention to detail. All of my hard work can be undermined quickly. Cleaning up after someone, or babysitting someone who refuses to learn from code-reviews is NOT something I want to do.
On a recent project, I had another ‘peer’ coding the backend with me. Code reviews were infuriating, because his code was verbose, imprecise, terrible naming, misplaced packages, terribly organized, and more. I’d call it out in every code-review, but he’d never fix it. The only thing he ever tested was serializers and deserializers.
The instant he was moved to another project, I proceeded to delete and refactor his code, replacing about 5000 lines with about 500 lines in about 3 days. That’s not an exaggeration, that’s what git stats says.
How to have better Attention to Detail?
It helps to know what good/clean code looks like. Read Clean Code by Robert Martin, or a similar book.
Next, code-review all of your own code carefully before creating a pull-request. Personally, I typically, code-review the entire diff at least TWICE. It helps to use an IDE, which can detect things like unused methods. Even though I try to code-clean, I might make a method II don’t need, or discover something half way though, and only catch the ”stupidity’ later.
Pay attention to code-review feedback. Few people mind correcting a person once. Most distaste correcting a person more than once. That’s not to say code-review feedback is always right, but if it is, you better pay attention.
It also helps significantly to take your time in the analysis phase, learning as much as you can before you start writing code. If you discover a more efficient or clean way to implement something along the way, it can save you a lot of time, both now, and in the future.