Hacker News new | comments | show | ask | jobs | submit login

I've been teaching kids to code for 19 years now, and I still make them do it the hard way.

Just two days ago this year's crop of 83 students wrote their first Java programs in Notepad and compiled and ran it from the command-line.

And I have a waiting list to get into my class.

I do work with older students (aged 14-18) and the key is TREMENDOUS support. I'll happily show them the command-line stuff over and over again for a month if need be.

And my curriculum goes through the basics of Java very slowly. As I've said on HN before, I make my students code FizzBuzz, but they will have literally done 106 complete programming projects before it.




> first Java programs in Notepad

Do you find this to be beneficial? What are your observations?

My first impression would be the frustration with lack of simple features that programmers take for granted in their editor, like auto-indentation. I can see the benefit in deferring syntax highlighting, but something as simple as the former can be unnecessarily off-putting, and distract from learning.

With that said, I try to think back to when I was learning HTML in elementary school, using Notepad to edit. I was so focused on struggling through comprehension that typing extra tabs/spaces wasn't what slowed me down. I also didn't know what I didn't know about editing. But I have observed frustration in others who didn't know how to program, pounding the tab key or spacebar. And I did forego indentation in my early days in many instances, because it was a PITA.

So this isn't a criticism of your decision to have students use Notepad; I'm just curious of their feedback and your observations. Java indents virtually every line.


It's important to clarify that these are brand-new students who have never coded anything at all in any language. I'm not teaching them Java; I'm teaching them how to code and Java happens to be the language.

That said, I only make them use Notepad for a day or two. My goal is that they understand that nothing magical is happening. Java is just text, which can be written with any suitable tool.

After the first couple of days we switch to Notepad++, which has syntax highlighting and auto-indent.

(We would use Sublime Text, but the district won't approve "shareware".)

I do have auto-completion turned off in Notepad++, though. In my experience that only produces beginners that don't actually learn the names of anything.

Auto-complete is super helpful once you have a few years of coding under your belt, but IMO it is inappropriate for honest-to-god beginners.


> I only make them use Notepad for a day or two. My goal is that they understand that nothing magical is happening.

This makes sense.

> I do have auto-completion turned off

I also agree with this. I'm not going to start a debate over the topic, but I believe its benefits are best exploited once they are least needed.

With regards to choice of editor: I don't know your district's rationale, but I personally wouldn't want to encourage use of an editor that they would have to purchase to use at home and get the same experience---it's not necessary in our field, and there are many good alternatives.

Your choice was a good one. I can't speak for the editor (though I have co-workers that use it for light editing), but it is free/libre software---proprietary editors would send mixed signals, saying that it's great to be curious and learn, to share code with others, to modify your software to suit your needs and help your friends...except when others tell you that you can't. Don't impose limits on their ability to learn and explore. :)


> I do have auto-completion turned off in Notepad++, though. In my experience that only produces beginners that don't actually learn the names of anything.

