From 04ae4f8b97643ea970dca472edbdcecdc6e6ccd6 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Tue, 16 Jul 2019 12:15:27 -0300 Subject: [PATCH] New chapter: code reviews are not for style --- content/books/things-i-learnt/_index.md | 1 + .../code-reviews-style/index.md | 32 +++++++++++++++++++ .../right-tool-obvious/index.md | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 content/books/things-i-learnt/code-reviews-style/index.md diff --git a/content/books/things-i-learnt/_index.md b/content/books/things-i-learnt/_index.md index 1b2c827..a9dc0b5 100644 --- a/content/books/things-i-learnt/_index.md +++ b/content/books/things-i-learnt/_index.md @@ -63,3 +63,4 @@ template = "section-contentless.html" * [Understand And Stay Away From Cargo Cult](cargo-cult) * ["Right Tool For The Job" Is Just To Push An Agenda](right-tool-agenda) * [The Right Tool Is More Obvious Than You Think](right-tool-obvious) + * [Code Reviews Are Not For Style](code-reviews-style) diff --git a/content/books/things-i-learnt/code-reviews-style/index.md b/content/books/things-i-learnt/code-reviews-style/index.md new file mode 100644 index 0000000..b734927 --- /dev/null +++ b/content/books/things-i-learnt/code-reviews-style/index.md @@ -0,0 +1,32 @@ ++++ +title = "Things I Learnt The Hard Way - The Right Tool Is More Obvious Than You Think" +date = 2019-07-16 + +[taxonomies] +tags = ["en-au", "books", "things i learnt", "code reviews", "code style"] ++++ + +When doing code reviews, do not focus on style; focus on design things that +look a bit weird. + + + +Code reviews are designed to spread knowledge around the team, with focus on +construction and problem description. Does the sequence of code gives you an +understanding on what it is trying to do? Does it contains something you know +it will make things harder to read in the future? Does it miss the point? + +That's the things you should focus. + +If the author of the code missed a space here, left a blank line there... +that's of no consequence in a code review. This is not the thing to discuss in +the code review. + +And people _hate_ people who go through code reviews just to point +missing/extra spaces and lines. + +On the other hand, if you find something weird in the code which is something +you want the author to recheck, _then_ you're free to comment that "it would +be good" if they fix the style. But that's it. + +{{ chapters(prev_chapter_link="/books/things-i-learnt/right-tool-obvious", prev_chapter_title="The Right Tool Is More Obvious Than You Think") }} diff --git a/content/books/things-i-learnt/right-tool-obvious/index.md b/content/books/things-i-learnt/right-tool-obvious/index.md index f72d22d..5c68f9b 100644 --- a/content/books/things-i-learnt/right-tool-obvious/index.md +++ b/content/books/things-i-learnt/right-tool-obvious/index.md @@ -26,4 +26,4 @@ One of the reason your hero project may fail is because of this: You may even prove that what you thought it was a better solution is actually a better solution, but it can't be applied 'cause nobody else can maintain it. -{{ chapters(prev_chapter_link="/books/things-i-learnt/right-tool-agenda", prev_chapter_title="Right Tool For The Job Is Just To Push An Agenda") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/right-tool-agenda", prev_chapter_title="Right Tool For The Job Is Just To Push An Agenda", next_chapter_link="/books/things-i-learnt/code-reviews-style", next_chapter_title="Code Reviews Are Not For Style") }}