Live data from Hacker News

Please don't learn to code

codinghorror.com

61–70 of 273 posts

Re: Please don't learn to code

#61
post #11

I doubt Bloomberg uses eight grade chemistry, biology or physics in his day job either. We still teach the sciences -- if nothing else than as a way to entice kids to continue studying it and keeping a steady influx of engineers in to society. There is nothing different about computation, per se. Instead of a teacher droning on to kids about how to surf, let them learn how to do webpages, or robots. Get them excited…

Most of us use most of a lifetime of knowledge in our day jobs, and machines are magical.

I don't think you truly believe that though. Most people who hack daily have at least a basic working model of the computer. There's a compiler parsing, generating code, there's possibly a VM executing bytecode, an operating system managing memory, scheduling, network and other services, below that there's a CPU executing some representation of assembly code, it's in turn composed of some sort of a logic array, etc. etc. I'm not saying you know the inner workings of everything.

It's more along the lines of, we teach physics with the aim that people finishing high school should have a vague notion about at least newtonian physics, some electromagnetism and the scientific model. For computers, we teach how to open Word, check your e-mail etc. Stuff kids know. What they don't know is how this all ticks, and I think there is certainly value in helping kids construct a vague mental model of it all, and how to apply certain parts of it to a screen they'll probably interact with 4-16 hours per day for the rest of their lives.

Re: Please don't learn to code

#62
1. It is ridiculous to tell somebody not to learn something in his spare time.

2. Atwood says:

"at least high school level math are fundamental to performing the job of a politician. Or at any job"

Do you know what is high school level math? It is a seemingly randomly selected subset of mathematics in fact based on mostly the scientific and engineering needs of the 19th century. What is included in 'highschool-level math' should be evolving. For example basic programming knowledge is more fundamental in today's society than trigonometric equations, coordinate geometry, logarithmic equations, etc... (all of which is high-school math).

Very basic programming could (and should) be part of basic math education.

Re: Please don't learn to code

#63
post #33

Earlier quoted context omitted.

When I said programmer, I meant a professional programmer - as an occupation.

