Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Only for a drive-by take-down by someone with none of the context.

Then write it down. If the code reviewer can't follow what's going on, what hope is there for the new hire looking at it six months from now?



Because looking through 6 month old prs are what new hires are doing to learn the codebase?


Running through `git blame` and looking at the commit message, the PR, and the PR comments is a very practical way to learn about a codebase! Beyond some high level code organization stuff that exists in a readme, learning a codebase is really about getting a history lesson of how the product evolved, the company pivoted, and the team re-org'd.

It'll be 6-months if you're lucky. Try figuring out why there's a particular "if" clause, one or two or four years later. Software maintenance, especially when the original author has moved onto another team/organization/company/career, is a frustrating art of almost remembered stories and hoping that you can figure out Chesterton's fence, lest it become Chesterton's barbed wire. The worst is when you fix a small bug with code and introduce an even bigger big in the process.


Not necessarily looking through PRs, but presumably they need to work with actual code in your code base that was merged at some point, unless your product is growing so fast that new people just write new code all the time? (Same applies for not-new coworkers that now need to touch that code area anyways)


Sure. If they are good and have a decent grasp of using version control then will look at the history of a certain piece of code if they don't understand why it is the way it is. I do it often, even when I'm no longer a new hire.


That is one of the things I do to learn new codebases.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: