HN Academy

The best online courses of Hacker News.

Hacker News Comments on
An Introduction to Interactive Programming in Python (Part 1)

Coursera · Rice University · 56 HN points · 13 HN comments

HN Academy has aggregated all Hacker News stories and comments that mention Coursera's "An Introduction to Interactive Programming in Python (Part 1)" from Rice University.
Course Description

This two-part course is designed to help students with very little or no computing background learn the basics of building simple interactive applications. Our language of choice, Python, is an easy-to learn, high-level computer language that is used in many of the computational courses offered on Coursera. To make learning Python easy, we have developed a new browser-based programming environment that makes developing interactive applications in Python simple. These applications will involve windows whose contents are graphical and respond to buttons, the keyboard and the mouse.

In part 1 of this course, we will introduce the basic elements of programming (such as expressions, conditionals, and functions) and then use these elements to create simple interactive applications such as a digital stopwatch. Part 1 of this class will culminate in building a version of the classic arcade game "Pong".

HN Academy Rankings
  • Ranked #23 all time · view
Provider Info
This course is offered by Rice University on the Coursera platform.
HN Academy may receive a referral commission when you make purchases on sites after clicking through links on this page. Most courses are available for free with the option to purchase a completion certificate.
See also: all Reddit discussions that mention this course at

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this url.
Consider codeskulptor[0] out of Rice University, I used it for a coursera class a decade ago (think it was this one[1])



Wow! This is actually exactly what I wanted, thank you!

Our classes were shut down at the start of COVID-19 in March 2020, but if we ever actually go again, I will definitely use this!

I can think of many - I have taken several starting since 2013. The tricky thing is that Coursera classes seem to get merged, re-mashed or otherwise re-branded. And as such only one currently is listed in my "Completed" courses section of my profile.

Having said that and with the caveat that these probably changed since I taken them, I recommend the following:

- Cryptography - - great introduction to the fundamentals and math behind cryptography. A lot of theory but also some practical exercises. This is my top recommended.

- Machine Learning - - a good introduction to the basic of machine learning; focuses on octave/matlab and does not dive into frameworks like scikitlearn or tensorflow

- Introduction to Interactive Programming with Python - - I took a course from Rice University on Python programming through making games that was fun. As far as I can tell, this is the modern incarnation in two parts.

- Software Security - - goes into stack / overflow exploits, tools for testing, and web-based attacks

- Functional Programming Principles in Scala - - this was a good introduction to scala and functional programming - it got me thinking in a different way

- C++ for C Programmers - - I think this was the first coursera class I took. This course dove into the C++ STL and a lot of modern features introduced in C++11.

> as such only one currently is listed in my "Completed" courses section of my profile.

That's surprising to me: wouldn't Coursera want learners to be reassured that whatever signalling benefit there is to completing a course will remain forever?

I took a few courses in 2013 just to see what MOOCs are really like and completed two (Programming Languages, as taken by many here, and Introduction to Mathematical Thinking, which IIRC was mostly about logic) which indeed are not listed under "completed" in my profile. I found them at though.

> I found them at though.

Thanks for pointing that out! I have 11 courses in the accomplishments and just one in "completed" courses.

These courses are for beginners, but I started with what I learned from a few courses in Coursera and turned it into a career as a software engineer. and from Jennifer Campbell and Paul Gries from the University of Toronto laid a great foundation to build on. I think I took them the first time they offered it and I still don't understand how they completely nailed a new medium like that first try. It was very accessible, but with enough detail to make sense and the videos were so clear and concise. The Python one from Rice University, is a fun, awesome course, where you build games to learn.
how did you turn it into a career?
I extracted everything I could from those courses, which served as a basic comp sci foundation, saw that I was pretty good at it, took a few more not-as-important courses, then applied to a challenging coding bootcamp. I passed the coding tests, got in, worked and learned the hardest I have ever done so before for a few months, and continued studying on my own for a couple months. Then I applied for a job that required a practical coding test, knew someone at the company so they would at least give me a chance, and crushed the coding challenge. I was almost optimally prepared for the job and hit the ground running, while having no official credentials. It's been great since then. The only drawback is that I don't have the broad depth of knowledge/experience that I imagine can come from a CS degree. So I am planning on getting a masters.
Many people, especially kids, will at some point encounter an online learning tool where you can just run Python in the browser. Chances are the underlying interpreter is Skulpt. A short list of examples:

- has a free online curriculum with more helpful error messages that kids can understand and real-time analytics for teachers

- handles Python, turtle graphics, and pygal charting in the browser

- their Python notebook feature uses Skulpt

- a popular open-source textbook that has excellent Parson's problems

- implements some custom Skulpt libraries that I haven't seen anywhere else

- Coursera's interactive Python course

That's just the ones I could remember off the top of my head. I truly believe this is one of the most impactful open-source projects of all time, especially if you consider the impact is has on kids (i.e. future computer scientists) that can use an excellent teaching language like Python directly in their web browser.

I work as an engineer at, and we run the code directly on a server, but I've always thought it would be interesting to try building interactive programming exercises with Skulpt.
I've always wondered, how do you isolate/protect against people doing nefarious things in a setup like that?
Virtual machine is probably the most common solution.
I'm a big fan of datacamp. You should definitely give this a try. It would be great to expand the reach of your lessons without the infrastructure overhead of every user hitting your server with their code. Hit up the skulpt dev listserve if you want some help. Or I'm at [email protected].

Plug: you could easily prototype this with Trinket embeds. Add #!/bin/python3 to the top of our Python (Skulpt) trinkets to get strict Py3 mode. Add data files via the + button (no directory support, so treat them as all in the local directory). Use the Share menu to get embed code. Paste. You've got your first interactive lesson. If your users like it, you can then decide whether and how to build skulpt in to the site.

Thanks for the pointers, I'll definitely have to take another look at! It would be cool to try some exercise submission + feedback with code highlighting all on the client side.
Yes, that kind of tool - that lets you run Python in a browser - can be useful. I had discovered, tried out and blogged about some of them earlier (also, which you mention):

Codingbat, Progress Graphs and Michael Jordan:

(for Java and Python - when I tried it)

Online Python Tutor looks quite interesting:

(for Python)

PythonMonk - learn Python in the browser:

(for Python), an open source pastebin with runnable snippets:

(for multiple languages)

Some of them use emscripten, IIRC.

Edit: These tools are good for beginners to learn the basics of the language. For more complete learning, I still think the traditional method of using the command line tools such as the interpreter and a text editor, and an IDE, are useful and recommended. Interaction with the real OS is a part of the learning of any (at least industrial) programming language (maybe there are some specialized exceptions) - i.e. things such as files, databases, directories, users, processes, peripherals, etc. - and not much of that can be done in the browser-only environment that these tools have.

In fact, since I am a trainer too, I sometimes come across some of my students who do not know the basics of dealing with an operating system, even as a user. E.g. some of them can only use the PC via the GUI (e.g. in Windows) and are not familiar with the command line and its commands, or even with concepts such as drives, pathnames, filenames, absolute vs. relative paths, how to reference a file in dir B from dir A, etc. In such cases I always show them some of the basics of that stuff and give them references for further learning. And I tell them that if they do not learn that stuff (or look down on it, as a few of them tend to do), it is like knowing how to drive a car (programming) but not knowing how to walk from your house to the car and from the car to the shop - in other words, you are not fully capable to even use a car due to that :)

Python dev and trainer here.

Skulp is terrible as a python implementations go. Error reporting is meh. Many advanced features are not supported.

Brython is a much better alternative. More complete and robust.

However, i advise against running a js python in general. Exposing secured and isolated jupyter notebooks is much better for learning.

High School CS teacher here. has always done me a treat, I've have had one or two odd bugs but 99% fine and they're adding nice features aimed at education too.
Thanks for mentioning that. I'd never heard of it; playing with it now, and it seems very nice indeed!
I think it's important to distinguish user groups. No solution is best for all of them.

For scientists or data analysts, jupyter notebooks are a great choice since they mirror the professional and research tools they'll use.

For web development, an in-browser IDE like Cloud9 would be my choice to get an arbitrary room of adults up to speed.

But for middle or high school audiences, or even adult beginners, solutions like the above are far too complex. It's easy to get a certain expert blindness, but a Jupyter notebook for instance can actually be a huge problem form someone trying to understand flow of control, since you can execute code blocks in an arbitrary order into the same runtime.

Tradeoffs between power and usability abound. Jupyter is a good blend. A full IDE is power. Skulpt prioritizes usability. Some group of users fits into each of these buckets.

So (surprise, surprise!) The meanings of 'best' and 'terrible' are highly dependent upon specific user needs.

> Jupyter notebook for instance can actually be a huge problem form someone trying to understand flow of control, since you can execute code blocks in an arbitrary order into the same runtime.

True. I usually don't let them know they can create several cells first. They use only one for a good part of the show.

Skulpt will lead to strange debugging sessions, and you really, really want them to learn how to debug autonomously asap. So having the same stacktrace in every env is very important.

I wanted to learn python by myself, a few years ago, it was not easy (difficult to justify to use it at work when you know perl enough to do the job in 1/10th of the time). To keep motivation, I have followed IMHO, it is very good for beginners. It avoids the library problem and allows to have funny results.
I can program (mainly C++, Java, Perl, Ada, SQL) and I had difficulties to improve my weak level in Python because I had (still have) few opportunities to practice. I have followed an easy MOOC ( that uses game development. It was very motivating and a good reminder that game programming can remain simple.
>I have some pretty significant overheads to meet each month.

Do whatever you can to reduce your overheads. A few years of sacrificing to cut your overheads can be hugely beneficial to your overall happiness. I know this is easier said than done but, if you have any debts, get rid of them as soon as you are able to.

>I dream one day of running my own successful tech business.

Have you considered starting something in your spare time? Do some freelancing, build some gizmo and release it online or whatever takes your fancy. You don't need to spend any money to step out of the employee box and to start developing a side income or outside projects. If anything it helps with saving money as you find yourself spending more time tinkering instead of being out spending money.

I don't know what you do exactly but I had great fun doing I did this free course then started making crappy little games and had great fun doing it.

Go check out, and Take some free courses in whatever amuses you. Either something technical to broaden your skills or something totally unrelated just because you want to.

>Do whatever you can to reduce your overheads. A few years of sacrificing to cut your overheads can be hugely beneficial to your overall happiness. I know this is easier said than done but, if you have any debts, get rid of them as soon as you are able to.

I read this in the context of his children being his overheads, and I chuckled.

Oct 11, 2013 · 2 points, 0 comments · submitted by jacoblyles
My girlfriend was in a similar position: She used Postgresql and R for her university stuff, and she'd dabbled a bit with HTML/CSS. She signed up for the interactive programming with python course on Coursera and really, really enjoyed it:

Granted, it explains the language through games, so after that one can't just go and write a web application since these work a bit different, but it explains programming in a really good way. From there to understanding of client/server is pretty easy.

Apr 05, 2013 · momatt on Can i learn to code?
Sure, it's doable. This class on learning to program starts in a couple weeks. They estimated 7-9hrs/week but as it is free there is no risk.
CheckIO guys, the very first task (ATM) is annoyingly unclear. One shouldn't need to try to understand what you meant. You might want to look at the way problems and objectives are laid out in Rice's excellent interactive python class on Coursera :

Also, from a pure "story" game design standpoint : there's no initial hook, and the story is fairly bland (I came in curious and 2 lines were enough to bore me). I believe you shouldn't try to do a backstory for the sake of it. Either think it through and do something good, or keep it very very very short.

Hope this helps, I know this kind of playtest feedback is always hard to listen to, but if you're gonna do something great, you need to pay attention... Plus I'm a business/product cofounder type of guy, currently learning Python, so I imagine I'm pretty damn close to your target audience.

Anyway, this is interesting and I'll be back to try it more and see if it gets better. Good luck and lots of courage on this!

There is a coursera class for python that is leaps and bounds better than whats currently on codeacademy. Much better organized, video lessons, better tools, and better feedback system

That could be an option for the video section, but I was unable to access the course. I think they only allow access while its in progress.
I'm really enjoying the Coursera course on learning to program 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?
Oct 18, 2012 · 54 points, 24 comments · submitted by bcjordan
well, just signed up.

My first programming experiences were actually small games for the TI-83, a humble dream soccer and a bowling game.

PC's were very expensive around '95, a fact which also lead me to take computer science for having access to them at school and obviously, gaming :-) Warcraft, Dune 2, Lost Vikings and the sorts.

