Learning to program is getting harder

I have written several books that use Python to explain topics like Bayesian Statistics and Digital Signal Processing. Along with the books, I provide code that readers can download from GitHub. In order to work with this code, readers have to know some Python, but that’s not enough. They also need a computer with Python and its supporting libraries, they have to know how to download code from GitHub, and then they have to know how to run the code they downloaded.

And that’s where a lot of readers get into trouble.

Some of them send me email. They often express frustration, because they are trying to learn Python, or Bayesian Statistics, or Digital Signal Processing. They are not interested in installing software, cloning repositories, or setting the Python search path!

I am very sympathetic to these reactions. And in one sense, their frustration is completely justified: it should not be as hard as it is to download a program and run it.

But sometimes their frustration is misdirected. Sometimes they blame Python, and sometimes they blame me. And that’s not entirely fair.

Let me explain what I think the problems are, and then I’ll suggest some solutions (or maybe just workarounds).

The fundamental problem is that the barrier between using a computer and programming a computer is getting higher.

When I got a Commodore 64 (in 1982, I think) this barrier was non-existent. When you turned on the computer, it loaded and ran a software development environment (SDE). In order to do anything, you had to type at least one line of code, even if all it did was another program (like Archon).

Since then, three changes have made it incrementally harder for users to become programmers

  1. Computer retailers stopped installing development environments by default. As a result, anyone learning to program has to start by installing an SDE – and that’s a bigger barrier than you might expect. Many users have never installed anything, don’t know how to, or might not be allowed to. Installing software is easier now than it used to be, but it is still error prone and can be frustrating. If someone just wants to learn to program, they shouldn’t have to learn system administration first.

  2. User interfaces shifted from command-line interfaces (CLIs) to graphical user interfaces (GUIs). GUIs are generally easier to use, but they hide information from users about what’s really happening. When users really don’t need to know, hiding information can be a good thing. The problem is that GUIs hide a lot of information programmers need to know. So when a user decides to become a programmer, they are suddenly confronted with all the information that’s been hidden from them. If someone just wants to learn to program, they shouldn’t have to learn operating system concepts first.

  3. Cloud computing has taken information hiding to a whole new level. People using web applications often have only a vague idea of where their data is stored and what applications they can use to access it. Many users, especially on mobile devices, don’t distinguish between operating systems, applications, web browsers, and web applications. When they upload and download data, they are often confused about where is it coming from and where it is going. When they install something, they are often confused about what is being installed where.

For someone who grew up with a Commodore 64, learning to program was hard enough. For someone growing up with a cloud-connected mobile device, it is much harder.

Well, what can we do about that? Here are a few options (which I have given clever names):

  1. Back to the future: One option is to create computers, like my Commodore 64, that break down the barrier between using and programming a computer. Part of the motivation for the Raspberry Pi, according to Eben Upton, is to re-create the kind of environment that turns users into programmers.

  2. Face the pain: Another option is to teach students how to set up and use a software development environment before they start programming (or at the same time).

  3. Delay the pain: A third option is to use cloud resources to let students start programming right away, and postpone creating their own environments.

In one of my classes, we face the pain; students learn to use the UNIX command line interface at the same time they are learning C. But the students in that class already know how to program, and they have live instructors to help out.

For beginners, and especially for people working on their own, I recommend delaying the pain. Here are some of the tools I have used:

  1. Interactive tutorials that run code in a browser, like this adaptation of How To Think Like a Computer Scientist;

  2. Entire development environments that run in a browser, like PythonAnywhere; and

  3. Virtual machines that contain complete development environments, which users can download and run (providing that they have, or can install, the software that runs the virtual machine).

  4. Services like Binder that run development environments on remote servers, allowing users to connect using browsers.

On various projects of mine, I have used all of these tools. In addition to the interactive version of “How To Think…”, there is also this interactive version of Think Java, adapted and hosted by Trinket.

In Think Python, I encourage readers to use PythonAnywhere for at least the first four chapters, and then I provide instructions for making the transition to a local installation.

I have used virtual machines for some of my classes in the past, but recently I have used more online services, like this notebook from Think DSP, hosted by O’Reilly Media. And the repositories for all of my books are set up to run under Binder.

These options help people get started, but they have limitations. Sooner or later, students will want or need to install a development environment on their own computers. But if we separate learning to program from learning to install software, their chances of success are higher.

UPDATE: Nick Coghlan suggests a fourth option, which I might call Embrace the Future: Maybe beginners can start with cloud-based development environments, and stay there.

Screenshot%20at%202018-02-16%2013_24_32

UPDATE: Thank you for all the great comments! My general policy is that I will publish a comment if it is on topic, coherent, and civil. I might not publish a comment if it seems too much like an ad for a product or service. If you submitted a comment and I did not publish it, please consider submitting a revision. I really appreciate the wide range of opinion in the comments so far.

via Allen Downey

10 Likes

In order to work with this code, readers have to know some Python, but that’s not enough. They also need a computer with Python and its supporting libraries, they have to know how to download code from GitHub, and then they have to know how to run the code they downloaded.

Fuck off. Try learning the win32 API or MFC without Visual Studio and the associated Visual C++ libraries to link to. Fuck, even with the all that it was still a bitch to configure your environment. Now a days script kiddies have to so easy:

pip install library_that_does_every_fricking_thing_for_me

git clone muhdick

edit: That was just the setup. Try actually figuring out the API. That was another clusterf*ck of legend.

edit2: All prospective software devs should come to terms with that fact that part of their careers will be lived as if they were a Rinzai Zen monk who riddle over an impossible koan for the entirety of their lives.

3 Likes

what is this I don’t even…

How can you expect to learn to code, if you can’t, or wont learn to download and install stuff??!?!?!

The yunguns expect coding is like playing a console game or what?

Isn’t reading a book too much work too then? :see_no_evil:

3 Likes

My first too! Storage on cassette tapes! The youngsters have no idea!

6 Likes

I was a Load “*”,8,1 type of guy

But borrowing tapes full of games and going through them for hidden gems was awesome :star_struck:

3 Likes

This commenter on the original article sums up my thoughts on that article:

image

I commented directly on that article, but here’s my reply (and then some since comment size was limited):

When I was learning to code, I had to find hard to find books on the topic, that were often quite expensive in of themselves. My Parents barely knew what a computer was or what good one was.

“What would anybody ever need a computer in their house for?”

That was the viewpoint of most adults back in the day.

The Internet didn’t exist. But BBS and 300 baud modems did. I was one of the lucky first to own a 1200 baud modem! My hunger for knowledge led me to acquiring the code that runs those BBS’s and run one myself. I wanted to play games and especially games that engaged other real people (computer AI was quite dumb back then…).

Granted, computers were SIMPLER. 8-bits instead of 64-bits. A single fetch, interpret, execute pipeline with virtually no optimizations (like look ahead and predictive prefetching) to multiple cores and threads and billions of transistors all on ONE microprocessor chip. Smaller instruction sets, smaller memory, smaller storage and programs were simpler, too. Assembler was prevalent. C was king (and by and large, still is). Newer generation languages like SmallTalk, C++, Object Oriented Pascal were in their infancy. Heck, even Perl did not yet exist!

Forget the technical tools needed. Think about all those DOS programs you used to hate. They were built by programmers with no UX skills (a specialty that didn’t yet exist!) Coming up with great designs back then was a HUGE challenge, designers notwithstanding. Especially as GUI/windowing environments were still yet to come. Nowadays, so many use-case successes across all OS’s and mediums exists and so many people share their design philosophies and research openingly, that design of the application interface is far less of a burden. Keeping designs fresh is the challenge of the day. Can you imagine today designing something that makes use of the mouse, then having to explain what a mouse is before the user you’re training can start focusing on learning your program’s interface? Oh, and since you made your app browser based, now let’s explain what a browser is and why you’d ever want to open it. I trained hundreds. I know first hand this pain. I’m happy to say, we’ve cleared this hurdle as a society.

Then networks for offices came along. How novel! One printer. One file server. Ability to instantly share files with officemates two floors up. Oops, let’s go back to training. What is a network? What is a server? What does it mean to “drag and drop”? Here we go again. Need more paradigms and visuals to teach users concepts, not just actions required to accomplish a task. Ok, once taught, now have to explain that we have to hire contractors to come in and install wires for the network and install a patch panel and a switch.

(dumb look by client before…)

“How much is that going to cost?”

Sorry, I digress. This is about programming being harder today than before. But here’s my point: Those learning to program then didn’t grow up with innate computer skills. So new programmers of the day learned about computers as much as they learned about programming them. Not only that, they built the tools they then used to program with. New editors. New languages. New frameworks.

But the world of programming was still opaque. You had to go to college to really crack it. Why? Because the Internet didn’t yet exist. Open Source didn’t yet exist. I spent hours upon hours on Gopher and FTP chasing source code to learn from. My focus was on the very core things that are not taken for granted today. How to do doubly-linked-lists, queues, stacks, sorting algos, memory management. I wrote my own testing suites, my own low-level debugger and hacked on vi, the editor, just to have better tools to build and test with. I even learned Assembler and often traced the assembler generated by my program’s compiler to find “my bug” vs. a compiler bug.

Who hears about compiler bugs these days?

Yup, I’m sorry, but programming today is not harder than when I was learning. Now, the programs you write today…different story. It may be getting harder and harder to come up with great, outstanding ideas that is, what they used to call, “the next killer app” that defines a whole industry and movement like 1-2-3 and Excel. Like Word. Like Amazon. Like Google or Facebook. It’s harder to stand out. It’s harder to hit a home run.

Then again, it’s not. Today, you can build something. Build it relatively quickly. Publish it to the App store. List it on websites all around like Product Hunt, TechCrunch, and so on. You can crowd source funding and quickly get mindshare of millions of people with virtually NO budget.

If you don’t know where to start, you know where to start getting answers. And those answers are, by and large, free to all who care to seek it out. Programming is more accessible to people of all walks of life than ever before. Even my young daughter of six has “programming environments” that lets her put together programs without knowing what a semi-colon is. There are even frameworks now that let you build entire applications that can be deployed to cloud and mobile alike without writing one single line of code.

I’m sorry, but learning to program today is easier than ever before on every single front I can think of except one: The spark of an idea that will solve something not yet solved.

3 Likes

This was very helpful and much appreciated. I really want to get into this field of work. I just need to dedicate more time to programing because I’ve only been playing with code academy for a few weeks now and every time I log in, I feel like this guy…

1 Like

Yeah i’m also old and started with the old school computers so I won’t repeat that stuff again - but the option of using a pre configured VM seems really simple these days.
I just made one yesterday for this exact reason for a customer who’s not used to Linux and needs it and some tools (and the perl libraries for those).

For anyone learning the cost of a raspberry pi and a pre-made flash card image with the environment should be easily doable.

1 Like

💰 YEN · YouTube ·️ YEN.CAMP 🧠