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.
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
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
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
*
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.
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.
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.
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.
(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.)
You can follow @hillelogram.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.