Live data from Hacker News

Ask HN: What's your view about learning how to program on paper?

news.ycombinator.com

1–10 of 23 posts

Ask HN: What's your view about learning how to program on paper?

#1
Hi hackers, how are you doing?

I have just started Computer Science at college and I will have a class named "Programming Fundamentals" where all our practice questions and exams are to be made on paper, instead of a computer.

This is supposed to be an introduction to programming and yet, we have close to no contact to actually programming on a computer. The teacher's logic is that we first need to learn how to "think like a programmer" but is paper a better way of achieving that?

What's your view on this?

Re: Ask HN: What's your view about learning how to program on paper?

#2
It's OK if you're only learning concepts and not syntax. Also if you're allowed to draw pictures, that will help a lot.

Obviously there's no replacement for the immediate feedback you can get by exploring with a real live computer. And you won't learn what is easy for a computer to do that might be hard for you to think about. I.e. you won't learn what a computer "feels" like or how it reacts to your input. I think this is a bad idea for a beginning class. Maybe some theory class later would be better.

"Always yield to the hands-on imperative!"

Re: Ask HN: What's your view about learning how to program on paper?

#3
That's the way i did it fifteen or so years ago and it's the method i'll use if i had to teach an introductory course.

Pros:

- Using the trial&error approach to solve a problem is not efficient without a compiler, this forces you to think more carefully about the algorithm (and corner cases) instead of just typing out stuff until your algorithm "appears" to work.

- You'll learn to debug/test on paper, a skill that everyone must have.

Cons:

- Harder to learn the proper syntax without something that automatically shows errors? I'm not sure that this is a real issue...

Re: Ask HN: What's your view about learning how to program on paper?

#4
post #2

It's OK if you're only learning concepts and not syntax. Also if you're allowed to draw pictures, that will help a lot. Obviously there's no replacement for the immediate feedback you can get by exploring with a real live computer. And you won't learn what is easy for a computer to do that might be hard for you to think about. I.e. you won't learn what a computer "feels" like or how it reacts to your input. I think t…

Yes, I should have said something about it, but it is not, at least from what I've been told, about drawing boxes and having a visual representation of your algorithm, but actually writing it on Scheme. On a piece of paper.

What if I have a small bug, like a comma, or something small like that, out of place? I'll have to ask the teacher about it.

I'm thinking of just skipping this class and learn from OpenCourseware.

Thanks for your thoughts.

Re: Ask HN: What's your view about learning how to program on paper?

#5
post #3

That's the way i did it fifteen or so years ago and it's the method i'll use if i had to teach an introductory course. Pros: - Using the trial&error approach to solve a problem is not efficient without a compiler, this forces you to think more carefully about the algorithm (and corner cases) instead of just typing out stuff until your algorithm "appears" to work. - You'll learn to debug/test on paper, a skill that ev…

But why only paper?

I am not against using paper to do things like doing a diagram so you can understand your algorithm better and its shortcomings, and you're right, knowing how to debug on paper is important, but how do you know you have a bug if you can't test the code in a computer?

Our practice classes don't have computers on the classroom. This is not to say you can't do that at home, of course)

Re: Ask HN: What's your view about learning how to program on paper?

#6
post #3

That's the way i did it fifteen or so years ago and it's the method i'll use if i had to teach an introductory course. Pros: - Using the trial&error approach to solve a problem is not efficient without a compiler, this forces you to think more carefully about the algorithm (and corner cases) instead of just typing out stuff until your algorithm "appears" to work. - You'll learn to debug/test on paper, a skill that ev…

What I meant by learning syntax is that you have to think more about syntax when you're writing it on paper. When you're typing C++, you're not really thinking about where all the semicolons and braces go, it's all pretty automatic. If you want to learn to "think like a programmer" that means being able to forget about the syntax and focus on your problem.

That said, I have to agree that bench testing is an invaluable skill. I was able to impress a lot of my classmates by simply glancing at a program listing and pointing out the bug.

Re: Ask HN: What's your view about learning how to program on paper?

#7
I've lectured for a few years. Classes like intro to IT, Software Engineering Fundamentals and a few other similar classes.

I think Programming Fundamentals should focus on teaching students how to visual systems (stuff) in the real world and how to make that stuff work in a computer. Basically, the job of a programmer is to take some manual process we do in the real world and automate it in a computer.

But the way the real world works and how you represent that real world in a computer are really different.

I think it is a wrong approach to learn how to do this by learning to code first. That being said....

I would recommend hacking stuff out on paper. Not necessarily the source code though. I wrote a book that tries to explain this stuff without using source code. I think drawing out your ideas using diagrams is a great first start (even UML diagrams can be helpful for this). I'm not saying you should program like this. Diagrams do help you take something in the real world and start to transform it to something more abstract: something that can eventually work in a computer.

Anyway, I'll be happy to give you a free copy of the book (I've given it away a few people on HN who are new to programming).

Also hope this helps answer your question.

Re: Ask HN: What's your view about learning how to program on paper?

#8
I would say 'Programming Fundamentals' includes topics such as logic and problems solving. There is a lot of ground you can cover on these without requiring writing code, or even using a computer.

I would expect the class to be fairly abstract like that for a while, maybe getting into the basics of some specific language about half way through the semester.

Re: Ask HN: What's your view about learning how to program on paper?

#9
post #4
post #2

It's OK if you're only learning concepts and not syntax. Also if you're allowed to draw pictures, that will help a lot. Obviously there's no replacement for the immediate feedback you can get by exploring with a real live computer. And you won't learn what is easy for a computer to do that might be hard for you to think about. I.e. you won't learn what a computer "feels" like or how it reacts to your input. I think t…

Yes, I should have said something about it, but it is not, at least from what I've been told, about drawing boxes and having a visual representation of your algorithm, but actually writing it on Scheme. On a piece of paper. What if I have a small bug, like a comma, or something small like that, out of place? I'll have to ask the teacher about it. I'm thinking of just skipping this class and learn from OpenCourseware.…

From my experience, teachers are pretty forgiving about "typos" in paper programming. They just want to make sure your thinking is good. Of course I can't vouch for your teacher in particular.

Re: Ask HN: What's your view about learning how to program on paper?

#10

I've lectured for a few years. Classes like intro to IT, Software Engineering Fundamentals and a few other similar classes. I think Programming Fundamentals should focus on teaching students how to visual systems (stuff) in the real world and how to make that stuff work in a computer. Basically, the job of a programmer is to take some manual process we do in the real world and automate it in a computer. But the way t…

Thanks Eric, really appreciated for your offer. I don't know how you generally approach this but I've updated my HN account with my email.

I will continue attending the class and see if it is indeed more abstract and focused on topics like logic and visual stuff. I'll also ask a friend of mine about her experience with the class and the teacher about how the exams are handled.

Once again, thank you for your help. Really appreciated :)

Post reply on HN