Hacker News new | past | comments | ask | show | jobs | submit login
Teaching Programming To A Highly Motivated Beginner (acm.org)
87 points by ivoflipse on Nov 8, 2012 | hide | past | web | favorite | 38 comments



This may seem silly, but I found the most difficult part of learning RoR was getting my development environment set up. I tried several times since 2005 to get started, but failed due to a sticking point that for some reason I couldn't get past. It wasn't until a friend with a bunch of RoR experience walked me through the setup of the black box of different parts to run a web app that I actually got it. Comparatively, coding, refactoring, implementing best practices is much easier and enjoyable.

If you view programming as a craft, having mentors/coaches/peers definitely helps you improve much faster.


There is nothing silly about that at all. I teach high school math and science, but I also sneak in an intro programming class whenever I can. Right now I am teaching students to set up dual-booting with ubuntu on our school district's windows laptops. They are loving it, but it reminds me how many little details you have to get right before you can even start programming. Setting up the environment is nontrivial if you have only ever used windows boxes before.

That said, students pick it up quickly, and are very satisfied with their new skills. I can't wait to get into actual programming next week.


One of the great things about growing up in the 80s was that virtually all computers booted into a BASIC interpreter as soon as you flipped the power switch, and presented you with a flashing cursor eagerly awaiting your program input.

Computers don't work like that today. Installation and configuration of various dependencies are a real challenge when learning.

This is especially true when trying to teach kids - we like to think they're all computer geniuses now, but really a lot of kids don't seem to have any idea of how to navigate a file system. They're hooked on installers.


Yeah, it's a bit of a nightmare at the moment, especially for a beginner.

You might be interested in Yehuda Katz's project, Tokaido.

http://yehudakatz.com/2012/04/13/tokaido-my-hopes-and-dreams...


Totally agree with your last point.

To your first point, I really wish people would make virtual machine images with dev environments already set up on them.


> I really wish people would make virtual machine images with dev environments already set up on them

I think this is actually often more of a problem in the long run, as it just pushes the learning of how RoR interfaces with the rest of the stack to later. If you're seeking to teach someone how logic, program control flow, and separation of concerns work (as the author did by abstracting the "grunge work" as he calls it), why not pick an environment a bit more bare-bones?

I see the merit in allowing someone to get something up and running rapidly, but I think they may miss important concepts when learning in an environment that favors convention over configuration.


Because the author explicitly wanted "not to waste his time on banal unrelated issues" except those directly related to the project at hand.

He's not missing important concepts but deferring important concepts to learn other important concepts that lead to progress today.

You end up paying back that deficit one step and one layer of abstraction at a time:

    Some of Brian's biggest forward mental leaps came when he took 
    a step back away from the day-to-day project grind, learned new 
    concepts in a course or from a book, and then thought about how to 
    apply them to SwearBuy.


It really depends entirely on what your goal is.

If your goal is to tinker with a new language, or a new tool, it would be really nice to start from a working example that you can fiddle with, rather than being stuck with the sometimes arduous task of configuration.


They did just that in the coursera course "Software Engineering for Software as a Service". A VM is available for download and as a rank amateur I found it a great way to dive in. https://www.coursera.org/saas/


modern Rails requires lots of configuration, convention and prerequisites.


Taught myself to program over 6 years ago. I've learned low level and high level languages, algorithms, data structures, how to make websites and mobile applications, etc, etc. While I may have wished for an instructor at parts (specifically when my computer refused to run certain pieces of software, or when I accidentally wiped my entire hard drive while trying to install linux) in retrospect, I don't think I would choose to do it any other way.

Then again, I prefer learning from reading a book than from being taught. Everyone is different. It must be amazing to have someone guide you and check up on you once in a while though.


I taught myself programming last year (starting with Python from Google's course) and am incredibly jealous of this. I'd have killed for someone to explain what on earth Object Oriented Programming was in the context of the project I was working on. It simply did not make sense to me for a very long time.


I'm curious; what was the first project you built on your own?

It's been so long since I started programming that I can't really remember mine. My wife is learning now and I sometimes worry that my gauge of what are good beginner projects is off.


Well, I still remember my first projects:

* a console hangman game

* a weird ascii art animation program

* a "guess the animal" program that used a binary tree of yes/no questions to guess the animal the player thought of. if it failed, it asked for a question that could be used to distinguish the wrong guess from the right one, and appended it to the binary tree (which was stored on disk)

I thought those were such a big deal back then :) Oh, the good old times :)


For me it was a system for tracking errors in weather forecasts. I downloaded 400-odd forecasts from the NOAA twice a day and dropped them into a database.*

Figured out the following technologies on the fly: Python for the machine learning part, the backend and web scraping (after I finally gave up on SOAP), SQLite, HTML/CSS, PHP (after giving up on Django), Apache web server, FTP protocol (for backing up my stuff to my external drive). There are probably other things I tried and gave up on but forget.

I definitely went down a LOT of blind alleys and generally found out-of-the-box frameworks incomprehensible. The difference in the various communities was fascinating, too. For instance, try comparing forum answers to CSS or PHP questions against Python or, gasp, C. Holy cow.

