Live data from Hacker News

Why Learning to Code Is So Damn Hard

vikingcodeschool.com

121–130 of 270 posts

Re: Why Learning to Code Is So Damn Hard

#121

When I was in college, one CS professor explained the difficulty of coding to me in terms of discreteness vs continuity. In the real world, things are continuous. If you accidentally build your structure with 9 supports instead of 10, then you only lose 10% of the strength of the structure, more or less. The strength varies continuously with the amount of support. But if you're writing a 10-line program and you forge…

> But if you're writing a 10-line program and you forget one of the lines (or even one character), the program isn't 10% wrong, it's 100% wrong. (For example, instead of compiling and running correctly, it doesn't compile at all. Completely different results.) This is where the beauty/simplicity of some programming languages, namely, intepreted languages (e.g., Python), comes in: if a bad line of code never gets exec…

>This is where the beauty/simplicity of some programming languages, namely, intepreted languages (e.g., Python), comes in: if a bad line of code never gets executed, then the program itself will run fine.

That's not beautiful; that's horrendous. A program that might contain syntactic (!) errors has no claim to being a sublime mathematical construct.

I'd say it's "beautifully simple" when I can tell you with 100% confidence that my program will never, ever, ever experience errors of a certain type. Even better if I can tell you with 100% confidence that my program contains no errors at all (which is possible with proof-based languages).

Saying a Python program is beautiful because it can have hidden failure conditions is like saying that a poorly maintained gun is beautiful because it can fire when rusty (but watch out for explosions!).

I wish, when learning to program, that I'd been taught to write universally correct code instead of "mostly correct" code.

Re: Why Learning to Code Is So Damn Hard

#122
I feel like I'm in the "Desert of Despair" and I'm not quite sure where to go. So far I'm self-taught in C, C++, Python, Lisp (a few of them) and some shell stuff. I have the basic syntax nailed in all of those. I don't know any of them well enough to be able to write simple programs without constantly looking up StackOverflow articles or reading references. I haven't even touched GUI programming.

It doesn't help that I always try and obsessively look for the "best" or "proper" way to do something. I know this is a good virtue to have but I also feel like it also gets in the way of getting things done.

It's such a weird place. On one hand I feel like I know a lot more than before but if any of my friends ever mention how "good" I am at coding I am quick to correct them by saying I'm really not. I could really do with some sense of direction, but I suppose that's on my shoulders since nobody else can decide for me what sort of developer I ought to be. I'm not sure what to focus on.

I initially got interested in coding just because of how interesting and fun it was in itself. I want to continue to pursue it because I feel like it's the first thing I'm really good at. I always got mediocre grades in school, I didn't learn any instruments or have any hobbies, then I started learning how to code and it just clicked with me and for the first time in my life I had an idea of what I might do for a living.

Sorry if that strayed a little too far from discussing the article, I wanted to try and write my thoughts down.

Re: Why Learning to Code Is So Damn Hard

#123

Having taught many non-programmers to start their programming journey, this article rings very true. The "cliff of confusion" he describes is a function of the Dunning-Kruger effect ( http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect ), which indicates that you don't know how bad you are at something until you get better at it. As an educator, the challenge is to make that cliff as unscary as possible and ch…

The Dunning-Kruger effect pretty much sums up myself. I feel like I have a firm grasp on the structure and syntax of JS, but now I'm questioning whether I really do. I always feel awful, as I can't really implement anything, and am always frustrated when I can't get off the ground starting a project.

I just don't know how to actually _do things_ with code. So, in essence, I think I know the language, and in a sense I do insofar as I know how to write an if else statement, a while statement, declare a variable, etc., but I _don't_ actually know the language, because I can't do anything with what little I do know.

Do you have any advice?

Re: Why Learning to Code Is So Damn Hard

#124
post #112

Hey there, really, really great article! It really spoke to me. I've got a small question for you, though: I'm in the Cliff of Confusion, but I have a serious problem. I can't even build a program. I know syntax, structure, etc., but I don't know how to pull all of it together to actually build something that serves a purpose. Do you have any advice for me?

Get some very small problem, put something toguether, and polish it until it works.

Do no stop to think if it's any good, neither stop to plan ahead what it will look like. Not on your first few programs.

Re: Why Learning to Code Is So Damn Hard

#125
I feel I hit the job ready part and started to work as a software engineer and I think I'm about as productive as I cost the company. Actually I feel a little better than that and my colleagues a little worse than that, but I guess that's how everybody in the middle feels.

The thing is, after that job ready upwards slope there is the next downswing. You're able to get something done, but what you envision is not what the company needs. You also realise that to be productive you need a lot of skills you never learned in school time at all, e.g. packaging, shipping code to customers, versioning, and actually create a tool that another person can, reading code of other people, and finally using the tools your coworkers build which are only marginally more productive than doing it manually or writing your own tools, and only after learning the arcane ways in that they are designed (much like the tools of your design, and quite different from the billion dollar applications you are used to in daily life). Also you will really become slower, because all the meetings and compromises drain your energy more than the coding, but there is no way around it if you work in a team. Is there another high coming after that? From looking at my coworkers it seems this down swing will last.

tl;dr the job ready high is not the end.

Re: Why Learning to Code Is So Damn Hard

#126

Earlier quoted context omitted.

