Live data from Hacker News

It's hard to write code for computers, but it's harder to write code for humans

erikbern.com

91–100 of 147 posts

Re: It's hard to write code for computers, but it's harder to write code for humans

#91
post #60

> “Humans learn from examples, not from “core concepts” Nitpicking maybe but I disagree with tfa on this point; not all humans work this way. Those of us who might actually prefer the general -> specific direction are already largely ignored in k12 and may only begin to thrive in higher education. Since we’re already kind of underserved, there’s no need to also deny that we exist!

I'm with you on this. My learning style is to read the reference manual cover to cover (metaphorically now). I can recall numerous instances of wanting to get into a new thing and finding the vast majority of recommended introductions to be the polar opposite of what I was looking for. I'm going through this now as I decided to spend some time today learning the Drizzle ORM. The first things I found were all "here ar…

I'm willing to bet that if you tried Rails, it probably wasn’t a good fit for you.

Re: It's hard to write code for computers, but it's harder to write code for humans

#92

From Code Complete: “The smaller part of the job of programming is writing a program so that the computer can read it; the larger part is writing it so that other humans can read it.” (P.733) Has stayed with me for ~20 years.

"Programs are meant to be read by humans and only incidentally for computers to execute."

From the preface to the first edition of Structure and Interpretation of Computer Programs by Abelson & Sussman (which predated Code Complete by a decade).

It's a maxim I live by although my employers always seem to insist on the computers executing part for some reason.

Re: It's hard to write code for computers, but it's harder to write code for humans

#93

Selfless shill of a blog post I wrote & shared last week: Move Fast & Document Things [1] My goal wasn't to be philosophical but share actual tips on how our small team [2] enforces (not automated, not AI, but deep, hard reviews) a culture for writing code for ourselves and each other. All my personal friends who are engineering leaders at other orgs said "We do the same thing but you actually wrote it down". Would a…

Haha selfless, or shameless!

Re: It's hard to write code for computers, but it's harder to write code for humans

#94

My approach to dealing with lots of concepts is pretty much stolen from how babies learn language. Grownups talk around non-verbal babies as if they're not there. We refer to all the objects in the room (or anywhere else) whether the baby understands them or not. "How was your day at work?" "Oh it was okay, but traffic was bad so I didn't have time to get my usual coffee." Babies don't understand what traffic or coff…

> We refer to all the objects in the room (or anywhere else) whether the baby understands them or not.

And that helps the baby enormously; I remember reading that the more words that infants hear, the more their brains develop.

But we still point to objects — or to pictures in a children's book, as I did the other day helping my wife babysit a neighbor's grandbaby — and say the words.

Re: It's hard to write code for computers, but it's harder to write code for humans

#96
post #90

There was an article similar to this less than 2 weeks ago: https://news.ycombinator.com/item?id=41566097 This whole issue of writing for people really distills down to two skills: 1. Empathy 2. Writing There is a world of difference between writing some code and writing an application, a product. That is all this article is about, though less explicitly. Empathy is a factor in this because its the difference between…

So true, and this is a dilemma, right? People who build frameworks do so to make it easier for others to ship products. In the process of building the framework, they become better developers themselves. However, others now have to learn their abstractions, which distances them from the underlying concepts. This can make it harder for them to master the core skills needed to surpass the framework. I had that feeling…

I think what developers need to understand is that these large frameworks aren't there for them. Developers are not the primary audience or the primary benefactor. The primary benefactor of these frameworks are employers.

The large challenge employers face is where to find developer talent then how to select it. Developers then become a replaceable commodity selected on the basis not of capabilities or potential but solely on the basis of current compatibility on a bell curve. That devalues the better half of developers. It ultimately costs the employers more by allowing employment for people who otherwise are not capable at interference to future cost saving ventures from creative solutions. Also consider that employers are still reliant on recruiters to find potential developer candidates, so frameworks don't even help with identifying talent.

Re: It's hard to write code for computers, but it's harder to write code for humans

#97

People learn things differently. I really need the "core concept" first, before diving into examples, (unless the core concept is extremely simple). Many tutorials are like hand-holding Lego building. Here's your Lego pieces, watch me and follow me in building this toy project, and you'll know how to Lego at the end of the day. I just don't function very well in this model. I want to know how and why decisions are ma…

I used to think I was a "core concept" kind of person, but later I realized I took that way too far and would refuse to do things outside of my comfort zone unless I felt like I truly understood everything ahead of time. Nowadays I'm much more likely to just jump in and start working with examples directly, and I feel much more productive. It's partly a thing of trust: I just trust that the makers of high quality sof…

I would much rather have 60 different examples of middling quality covering a majority of use cases than a 5-page exposition about why the maintainer chose whatever database or why I should think of components as conveyer belts or whatever strained analogy they come up with. This only works with a lot of examples though, I've come across numerous projects where they think they're doing this but they've got a toy-level "Hello World" style example and maybe one more and that's it.

But in a perfect world, they'd have both. The GP can read that essay and get their bearings, and I can click "Examples" and start copying & pasting until I start to figure out how things work.

Re: It's hard to write code for computers, but it's harder to write code for humans

#98
post #89

People learn things differently. I really need the "core concept" first, before diving into examples, (unless the core concept is extremely simple). Many tutorials are like hand-holding Lego building. Here's your Lego pieces, watch me and follow me in building this toy project, and you'll know how to Lego at the end of the day. I just don't function very well in this model. I want to know how and why decisions are ma…

how do you manage when the core concept are too abstract ? I guess then you would need some examples to understand ?

I’m generally okay with high level concepts talk, and don’t often find it too abstract. We are talking about documentations for libraries or frameworks after all. I’ll take a gentler approach if it’s an actual theoretical firld.

Obviously, during the first read, my understanding of those concepts would be full of holes. And I plug them as I continue reading the API references and later when I start to try it hands-on.

Re: It's hard to write code for computers, but it's harder to write code for humans

#100

> “Humans learn from examples, not from “core concepts” Nitpicking maybe but I disagree with tfa on this point; not all humans work this way. Those of us who might actually prefer the general -> specific direction are already largely ignored in k12 and may only begin to thrive in higher education. Since we’re already kind of underserved, there’s no need to also deny that we exist!

I only started thriving in school once I started practicing theory construction in my head.

Hypothesis->test->refine

I’m not sure I could still do it in realtime today. It takes a lot of cycles to do this and reading or pausing videos to process is more my speed now.

I’ve ended up spot tutoring a lot of people who still don’t get it. Having a theory of the system lets you answer their questions where a classmate would not be able to because they’re barely past rote.

Post reply on HN