After my first job and subsequently, that fascination on developing games faded away under other things like e-commerce, corporate applications and messing with Linux also sinked a large deal of my spare time etc but haven't yet lost hope of finding a way into it.

First homework due tomorrow!

That brings back some unpleasant memories. When I was a CS undergrad something the professors would enjoy doing was assigning problem sets on the very first lecture of a module that were deliverable by the next lecture (often the next day). I assume it was a mechanism for figuring out people's learning rates.

Of course it was great fun beginning a new term and having 2 or 3 such classes on the first day.

If you really want to learn game development on the web, you should check out

You learn how to make games that run in HTML5 Canvas using JavaScript, and there are custom libraries that make graphics and user interaction much easier to deal with.

Also, you can take the class at your own pace, so no need to worry about artificial deadlines.

It looks like Udacity is doing a similar course in the new year:
Wow, it seems that they're generating js + canvas games straight from Python (the tool used in the course is ). Never heard of it before
They seem to have built it by themselves this summer.
Okay, I had a look and it and its clearly for educational purposes only. Indeed this course is more a "fun" introduction to programming ("what's a function" ... ) than a real course on building games.
In the recent news about the course, a headline reads: "Make a student tutorial video, Win an iPad" ( - Sounds wierd to give a non-programmable device to someone who is following a course on interactive programming. Someone did not get the point.
In what universe is an IPad not something nice to win?
In what universe is iPad non-programmable?
In the universe where, to program it, you need a fully fledged computer to do the development on?
So? You still are able to program it, aren't you? Therefore, it is programmable.
I can't personally, as I can't afford a mac. But I see what you mean.

There are different senses in which the word 'programmable' can be used - you can program a VCR without ever seeing a line of code!

What I assume ekianjo meant was: There is a long standing tradition in the personal computing industry of being able to program on the computer itself without costly extra equipment or software. You look at your BBC Micro, your ZX-81, your TRS-80 they can all be programmed on the device. It was the same with mainframes and servers. Even DOS and Windows had QBASIC. Nowerdays, programming tools can be downloaded over the internet in a few clicks. The PC has always been a device which can not only consume software, but can produce it.

Many people in the hacking community see this as a good thing - as a democratisation of creative power, and for educating the next generation of technologists, engineers, scientists and makers.

The iPad lacks the ability to program on the device itself. It can only consume software, it cannot produce it. It does not belong to the long, revered tradition of self-programmability. It is in that sense that it is not programmable.

Yes, that is exactly what I meant. Especially in the context of a course to learn about interactive computing, I find this very ironic that the prize offered is a non-programmable device. Why not offer a washing machine or an oven, then?
Try to write a python script and run it natively on the iPad, and we'll talk again if we live in the same universe.
I don't follow. Is Python the only programming language available? Is programmability determined by a device's ability to run python scripts natively?
That's an example. On any open device you can program in any language. There are no restrictions. The iPad is a walled garden and there are clear limits to what you can envision doing, embedded in the way it is designed and locked down.
Great. Just signed up. Anyone knows of a similar courses/tutorials for C++ Game dev?
There's the Game Institute ( but they're not free...
I am also very interested, but could not find this kind of course
Almost missed that, thx.
I think Coursera needs to do a course on game engine architecture with real-world examples (idtech, ogre).
The problem that I see with that is, these engines are difficult to do in one class. Generally, learning that is a full two-year program involving programming, logic, math, 3D design, etc. Using 3D engines gets difficult to teach in a 7 week course unless the student already knows quite a bit.
Should be enough time to understand and implement a basic raycasting engine ala Wolf3D/Doom though.
HN Academy is an independent project and is not operated by Y Combinator, Coursera, edX, or any of the universities and other institutions providing courses.
~ yaj@
;laksdfhjdhksalkfj more things ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.