How Not to Code - A Discussion on Learning Styles

On a recent edition of the Versioning Newsletter, there was a link across to a discussion between @Adam and @ralphm on learning to code. The discussion was around a recent article by Daniel Voicu published on Medium.

As I read the article and the comments, it struck me how much it resonated with my own experience, and clearly with others, particularly the point about translating what you learn from tutorials into writing your own code. The number of times I’ve found myself going through learning some concept, typing out code line by line (and inevitably debugging it, then finding myself presented with an exercise to solve a problem, and staring blankly at the screen, is… well, a good few times.

So what has been the experience of others in learning, and what did you do to overcome the barriers you encountered?

3 Likes

I sure have tried a few different languages. It all started …

Circa 80 something I took a class in digital logic. OK, so maybe most wouldn’t find
NAND, NOT, AND, OR, NOR, XOR, XNOR all that interesting, but I did.

I went and bought a powerful 128K cassette tape radio shack computer and learned Basic.
No Internet for tutorials, no copy-paste, but a mess of GOTO lines. It was fun.

Late 90s I picked up a cheap copy of O’Reilly’s PHP in a Nutshell and wrote the obligatory Hello World (in PHP 3) . I also did some code with VBasic and Java.

Did I learn from tutorials? You bet. Almost everyone I tried had a bug or three to figure out, and the few that didn’t I tweaked until they did break, then figured out how to fix my errors.

Then the move from desktop apps to web really took center stage. My first site was AOL Hometown using HotDog Express, I messed around a bit with FrontPage and PWS but got annoyed when Word kept putting fancy quotes into my code so I started another site - Geocities.

Not satisfied with only HTML and inline CSS and inline JavaScript (with a little JScript snuck in) I learned some Perl for a few SSI files.

And I did a RoR tutorial that worked, but I confess I’d have been hard pressed to have been able to explain much of the how and why of it to anyone else .

Anyway, I’ve probably had to unlearn more than I’ve learned :wink: and it has taken a decade or two, but I like to think I’m finally starting to get there.

1 Like

I had almost forgotten about HotDogExpress and [thankfully] Geocities!

I can second that, brother. Software development (the engineering and the creative process of construction) is like many other disciplines which cannot be completely taught through “boot camps” or entirely learned from tutorials.
I recall manually typing machine code, line-by-line, in my Sinclair ZX80 (which I built from a kit) from pulp magazines in order to complete a small utility application.
Years and years of experimentation, stumbling, fumbling and “That’s strange behavior?” was the real training.

Of course, I am very thankful for The Internet (recalling days of BBS on dial-up), and resources like Sitepoint to provide quick answers and a great “broad view” of a new technology.

The “NEW” things seem to be appearing at an accelerated rate now too. Or, perhaps that is just my perception and a symptom of Old Age.

The main problem with most tutorials is that the instructor just leads the novice coder through the ‘project’ line by line, so when the novice coder tries to built his/her own project from scratch they are lost - often not knowing how to get started.

The best tutorials are the ones that reflect the process the same way as it would happen in real life - starting with the planning stages, outlining the requirements, breaking it down into smaller chunks, and then building the application.

I found that I learned coding the best by making up my own personal projects and working through them - solving problems as I came across them.

Of course we never stop learning.

2 Likes

That is something very much I’d like to see more of. I understand there’s a baseline part where you literally have to follow line by line, but there then seems a huge gap to go from there to building from scratch. Even those beginner ones don’t do a particularly good job of setting out, not so much what the end result needs to be, but how you structure your thinking and code to get there. For me, my understanding is enhanced massively when you can map out a block diagram type of thing for me; modularise it into smaller chunks so to speak, but take me through the rationale of why it needs to be like that - maybe I’ve missed it, but other than resorting to Visio, I can’t recall seeing an online tool that helps with that part. OK, I’ll admit it, I need pictures…

I first learned to program in assembly language on an Elliott 803 rather more years ago than I would like to admit!

This is caused by the “get me the code, NOW” situation many new online learning developers are in. They just want to develop a web site, and “learn html and css” is the mantra they hear. There are reasons folks (used to?) spend four years in college getting a CS degree, and it was not all spent in class learning html. They learned stuff like Data Structures, Flowcharts, Database Design and Security, they learned lots of languages so they could see the applicability of a certain language to a certain solution, they wrote compilers and assemblers, to understand how code really works on hardware, they studied code optimization. And then they spent hours in labs working on projects, with teaching assistants helping them along.

That kind of background helps enormously when you see a big new project for the first time and have to figure out how to get started. It’s not clear to me though that online tutorials on all those topics are in great demand. What seems clear to me, and I could be wrong, is that most folks don’t see the value in them, and would prefer if they were just told how to write the code, asap.

The absolute worst of those have to be the JavaScript for Netscape 2 courses that seem to be so common most people still think that’s the way to write JavaScript. Even if the students do manage to learn something in the course they’ll have to unlearn most of it if they want to learn JavaScript properly.

:wave:

I’ve long struggled with learning to code and have started and abandoned dozens of courses and books. BUT a few recent experiences have given me hope:

  1. I recently took the Introduction to JavaScript course on SitePoint Premium. While this was a reasonably basic intro to JS and general programming concepts, the quality of teaching was very high. A particular strength was that it mainly used JSBin to demonstrate examples, which kept the feedback loop (building something and seeing a result) extremely short.

  2. I’ve also just finished Treehouse’s Interactive Pages with JavaScript course. The interesting thing about this course was how much effort the tutor put into simulating the actual process of building an app. Like WebMachine mentioned above, he first used comments to sketch out the kinds of functionality the app needed, and then filled in each section with actual code. He also had the student look up methods and elements at the documentation for the DOM API, much more valuable than having the student enter commands by rote.

  3. But better than either of these courses has been a weekly, hour-long real world lesson with one of our Ruby devs. He’s taken us through the basics of how Ruby and Rails works, and having an actual real person to give instant feedback when you run into difficulty has been invaluable. Have you tried installing Ruby lately? It’s not as simple as it could be.

I think having personal projects to use to learn a language is really useful, but for a newbie it’s hard to know which projects to choose.

4 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.