|
|
|
Ask HN: Reviewing PRs in a language you don't know?
|
|
3 points
by Steppschuh
3002 days ago
|
|
I'm an Android engineer with only basic knowledge of a few languages that are not Java. I'm responsible for a project that will now also include an iOS app. I have never worked with Swift before, but of course want to make sure that the new iOS developers are building up a healthy codebase. I feel like I'll only be able to look at a higher level when reviewing their work (like architecture, patterns, etc.). I'm considering taking some Swift courses to get familiar with the language. I'm looking for tips or experiences how to deal with this situation. |
|
So I focus most of my attention on test cases. Do they cover all the edge cases we discussed in sprint planning? Now that the implementation is done, can I see any more that area necessary? How clear are the test cases?
Then I turn to the general readability of the code. Are there any strange variable names? Any complicated blocks that could be made clearer? Any strange bits of magic that could have a comment? I might also look for other common anti-patterns - duplicated code, magic numbers, dead code.
Some of this depends on the idiomatic use of the language, and the code style the team has agreed on. There will be places where you'll be wrong, and the developers will be doing the right thing, despite it looking strange to you.
But pushing people to explain their decisions can make them better developers, as they'll have to think about why they code in that way instead of "I dunno, I just did".