Live data from Hacker News

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

erikbern.com

111–120 of 147 posts

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

#111

> “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!

This also stood out to me as obviously wrong in the article. Since time immemorial, we have taught math by teaching the core concepts and building on them incrementally. Since people do successfully learn how to do math, this directly disproves the author's claim that people don't learn that way.

I wish I had ever seen math taught that way. Usually I'd is taught as "here's a bunch of example problems. Solve all the problems and hopefully intuition will magically result"

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

#112

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…

Im quite good at writing pieces of code but if the application gets sufficently complex i tend to attack the problem by rewriting things in a circle. Sometimes complexity puts me in an infinite loop of rewrites. That this is an entirely different skill is quite the eye opener. Its now a known unknown if you like. Thanks!

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

#113

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 cannot agree more.

I also want to add that I hate these "project generators" such as create-react-app when I'm just getting started. (It's just an example: I'm glad I learned React long before its existence.) They create an opinionated folder structure with template files and preconfigured tools. I don't function well in this model: if I don't immediately have a high-level overview of what the created files do, why they are created this way, I just become uneasy at all this magic that I do not understand. Each time a new thing is introduced, I need a high-level introduction covering its purpose that relates to the concepts I already know. I'm not comfortable dealing with magical black boxes unless I have at least a rudimentary understanding of the main interface of that black box.

To put this back into the concrete example, it means that hypothetically if I were to be learning create-react-app from scratch, I would immediately begin to investigate the purposes of the tools that have been configured by it, like Babel and ESLint.

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

#114
> Too many programming books and tutorials are like “let’s build a house starting from scratch, brick by brick” when what I want to “here is a functioning house, let’s learn about it by changing something and then seeing what happens”

That's how I taught myself how to program. I spent years getting good at writing small, simple, kinda crappy programs. Later on I learned I wasn't eligible for better software development jobs, because I had absolutely no fundamental knowledge about software design, programming languages, and computers. It was humbling walking out of a job interview realizing how much I didn't know because I never learned the boring way.

Always read the whole manual. Always learn the fundamentals.

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

#116

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…

Empathy is great but you need to understand cognition otherwise the empathy will be misplaced.

How is this code going to appear or show up for someone whose boss is breathing down their neck, or who is fixing a production problem at 2 am? You don’t know how valuable that answer is until you actually need the answer, and then you’ll pay a lot for it. If you can find someone who knows how to do it. Few people do.

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

#118
post #97

Earlier quoted context omitted.

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-leve…

> why I should think of components as conveyer belts

thanks for the chuckle!

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

#120
post #113

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 cannot agree more. I also want to add that I hate these "project generators" such as create-react-app when I'm just getting started. (It's just an example: I'm glad I learned React long before its existence.) They create an opinionated folder structure with template files and preconfigured tools. I don't function well in this model: if I don't immediately have a high-level overview of what the created files do, why…

I think this way too and I think it's because I'm autistic. I don't WANT to clone a project in one click. I want to understand every tool well enough to create my OWN project that serves MY use cases.
Post reply on HN