Live data from Hacker News

Why Learning to Code Is So Damn Hard

vikingcodeschool.com

111–120 of 270 posts

Re: Why Learning to Code Is So Damn Hard

#111

Earlier quoted context omitted.

That is absolutely something that irritates me. I've just inherited a large RoR application, and the amount of "magic" and things by convention is driving me crazy. There should be answers to questions like "why is this the way it is?!" On a side note, if anyone has some great resources for RoR, I'd love to have them linked. I suspect my inexperience is the source of my problems, and I'm welcome to any assistance any…

The guides on the ror website are pretty good: http://guides.rubyonrails.org/ Which bits did you find were magic? The bits of convention I can think of you'd have to know about are: DB naming conventions - these are used so that it can do joins etc easily behind the scenes, they're pretty simple so not a huge problem I find. Rendering at the end of controller actions - it'll render the template with the same path as…

The routing system and associated view helpers can really get confusing.

For example:

    link_to @story.title, @story
You have to know that rails has some automatic routing based on the class of an object. If @story is a Story class, rails basically does this underneath:

    link_to @story.title, send("#{@story.class.name.downcase}_path".to_sym, @story.to_param)
There's implicit conversion of class names going on under the hood in a few places. It's all documented but it's not easy to find the documentation when you don't know what you are looking for.

The thing that really screws up people starting with rails is not understanding the various layers (html, views, controllers, models, http, etc.) and how rails puts those together. If you don't know how to do web programming with basic html and php, rails will eat you alive with it's seemingly magical behaviors.

Re: Why Learning to Code Is So Damn Hard

#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?

Re: Why Learning to Code Is So Damn Hard

#113
post #3

I always thought the "Desert of Despair" was the point at which you should find a mentor with professional experience, instead of waiting for the "Upswing of Awesome".

The upswing of awesome sounds like a great way to prepare yourself to build things that are 90% correct with a 10% catastrophic failure rate. I really try to keep a more emotionally neutral stance on all of my code and my abilities. If I want to indulge in arrogance I philosophize. In the end, it's the same thing over and over again. Symbols swapping with others symbols denoting some kind of esoterically tangible, bu…

You've made an interesting comment. I've felt the same way about some of the things you've mentioned, such as

"In the end, it's the same thing over and over again. Symbols swapping with others symbols denoting some kind of esoterically tangible, but ultimately fleeting, meaning."

I feel that way about all the different languages, new ones or old. Just different symbols that distill down to machine instructions.

My question to you, how do you approach learning? Learning new things and marking your progress? What gives you the satisfaction that you've made progress in "learning" a given topic?

Re: Why Learning to Code Is So Damn Hard

#114
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?

This is actually a good time to check out a few tutorials to ease into building mindset and patterns. They start to become a crutch eventually but can be a great transition between syntax and building. I don't know your stack, but if you're looking for Rails check out Daniel Kehoe's RailsApps, Tuts Plus has some free stuff and, if you're looking to get deeper, the Hartl Tutorial in Rails is the standard (though it's often too much for a beginner). Google will know more than I for specific resources.

Re: Why Learning to Code Is So Damn Hard

#115

Earlier quoted context omitted.

I'm 37 and my first programming job after college was doing support & custom integrations for a larger product (which I wasn't allowed to change). I'd already been programming since 8 and knew BASIC, Pascal, C, C++, sh, Perl, Java, etc., but I had only taken a few CS classes and majored in English. It was a great chance to learn new things, e.g. SQL, and there was a ton of variety, autonomy, responsibility, and clien…

Amazing that there was a time that English majors could get hired for programming jobs. Nowadays your resume would be rejected by an ATS without ever passing before human eyes. You would be treated as a non-entity, incapable of offering any value.

Well, I'm not sure it was so different then. In my case there's a pretty good story behind it. I was working as a temp doing data entry for 1000+ page industrial catalogs, and then we ran a Perl script to generate QuarkXPress files while sizing/moving products within the 3-column layout to cut down on pages. It was sort of a killer feature for the monstrous CMS app they made, and we were the pilot project. But this was 2000 and there were lots of Unicode bugs around © ® ™ ” etc. Since almost every product had a table with 10ish SKUs and 2-6 columns of various dimensions measured in inches, there were a lot of problems---I'd say hundreds per page. Oh and also the script added extra spaces around every special character. We temps were kept around longer than expected so we could circle in red every bad character on every page of the catalog. That was bad enough that I started poking around, saw the app was in Perl, and tracked down the problem (a single regex). When I told my boss I could fix it, he asked me to write up a proposal, which I did, and they asked the original developer if it looked okay. So that's how I got the services job. :-)

Re: Why Learning to Code Is So Damn Hard

#116
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…

Shortly after I began driving my uncle taught me drive stick. We went out a few times, I'd practice in the parking lot, and I was eventually able to get it in gear and drive on the streets. I was horrible at driving stick, stalling at intersections, but I was good enough at it to get by. It wasn't until I actually bought a car that had a manual transmission that I got good at driving stick. I was terrible because I was trying to learn to use the tool (stick shift) for the sake of learning.

I learned to program in a completely utilitarian way. I had a problem that I needed to solve, I knew others had used programming to solve similar problems, so I learned only what I needed to know to solve the problem at hand. After using it this one time I began to notice all sorts of other problems around me that could be solved using programming. I developed my passion for coding because I understood it was a tool that could make my life easier.

Re: Why Learning to Code Is So Damn Hard

#117
post #45

Learning to code is not hard. At all. Not relative to things that actually are hard. Having trained as an electronic engineer, programming is by far one of the easiest things I've ever done, by an order of magnitude. You can tell by the number of teenagers that can code, how many teenagers can design a nuclear submarine? That is much harder to learn.

>how many teenagers can design a nuclear submarine?

Just about every one I meant.

It isn't likely to work. But then I wonder how many teenagers could code a working control system for something like a nuclear submarine.

Re: Why Learning to Code Is So Damn Hard

#118

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…

Wouldn't it be better to catch an error at compile time than throw an exception or have the app completely fail when a bad piece of code is run?

Re: Why Learning to Code Is So Damn Hard

#119
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".

Re: Why Learning to Code Is So Damn Hard

#120
post #118

Earlier quoted context omitted.

> 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…

Wouldn't it be better to catch an error at compile time than throw an exception or have the app completely fail when a bad piece of code is run?

Depends on if you're trying to engineer fault-tolerant, robust systems, or trying to learn how to program.
Post reply on HN