*The result, if anyone cares, was that I figure they systematically overestimate High temps, underestimate low temps and overestimate POP.

EDIT: forgot javascript/jquery.


Wow, that's an impressive first project, congratulations on finishing it! I definitely agree that the developer community for a language makes a big difference in how easy it is to use.

We are really into StarCraft II, so she's thinking of building a build order identification game for her first bigger project. We'll probably go ahead and use JQuery Mobile + PhoneGap to make it a free Android app we can give to our friends. Not quite as complex, but it should be fun!

For those of you that don't play StarCraft: A build order is like an opening in chess: it sets up the rest of the game, and recognizing/responding to a build order is key to being a good player. The game she wants to build would help train people to recognize build orders by showing them a quiz with pictures.


Did you set out with the goal to be a programmer when you started? I have a particular project I want to build, but I struggle with the build vs buy dilemma. It will probably take me 5x as long and be 10x worse than if found a good programmer.

But, I also want to learn because I know that I need to understand what is being built and if it's being built in the best way to accomplish the goal - getting the job done for the customer.

Is it realistic to focus on being a generalist with an understanding of various languages or do I just need to learn one language first like Python and go from there? I noticed the MIT Python videos are free also. Thanks


If you want to build something, I think that's an excellent reason to learn Python and dive in. You don't need to become a generalist before you can build something useful which you can learn from. As mentioned in the article, having concrete pain points in your coding ("Why doesn't this work?" or "how can I X?") will help you appreciate the problems that various techniques solve.

Studying other languages exposes you to issues that you might not experience on your own, but on the other hand it's hard to apply your understanding of them all quickly. Python is an excellent language to learn first.

Learn enough of one language to be dangerous, code the minimum that comes close to what you feel you need (or a toy version of it), and then you'll have a much better idea of what else you want to learn. Good luck!


Really appreciate your insight. It seems like there are some good online tutorials out there for Python also. Ok, Python will be my first victim. Thanks!


I went through a very similar process and I highly recommend it. I'm a web designer and I had a bit of experience with Javascript (just enough to be dangerous) but I really wanted to build an actual web application. I just couldn't seem to grasp OOP, but in hindsight it's because Javascript's OOP is so obfuscated.

I live in a small tourist town and I was surprised to find a local Ruby developer. We met up and I asked him to tutor me a couple of hours per week trying to build an actual Ruby on Rails application.

He set up the project structure and wrote a couple of tests, and I'd go back home and try to get those tests to green. Boy it was hard. I'd grind for days trying to get the last couple of tests to pass, so when we'd meet up for our weekly session he'd resolve them in just a couple of minutes and it made perfect sense. It was worth it just for those "ah ha!" moments.

Of course, the motivation isn't in learning the language/framework itself, it's in building something useful or meaningful to you.

In the end, with 2-3 hours of weekly mentoring, I was able to release the functional application in six months and learned tons in the process.


I am in a similar situation to the author: I am an experienced programmer, and I am tutoring my wife, who left her job so she could devote all her time to learning to code. She's gone through all of the HTML, CSS, and JS CodeAcademy courses, and is now doing the Python course on Udacity.

While she hasn't needed a lot of help with those, she has also been working on extracurricular projects that I've helped put together for her. This is where I think the article was most revealing: I have been worried about helping too much, but now I can see why the opposite is true.

The author mentions that struggling with what you're learning is important. I agree. However, I think I have been letting my student struggle with the wrong things in the name of not "doing it all for her". I think it would be better to err on the side of providing every resource I can to define a straight path to a completed project. When she gets comfortable at a certain level, we can make the projects more complicated by involving more parts, rather than more frustrating by giving her less information.


I'm really enjoying the Coursera course on learning to program https://www.coursera.org/course/interactivepython. They have an interactive python implementation in javascript, so all the exercises are via browser - no configuration required at all. And the exercises are to build games.

Although I'm not building my own projects in the exercises, I am building something that I understand. This week's exercise was Pong and I'm looking forward to Asteroids in week 8.

Making something concrete really helps me understan the concepts.


Thanks for the tip! Would you mind posting a screenshot of Pong? I know that I loved being able to use graphics when I started, which is why I stuck to QBASIC as long as I did. Do they give you a library to use for drawing primitives (circles/squares/cthulhu), or is it all image-based?


Cool post! I've seen a lot of beginners learn to code (I started a non-profit to help bring more women into software development) and while we're addressing the issue of code literacy, there's still a huge skills gap between those who "can code"/ have done some tutorials and those who are ready to flexibly architect software.

I'm hoping to make the process of going from newbie to experienced easier and more meaningful with CodeMontage (http://bit.ly/CodeMontageLaunch) - you get to work on real, open-source and social-mission projects, you get feedback and code reviews from experienced developers, and you build a portfolio of open source, quality code that you can reference later or use to get a job. It's also really nice for the experienced developers / experts in a language to be able to give code reviews on important projects - it's nice if you have a friend willing to pair on your side project, but definitely can wear on a relationship over time (and when all your friends are learning to code...).


