One of my most controversial software opinions is that your sleep quality and stress level matter far, far more than the languages you use or the practices you follow. Nothing else comes close: not type systems, not TDD, not formal methods, not ANYTHING.
Allow me to explain why.
Allow me to explain why.
Name anything technical that "improves software", and I guarantee you the empirical results are mixed. They may have evangelists, but the actual, rigorous research, the trials and case studies and ethnographies, will see, at best, a weak signal. Most likely it's inconclusive.
Take choice of language: large Github scale studies don't see evidence it reduces defects that much: https://arxiv.org/pdf/1901.10220.pdf
TDD? Results are mixed. It might trade effort for defects ( http://www.sserg.org/publications/uploads/04b700e040d0cac8681ba3d039be87a56020dd41.pdf)... or maybe it doesn't reduce defects at all! http://softwareprocess.es/pubs/borle2017EMSE-TDD.pdf
TDD? Results are mixed. It might trade effort for defects ( http://www.sserg.org/publications/uploads/04b700e040d0cac8681ba3d039be87a56020dd41.pdf)... or maybe it doesn't reduce defects at all! http://softwareprocess.es/pubs/borle2017EMSE-TDD.pdf
Clean Code? Helps a bit with adding features but might make debugging harder https://www.duo.uio.no/bitstream/handle/10852/51127/master.pdf?sequence=1
Design by Contract? Good luck finding any empirical studies on it.
Code Review? Okay this one is actually really effective
Design by Contract? Good luck finding any empirical studies on it.
Code Review? Okay this one is actually really effective
Now you might argue that the studies are flawed, or there's too much variation, or the effects only appear in different contexts. Those responses, though, concede one of
* $thing only helps in specific contexts
* The benefits are minor at best
*
* $thing only helps in specific contexts
* The benefits are minor at best
*
But maybe the benefits are obvious and dramatic, but we somehow can't study knowledge working! Or maybe _any_ kind of benefit in SE would be subtle.
Except.
_Except._
There are some things we know have obvious, overwhelming impacts in ALL kinds of fields.
Things like sleep.
Except.
_Except._
There are some things we know have obvious, overwhelming impacts in ALL kinds of fields.
Things like sleep.
After 24 hours awake, novice software devs lost half of their dev skills: https://arxiv.org/pdf/1805.02544.pdf
Chronically getting less than 7 hours of sleep causes dramatic degradation on all mental tests: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2656292/
People can't tell when SD degrades their ability (ibid).
Chronically getting less than 7 hours of sleep causes dramatic degradation on all mental tests: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2656292/
People can't tell when SD degrades their ability (ibid).
Overwork also has a dramatic effect:
If you do 50 hours of work a week, after 8-10 weeks you're less productive per week than someone doing 40 hpw: http://web.archive.org/web/20090824001133/http://www.curt.org/pdf/156.pdf
Gamedev teams in "crunch mode" perform worse for no benefit: http://gamasutra.com/blogs/PaulTozour/20150120/234443/The_Game_Outcomes_Project_Part_4_Crunch_Makes_Games_Worse.php
If you do 50 hours of work a week, after 8-10 weeks you're less productive per week than someone doing 40 hpw: http://web.archive.org/web/20090824001133/http://www.curt.org/pdf/156.pdf
Gamedev teams in "crunch mode" perform worse for no benefit: http://gamasutra.com/blogs/PaulTozour/20150120/234443/The_Game_Outcomes_Project_Part_4_Crunch_Makes_Games_Worse.php
Stress levels tank productivity: https://www.cdc.gov/niosh/docs/99-101/#Stress,%20Health,%20and%20Productivity
Happy developers solve problems faster: http://neverworkintheory.org/2014/05/01/happy-sw-devs-solve-problems-better.html
These findings span all groups and all industries. And this is just cold-blooded _productivity_. There are even bigger impacts on health and well-being.
Happy developers solve problems faster: http://neverworkintheory.org/2014/05/01/happy-sw-devs-solve-problems-better.html
These findings span all groups and all industries. And this is just cold-blooded _productivity_. There are even bigger impacts on health and well-being.
On one side, we have vast troves of papers in many different contexts showing dramatic impact of sleep, workload, and stress levels on our competence and productivity.
On the other hand, we have precious few tool/method studies that all find no benefit or are inconclusive.
On the other hand, we have precious few tool/method studies that all find no benefit or are inconclusive.
To me, this is beautiful. It elevates us. Our most precious gift is the capacity to think. Our limits are not defined by whether we prefer Rust to Haskell or Scrum to Kanban, but how much we're burdened by stress and sleep deprivation.
No method, tool, language, matters nearly as much our own minds. If you want to write good code, be human. Be healthy. Nothing else comes close.
...Except for code review. That still holds up.
...Except for code review. That still holds up.
(PS: obvs this is not totally in our control: stress comes from many places, many people have health problems, etc. But the company has a choice on whether to realize the benefits of a good workplace or destroy its own productivity in the name short-term profits.)
Ok so since this is going around again, I wrote a much more in-depth piece on this at @IncrementMag https://increment.com/teams/the-epistemology-of-software-quality/
Since this is going around again again, here's a 40 minute talk on it with copious references https://www.hillelwayne.com/talks/what-we-know-we-dont-know/
Also this piece on how why the evidence is so mixed, as seen through a high-profile debunking of a debunking of a debunking https://www.hillelwayne.com/post/this-is-how-science-happens/