Live data from Hacker News

Ask HN: What would you teach adults new to programming in a 2 hour class?

news.ycombinator.com

11–20 of 21 posts

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#11
Perfect - I currently teach this to my sales agents and customer support team ( I am founder at a startup). They come from varied backgrounds and had zero knowledge of programming. Most of them actually wanted to know some very very basic things like : - What is a computer - What is a program - How does internet work

What I taught them in the first two hours: - What is a computer made of (Hardware, logic gates, cpu etc) - What is a program and how it runs on a server (How does a simple program look like and how does it go from high level code to being run on a computer) - How is the internet set up and how does the browser use it to find stuff - What is a browser - History of the internet - What is the difference between Front end, middle tier and database - Database basics like how is data actually stored physically - Write a simple python program

.... and now I go into actually building a website end to end with basic Html, css, JavaScript, some backend language, database. But thats more than 2 hours.

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#13
post #6

I honestly believe that learning to program is similar to learning to speak languages. You can't truely learn them after childhood. Atleast not in the way that you could when you were a child - in the way we learn our native languages. That certainly doesn't mean that someone can't 'learn what programming is' but I have serious doubts that someone who learns to program as an adult will ever actually program like a na…

I don't agree with either of your points, spoken language or programming language. I served in the military and studied CS. I graduated when I was 31 and have had a great career. I also learned Arabic while in the military. I don't think there is anything unique about my experience. The idea that adults stop learning is garbage. The brain is much more complex then that.

I never said adults stop learning. It would be terrible if we did.

But spoken language, absolutely true. For example, my wife speaks three languages fluently. But she dreams in Bulgarian, because that's what she is. I've been programming since I was six. Now, almost 50, I see virtually everything as a process (which is not a good thing, just as my wife). I strongly suspect that I think as I do because of what I've been doing every day for over forty years.

I didn't mean to offend. Clearly adults can learn and many can reach professional level with strong dedication. You are obviously one of them. But I still suspect that the children the OP teaches will get far more out of the lessons than the parents if they are taught in the same manner. Ask yourself if you ever think, count, dream etc in Arabic?

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#14

Two hours isn't really enough time to go from zero knowledge to programming. The first two hours or so are, almost inevitably, going to be spent learning the syntax and the interface; real programming begins when you start using that knowledge to solve problems.

I don't know. Assuming you don't have to deal with setup issues (the machines are ready to go), you should be able to present IO, variables, assignment, arithmetic operations, IF statements, and loops. Then give them a program that reads and repeats numbers, and ask them to modify it to print out the biggest number and the average. You'll have to move fast and just skim the surface of everything, but that would get them to programming within two hours.

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#16
Simple: build a calculator. They are adults and should know basic math so they have a comfort zone and would know if the computer did it right.

Introduce loops (add a string of integers like "1 2 5 8"), functions to run those (add, multiply, etc.)

Don't get all computer science-y on them with recursion, sorting or stuff like that in the first 2 hours of an introduction.

It might be a lot of work to setup 20 computers with something like Ruby or Python - assuming you ask them to bring their own laptop. That might take 2 hours itself. Just find some online Javascript (shudder) editor thing which will allow them to build a basic calculator - no UI though, that's too complex for 2 hours.

Programming is just telling a computer to do things. They are parents and should be familiar with that concept, except the computer will do exactly what they ask, unlike kids.

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#17
Get their hands on something usable and relevant as fast as possible. I like using very precise and specific instructions for creating a twitter "every word" dictionary bot for instance. Simply exposing people to the idea that there is a whole world they can interact with with code (via an API) is a very powerful concept to get people interested in coding. It makes them go "aha!" when they think of all the apps and technology that use in their every day life and wonder how things work.

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#18

Simple: build a calculator. They are adults and should know basic math so they have a comfort zone and would know if the computer did it right. Introduce loops (add a string of integers like "1 2 5 8"), functions to run those (add, multiply, etc.) Don't get all computer science-y on them with recursion, sorting or stuff like that in the first 2 hours of an introduction. It might be a lot of work to setup 20 computers…

Definitely NO! Not another calculator!

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#19
post #8

I think I would do the following: - set up a web page with some minimal and familiar interactions. - with the adult student, visit that webpage and let them use it. - then bring up the browser's web dev tools and show them some ways they can modify the content and behaviour. - to wrap up maybe go to a website they use regularly, and bust out the web dev tools and do some minor modifications. Why I think this approach…

I absolutely agree - it has to be something in the browser, because it has to be familiar and visual. No theory. Open the source, show people how simle html 1.0 elements work. Bold, italics, paragraphs, some simple styles. Then people would be able to see the link between the code and how it translates to what is displayed. I am not sure if 2 hours are enough to introduce javascript, but that is definitely the way to go next - you put a little script, like: calculate something easy, and diplay the results. But it shouldn't be about math, it should be about colours, shapes etc.

The third step would be about making them understand the difference between client and server side programming and between programs in the browser and standalone programs. But that's only if they get the first part.

I would also stress, from the very beginning, that it's really simple, that there is no magic or super-powers involved. Open a popular news website, open the source and change the articles on the New York Times website. You want to achive the "aha!" effect within the first 2 minutes, so that they are encouraged and positive about the idea. It's a small lie, but an important one.

Re: Ask HN: What would you teach adults new to programming in a 2 hour class?

#20

I don't think it's possible to do any better than this: https://www.youtube.com/watch?v=dlbMuv-jix8 Admittedly, when I found my way to Sussman's course, I had already been programming for awhile, so the "magic" was less of Wow, I can write a computer program that does neat stuff! and more Wow, this makes everything I've been doing so much more clear and simple!

I don't think that the average person taking an introductory program course has any interest in calculating the sum of squares or fibonacci numbers. May be alright for MIT students in 1986 but in 2017 people want to know how websites and phone apps work.
Post reply on HN