Skip to content

Commit 79e0da8

Browse files
committed
New Article: The Hangover test
1 parent fcdfacc commit 79e0da8

3 files changed

Lines changed: 30 additions & 0 deletions

File tree

docs/.vuepress/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export default defineUserConfig({
8989
{
9090
text: "Lessons",
9191
children: [
92+
"/lessons/TheHangoverTest.md",
9293
"/lessons/ProductivityAndWellBeing.md",
9394
"/lessons/AtomicGitCommits.md",
9495
"/lessons/HowToLearnGit.md",

docs/lessons.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ footer: CC-BY-4.0 Licensed | Copyright © 2018-present by Samuel Faure <3
66

77
# Lessons
88

9+
- [🍻 Does your Pull Request pass the Hangover test?](/lessons/TheHangoverTest.md)
910
- [📈 Productivity and Well-being, A summary of what works.](/lessons/ProductivityAndWellBeing.md)
1011
- [⭐Dramatically increase your productivity with Atomic Git Commits](/lessons/AtomicGitCommits.md)
1112
- [🧑‍💼 How to Learn Git Slowly](/lessons/HowToLearnGit.md)

docs/lessons/TheHangoverTest.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: 🍻 Does your Pull Request pass the Hangover test?
3+
description: A short reminder about what Programming is about - reducing complexity.
4+
footer: CC-BY-4.0 Licensed | Copyright © 2018-present by Samuel Faure <3
5+
---
6+
7+
# 🍻 Does your Pull Request pass the Hangover test?
8+
9+
This is a short reminder about what Programming is.
10+
11+
Programming has and will always be about reducing complexity first and foremost.
12+
13+
If you ask a coworker to review your pull request, always ask yourself: does it pass the Hangover test?
14+
15+
Can your coworker turn on his computer after having drank too much the previous evening and still be able to understand your code with minimal effort?
16+
17+
It's always easy to write complex code on a good day. Complexity is easy to write; simplicity is not. Just because you had an easy time writing it on that day doesn't mean it's simple enough for someone else to understand it on a bad day.
18+
19+
Because you don't write code for writing it, you write it for it to be read - it will be written once but read 50 times or more.
20+
21+
If you're not writing for Hangover Coworker, you're making your life -and the life of every colleague, present and future- harder.
22+
23+
Remember that Complex code is not a sign of intelligence, it's a sign of sloppiness.
24+
25+
So can someone kill their brain cells with too much alcohol and the next morning still make sense of your code with relative ease?
26+
27+
If not, back to the drawing board 🔁 Make it better until it passes the Hangover test.
28+

0 commit comments

Comments
 (0)