225 points · by akkartik · 10y ago · 109 comments
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.
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.
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.
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 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".
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.
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.
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."
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.
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.
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'd love to chat with you outside of HN if you have the chance!
Shoot me an email; would be happy to discuss.
Pretty sure I've never met one of your students in an interview...
(Just joking...)
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!)
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.
I think the article was written more in relation to teaching younger children, rather than high schoolers.
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.
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.
Let's pretend you're a high schooler volunteering at a charity.
"Donors who attended our last five fundraisers?"
"Email list for our whale donors from this fiscal year?" (>100, 1000, 100000+ whatever)
"Who are our best fundraisers?"
"Was the dinner last week a success?"
What are the odds the student who can answer these questions is helped by a teacher who ticks off any of the five principals in the submission? Logo? People aren't drawing basic geometric shapes. "Cognitive load" referencing types? I'm not even sure how to address this. Any beginner expects 1/2 to display 0.5. That entire paragraph is nonsense. Be honest Ok, learn how to excel in your field with programming/excel/sql/etc as tools to succeed at your job. "Computer Science" isn't programming and it isn't a job. Never confuse any of those. #5 is just generic filler for being a not-bad teacher.
In any case: I hope schools don't start with Excel, since that cements students in relying on proprietary software and Microsoft's suite of software. If they teach it as a generic spreadsheet program---e.g., the same things can be done with LibreOffice---that's another thing.
But if we're talking about programming, then we're not talking about putting some formulas in Excel---that's what I'd expect of far less technical positions, ranging from accounting, to data entry, to your average person looking to understand some simple data a little bit better. Someone trained to use Excel is stuck with morphing problems into Excel's domain rather than being able to apply general building blocks to other problems.
You can do some pretty complicated stuff in Excel that requires strong technical skill; I'm not implying otherwise.
They take my course to learn programming so we don't waste time on applications, valuable as they are.
I have felt this way for awhile with the direction some of these learn to code courses take with the younger kids. I think we sometimes forget just how quickly younger kids learn. They soak things up so much quicker than adults and even teens.
Last summer I ran a learn to program class for 8 to 12 year olds and it was a very interesting experience. We taught them how to program Minecraft mods in JavaScript. The biggest hurdle was critical thinking and trouble shooting.
We taught groups of 15 kids at a time and out of each group only 1 to 2 kids had the critical thinking/trouble shooting skills needed for programming. These kids were the ones that really excelled in the class and wanted to learn more. They couldn't get enough.
By making things too easy, I worry we are losing those 10% of kids that have the potential to be really great programmers. That 10% get bored with the drag and drop stuff and bail out if they are not challenged.
I was very bored in school, and I usually found some way to entertain myself. If it was a subject that I was interested in (like programming!) it meant that I spent time writing other programs while I was waiting for the rest of the class.
I would have preferred a stronger class for me, but this was the second best thing, I think.
I taught a semester of CS to high school students in Snap!, a derivative of Scratch. It's a coding-with-blocks app and we did go through a sequence of game projects with it. But it's unfair in the extreme to say students are not learning real CS by going through it. Here's what we covered:
Algorithms and algorithmic thinking (one of the first things we hit upon!) - Data types and variables - Data representation - Binary arithmetic - Scope (to some extent) - Conditionals and boolean expressions - Loops - Modeling and simulation - Event-based programming - Functions and procedures - Prototypal OOP
And all this while keeping high school students engaged with extremely limited time.
The curriculum I linked elsewhere on this thread if you're curious.
I think that, given the time and size constraints of an American high school class, the emphasis on keeping the cognitive overload constrained is paramount. And that includes as little yak shaving as we can get away with! Any attempt to evaluate a PL for intro really _really_ needs to look carefully and honestly at the yaks - in the language as well as the programming environment...
It is easy syntax, no extra concepts. Then pick some sort of structural language, and then go further...
Come to think of it, might be as successful as Logo but more gradual and useful. Everything is explicit.
Logo fails this criterion as far as I am aware, Pascal and Squeak do not.
In order to do TDD, students have to know enough to write an object with methods or -- at minimum -- a function.
My students do seven assignments before they even see a variable. They've done 25 assignments before they write an if statement. They do 76 assignments before they see a function.
My second-year kids can do TDD and it works pretty well.
But for students with literally zero experience coding, TDD means you're skipping a LOT of basics. Or throwing a lot of unnecessary complexity at them before they even know the basics.
I've been teaching programming 1-on-1 with mild success by introducing concepts related to teaching fairly early: http://akkartik.name/post/mu. But I'm very conscious of what I don't know, and eager to learn more.
If you can write a TDD suite to test those first 69 labs then my hat's off to you.
I think we have different definitions of the word "beginner".
Absolute beginners have trouble looking at foo = bar; and understanding that variables do something different on either side of the equals symbol (which helpfully is doing a different job to what it does in their math class). TDD I just adding another layer of misunderstanding and complexity when you need simplicity and clear concepts.
I even got to try it myself recently. The IntelliJ people have a nice setup for learning their new language Kotlin. Every exercise is driven by automated tests:
I'd love to see this approach tried seriously with programming novices. Partly because I think it's a good learning experience. And partly because people get used to testing from the beginning.
As long as there is a market demand for these little apps, enterprise consumers and shitty little ventures millions wills be invested here and greedy companies and stackeholders will profit. Fuck the poor and ambitious ideas. There is money to be made!