Live data from Hacker News

Don’t Believe Anyone Who Tells You Learning To Code Is Easy

techcrunch.com

71–80 of 186 posts

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#71

I've been programming for maybe too long now, but likely not nearly as long as the higher level advanced developers, but still the idea that people copy & paste code from Google/SO is horrifying. You are really just going to work on some real life project and just blindly copy some random crap you found online without even knowing what it does completely? Yikes.

I find it amazing how often I see comments on Stack Overflow complaining that the obvious pseudocode solution (meant as a guideline to explain the correct answer) "doesn't work". It seems like it's very common to outright copy and paste code without any sort of basic critical thinking on how to properly integrate it into one's project...

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#72
I highly disagree. The author says one of the main reasons coding isn't easy is because setting up the environment is so difficult. The problem is that if you try and learn "iOS" using XCode then of course the environment has a lot more weight and cause more issues that you really don't need to deal with as a beginner. A better option would be to fire up a simple Scheme or Ruby interpreter in a terminal and watch them go (after giving them a copy of your favorite programming book). Heck, with things like CodeAcademy you can just visit a website and eliminate the environment issue completely.

I'd say the problem with programming isn't that it's difficult, but that it's intimidating. Writing a bunch of arcane symbols and words in a text file scares people off, while really it's just everyday logic people use in a different form (at least, the very basics are). I think that's also why programmers keep telling people it's so easy, so that they get over that irrational fear.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#73
post #69
post #66

Earlier quoted context omitted.

I copy and paste code all the time. I'm in the business of getting shit done, not learning everything ever, I don't need to learn the ins and outs of some obscure algorithm I'm only going to use once. I also don't need to memorize Apis and boilerplate for technologies I rarely use. Of course once i'm settled into a domain I don't need google anymore. But it's invaluable for quickly diving into new stuff.

Please never stop doing this. I get paid $$$++ to swoop in after people like you are done and whole teams grind to a halt productivity-wise because the codebase is so bad. You are doing god's work, son. Thank you.

please define $$$++?

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#74
Though I'm a novice C++ programmer (working with templates at the moment), the only time I'd ever felt lost and stupid, which was just recently, was when it came time to write the end-of-chapter program in the book I'm reading.

Oddly enough, the program wasn't difficult to understand. I've even written it and got it to run before! I think what happened this time around, is I had read the chapter again, started writing more notes and had a better grasp on the material than before, that when it came time to bring all the concepts together, the example program didn't include them! For the first time in years, I actually felt stupid, borderline retarded (in the literal sense).

The example involved an abstract base class, Dragon, with 3 derived classes. The idea was to have a player fight a randomly selected dragon via Base class array and Base class pointer. At this point in the book, aggregation was discussed and shown in an earlier example, but wasn't implemented in the example. Mind you, no player class was created! So basically, arguments were passed to xDragon's defend and attack member functions via variables within the main function.

So I'd decided to create a Player class instead, and have the Player And Dragon objects interact with each other in the main function. Problem was, I hadn't learned enough to know how to do that, to which I didn't realize until error after error and trying desperately to get it running. I'd refrained from using Google and Stack Overflow for the most part, save for a few compiler errors I'd never received.

In the end, I'd decided to create a Game class that layered a Player and Dragon object. I had a feeling I should have written it that way from the start, but felt uncertain. The last errors that I was stuck on for a few days, I'd solved by way of "I wonder if this will help" lol.

Up until then, I wasn't aware that if you don't have a separate implementation file for a class, and should you decide to layer an object from that class, the class must be defined within the class declaration. Having defined member functions outside of the declaration, although within the header file, gave me: include\BlackDragon.h|22|multiple definition of `BlackDragon::calcDamage(short)', first defined here.

I will admit, it did put a damper on me. I felt like I was on a roll up until that. Perhaps I'll take a week or two break from programming get the feeling back again.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#75

"They don’t tell you that a lot of programming skill is about developing a knack for asking the right questions on Google and knowing which code is best to copy-paste." No, no, no! This always frustrates me. This is not 'coding' (maybe it is, and we should be doing less of it, and more programming). This is gluing together pre-coded snippets and trying to make it work. Continuing to do this is an impediment to gettin…

> Copy and paste doesn't help you at all with this.

Generally I agree with this, but there is a way to use copy-pasta as a learning tool. If I find a code sample that does what I want but don't understand it, here is what I do:

1. Add a comment with a link to the source for reference.

2. Rename the variables.

3. Comment the parts that I understand.

4. Flag the parts I don't understand with a simple // ? comment.

5. Research the parts of #4 until I understand them, and then update each comment accordingly.

#2 is incredibly important to me. I've been doing some walk-through tutorials lately (e.g., http://learn.knockoutjs.com), and if I use the same variable names as the tutorials suggest, then I'm just transcribing. The code doesn't stick in my head, and I'm not really learning as much. But once I start changing the variable names, then it sticks.

#3 might seem like a waste of time, but I've found with conceptually difficult code, having the #3 comments helps keep me grounded if my brain gets too muddled.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#76
post #69

Earlier quoted context omitted.

Please never stop doing this. I get paid $$$++ to swoop in after people like you are done and whole teams grind to a halt productivity-wise because the codebase is so bad. You are doing god's work, son. Thank you.

please define $$$++?

It means 'lots of money'.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#77
post #69

Earlier quoted context omitted.

Please never stop doing this. I get paid $$$++ to swoop in after people like you are done and whole teams grind to a halt productivity-wise because the codebase is so bad. You are doing god's work, son. Thank you.

please define $$$++?

Well, you take a dollar amount. Then you increase it. Then you increase it some more. Because companies who can afford it will pay you pretty much anything if you can make their whole engineering team even just a few percent more productive by improving the codebase. Or can figure out very hairy issues caused by Daily WTF style situations.

For example, I have a friend who sometimes fixes bugs in compiled software running banking systems with no access to the original code and woefully out of date documentation. He gets paid some 300eur an hour in a country where the median developer salary is only about 30k eur per year (about 14eur/h)

Sure, that particular type of problem likely/hopefully isn't caused by copy-paste programming, but it is caused by the sort of endemic issues copy-paste programmers to produce.

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#78
When I see "programming is easy" I think "dirty, filthy lies!" When people say everyone should know how to program I think "why?" There's some weird nerd myopia going on with the programming literacy movement.

Programming takes an odd kind of thinking and is about as easy as anything else that takes a large amount of time and effort (read not easy).

Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy

#80
post #77

Earlier quoted context omitted.

please define $$$++?

Well, you take a dollar amount. Then you increase it. Then you increase it some more. Because companies who can afford it will pay you pretty much anything if you can make their whole engineering team even just a few percent more productive by improving the codebase. Or can figure out very hairy issues caused by Daily WTF style situations. For example, I have a friend who sometimes fixes bugs in compiled software run…

Thanks for responding with a specific $ amount. I do indeed appreciate it.
Post reply on HN