I found it a pretty surreal experience working on a Chinese (Java) code base. All the names were in English (comments were in Chinese, but anything that wasn't a comment was in "English"). Everyone used autocomplete. If a name happened to be misspelled on creation, everyone happily went with it forever. They didn't care. Even if e.g. you had a bunch of related methods like "dispatchAComponent", "dispatchBComponent", "dispacthCComponent".


At times even the power that an IDE brings aren't put into full use. The refactoring functionality in most IDE's makes fixing repeated typos easy but people still leave their code like that.


>> these are brand-new students who have never coded anything at all in any language

Is this really a thing? I just can't imagine a student going into CS unless they have at least a bit of experience playing with it in their own time. As someone who started programming at age 7-8, I just can't believe people go into CS without a pre-existing interest in the form of a hobby.

Do people really enter into CS for the money grab? No interest in programming, no idea what they are getting into, and solely interested in the salary once employed? That seems so counterintuitive based on the reason the majority of us enter the industry. Maybe this is where the 9-5ers come from? I can't say this without ego being involved: you can tell the difference between a "real developer" who spends some time most nights digging into new tech, vs. someone who is in it for the salary who adds nothing but code debt every time they touch the codebase because they never improve their skills outside of office hours. ie: The "senior" after 10+ years whose every commit looks like the work of a first-week developer.


Computer science is just an elective at my school. Students can also take a cooking class as an elective even though they don't plan to be chefs.

Students have room in their schedules for several electives and mine has a reputation as a tough but rewarding course. The majority of my students just take a single class and go on to college to major in something else.

Kids have different hobbies. I have students who've been playing soccer since they were 5 years old who don't play around with a computer for fun. Or they don't have access to a computer. (Many of my students are on free or reduced price lunch.)

Limiting the profession to those who started naturally at a young age is a good way to keep out everyone but rich mostly-white kids with college-educated parents.


"Limiting the profession to those who started naturally at a young age is a good way to keep out everyone but rich mostly-white kids with college-educated parents."

I would say it weeds out everyone who was not inclined to study programming or was not in a situation that prompted them to start programming.

Frankly, this is a childish presupposition. Let's imagine if surgeons where expected to have begun surgery for fun at the age of seven.

It's a cop-out excuse from teaching establishments (if used) and it's a harsh and exclusive requirement from colleagues, more fitting of a puerile fraternity than that a professional cohort.

What one does need, is a certain fluidity in language skills, logic, and most of all, most importantly, a will to learn.

Yes, it needs a lot of work, and it's not easy, but let's not invent imaginary boundaries for peoples careers and lives.


> Limiting the profession to those who started naturally at a young age is a good way to keep out everyone but rich mostly-white kids with college-educated parents.

Counter-example: I started coding at 9, got my first at-home family computer 3 years later, and my parents graduated college when I was already in college. This was back when a PC cost more than my parents made in 2 months. Now laptops can be got for $300.

It's not about rich, it's about having coding after-school classes as available as soccer (or whatever) practice.


> It's not about rich, it's about having coding after-school classes as available as soccer (or whatever) practice.

Ok... so what about the kids who want to play soccer instead of being cooped up inside?

The idea that you might have to choose between playing a sport and getting enough experience to consider going into CS/SE in college is ridiculous.


OK ... so what about the kids who want to be cooped up inside instead of playing soccer?

The idea that you might have to choose between coding and getting enough experience to consider being a professional soccer player is ridiculous.

;)

But my point was about having the choice and opportunity.


> Ok... so what about the kids who want to play soccer instead of being cooped up inside?

I don't see what your point is. The OP suggests that coding after school classes should be as available as soccer practices. Do you think that if coding classes after school are made available then somehow it is harmful?


Or rather, it's either about rich or about having a adequately funded and provisioned school system for people who are not.

I went through my first year at community college without even having a desktop computer. All of my home programming was with pencil and paper, and I used the lab. I can imagine that if you're 9, you may not have parents that can carve out an extra $300 so you can see if you like computers, or a lab at your school that has free computers that you have a sufficient level of access to in order to run or install the software you would need. I was in my 20s, and still limited.


I think the OP meant those doing a CS degree with no prior coding experience why would you do a degree in something if you had not done it at some level at high school?


> I do work with older students (aged 14-18)

These are high school students.


> Limiting the profession to those who started naturally at a young age is a good way to keep out everyone but rich mostly-white kids with college-educated parents.

~$100 (or less for an old second hand laptop plus a basic internet connection (or the public libraries one) is all that's needed to start programming.


$100 equals 40 hours of work in a blue-collar job down here in Argentina. It's probably even worse elsewhere.


And if you're coding, you're not training or doing another job. So it is actually much more.


Maybe there should be a laptop charity page which connects the ones needing old laptops with people having them rotting away in a drawer. Shipping can't be that expensive.

The question is, is there need for something like this?


$100 is a lot of money for a lot of people.

A lot of poor people do not have free time to earn it-- they're going to school and using their minimum wage money to eat. I slept on the floor and worked 16 hour days to be able to get my education.


"is all that's needed to start programming"

No it's not. You first have to know that it's a thing that you might be able to do. Who knows what other barriers are there unless they live it?


Hardware is relatively cheap, time is not.


To have been coding for 5-15 years when entering college now... you have to think about the prices and availability of internet/computers 5-15 years ago ;)


15 years ago I was involved with a charity refurbishing 486s (or better) and we were giving them away.


Okay, so you could potentially get a computer.

Now, think about accessing the resources to learn programming: Books, Documentation, Compilers, IDE...

I recall being on 56k internet in 2001, paying by the hour. Couldn't have learn programming, except going around and buying books and tools on CD and offline documentation.

That was the hell of a barrier to entry compared to today.


I didn't major in CS and I started programming only when I was 20 on my first year at the university, yet I quickly became enthralled with the subject and am now a pretty good well rounded software engineer (got my MSc in physics).

1. It's quite ok to start programming after ones teens and still make a career of it. The basics of programming aren't that hard. It's the systems design aspect which takes a lifetime.

2. Internal motivation for the subject is the key. People are pretty good learners for most of their life.

"Money grab"... Most professional careers demand quite many hours put into it. Some programmers treat their career as a profession, others as just a job. Since there are no authorative qualification bodies on the matter (like for doctors) that's just how the dynamics of personal lives and human nature run.

That said, I don't really see the point in chasing after new technolgies - I have quite a large enough learning load in trying to gain deep understanding of my domain (graphics/computational geometry).


Totally hit the nail on the head. I started programming when I was about 15 or so, but I left it for a few years. Im pretty much at the spot you're in right now and I'm just more fascinated with the subject than ever before even though I've been into computers since I was a little kid. Also again totally agree with you about the "money grab", even a friend of mine who does this for a living and is quite ab it older than me says he doesn't care about work off time because when he's out of the office for the day, he's done.


I've taught individuals that have driven forklifts for decades that converted to computers because of "the money". Regardless of anyone's reason for coming into CS, assuming only does one thing. That same individual is now a fledgling web developer because he found a love for programming amongst the certifications at my community college (the Software and Web Developer courses did not offer any form of certification with its degree, while tracks like Networking did).

Everyone starts with a simple "interest". Computers were the "interest" for me as a teenager that grew in CS. Others can be interested in "computers" but not know where to begin. Only after looking around did some find CS to be that "it" they were looking for.


1. These are high school students.

2. My mother, with an English degree, went into programming in her early 20s through a training program at her job. That was nearly 40 years ago, and she's still going.

Programming is largely a monoculture that looks down on people who are dissimilar (for example: who didn't program as a child, or decided to enter the field in college), and actively discourages them from continuing by assuming the worst about their capabilities.


Cool story about your mother. I'm interested to hear more about the kind of company that supported that transition, how long it took, and what it was like for her.


People take intro courses into subjects in the first year of university all the time when they're undecided. If something sparks an interest, some follow it all the way through. It doesn't necessarily produce 9-5ers -- it just means some people discover what their passion later in life in a different manner.


In college (back in the late 80s/early 90s) I had a few professors (in Comp Sci) that hated computers. My roommate disdained computers as well (he had a more theoretical/mathematical bent). There was also the Comp-Sci major I met that wanted to get out of programming and into management as quickly as possible.

There are all kinds.


From what I've experienced, most people don't have a "passion" coming out of high school. They figure they're pretty good at math, enjoy computers, and CS pays well, so they might as well major in that. So, it's not quite a money grab, but it's not based on a passion/hobby either.


More than 70% of the students who take Harvard's introductory CS class have never programmed before.

Introductory courses often serve the purpose of introducing students to a topic they've only heard of, if that.


I had very limited exposure to programming growing up. Freshman and sophomore year in college were what hooked me. I turned out all right, I think.


While I was interested in computers since I was young (at about 3) - my interests started with gaming and "hacking". Over time, I wanted to be a "hacker" and I started to look into actual software development. But till about Grade 8 - computers for me were a form of entertainment. I took CS classes but in all honesty, most teachers treated it as an extra-curricular activity (we were told to use MS paint, or play around in MS office etc.)

Over time, my interests grew and I wanted to make websites so I started off with some HTML. I got a basic hang of it and I wanted everything to be pretty - so I did some basic CSS and then I got in JS. (All of this was done in Notepad - I was not even aware about auto-complete and tab indentation till I got to university and started using Visual Studio and Eclipse)

I got into Software Engineering in university because I was passionate about computers - not "programming" in general. But the course of my education, I got into everything from web and mobile dev, to creating file systems (it was extremely basic) - and now, I'm extremely passionate about programming. All that said...from personal experience, I would say that if you combine game dev, CS and SE - more than 80% of the incoming class came in with no prior experience in programming.

In my specific class, out of the graduating students (in Software Engineering)- at max 2 of the 15 are what I would consider "good/skilled" programmers. The rest got in because of various reasons (thought it was easy, thought they'd get a huge salary after leaving etc.) and don't really give a damn about programming/tech and their code/skills display that - but in the end, it does not even matter because companies like TCS/FDM hire such students, have a "intense" training program (read: basic Java/C# skills) and then pass on these "trained" students to enterprise (banks, hospitals etc.) and pay them extremely low (min. wage during training period, 30 - 40k CAD for the next 2 years - which these students will accept because they are aware of their deficiencies and this sets a bad precedence for even skilled workers)

It's not TCS/FDM's problem, managers/enterprises don't care either as long as you have that many hours/day and work gets done (quality and ownership does not really matter) and your co-workers generally have a similar skillset and play hot potato when it comes to getting actual work done. All the workload finally falls on that one skilled guy / team who basically does everything (who'll keep getting more and more frustrated and finally quit)- rinse & repeat. And worst of all - co-workers will have the audacity to make fun of the skilled worker for having an interest in programming/work (because having a passion for what you do is somehow a bad thing /s) all while offloading as much work as possible.

I have seen quite a lot of friends (skilled and mediocre) basically fall into the above cycle and in the end - the skilled are the ones who finally give up and stop giving a damn about their work/skills (which then sets a bad example - I have heard this as an example in uni - "why bother studying this framework/tech?, just find the guy who knows it and offload it to em") while mediocre workers basically get skilled at just that - not getting work done while not getting fired - which is considered a perfect 9 - 5 life.

BTW the above are my experiences and incidents I heard from friends/co-workers etc.


I taught a few programming courses (C programming) this past year at a local college and I went for basically the same route: Get them to type out small simple programs in gedit, and compile them on the command line with a simple make file.

Modern programming is often so high-level and tool assisted that it is difficult for a newcomer to understand the difference between what they did and what the computer did. Many of them previously programmed using the arduino programming environment (which I haven't ever used), but I have been told that it does a lot of stuff automatically for them, they don't even write the 'main' method. Many of the students started trying to do all kinds of crazy stuff when trying to make a simple 'hello world' C program, including various Windows headers (on Linux), trying to do GPIO pin stuff etc. I think it can be beneficial to keep the number of new things as small as possible, and build up from there.


I couldn't agree more.

That's actually my biggest complaint with Java for true beginners; "hello word" has half a dozen concepts you can't omit but also can't even begin to explain.

I just get hand-wavy and say "it's a required heading that Java requires; I'll explain it later."


C++ is even worse, especially if using iostreams as many beginner's tutorials do. I mean seriously, your introductory script requires polymorphic operator overloading to abuse a common operator (left shift) into doing something totally unnatural for its usual meaning? What the hell.

Any introduction to programming which requires hand-waviness is just teaching newcomers to not ask questions, which is terrible.


I'm assuming you don't have a choice in the language? I'd pick Python or something similar over Java for teaching coding.


The AP exam is in Java, so I could teach the beginners Python and then switch to Java for their second year. Many teachers do.

Introductory Java works for me, though.


It's too bad that the AP exam is so slow to update.


In the US, most universities still teach Java for their first programming course for CS majors. The AP exam has to match that.

Once most universities begin with Python, the AP exam will follow suit.


The majority of "top" computer science departments teach Python in their CS 101 equivalent.

http://cacm.acm.org/blogs/blog-cacm/176450-python-is-now-the...


...but the vast majority of programs in the US teach Java or C++.


About 20k students take the AP Computer Science exam each year, split 14k for the A-level and 6k for the AB-level. I was going to make some argument that the AP students are all aiming for top schools, but the numbers seem to say otherwise. At least, 14k sounds like a lot.


Your data is super old; the AB-level exam was discontinued in 2009, and last year we had nearly 60,000 students that took the A exam.

But your point is therefore even more valid: not all of these students are going to be at top schools.


Wow, that is old. I looked up stats from the collegeboard website. I guess they haven't updated. Or maybe Google led me to an old page they haven't removed.


Ah, got it. I also took AP Computer Science—good memories!


I did a unit at university learning C at the beginning of the year and you sound similar to my lecturer. We used VIM, no fancy IDE's and we had to compile our code in the command line using flags such as -ansi -Wall -pedantic and would be marked down even if we had warning for not following the coding conventions. Same goes for allocating any memory we did not free, etc and to illustrate how to use debugging tools such as gdb, valgrind.

Was a tough unit that definitely did not hold your hand (I had done a lot of Java before that which handled things like memory allocation for you along with a much more forgiving teacher) but I am grateful I did the unit and really enjoyed the harder-approach my lecturer took.


> Modern programming is often so high-level and tool assisted that it is difficult for a newcomer to understand the difference between what they did and what the computer did.

I started programming long ago in a land fortunately very far away with Visual Basic---and this statement expresses one of the largest impediments to my understanding of systems.

I wholly agree that it's detrimental (and perhaps negligent on an instructor's part) until a time where the student has a firm understanding of the boilerplate.


As a middle school student in the early 90's we coded in basic on the Apple II. I loved it. I'm not sure fancy features like auto-indent are really necessary, nor would they detract from learning depending upon the goal. They're productivity enhancers for sure, and I suppose it depends on what you want to teach. If you're teaching algorithms through implementation, sure...might detract from the teaching process. If you're teaching people to go on to jobs right out of high school, then my goal for high school level students is to teach them to go into any environment that their employer might have. I can't tell you how many undergrads (my experience as an instructor while a grad student) I've had complain about an IDE that is unusable because it doesn't have feature X. When students show up with programming experience to college/job, I'd rather have their programming experience be transferrable to whatever editor is available (be it VIM, VI, Nano, MSVS, Xcode, whatever).


When I was learning C and C++ in college, my professor didn't show us what an IDE is until the second to last lab at the end of the school year. We were all like, "WHAT?! We were over here making Makefiles and all that when there's a piece of software that could do it for us?" But to be honest, after that, we didn't even use the IDE because we were already good at making Makefiles for our project, haha.

EDIT: Just remembered writing my first C programs in nano, lmao. I really wonder how much time I lost doing that, smh. Ended up using kate later on. I just learned vim last year out of forcing myself to abandon Sublime Text/Atom and once again, productivity skyrocketed.


I've been experimenting with college students by giving them images of source code and forcing them to type out the program as their first assignment for the week. I've since gone back to earn my PhD and I hope to study this specific technique to see the empirical merit to it.

I'd love to chat with you outside of HN if you have the chance!


I make all my students type in many assignments as well. I don't use images, though, just classroom management techniques since I have them in the room with me and I find students have less incentive to "cheat" when they know what they're doing.

Shoot me an email; would be happy to discuss.


"I make my students code FizzBuzz, but they will have literally done 106 complete programming projects before it."

Pretty sure I've never met one of your students in an interview...

(Just joking...)


I understand that you're joking, but my students deeply understand the fundamentals. They can code everything from scratch without having to Google anything or ever reference Stack Overflow.

My program is very strong. Some of my former students now write code for Microsoft, Google, Apple, Facebook and Dropbox. (Haven't gotten anyone hired at Amazon yet, though!)


> They can code everything from scratch without having to Google anything or ever reference Stack Overflow.

This isn't a good measure of proficiency. I frequently do both of those things---in fact, I consider it a bad thing when someone does not, because that means that they are not exploring others' solutions to the problem, or learning other methods of doing something. Struggling is a good way to learn, but at some point you should see what others are thinking, and how they are doing it better than you are.

Similarly, manuals (manpages, info manuals, online resources, etc) are essential: trying to memorize every detail when certain things aren't often used is not an efficient use of one's time, and that knowledge will only fade unless applied.

I think the point you were trying to get at was that for what was taught in your course, the students were proficient enough that they didn't need to reference other resources.


There is a difference between proficiency and fluency and when teaching languages it is important to distinguish them. Proficiency is a measure of how many things you can do. Fluency is the degree with which you can do something without undue thinking or planning.

I don't know exactly what the parent poster had in mind, but for me fluency is what you should aim for when teaching novices. You should keep the domain very, very small and help them get to the point where they can explore it without undue effort.

In human language training you get the classic example of "I can read just about anything if I have a dictionary, but a can't speak to save my life". The lack of ability to output fluently is an indication that the language has not yet been acquired.

It is tempting to get students to achieve impressive results based on being able to piece together material from outside sources (Google, SO in a programming context or a dictionary and example sentences in a human language context). However, creating fluency in a small domain gives a more solid conceptual model and will ultimately serve them better IMHO.


> There is a difference between proficiency and fluency and when teaching languages it is important to distinguish them.

That is important; thank you for the clarification.

> fluency is what you should aim for when teaching novices

I think you should aim for both, but yes this is important. An earlier thread mentioned autocompletion: use of it during early stages of learning is a good example of working against fluency.


Yes, I mean that they can code everything in my class without needing a reference.

I don't make them memorize anything -- I agree that's a waste of mental capacity -- they just learn it through tremendous repetition.

Once you know a half dozen programming languages then Stack Overflow and reference manuals are of course useful and I'm sure most of my former students do use them.


> I don't make them memorize anything -- I agree that's a waste of mental capacity -- they just learn it through tremendous repetition.

I don't understand. You are drilling them to memorize through repetition.


As someone who is studying web dev right now, i'm interested in hearing your methods and curriculum, as at least for web dev, it seems so much requires googling/using stack overflow.


> I do work with older students (aged 14-18) and the key is TREMENDOUS support. I'll happily show them the command-line stuff over and over again for a month if need be.

I think the article was written more in relation to teaching younger children, rather than high schoolers.


You're right, of course.

I'm not disagreeing with the article at all, actually. I agree with all five points.

I wish there was some programming offered in the lower grades in my district.


Do you have your curriculum in a shareable format, or even just an outline? I'm going to start teaching programming to high schoolers soon and would love to see that.


TEALS volunteer here (https://www.tealsk12.org). TEALS offers its Intro to CS curricula as open textbooks:

Sem 1: https://teals-introcs.gitbooks.io/introduction-to-computer-s...

Sem 2: https://www.gitbook.com/book/teals-introcs/2nd-semester-intr...

I taught this last year and had a blast. It's still a very new curriculum, so expect to have to work out some flow issues and maybe even a bug or two. In particular, doing Snap! for a whole semester I think works if you're only teaching one semester, but we wanted well more time on Python than we had.


These were my classroom assignments in 2012. My current assignments use my book, but the basic sequence is the same.

https://programmingbydoing.com/


I work in edtech and find this fascinating. I was at ISTE last June and talked with teachers with similar experiences. In your experience, what are the top three issues students face?


This is really interesting! Is your curriculum open, by chance?




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: