"Of all the cruel tricks in software engineering, this has to be the cruelest. Most of us entered this field because the machines are so much more logical than people. And yet, even when you're writing code explicitly intended for the machine, you're still writing for other people. Fallible, flawed, distracted human beings just like you. And that's the truly difficult part." https://blog.codinghorror.com/coding-its-just-writing/
Coding: It's Just Writing

In The Programming Aphorisms of Strunk and White, James Devlin does a typically excellent job of examining something I've been noticing myself over the last five years: The unexpected relationship between writing code and writing. There is perhaps no greater single reference on the topic of writing than Strunk and

Coding Horror
@codinghorror It's a little more than "just writing", particularly when you get down to lower level machine language.
More than writing? What aspects are more?

@codinghorror There was a large bit of code I wrote about ten years ago for what was then a personal work project. It was "clever" in a way that I really enjoyed while writing. It was only when it went from my personal project to a core library that hundreds of engineers at my company depended on that I realized that all that "cleverness" was antithetical to clarity.

I knew this when I was writing it, but dismissed those thoughts because I thought I'd be the only user.

Lesson learned

@ucblockhead @codinghorror We always think our code is for the purpose we intended -- but any code that works doesn't stop there -- it is pulled and stretched into new uses and contexts

@codinghorror Coding, engineering, and mathematics are difficult precisely because they are a deeply human and artistic endeavor. There's no way around it.

The best programmers and engineers I know have a deeply nourished and cherished artistic side to themselves. I see a lot of people calling it their escape from work, but I actually think it's one of the most important aspects that makes us good *at* that work

Machines may be logical, but the expression of that logic is an art, and I love it

@hazelweakly @codinghorror I think this is also why burn out can affect some people more than others.

When the expression of logic is part of one's mental world to navigate everyday, it can be physically painful to have to work with ugly/wrong abstractions.

The art I do in my own time is free from corporate constraints and as a result any related code can be beautiful, in the same way as an elegant mathematical proof.

@codinghorror This is a great point.

I'd add to that if you're an experienced dev, your code still needs to be read _and understood_ by your teammates, who might be junior or new to the language, so nowadays I tend to write far simpler, longer code avoiding ā€œneat tricksā€ of the language, even if it results in my code looking less ā€œsmartā€ and ā€œidiomaticā€. The same goes for technical writing, I'm avoiding idioms, colloquialisms, references etc, that non-native speakers might not understand.

@codinghorror this is why one of my favourite books is still If Hemingway Wrote JavaScript. A perfect example of how the literature we read shapes the code we write.
@fnordius https://basketrandom.io I produced a significant amount of code for a personal project around 10 years ago. I had a great time composing it since it was "clever" in a manner.
Basket Random

Basket Random is one of the most exciting sports games for basketball fans. If you are sure of your hitting ball talent, now is the time to show yourself!

Basket Random
@codinghorror "you're still writing for other people" – 100%, and what's more: one of those 'other people' is you, six months down the line, who's done ten other things since and can't remember the code…
On The Meaning of ā€œCoding Horrorā€

In a recent web search, I found the following comment in a programming.reddit.com thread from eight months ago, completely by accident: I think prog.reddit will continue to move in phases... a couple of days ago, someone complained about a drop-off in Haskell articles, today there were 4

Coding Horror