According to emails I still get for my (yet-to-be revised) Bastards Book of Ruby, this statement rings particularly true:

> Since we finished our final tutoring session in March 2012, I didn't hear from Brian for six months. He recently sent me an email mentioning that he just wrote a Python script to help him model personal stock investments: "I'm very proud of this script because it was the first thing I've done that was both practical and purely for personal use. I was evaluating a stock investment and wanted to simulate a bunch of scenarios. I started to model the scenarios in a spreadsheet before I realized that a spreadsheet wouldn't work, but python was perfect."

Showing how programming is useful for "both practical and purely for personal use" seems to be the surest path for enticing non-professionals...with everything that we have to keep track of in our lives, purely academic pursuits can be tough to stick to.


Essentially this is where I am - I've completed about 1/4 of codecademy's codeyear, and I'm digging into Arduino pretty well (hello self-driving trash can). Codecademy covered the basic concepts well, but I'd like to make sure there aren't any concepts I'm missing. If I'm doing something the hard way, I'd like someone with more experience to tell me.

I've already got a BA in business, and while repaying college loans, I really can't afford to pay for college classes to be able to meet with a professor. Besides, I'm not sure that college courses would teach me electronics and programming faster than I can teach myself. (College was a good experience, but I'm not trying to get another BA)

I'd almost like to start a service connecting interested learners with subject-matter mentors. In fact, some type of mentorship/tutoring program could be an integral part of a good hackerspace.


Not sure if this is a feasible where you live, but there are a lot of "code with other coders" meetups in SF and NYC. If you come with a programming sticking point, there are fresh eyes that can help you though it. I like codeacademy, but find its structure limiting; you can literally just go through courses parroting off information without learning best practices or antipatterns.


Any advice for the slightly motivated beginner?

My wife has recently asked me to teach her some programming. I doubt she will be that highly motivated though. I am guessing her interest is just to explore this world and perhaps better understand the work I'm doing. I have never taught any beginners but this could be a fun experience for both of us. I am wondering what kind of assignments, projects or scenarios to go through, and what kind of a development environment to use.

I love python and think it's probably the best language to learn (and use), but I'm not sure how excited my wife will be from looking at a console? I was considering a little bit of javascript together with HTML/CSS, but most of the programming involved with interactive web pages I find a little boring... Any suggestions for some cool simple projects to walk through and learn programming with?


Students pick up on the enthusiasm of their teachers; motivation can be catching. Assume she's highly motivated and work from there. In general, I don't think that people who are "slightly" motivated learn much in any area.

A friend of mine who is highly motivated is having fantastic success with Zed's "Learn Python the Hard Way" (http://learnpythonthehardway.org/). I can't say I'm teaching him, though, I'm just in text and email contact if he hits a sticking point.


Thanks for the tip. That's true, of course. She might become highly motivated, but at this point there's nothing burning to motivate her. She's not hoping to get a job as a developer, she's not particularly passionate about building a new app or a website. She's curious enough about it to try to explore. The same way she enjoys knitting occasionally. Does one have to be highly motivated to enjoy it?


I'm currently mentoring someone using a method similar to this -- build steps of a project, be available for questions as they come up. We've covered basic OOP and are moving into more abstract concepts like FSMs. I'm curious about what happens next for someone who has learned to program decently well, but has no traditional formal education.

If going back to school is probably not an option for this guy due to other obligations (and finances) do you have any advice for the path from solid hobbyist into entry level professional?


I'm also interested in any advice that people have. I'm in the process of teaching myself programming and I try to take in as much guidance and advice as I can.


Sadly, new Python-based MIT courses are at least mediocre.

By mere rewriting the code from Scheme to (ugly) Python they lost all the elegance and convenience acquired by decades of evolution of the classic courses and two editions of SICP.)

Watching 6.00CS is boring, when you remember how this very code supposed to look in Scheme.

The old Berkeley's CS61A, which is based on the same great book, was also translated into Python.

For teaching in Python, at the very least, its standard idioms must be carefully selected and used, as it is in the original Python tutorial on the web.


To those looking to start programming, but don't have a tutor nearby: pick up Steve Kochan's "Programming in C" and head on over to http://cs50.net. They have a Google Group set up where David Milan and his aides will answer your questions!

It's how I finally added some structure to my learning adventure.


I started that last week! I believe the new official site is www.edx.org


yes, how much for this kind of tutoring lessons?


I guess you are asking the wrong question here. Instead asking how much you should ask who will mentor me? It is more important to find a person who is ready to devote his/her time to mentor new programmers. I wish I would be as lucky as Brian. I am also looking for someone to mentor me. At times hundreds of choices confuses the new learner and all of a sudden the interest to learn fades. This is the best part of this article and so so very True - "There are dozens or sometimes hundreds of ways to accomplish the same task in computer programming; this multitude of choices can be paralyzing for beginners."


I'm curious as to see how much he charged for the lessons.




Registration is open for Startup School 2019. Classes start July 22nd.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: