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.
Don’t Believe Anyone Who Tells You Learning To Code Is Easy
71–80 of 186 posts
Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy
#72I'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
#73Earlier 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.
Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy
#74Oddly 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…
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
#76Earlier 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 $$$++?
Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy
#77Earlier 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 $$$++?
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
#78Programming 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
#79Re: Don’t Believe Anyone Who Tells You Learning To Code Is Easy
#80Earlier 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…