Live data from Hacker News

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

erikbern.com

121–130 of 147 posts

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

#121
I write all of my code for humans.

Whether that's me, or some other poor schmuck who'll have to figure out my intent years from now.

I don't find code-writing hard. Reasoning comprehensively about your problem, collaborating with other stakeholders to discover and guide them along the best path, learning specialized skills (eg. new math or industry conventions), devising efficient algorithms, conveying your program's structure and patterns such that they're obvious and have elegant boundaries - that's the part that showcases talent. A lot of it comes down to communication and clarity.

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

#122

Bit of a side issue for me: I was working on my Unity game the other day and thought to myself, have IDE's really not progressed all that much in the last 10-20 years? Default intellisense has definitely gotten a lot better, but apart from that and a few other minor things the whole concept of coding feels pretty much the same today as back then. The biggest positive change for me is outside of the editor, it has bec…

The problem isn't the IDE, but that we are still using a programming language 24 years old.

What's the problem? Golang is more than a decade old. Python predates Linux. Common Lisp with ANSI C is from early 90's too, but it began as Lisp in the 50's.

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

#123

Bit of a side issue for me: I was working on my Unity game the other day and thought to myself, have IDE's really not progressed all that much in the last 10-20 years? Default intellisense has definitely gotten a lot better, but apart from that and a few other minor things the whole concept of coding feels pretty much the same today as back then. The biggest positive change for me is outside of the editor, it has bec…

> The whole concept of coding feels pretty much the same today as back then. The whole concept of programming languages has not changed that much. We have the two big pillars that is the Turing Machine and Lambda Calculus (and various others) Everything after that has been abstractions, and when the abstractions are good, we call them paradigms. But it's all abstractions, and ultimately we are just writing instructio…

Slime or Slimv with a file/buffer as the REPL input it's one of the best things ever. Refactor your code doing crazy data mangling on functons? On Lisp you just redefine functions/macros with ease. With the rest of languages the complexity raises exponentially.

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

#125

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.

A lot of that is just experience from practice. If a person has solved a given problem before they will be able to do it faster the next time.

Another part of that is simply being hypo neurotic, low fear. If a person is hypo neurotic those conditions are just not stressful at all. For example being shot at by a violent aggressor is stressful but not writing code at a different time of day. It’s hard to explain unless you are that person or personally know someone who is. It’s also apparently a massive gaping hole in psychology. Neuroticism is generally viewed as negative, so the less of it the better. That does not account for the extreme states, that bottom 2%.

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

#126

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 write very verbose tutorials ([0] has my latest effort). I walk through the reasoning, from start to finish, and usually use things like Git tags and releases, to support the prose. I also like to provide examples that are very “real-world.”

It doesn’t seem that people read it. I think folks prefer videos and unrealistically sparse examples.

[0] https://littlegreenviper.com/series/universal-links/

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

#127
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 absolutely loathe those “frameworks“ with billion files in billion directories. If can't start with single file and build upon it - it is complete trash. Android projects with Gradle come to mind.

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

#128

If humans understand how computers work, then you just have to write code for computers and can ignore the human element. Unfortunately the last few decades we decided that software engineers don't need to know how computers work anymore.

Obfuscated C contest seems to be challenging your view. Or Brainfuck. Intentional coding-trolling aside, if whatever is happening in the head of the original developer is muddled, the resulting code is likely to be confusing even for people who know computers from the inside out.

> Obfuscated C contest seems to be challenging your view. Or Brainfuck.

Both of those are leisure for experts.

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

#129
post #6

[flagged]

> psychopathic scammers like Robert Martin That is a pretty wild take. Would you like to elaborate on that?

https://blog.wesleyac.com/posts/robert-martin

Part about politics, race, gender. He is insane.

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

#130

Earlier quoted context omitted.

What does a more recent language offer that C# doesn't and that would enable more powerful IDEs?

Verified pre and post conditions would be nice. Especially in the era of LLM's, which can usually fill in the implementation given a sufficiently clear specification.

Eiffel is also well over 24 years old (but Albatross is more recent)
Post reply on HN