And then they give up and do something else, with lower self esteem this time. Seriously. "Just code" is the worst advice that everyone gives. It's trite. You'd be better off saying nothing at all. Do you think you can sit someone down with a C compiler and come back five years later to find they've written the Linux kernel? Don't say "just code". It's not helpful. It's disparaging. You don't tell a child "just walk"…

Of course one is not "born knowing how to code". Saying "Just code" does not mean "sit down by yourself and try to figure out the C compiler." It means, for most of the people I've met/worked with "Stop agonizing over what course to take, what book to read, what you should build first - just build." Implicit in that is that the person can ask me for help outside of some master/grasshopper relationship.. no I'm a code…

I think we're way past the point where mindlessly playing around and idle curiosity can reliably teach someone how to program. That might get them interested in programming, but it's one thing to print something to a terminal or change the text on an exiting page; it's quite something else to get a GUI app going or deploy Rails to a server. And GUI/web is pretty bare-minimum when it comes to keeping people interested in programming. Not a whole lot of people want to write console applications anymore.

Here's the sticking points where beginners need your help, and might not even have enough information to actually ask what they're looking for:

What framework do I use? I see people talking about AngularJS, so I'm going to pick that one. Oh wow, it's harder than I thought bzzzt you just lost a future programmer.

How do I deploy? DigitalOcean costs money, bzzzt there goes another. I paid for DigitalOcean, but I ran into troubles installing pip, bzzt there goes another.

How do I make a GUI? Tkinter, Wx, Qt, GTK, WPF, bzzzt there goes another.

And the worst of them all... "What language should I learn?"

Yeah, a lot of programmers might not want to hear this. But there are a lot of languages. You can't blame a beginner for not being able to decide. And to be honest, there isn't really a good choice here, which is why programmers get into fights about languages and when that happens, bzzzt there goes another. Javascript sucks, but people claim its essential. Beginners get turned off by hearing "Javascript sucks but you have to learn it". The better option is to just not learn programming. Or bringing political wars into it. "Don't learn C# because M$". Beginners don't care about your politics, they want to learn. Eventually people settle on Python, so the beginner starts learning Python, then asks "what GUI framework" or "how do I deploy Django" and we start back at the top of this list.

So, in the midst of all of this confusion happening for a beginner, they're (understandably) lost and ask for a lighthouse to guide them on a path, any path, as long as they don't have to make the choices themselves. So they ask the question "how do I learn to program". And the response they get? "You don't learn how to program, you just start programming."

Bzzt, you just lost the entire next generation.

Re: Why Learning to Code Is So Damn Hard

#127
post #83

[deleted]

What are we comparing when we are comparing coding? I could teach a child to code a simple text based game, but designing a massive software for a critical system is just as hard as building the rest of that system.

Most any teen can take building materials and build a dog house. That doesn't mean skyscraper construction is child's play.

Re: Why Learning to Code Is So Damn Hard

#129

The hard thing about learning to program is that to create anything even vaguely useful you have to learn a million things in parallel. Say you wanted to build the simplest of Rails apps - you're simultaneously learning not only what the terminal and a text editor is, but how unix commands work, what an MVC framework is, probably a little of HTML and CSS, database migrations (maybe some SQL), asset management/pipelin…

My first real, non-toy app was an Android card game. I knew the basics of Java going into it, but nothing else. Following tutorials got me to where I had an app that I could install and run on my device.

At that point, it was up to me to figure out what to do. I started with a single screen that showed some text and added a few more screens that had the same text. Then I added a button that triggered a change of that text. Then a button that displayed an image. And so on until I had a real card game that could even identify whether there were any legal moves available and if the player was stuck.

Every step along the way was not easy and I got derailed a couple times, nearly giving up. The hardest single feature to implement was dragging and dropping a card. It took a lot of cribbed code from a few useful blog posts, but the feeling when I actually got it working was indescribable. It was a Saturday morning and I was running around my house, dragging and dropping cards on my tablet like I was 8 years old and it was the greatest Christmas gift ever. That was the moment when I realized I could actually finish this if I was willing to put in the effort. The rest of that weekend was spent in blissful coding and my commitment to becoming a developer has never wavered since.

Now in my job, which I got an interview for because of the card game, I have witnessed other people with less self-guided (contrasted with CS class projects) experience than I started out with be unable to persist long enough or self-teach hard enough to solve a problem by themselves without asking for help to get over minor bumps. I won't ask for help from a more senior dev unless I have exhausted my abilities to understand the problem space and can enumerate the things I have tried. I refuse to be the person who simply "doesn't know how".

Never ever give up.

Re: Why Learning to Code Is So Damn Hard

#130
post #81

This seems like a symptom of learning to code for the sake of being able to code , versus learning to code because you enjoy coding . It's just as much work in an absolute sense, but the process in the latter case seems more effortless and fun. There's a similar thing in the music world. Some people want to be good at guitar, others like playing guitar. The former get bogged down in despair, the latter fiddle around…

I agree to an extent, but instead of "enjoy coding", I'd say it's more "wanting to build things", at least in my experience; I do enjoy coding, but really it's the building of the things that's my primary motivating force. Or a similar modification of your music analogy: "Some people want to be good at guitar, others like making music ".

Agreed; "enjoy building stuff" paints a more complete picture than "enjoy coding."
Post reply on HN