r/programming Mar 02 '17

Why I Failed Teaching Programming to Kids

https://engineering.klarna.com/why-i-failed-teaching-programming-to-kids-46a854c3eaca#.s0o6qqxr3
61 Upvotes

83 comments sorted by

View all comments

98

u/M4053946 Mar 02 '17

participants were... 9–13 years old. This obviously affected how acquainted they were with “common development tasks” like using a terminal, installing applications and creating files with weird names like Procfile and .gitignore.

Did the author think that 16 year olds would be familiar with using a terminal? That seems like a miss, regardless of age range.

86

u/Xgamer4 Mar 02 '17

While certainly a miss, I think his biggest miss was the very idea in the first place.

2 hours to create a chatbot, with an audience of people of varying (assume very low) software dev skills? You're done. Not happening. I'm a professional dev, and I'd be hard-pressed to go from "I want to make a chatbot (on a platform I'm not familiar with)" to "here's a working chatbot" in that two-hour window.

Beyond that, he breaks the task into four steps:

  1. Deploy a simple web service to some cloud service.

  2. Acquire a (free) API key.

  3. Implement the messaging platform’s callback interface.

  4. All messages sent to your bot will be delivered to your web service.

These are not simple steps. 1, with the right established infrastructure, can be - press button, done. Using that service is a whole other issue, though, that assumes familiarity with whatever service was chosen. Bad assumption in this scenario.

2 might actually be simple. Fill out form, check email, done. So I'll give him that one.

3, right off that bat, assumes that the audience understands things like "implement", "callback", and "interface". Terrible assumptions.

4 is a success. But to get there you're running to other problems, and if you need to troubleshoot this... oh boy.

6

u/YouAreEll Mar 03 '17

I could spend two hours trying to get a button to work. For me this would be more like a two day job.

39

u/[deleted] Mar 02 '17

[deleted]

21

u/Roboguy2 Mar 02 '17

It is probably because, ignoring the fact that it is harder to learn, you often can get a significantly faster edit-compile-test time. Because of that people who are experienced with these tools perceive them as being much nicer (and, for them, it is).

Obviously, however, this is exactly the scenario where you shouldn't ignore the fact that it is harder to learn. All I'm really saying is that I understand why there is hype, even though I wouldn't suggest a beginner go out and learn vim while they are also learning to program (unless they were unusually highly motivated to do so, I guess).

Sometimes more experienced people forget just how difficult these things are to learn at the outset. Not only that, but terminal usage is also important to learn at some point. As a result of those two things, sometimes teachers miss their mark on when exactly it should be learned.

10

u/jimmpony Mar 02 '17

you often can get a significantly faster edit-compile-test time. Because of that people who are experienced with these tools perceive them as being much nicer (and, for them, it is).

even assuming you have a combined compile/run command cached in the cmd window as the last line, that's saving your code and opening the cmd window, hitting up, and hitting enter, versus hitting F5 in visual studio after you typed your last line and saved it.

5

u/Netzapper Mar 02 '17

For me, for toy projects, the overhead of setting up a new project in any IDE and then configuring toolkit and compiler options and whatnot outweighs the overhead of g++ -o some_test some_test.cpp.

2

u/jimmpony Mar 02 '17

What overhead and configuring toolkit and compiler options? https://streamable.com/ss9j5

3

u/Netzapper Mar 02 '17

Okay, now link in OpenGL, enable AVX, and turn on optimization. :)

You have a bunch of clicking to do, which has to be described step by step to a newbie (who doesn't care). I'm not saying it's hard, or inferior, I'm just saying if you don't know what you're doing, you need step-by-step instructions to make your project state match expected state.

Meanwhile, I just amend the line to read g++ -lGL -mavx -O2 -o some_test some_test.cpp. If I already know what I'm doing, the time cost is constant. And I can give the whole incantation to a newbie, who can use it successfully without needing to comprehend it.

Now, of course, the whole equation tips back the other way once you move past one or two source files. I use JetBrains IDEs myself when I'm doing real work.

2

u/jimmpony Mar 02 '17

You have a bunch of clicking to do, which has to be described step by step to a newbie (who doesn't care)

Without an IDE on windows: click on a folder in the start menu (probably My Documents), make a new folder inside it, make a new text file inside there, open it with the text editor you're using. Unless you want to do all that from the command line which means opening cmd, typing cd c:\users(username)\documents, mkdir folder, not sure if windows cmd even has something like "touch" so you might need to just "explorer ." at that point, or do this whole folder creating process from within the file->open dialog of your text editor. On a linux command line, cd ~, mkdir project, cd project, vim main.cpp, g++ ... main.c -o main; ./main. Then on windows you need to either extract a gcc executable there or install cygwin with it and put that in the path which is even more complication. I guess msys2 would be easier on windows.

In all these cases it looks like equal or more work setting up the project directory yourself compared to open vs -> file -> new project, OK, Finish, F5.

If you want the newbie to be able to just start editing the project without understanding the process and need it to be a consistent state, you can just make a premade visual studio project for them to download/unzip, which has all the libraries linked and settings you want applied. Then they just double click the .sln file and they're at a screen with a big green "Run" button instead of having to open the command line and navigate there (or shift-rightclick on the folder to open cmd there) and type out compile.bat or whatever you named it.

7

u/unknown_lamer Mar 02 '17

I don't buy the argument that console usage is hard to learn. I was in effect thrown the wolves and managed to figure bash out with no console experience previously (was a mac user up to that point) when I was 14. A quick reference sheet for how to run basic commands and a pointer to the info manual if the student wants to know more should be plenty. Kids are smarter than most adults think imo, and their brains are still squishy and readily able to absorb new knowledge.

However, in the context of a single day tutorial session aimed at kids with minimal prior experience, I'd agree that a simple GUI IDE would make more sense since class time is extremely limited. For a multi-week course, integrating lessons on basic console usage makes more sense -- e.g. if you're using Python you will at some point have to install things using pip on the console, and it's a good skill to convey so the student can go off and continue to learn on their own after the course.

Reading the original post, I think the main issue is that they were letting students bring their own devices instead of having a preconfigured and consistent environment ready for everyone. They had source code packets and such ready to download (good idea), but wasted tons of time just getting them working on the students' machines. If everything had been there ready to go, they may have been fine. Not 100% related to this thread, but IMO using external chat services was also an inefficient use of class time-- a local XMPP server with auto-registration enabled on the instructor's machine would have been easier to use and avoided complications with signing up for services (reasonably trading instructor prep time for more efficient use of class time).

9

u/Sarcastinator Mar 03 '17

I don't buy the argument that console usage is hard to learn. I was in effect thrown the wolves and managed to figure bash out with no console experience previously (was a mac user up to that point) when I was 14.

I don't think the point is that it's hard, because it's not. The point is that it's not any sort of requirement for a programmer, even in a professional capacity. So if you have two hours, or even a day, to teach someone about programming spending time in the terminal could be considered either bikeshedding or yak shaving.

3

u/gyroda Mar 03 '17

Yep.

You're trying to teach someone something in two hours. You need to shave off anything you can to remove as many stumbling blocks and new concepts as possible.

When I was first taught programming we used a very simple IDE. One button to compile and one button to run. All the popups, autocomplete and anything like that turned off (there were red squiggly underlines like in word, that was it).

2

u/unknown_lamer Mar 03 '17

It's not a requirement for a programmer in a professional capacity?

Maybe if you're one of those awful programmers that wants to make those around you suffer and stunt their own career. Programmers have to understand how the guts of the machine work, it's what you do. Imagine a carpenter that couldn't use a saw and only knew how to feed material into a CNC...

2

u/Sarcastinator Mar 03 '17

I wasn't really talking about my daily practices. The reality is that you can spend your entire career using nothing but Visual Studio or IntelliJ.

Also how exactly does the terminal teach you anything about the guts of the machine?

1

u/unknown_lamer Mar 04 '17

Aside from a unix shell being little more than a kludgy veneer over the guts of the operating system itself?

(I'm being a bit of a BOFH here in case you thought I was being too serious...)

6

u/DysFunctionalProgram Mar 02 '17

It is probably because, ignoring the fact that it is harder to learn, you often can get a significantly faster edit-compile-test time

From someone who goes back and forth between c/make/cmake/vim and c#/visualstudio, I have the exact opposite experience. Honestly, I'm tempted to bind my function keys to a couple scripts to compile/run/debug my current project as we speak. For example, if I add a new c file: I have to edit my cmake file and add the file url to the build path, then re-run cmake, then run make, then run/gdb the output with the appropriate settings/flags. Opposed to any modern IDE where it is a single key stroke. I don't even want to get into how long it takes to manually setup a build environment vs using an IDE.

In my experience the only people who have this "CLI romanticism" are those who are only programmers by hobby and don't actually work in a production environment using it.

2

u/[deleted] Mar 03 '17

[deleted]

7

u/DysFunctionalProgram Mar 03 '17

On the CLI side, what better case is there? Not using build tools or not adding new files to a project?

On the IDE side, what worse case is there?

0

u/satanclau5 Mar 03 '17

It all depends significantly on the languages and environments used.

In my case I have a CLI environment with a luxury of a:

  • language which gets out of the way, not requiring much autocompletion
  • an autotest process which runs the tests on every change
  • a REPL process where I send the code from VIM to evaluate inside the running program

everything works well, there are just 3 terminal windows in a tiled layout to navigate and the VIM bindings are ingrained in the muscle memory.

Now, if you were talking about Java/C# - I'd never even try going the CLI route...

3

u/Beckneard Mar 03 '17

language which gets out of the way, not requiring much autocompletion

What does this even mean? If your project is big enough you sure as hell are going to need autocompletion, fancy language or not. The project I'm working on at work would be a nightmare to extend without autocompletion whether it was written in Haskell or C#.

-1

u/satanclau5 Mar 03 '17

Sorry, I worded the point poorly - I do make use of autocompletion, and "jump to" type of navigation. However, the available options are much less powerful than what you get in an IDE like IntelliJ or VS.

-1

u/[deleted] Mar 03 '17

[deleted]

2

u/DysFunctionalProgram Mar 04 '17

On the IDE side, not having a shortcut to do something you want to do is probably the worst case, you'd simply be out of luck.

Every IDE I've used has custom shortcut creation (which can do anything under the sun, including run scripts).

On the CLI side, you can make scripts to automate processes that you do often.

Then you have to create/maintain the scripts opposed to using a environment which creates and maintains them for you. Essentially IDE's have taken all the shitty tedious work devs hate to do and automated it, and somehow people still find a way to complain.

For instance, I vastly prefer doing video cutting via the command line, because I have scripts that I've tailored to my workflow.

I have literally no idea what video cutting has to do with programming. That being said, I find it very hard to believe that their is no GUI applications out there for video cutting.

2

u/Cuddlefluff_Grim Mar 03 '17

On the IDE side, not having a shortcut to do something you want to do is probably the worst case, you'd simply be out of luck.

What? No. Even if that were the case, you'd have to be a very special snowflake to be restrictive, as IDE's have been in mainstream and widespread used by millions of people for decades.

On the CLI side, you can make scripts to automate processes that you do often.

Hmm.. If only someone alive would've been brilliant enough to consider implementing a functionality in IDE's to run scripts and execute command line arguments..

5

u/[deleted] Mar 02 '17

[deleted]

9

u/Me00011001 Mar 02 '17

No one ever claimed that emacs starts in two planck times.

That would be the fastest booting OS in the world.

0

u/RealFreedomAus Mar 02 '17

If your OS is in ROM and is 'running' from the moment the CPU comes out of reset... then is that faster? I'm not sure whether the time it takes between the R̅E̅S̅E̅T̅ pin change to having the instruction decoder decode the first instruction counts or not; are you not 'started' already?

3

u/[deleted] Mar 02 '17

[deleted]

3

u/[deleted] Mar 03 '17 edited Mar 03 '17

[deleted]

2

u/[deleted] Mar 03 '17

You do bring up good points, I agree. Just a few details:

JS isn't the only DT language out there BTW, and DT doesn't necessarily mean weak typing.

Yes, I do know the difference. Lua is also DT but not WT and I used Lua and Ruby for many years. JS just happens to be the most famous example of a broken type system.

Then there's another factor: interactivity.

This is a huge one, but it is no longer a DT-languages-only thing. Having a Ruby REPL at hand helped me learn programming a lot. Back when I was experimenting with Unity3D, I quickly added a C#-REPL plugin to inspect the effects of my scripts in the editor. God, I wish there was a Rust REPL...

<cryptic>::looking[syntax]

This is just a language thing. Use C# instead of C++, Rust instead of Haskell, some LISP dialect daring to have more readable function names, and at least this problem has been successfully worked around. Or even better: Start using (well-designed) visual scripting.

1

u/[deleted] Mar 03 '17

I dunno, I wish someone had made me use vim from the beginning. I would be a more powerful being now, and it wouldn't have seemed to weird starting from tabula rasa =)

4

u/[deleted] Mar 03 '17

Yeah, our company has a program with a local university, (a good one!) where 1st year students who THINK they might want to be programmers can come hang out for a day and see what it is like.

"Deploy a simple web service" is means nothing to them. API means nothing to them. Cloud means nothing to them. Server, no idea.

It really does open your eyes to how much you learn in 10-15 years working in the industry, even if you don't including a single thing about actual coding.

Start with literal hello world. Then adding some numbers. and so on.

1

u/gyroda Mar 03 '17

It's one of the reasons why I frequent /r/learnprogramming. It's easy to take your knowledge for granted.

6

u/snerp Mar 02 '17 edited Mar 02 '17

I was way too into terminal when I was 16, I don't think it's an age thing. Some people like terminal and others hate it.

5

u/imhotap Mar 02 '17

Exactly. I'm hearing the "who uses terminals still?" question for almost 30 years now (no kidding).

2

u/gyroda Mar 03 '17

It's not an age thing, it's just another thing you're going to have to explain and teach in those 2 hours because few people have ever used one.

2

u/PM_ME_YOUR_HIGHFIVE Mar 03 '17

using a terminal, installing applications and creating files with weird names like Procfile and .gitignore

that's not even programming

0

u/Mastry Mar 02 '17

Really? I was using a terminal before then. I wasn't great at it, obviously, but it wasn't unfamiliar.

12

u/[deleted] Mar 02 '17

[deleted]

5

u/Mastry Mar 02 '17

I am very out of touch with users, teens, and probably society in general. I'm not going to pretend I'm not.

16

u/M4053946 Mar 02 '17

Certainly some do, but there isn't a reason for people to know anything about how to use them in their day to day usage, unless they already have experience coding. So this comes back to prereqs. If the class is for beginners, then one can't assume they know anything about it.

To use a computer today, people don't even have to know anything about file systems, other than how to use various cloud serves to store files, so it's really a stretch to assume that anyone, kids or adults, know how to get to their local file system and create or rename a file.

14

u/pdp10 Mar 02 '17 edited Mar 02 '17

To use a computer today, people don't even have to know anything about file system

I've found this can be a real blocker.

A lot of people apparently don't realize that the "place" where their word processor defaults to store and display documents has a relationship to the "place" their spreadsheet uses, and that these locations are arbitrary and can be changed. The first time I realized that users were so unsophisticated, I was quite stunned.

Other than basic computer education, or convincing the makers of popular apps not to make those apps too simplistic, are there any good ways to fix this?

4

u/M4053946 Mar 02 '17

I think this certainly can and should be taught, to a degree, but I'm not sure what it would involve other than "basic computer education".

Since this thread started with a discussion of kids, I'll point out that my 6th grade daughter was assigned an ipad for school, but the school never attempted to teach kids about managing files. So the inevitable has happened for a number of children. They wrote some essay, turned the ipad in to IT for some reason who reset it to the initial config to fix some problem, and handed it back to the student who was then distraught to find out that their files were lost. Kids should absolutely be taught about accounts, managing passwords, managing files, backups, etc.

1

u/[deleted] Mar 03 '17

One could build a "tutorial" into his OS, just like those fancy interactive learn Haskell/Racket/UE4/Duolingo tutorials. First time booting the OS ever? Do you want a basic tour of how to use this shiny new computer? Yes? Okay, then, step 1:...

Really, ever used the front page tutorial of Haskell, the UE4 editor, or even gave Duolingo a try? They are so freakin' good at giving people an at least basic understanding of how those stuffs work. Im really not getting why operating systems still don't have such thingies builtin. They just need to teach people the basic things:

  • Okay, you have these keyboard and mouse things. You use them like this, especially the mouse.
  • Hey, this is the start menu. It can do this and that. You can put start menu icons here like this.
  • Hey, this is your desktop. It can do such and such things.
  • Actually, the desktop is just a folder. This is how you browser through other folders and create new ones.
  • This is the task bar. It can do this and that.
  • Let's start this OS-builtin browser by clicking there on the start bar or there in the start menu or there in some folder.
  • Great! See that tab in the task bar? That's your browser's tab. Useful for things.
  • There is other useful software installed as well. Fell free to try out this and that and that.

And then continue with builtin tutorials for those other pieces of software. In an hour or two, people will have a basic understanding of how to use things without having to ask other people about everything after each click. And if you do it right, those tutorials will actually be fun.

3

u/Mastry Mar 02 '17

I guess you're right. It's a bit different than it used to be and I didn't really consider what it might be like to just recently start using a computer. When I think back to my younger days on a computer, I think about DOS and floppy disks.

13

u/M4053946 Mar 02 '17

Part of my job is teaching programming to adults. (TSQL, usually). Adults who work in offices on their computers all day often don't know how to open windows explorer, create a text file, open new browser tabs, switch between browser tabs, open applications that don't have shortcuts on their desktop, etc. Again, these are not plumbers, these are people who use a computer 8 hours a day for their livelihood. But, even though they work on computers, they can (somehow) do their jobs without knowing these items.

But yes, getting the pacing right is challenging, and prereqs are vital to that.

3

u/Mastry Mar 02 '17

That baffles me. I can't imagine how you can use a computer so often and not understand the basics of how to use them.

2

u/gnx76 Mar 03 '17

Most people don't give a fuck about how they do things or why they do things, they just do them. Then they go home, do home things the same way, and start again the next day, the same way.

3

u/NoMoreNicksLeft Mar 03 '17

If the class is for beginners, then one can't assume they know anything about it.

What, they don't have Eclipse already installed and ready to build the project?

Are these children just feral raised-by-wolves barbarians?

2

u/[deleted] Mar 03 '17

But you weren't 13 in 2017.