After a long while, I bought an (DRM-free) ebook again
(Manning currently has a 35% discount so go get it and maybe read it along with me? https://www.manning.com/books/the-programmers-brain)
The Programmer's Brain - Felienne Hermans

With this unique book learn how to optimize your brain’s natural cognitive processes to read code more easily, write code faster, and pick up new languages in much less time.

Manning Publications
Wait‼️ Why am I just now learning that @Felienne wrote a paper title “Programming is writing is programming”⁉️ That’s so obviously my jam! https://dl.acm.org/doi/10.1145/3079368.3079413
“Research has shown that when code contains comments, programmers will take more time to read it.”

‘Beacons are parts of a program that help a programmer understand what the code does. You can think of a beacon like a line of code, or even part of a line of code, that your eye falls on which makes you think, "Aha, now I see."

Beacons typically indicate that a piece of code contains certain data structures, algorithms, or approaches.’

Turns out that all that time I spend “making the code pretty” I was just making it understandable. The question is if what I consider pretty/understandable is the same as other programmers would call pretty/understandable

“after taking a course on design patterns, the time participants needed to maintain code was lower for the code with patterns but not for the code without patterns. The results of this study indicate that gaining knowledge about design patterns, which is likely going to improve your chunking ability, helps you process code faster. You can also see in the graphs that there is a difference in effect for different design patterns: the decrease in time is bigger for the observer pattern than for the decorator pattern.”

I have no idea what the decorator pattern is, but I’m a fan of the observer and i sprinkle it everywhere whenever I can.

A tangent: I think this the magic of functional programming: you have some well defined concepts that you can mix and match. It’s hard to learn them because they are unfamiliar, not because they are difficult, but once you do, it’s easier to reason about stuff that uses them

“In summary, you remember the longest if you study over a longer period. That doesn't mean you need to spend more time studying; it means you should study at more spaced-out intervals. […] This is, of course, in stark contrast with formal education, where we try to cram all the knowledge into one semester, or with bootcamps that seek to educate people in three months.”
“[…] recent research indicates that people never really forget memories—and that it’s the retrieval strength of memories that decays over the years”

In the age of so called AI isn’t it weird I’m reading a book that teaches you how to use refactoring and state tables for the sole purpose of understanding?

Weird is good though

The point of the chapter though is that readability and maintainability aren’t the same, and readability depends on the experience of who is reading.

So, for example, I tend to dislike loops now, I think they add too much noise to what usually can be just a map + a filter call, or reduce or whatever. But before I started to learn Haskell any code using higher order functions was overly confusing for me.

I been rejecting any attempt to make languages easier to learn or more familiar based on how my own experience. Learning is uncomfortable and takes time. There’s no shortcut. If you wanna help beginners don’t be an asshole when they ask stuff. That’s 100 better than adding braces to an ML language (yes I’m still mad at ReasonML)

I have to go, but what a cliffhanger: “Sajaniemi argues that with just 11 roles, you can describe almost all variables”

This books is making me doubly down on the idea that programming sucks because programmers suck, not because programming languages sucks. We approach the discipline in a way that’s nothing rigorous at all. We call 100% coverage rigor, and that’s laughable.

If you think and LLM can write code that’s as good or better than yours, that’s on you

“When reading entirely unfamiliar code, I find it helps to print out the code on paper or save it as a PDF that I can annotate. I realize it may feel weir to read code outside of the IDE, and you will tainly miss some features, like being able to search through the code. However, being able to write notes can deepen your thinking about the code, enabling you to interact with it on a different level.”
@RosaCtrl ok FINE i’ll read the copy lying next to my desk. YOU WIN
@trenner I had it in my wish list since it was announced and I think there’s no better time to read it than now. If I had read it before November 2022 it wouldn’t have made the impression it’s making now
@RosaCtrl thank you for saying that, makes me feel better about how long i’ve procrastinated picking it up!