New name, new site, new discussion group

I knew proglit wasn’t a great name, but I figured a short domain name would be advantageous. But it turns out not to be any good because it sounds like random syllables, so you have to always spell it out to people: p r o g l i t. Finally I hit upon this new name, codeschool, which fits pretty well, is easy to say, and there’s no question about how to spell it.

You’ll notice the mascot is a toadstool. Get it? Toadstool? Codeschool? No? Okay.

I’ve also deleted the old discussion groups and created a new one. (Rather than have separate groups for students and contributors, we’ll just stick with one for now. If it becomes a problem, I’ll just start a second group later.)

I’m currently working on material for Python. I’ve reconsidered the whole approach to first languages: rather than take students through Javascript, C, then Java before they should expect to do anything resembling real programming, now they’ll do Python after Javascript so they can get down to doing some more practical stuff earlier on. I still maintain that Python is a much more complicated language for learners than many assume, but Python really does make it much easier for students to get off the ground writing and executing small programs, and I realized that’s more important than I was giving it credit. I also realized Python makes a simpler introduction to OOP than Java and better leverages material already learned in Pigeon and Javascript. It will be nice to reinforce the dynamic model students learn in Javascript even further with a language they can actually write some code in and run.

Posted in Uncategorized | Leave a comment

Hard problems in computer science

“There are only two hard problems in Computer Science: cache invalidation and naming things” – Phil Karlton

Posted in Uncategorized | Comments Off on Hard problems in computer science

more Java material

Updated “C, Java, and Javascript miscellany” with more Java material. This is stuff I had thought would go in its own unit, but it’s mostly too tedious for a video.

UPDATE: I’ve split this stuff into separate documents. Intermingling C, Java, and Javascript material was just too confusing.

Posted in Uncategorized | Comments Off on more Java material

What every programmer should know about memory

Very good article at lwn.

Posted in Uncategorized | Comments Off on What every programmer should know about memory

Current work

Right now I’m writing some material to fill in details about convenience features in C, Javascript, and Java, such as switches, compound assignment operators, etc. This material covers stuff already in “The C Language (unit 2) and stuff I thought would go in “The C Language (unit 3)”, but now I’m going to remove the first two videos of unit 2 and add additional videos to unit 2 to finish up the coverage of C.

Aside from this, I’m working on two units about Unix: the first unit covers the essential system calls (fork, exec, etc.) and simpler IPC mechanisms; the second unit covers terminals, shells, and essential utilities.

Also, I’m working on an introduction to networking and the Internet, including coverage of TCP/IP and DNS.

Currently we go from Javascript (unit 1) to C (unit 1) to Java (unit 1) with C (unit 2) left as a supplementary unit, but because it’s hard to talk about Unix without first having a quite thorough working knowledge of C, and because going straight through 3 languages is probably confusing and exhausting, the new order will probably be:

  • Javascript (unit 1)
  • C (unit 1)
  • Introduction to networking and the Internet
  • C (unit 2)
  • Unix system call
  • Unix terminals and shells
  • Java (unit 1)

The Internet unit could pretty much go anywhere here, but in this position  it can usefully break up the monotony of too much talk about C.

Posted in Uncategorized | Comments Off on Current work

First release, 10.5

The materials are under core units.

Understand that the first unit is the roughest: the narration needs to be redone at some point and I plan to get rid of the intro music (it doesn’t contrast well when the music cuts out and my droning voice comes in). The other units are generally a bit more polished.

Though the materials are not yet as complete, clear, and error-free as I envision, I feel the project is finally at a point where it’s genuinely useful to anyone newly starting out or still in their first year or so of learning to program. There’s now a complete progression from starting blank up through partial coverage of Javascript, C, and Java. So I’m going to call it good for a first release. Not every t is crossed, but close enough.

If you have corrections or other material to contribute, see development.

If you work your way through the current materials, I recommend you take it in 20-30 min chunks (lest you get too sick of my voice), using the notes to refresh you on what you last watched. Even assuming everything is comprehensible enough to get you all the way through all 10 or so hours, it’s very unlikely you’ll understand and retain everything, but you should be in a much better position to understand other resources. The overall goal of the project is to spare you enormous amounts of pain and time in learning to program, and I hope the materials will accomplish that even in their partially completed state.

Here’s a few ways these materials are meant to differ from what you usually find:

Favor concepts over particulars:

Knowledge tends to fall into two types: the conceptual and the particular. Learners need to “get” concepts and then retain them; for particulars, in contrast, there’s nothing to “get”, just something to memorize.

So learning particulars is easier and less work, right? Well particulars are certainly easier to teach because all the teacher has to do is basically list them. However, most particulars in themselves seem arbitrary and boring, so they tend to go in one ear and out the other. What’s worse, the only real way to learn particulars, in practice, is by repetition. Ideally, this repetition would be “organic”, arising naturally in the context of some other business the student undertakes, so teachers should try to contrive such “organic” scenarios. Unfortunately, this is generally very hard for teachers to do and sometimes just not possible.

A concept, on the other hand, tends to be memorable once you get it, and once you do get a concept, it’s much easier to memorize the particulars associated with it. The challenge for teachers, then, is to make concepts understandable by articulating them clearly and presenting them in the right order.

So the approach of these materials is to greatly focus on concepts over particulars. For example, when it comes to laying out the features of programming languages, I defer the introduction of syntactical conveniences because they’re mostly just so many particulars that distract from the core concepts. A for loop, for instance, is just a convenience for more compactly writing a while loop, so I don’t mention for loops until well after the core concepts of the language have been clearly laid out.

Err on side of concision:

When material is too verbose, students get bored and their patience wears thin. When material is too concise or just moves too quickly, students can get lost. This danger is especially present when the material is delicately constructed such that, if the student fails to follow along at any point, they won’t understand anything that comes after.

Currently, the materials err on the side of concision. My thinking is that minimalism is the ideal, so better to cut bloat up front and pad things out later as needed.

Not a tutorial:

Because the materials mostly focus on concepts rather than particulars, they are in this sense not “practical”. I intend to include exercises and lengthy walk-throughs of code at some point, but such things will always be supplements to the main materials, not integral, mandatory steps. When the success of learning materials hinge upon the student stopping every other step to work through exercises, I consider it a failure, an abdication of the teacher’s responsibility to clearly explain the often abstract and hard to verbalize concepts of programming. Students should be able to simply focus on absorbing concepts and information almost like they would absorb an interesting (if dry) story. It’s true that students don’t really learn to program until they get their hands dirty, but I strongly feel that actual hands-on practice can wait until students have a reasonable mental model of how computers and code work. When teachers force students to wade through the giant mess of particulars which makes up the actual practice of programming, teachers are basically pointing and grunting.

Comprehensive coverage:

The idea is that, eventually, you shouldn’t need any other sources to learn the materials we cover other than reference materials. So say, instead of, as is currently typical, having to read multiple books on Java, you should only need our materials on Java (aside from, of course, the standard Java documentation). The materials don’t yet reach that goal, but this release should still be very useful if you’ve been trying to learn, say, Java, but find the available materials frustrating.

The broader idea of the project is that beginning programmers need a comprehensive approach that doesn’t just focus on programming languages. Hence, “literacy”.

I have a several other units in a half-completed state. The next unit I’m finishing is all about Unix and using the Unix shell (with a bias towards Linux and Bash). That should be done in a couple weeks.

Each class in Java must inherit from one—and only one—other class. The only exception is the built-in class Object, which is the ancestor of all other classes.

Posted in Uncategorized | Comments Off on First release, 10.5

"Hardware and Operating System basics" on Youtube.

“Hardware and Operating System basics”.

This one’s about 90 minutes. The topics touched upon here include:

  • programming the CPU and its interactions with memory and i/o devices: instructions, registers, big-endian vs. little-endian, memory-mapped vs. port-mapped i/o, interrupts, hardware exceptions, the cache
  • use of memory: stack-based execution, allocating heap, virtual memory, swapping, stack allocation
  • operating systems: Windows vs. Unix, processes, drivers, pre-emptive multi-tasking, system calls, blocking, the filesystem, IPC

To my best of my knowledge, the material here is accurate, at least in an OS- and system-neutral way, though a few things worry me: I probably should have explained better how the OS copes with scheduling its own business and, say, how OS code is often run in the context of the last running process. That’s getting into material I’m somewhat vague about myself, though.

When I realized how long this one was getting, I axed a lot of Unix-specific material that will be better covered in a Unix unit. So “Unix and shell languages” is what I’m working on next, along with getting notes and questions done for the existing units.

Posted in Uncategorized | Comments Off on "Hardware and Operating System basics" on Youtube.

"The C language (unit 2)" – video on Youtube

I’ve posted the videos for “The C language (unit 2)” on Youtube. This unit runs about 60 minutes and covers some conveniences, like the compound assignment operators, for loops, and switches, and the unit also covers “complex” pointer and array types, e.g. arrays of pointers, pointers to pointers, function pointers, etc.

Posted in Uncategorized | Comments Off on "The C language (unit 2)" – video on Youtube

F.A.Q.: Why not start students with a language like Python/Haskell/Scratch/etc.?

I certainly considered every language, but this old post explains why these choices aren’t as great as they might seem.

Posted in Uncategorized | Comments Off on F.A.Q.: Why not start students with a language like Python/Haskell/Scratch/etc.?

Finally getting the site presentable. First release in next few weeks.

Once I complete the unit “hardware and operating system basics” and complete the notes and quiz questions for the other first several units, I’ll declare the first release.

Posted in Uncategorized | Comments Off on Finally getting the site presentable. First release in next few weeks.