Edit: typo
Ask HN: How do you find the "why" behind old code decisions?
21–30 of 44 posts
Re: Ask HN: How do you find the "why" behind old code decisions?
#22In some cases there are many options and great talent is readily working on the problem for the given organization. Its nice to have options, but this is an exceedingly rare scenario. For example there are tons of options available today, but from reading HN job posts it looks like the answer is still a CRUD app that does some SAAS solution with React, AI, and Python. I could guess that and be right more than 60% of the time, which is extraordinary considering these businesses have thousands of technology combinations and unlimited ideas to pick from. Its all about the talent available, but when I say talent I just mean people because when you are that restricted it isn't very talented.
Re: Ask HN: How do you find the "why" behind old code decisions?
#23Re: Ask HN: How do you find the "why" behind old code decisions?
#24If the requirement was never documented or lost, then you can only deduce it like Sherlock Holmes.
Low level answer is always- because this is the best way current developer could come up with given the organizational context and his level of experience.
Re: Ask HN: How do you find the "why" behind old code decisions?
#25Then the answer is just one prompt away… (I wish our team was more committed to 2 - will push for it more in the future). Having acceptance criteria in stories linked at the start of each sprint is so important though I think for alignment of work.
Re: Ask HN: How do you find the "why" behind old code decisions?
#26Commit logs, slack/email/etc, documentation silos, or issue trackers are your best bet, other than actually being able to talk to the author(s) of the code.
But in general, the decision was made because in the time the developer had to implement the feature or fix, this was the best solution they could come up with. Hopefully if there were clear tradeoffs, there is some comment as to what they might have done with more time. Likely though they were rushed, told their team they wanted to go back and fix this, and then were ushered into a new project the second this one stabilized.
I think gghhjnuhbb has the best alternative to finding actual documentation and that is sitting and putting yourself in their headspace. That can sometimes lead to insights you might have missed.
Re: Ask HN: How do you find the "why" behind old code decisions?
#27Now with AI it’s a lot easier to ask the bot to put together the reason behind this or that by sharing commit history.
Re: Ask HN: How do you find the "why" behind old code decisions?
#28Re: Ask HN: How do you find the "why" behind old code decisions?
#29Most of the time I don't know why something was done a particular way .