As opposed to a professional "coder"? (I also see "programmer" as a more distinguished title and I prefer it to "coder" (and even "software engineer"), but I don't understand any of these terms to have any generally-accepted definition; personally it is only a matter of taste.)

As opposed to vocational coding/programming/hacking. Seems like you're being facetious for the point of it?

Re: Please don't learn to code

#64
As many others have pointed out, I think there are two sides to non-professional* coders learning to code, one of which I agree with wholeheartedly, the other I disagree with, equally wholeheartedly:-

* As in paid to sling code - I don't mean to cast elitist aspersions with the term 'professional'.

The Good

Learning to harness the amazing realm of creativity that computers offer - unlike other fields of engineering, you aren't limited by the need for millions of pounds and a team of people to turn your idea into reality, nor are you constrained by the laws of physics or possibly killing people should your calculations turn out to be incorrect.

For example, I am slowly writing a chess engine, it's such a joy to explore that because I want to and it's interesting to me.

There is a core kick that many people get out of programming, which is when you actually get something working, knowing that you made the computer do that. I wouldn't want to take that away from people.

Another aspect is that, should somebody learn enough to make some aspect of their life easier, that could even be simply learning some vba to automate some process which used to take them several hours, that's worth a lot too.

The Bad

People thinking that coding is easy and straight forward, simply because they've learnt to do something trivial or played around with code a little bit. I have met several professional programmers who have had the same opinion and then gone on to produce the most horrendous, unmaintainable, broken code imaginable and get paid a lot of money to do it all the while producing quite awful software.

I wholeheartedly agree with Jeff's point that this sort of attitude is not something we ought to encourage. If people more generally think of coding as something easy, then the kind of programmers who produce shitty code and think it's fine will be emboldened and we will be doomed to experience yet more broken software in the world. That's the last thing we need.

There's a element of pride in all of this, admittedly, but it's still a very real issue. Good programmers don't get enough respect, nor does good programming and we don't want to play with that.

The cooking example cited by shin_lao is a great analogy - you don't want to discourage people from coding, quite the opposite, but don't think what you do is the same as Pierre Gagnaire, or even the guy working in the kitchen of that cafe you like down the road.

I do want to add that yes, the good can lead to a good professional programmer, but it's critical that it be realised that, as Jeff says, you need to put in your hours, whether the Gladwellian 10k figure is accurate or not.

Re: Please don't learn to code

#65
I'll leave the part of "coding is important because computers are everywhere and learning how to automatize everyday things is a great skill" to others, as there are lots of excellent comments about it in this thread. Let's talk about something different:

> But understanding variables and functions, pointers and recursion? I can't see it.

Hey, I'd argue that understanding exactly those things are what should be included in "everyone should learn to code". All of those are difficult mental constructs important for understanding how our complex world works. Let's look at it case-by-case:

variables - this is basic; the idea to take something (a concept) in your hand and manipulate it by a symbolic name. This is, in some way, taught in high-school math, but somehow many people don't seem to grasp the idea behind the concept of a variable.

functions - ability to take a set of instruction and name it. Possibly have it parametrized. That's simple. But naming several sets of concepts, and then using them to build another layer of concepts, which is then used to build another layer of concepts... I'd call this an essencial problem-solving skill.

pointers - concept of indirection; for people not accustomed to it, it's easy to get lost in different levels of indirection when discussing things (like, a difference between 'belief' and 'belief in belief', or P, proof of P, proof that P is provable, etc.)

recursion - because not everything circular is invalid; sometimes things defined in the terms of themselves are the simplest way to go.

To all of this I'd also add one more, IMO essencial, thing - understanding of feedback loops. It could cut out a lot of discussions about whether X causes Y, or Y causes X. Surprise surprise, it might be a feedback loop, in which X and Y are interlocked, and are both to blame.

Bottomline, programming teaches us a lot of important skills and mental constructs useful for problem-solving and understanding how the world works. And those skills are hard to get elsewhere.

A silly example from high-school biology: what is genetic code if not opcodes for protein assembly machinery? DNA "data" is code that programs machines building proteins. Easy to understand and remember if you know even a little bit about how 'automation'/'computing' is done.

Re: Please don't learn to code

#66
I really agree with this part: "You should be learning to write as little code as possible. Ideally none."

Less code is better than more code. Even less code probably means you are reusing someone else's code which is even better. And this is the one that programmers can't accept: composable/configurable tools are better than programming languages. Better as in plain better, and better software engineering.

Re: Please don't learn to code

#67
post #54

"Can you explain to me how Michael Bloomberg would be better at his day to day job of leading the largest city in the USA if he woke up one morning as a crack Java coder?" If anything should trickle down, it would be the joy and satisfaction of acquiring a basic competence.

Or maybe he could found a company making trading software, amass a fortune, and get elected mayor of New York City...

... and then profess to study that which his generational peers have foregone. If only we could all be mayors of NYC!

Re: Please don't learn to code

#68
This largely misses the point. I agree that it's not "essential" and not everyone should do it, but it's still more valuable than I think Attwood gives credit for.

I'm perhaps in a unique position to comment, having recently taught my girlfriend to program. So I can talk about how that played out.

My girlfriend understands menus, she knows about links, she can install software, she can use word, she can type away like no other, and even fix some problems. If you watched her using a computer it'd seem like she had a pretty good affinity with this black box.

However, I don't think most programmers realize what a holistic approach the average person (even a relatively tech savvy one) takes to computers. They only understand them at the highest level. They develop fetishes and incantations to fix things. When something goes wrong my girlfriend will turn the computer on an off. She'll turn the router on and off. Etc. Or just click "ok" until it stops complaining. It often fixes the problem, but it's just something she's learned to do with little understanding. She goes to the store and can pick out a decent phone or laptop, but only because she's developed an intuitive semi-understanding of the lingo. This one has more gigs, that's better...etc.

The computer will do things they don't understand, except some vague notion that the computer is "dumb".

I asked her one time how a computer works because I was legitimately curious how people without any instruction in comp sci etc visualize it. She had absolutely no idea of even the most fundamental workings of a computer except that it had something vaguely to do with "ones and zeros".

I taught her binary. I taught her boolean logic. I showed her binary math. I gave a very basic example of how you can use circuits to do binary math. I made her sit at a desk and act as a processor. Then I explained the concept of bootstrapping.

Then I taught her a little bit of Python.

Enlightenment.

She understands garbage in - garbage out. She understands dependencies. She understands algorithmic complexity. She understands types and formatting...and much more. (at least generally, which is enough).

This mysterious box no longer seems capricious and opaque. She has a much better understanding of why her computer behaves the way it does and therefore feels more at ease. Sure she can't magically fix anything, but she's recognizing general patterns more and more.

She installed Ubuntu recently in fact, and has started writing Python scripts (and Bash!) to assist in assorted data processing tasks she used to do by hand. When my girlfriend needed to update batches of reports, she would up each one BY HAND and change them. Using a computer was frustrating and scary. Learning coding won't improve her life? Seriously?

Would it make him a better mayor? Not necessarily but it sure could help. I'm sure he uses a computer and I'm willing to bet the less time the mayor spends screwing around with a computer or waiting for tech support the better. Likewise, I'm sure he has all sorts of tedious tasks which don't warrant third party software but which could be tackled by a nice Perl script. That doesn't even take into account the boost in (general) analytical thinking that comes from programming. Ditto for potential refreshment in Math.

Who says it needs to make him a better Mayor anyway? What if he just wants to be a better person?

In addition to being a programmer, I happen to be a musician as well...which puts me into contact with a lot of artists. I'm always surprised by how much they could benefit learning programming because a lot of art involves hacking; creating weird one off contraptions...often requiring lots of tedious work. Many want to experiment with technology and art, but are unsure how. Processing could blow some minds. Ditto Overtone.

Using a computer is largely about software; and software is similar to arts and crafts in that it's a reflection of the creator and the tools they used.

Learning about an artist helps you interpret the meaning of their work. Learning about the techniques help you evaluate and appreciate their work.

Learning to code makes you sympathize with the people who wrote the software you use. It helps you understand how software is put together. Which is good, because the more you sympathize with the author and the more you understand how it fits together the easier time you will have using it.

To be fair there are a lot of things I feel everyone should learn. I think it's fair to say though that out of all the ones you could pick, learning to program will be more beneficial practically relative to most others.

> Research voraciously, and understand how the things around us work at a basic level. Communicate effectively with other human beings.

I think this is the heart of the misunderstanding between sides. Learning to program is actually the first step in that. He mentions having "basic internet skills" as a necessary life skill. Learning some programming will greatly facilitate that.

Likewise programming will introduce concepts and develop skills that help you understand technology in general. It even helps in in non-technological areas. It facilitates communication because it forces you to confront and think about how difficult it is to communicate certain things clearly.

Re: Please don't learn to code

#69
The idea that you should learn X to "succeed at life" (whatever that means) is fallacious. We learn things to become better people as a whole, not necessarily to use those skills in our jobs. I bet Bloomberg is not using his math skills in his job and that's fine but he's probably thinking using logic (I hope) which is something you learn both from math and programming.
Post reply on HN