| ▲ | analog31 4 days ago |
| Where are the junior devs while their code is being reviewed? I'm not a software developer, but I'd be loath to review someone's work unless they have enough skin in the game to be present for the review. |
|
| ▲ | tyrust 4 days ago | parent | next [-] |
| Code review is rarely done live. It's usually asynchronous, giving the reviewer plenty of time to read, digest, and give considered feedback on the changes. Perhaps a spicy patch would involve some kind of meeting. Or maybe in a mentor/mentee situation where you'd want high-bandwidth communication. |
| |
| ▲ | throwaway314155 4 days ago | parent | next [-] | | My first job did IRL code reviews with at least two senior devs in the loop. It was both devastating and extremely helpful. | | |
| ▲ | SoftTalker 4 days ago | parent [-] | | Yeah when we first started, "code review" was a weekly meeting of pretty much the entire dev team (maybe 10 people). Not all commits were reviewed, it was random and the developer would be notified a couple of days in advance that his code was chosen for review so that he could prepare to demo and defend it. | | |
| ▲ | necovek 4 days ago | parent [-] | | Wow, that's a very arbitrary practice: do you remember roughly when was that? I was in a team in 2006 where we did the regular, 2-approve-code-reviews-per-change-proposal (along with fully integrated CI/CD, some of it through signed email but not full diffs like Linux patchsets, but only "commands" what branch to merge where). | | |
| ▲ | SoftTalker 4 days ago | parent | next [-] | | Around that time frame. We had CI and if you broke the build or tests failed it was your job to drop anything else you were doing and fix it. Nothing reached the review stage unless it could build and pass unit tests. | | |
| ▲ | necovek 4 days ago | parent [-] | | Right, we already had both: pre-review build & test runs, and pre-merge CI (this actually ran on a temp, merged branch). |
| |
| ▲ | marwamc 4 days ago | parent | prev [-] | | This was still practice at $BIG_FINANCE in the couple of years just before covid, although by that point such team reviews were reducing in importance and prominence. |
|
|
| |
| ▲ | jopsen 4 days ago | parent | prev [-] | | Doing only IRL code reviews would certainly improve quality in some projects :) It's probably also fairly expensive to do. | | |
| ▲ | jghn 4 days ago | parent | next [-] | | Am old enough that this was status quo for part of my career, and have also been in some groups that did this as a rejection of modern code review techniques. There are pros & cons to both sides. As you point out it's quite expensive in terms of time to do the in person style. Getting several people together is a big hassle. I've found that the code reviews themselves, and what people get out of them, are wildly different though. In person code reviews have been much more holistic in my experience, sometimes bordering on bigger picture planning. And much better as a learning tool for other people involved. Whereas the diff style online code review tends to be more focused on the immediate concerns. There's not a right or wrong answer between those tradeoffs, but people need to realize they're not the same thing. | |
| ▲ | Ekaros 3 days ago | parent | prev | next [-] | | I would guess that 3 part code review would actually be most effective. Likely even save on costs. First part is walkthrough on call, next independent review and comments. Then per need an other call over fixes or discussion. Probably spend more time on it, but would share the understanding and alignment. | |
| ▲ | comprev 4 days ago | parent | prev | next [-] | | Pair programming? That is realtime code review by another human | |
| ▲ | stephen_cagle 4 days ago | parent | prev | next [-] | | And yet... is it? Realtime means real discussion, and opportunity to align ever so slightly on a common standard (which we should write down!), and an opportunity to share tacit knowledge. It also increases the coverage area of code that each developer is at least somewhat familiar with. On a side note, I would love if the default was for these code reviews to be recorded. That way 2 years later when I am asked to modify some module that no one has touched in that span, I could at least watch the code review and gleem something about how/why this was architect-ed the way it was. | | |
| ▲ | lokar 4 days ago | parent [-] | | IMO, a lot of what I think you are getting at should be worked out in design before work starts. |
| |
| ▲ | colinb 4 days ago | parent | prev [-] | | Fagan inspection has entered the room |
|
|
|
| ▲ | ok_dad 4 days ago | parent | prev | next [-] |
| A senior dev should be mentoring and talking to a junior dev about a task well before it hits the review stage. You should discuss each task with them on a high level before assigning it, so they understand the task and its requirements first, then the review is more of a formality because you were involved at each step. |
| |
| ▲ | marwamc 4 days ago | parent [-] | | Also communal RFCs, RFPs, Roadmapping, Architecture/Design Proposals, Design Docs and/or Reviews help socialize/diffuse org standards and expectations. I found these help ground the mentorship and discussions between junior-senior devs. And so even for the enterprising aka proactive junior devs who might start working on something in advance of plans/roadmaps, by the time they present that work for review, if the work followed org architectural and design patterns, the review and acceptance process flows smoothly. In my juinior days I was taught: if the org doesn't have a design or architectural SOP for the thing you're doing, find a couple of respectable RFCs from the internet, pick the three you like, and implement one. It's so much easier to stand on the shoulders of giants than to try and be the giant yourself. |
|
|
| ▲ | groby_b 4 days ago | parent | prev | next [-] |
| I think we've moved on from the times where you brought a printout to the change control board to talk it through. |
| |
|
| ▲ | stuaxo 4 days ago | parent | prev | next [-] |
| Git PRs work on async model for reviews. |
| |
| ▲ | DrewADesign 4 days ago | parent [-] | | And even then, in my experience, they work more like support tickets than business email, for which there are loose norms for response time, etc. Unless there’s a specific reason it needs to be urgently handled, people will prioritize other tasks. |
|
|
| ▲ | rootusrootus 4 days ago | parent | prev [-] |
| As someone else mentioned, the process is async. But I achieve a similar effect by requiring my team to review their own PRs before they expect a senior developer to review them and approve for merging. That solves some of the problem with people thinking it's okay to fire off a huge AI slop PR and make it the reviewer's responsibility to see how much the LLM hallucinated. No, you have to look at yourself first, because it's YOUR code no matter what tool you used to help write it. |
| |
| ▲ | muzzio 4 days ago | parent | next [-] | | Reviewing your own PR is underrated. I do this with most of my meaningful PRs, where I usually give a summary of what/why I'm doing things in the description field, and then reread my code and call out anything I'm unsure of, or explain why something is weird, or alternatives I considered, or anything that I would catch reviewing someone else's PR. It makes it doubly annoying though whenever I go digging in `git blame` to find a commit with a terrible title, no description and an "LGTM" approval though. | |
| ▲ | unbalancedevh 4 days ago | parent | prev | next [-] | | > requiring my team to review their own PRs before they expect a senior developer to review them I'm having a hard time imagining the alternative. Do junior developers not take any pride in their work? I want to be sure my code works before I submit it for review. It's embarrassing to me if it fails basic requirements. And as a reviewer, what I want to see more than anything is how the developer assessed that their code works. I don't want to dig into the code unless I need to -- show me the validation and results, and convince me why I should approve it. I've seen plenty of examples of developers who don't know how to effectively validate their work, or document the validation. But that's different than no validation effort at all. | | |
| ▲ | rootusrootus 4 days ago | parent | next [-] | | > Do junior developers not take any pride in their work? Yes. I have lost count of the number of PRs that have come to me where the developer added random blank lines and deleted others from code that was not even in the file they were supposed to be working in. I'm with you -- I review my own PRs just to make sure I didn't inadvertently include something that would make me look sloppy. I smoke test it, I write comments explaining the rationale, etc. But one of my core personality traits (mostly causing me pain, but useful in this instance) is how much I loathe being wrong, especially for silly reasons. Some people are very comfortable with just throwing stuff at the wall to see if it'll stick. | | |
| ▲ | alfons_foobar 4 days ago | parent | next [-] | | > added random blank lines and deleted others from code that was not even in the file they were supposed to be working in. Maybe some kind of auto-formatter? | | |
| ▲ | rootusrootus 4 days ago | parent [-] | | That is my charitable interpretation, but it's always one or two changes across a module that has hundreds, maybe thousands of lines of code. I'd expect an auto-formatter to be more obvious. In any case, just looking over your own PR briefly before submitting it catches these quickly. The lack of attention to detail is the part I find more frustrating than the actual unnecessary format changes. | | |
| ▲ | Aeolun 4 days ago | parent [-] | | Why would you are about blank lines? Sounds like aborted attempts at a change to me. Then realizing you don’t need them. Seeing them in your PR, and figuring they don’t actually do anything to me. | | |
| ▲ | baq 4 days ago | parent [-] | | More likely artifact of debug prints being removed. |
|
|
| |
| ▲ | ok_dad 4 days ago | parent | prev [-] | | > Yes. I have lost count of the number of PRs that have come to me where the developer added random blank lines and deleted others from code that was not even in the file they were supposed to be working in. That’s not a great example of lack of care, of you use code formatters then this can happen very easily and be overlooked in a big change. It’s also really low stakes, I’m frankly concerned that you care so much about this that you’d label a dev careless over it. I’d label someone careless who didn’t test every branch of their code and left a nil pointer error or something, but missing formatter changes seems like a very human mistake for someone who was still careful about the actual code they wrote. | | |
| ▲ | hoten 4 days ago | parent [-] | | I think the point is that a necessary part of being careful is reviewing the diff yourself end-to-end right before sending it out for review. That catches mistakes like these. | | |
| ▲ | code_for_monkey 4 days ago | parent [-] | | i myself have been guilty of creating a pr and immediately pushing a commit to clean that stuff up |
|
|
| |
| ▲ | jjmarr 4 days ago | parent | prev | next [-] | | Many are just doing SWE for the money. Their goal is to pass the hot potato to someone else, so they can say in the standup "oh I'm waiting on review" making it not their problem. | |
| ▲ | epiccoleman 4 days ago | parent | prev | next [-] | | > I want to be sure my code works before I submit it for review. No kidding. I mean, "it works" is table stakes, to the point I can't even imagine going to review without having tested things locally at least to be confident in my changes. The self-review for me is to force me to digest my whole patch and make sure I haven't left a bunch of TODO comments or sloppy POC code in the branch. I'd be embarrassed to get caught leaving commented code in my branch - I'd be mortified if somehow I submitted a PR that just straight up didn't work. | |
| ▲ | lokar 4 days ago | parent | prev | next [-] | | It’s cultural. It always seemed natural to me, until I joined a team that treated review as some compliance checkbox that had nothing to do with the real work. Things like real review as an important part of the work requires a culture that values it. | |
| ▲ | tqian 4 days ago | parent | prev [-] | | Oh junior devs submit PRs that don't fully work all the time. |
| |
| ▲ | theshrike79 4 days ago | parent | prev [-] | | We have an AI doing the first pass PR review using company standards as a prompt. It catches the worst slop in the first pass easily, as well as typos etc. |
|