annatar : Old Geek

I arrange my work spaces such that there is always a chair and ample desk room for anyone to bring their laptop over, plop themselves next to me, and start talking to me about the problem they want to solve.

I've also planned an apprenticeship program, where I had pupils formally assigned to me to mentor. I'd start them while they were still at the university doing their bachelors or masters. Usually they are new to UNIX, so the first thing I have them do is read the entire manual page for tcsh and zsh. Then move on to teaching them how to shell script, then how to program in AWK. Once they're past that, I move on to teaching them C.

For shell programming, I tutor them one on one, covering looping, input, syntax, interface design with getopts). I teach them why having ".sh", ".pl", ".py" or any other extension on an executable is a bad idea on UNIX, and there I cover what it actually means for a file to be executable on UNIX. I teach them about the runtime linker. I teach them about compiling and linking, about how functions map to symbols in an ELF executable. I teach them about ELF. About process spawning, context switching, high interrupt counts, 32- versus 64-bit code, instruction encoding. About what being a zombie process actually means, how they become such, how they get adopted by init(1M).

Eventually they hit deeper and deeper problems, so I inevitably end up teaching debugging and OS programming.

For teaching them how to program in AWK, I have them go through all the chapters and all the exercises in the Gray AWK book by Aho, Weinberger, and Kernighan. Then I help them with the actual real world problems they are attempting to solve with AWK, by showing them how to do it and explaining how it works. This is usually the time when I cover all the formal algorithms they're supposed to be learning at the university but aren't: stacks, queues, linked lists, doubly linked lists, sorting, pointers and pointer arithmetic, topological sorting.

For teaching them C, I have them go through the ANSI C programming language book, 2nd edition, and then cover anything that they don't understand with examples. Then I have them follow that up with the Advanced C programming by Example book. Then I cover dbx(1), gdb(1), and mdb(1) with them (what I know about mdb(1) anyway, and I touch upon kdb(1)). Throughout all of this, I cover cpp(1), make(1S), gmake(1), and m4, as well as lex(1) and yacc(1).

If I am forced by circumstance to teach them on GNU/Linux, I constantly and consistently pound it into my students' heads never to use GNU constructs or GNU specific features; by the time I'm done, they are able to write clean, portable programs in shell which work on any UNIX-like platform without any modification, and ditto for C programs. I purposely teach them to stay the hell away from bash(1), and use either the original Bourne or Korn shells to program.

If they are apprenticed to me for a long enough time, I will also cover complete UNIX system, network, and security administration (up to and including locking down the system and configuring the firewall and IPsec); by the time I cover the material, any of my students should be able to take on and pass a Solaris system administration exams and get certified. And with that knowledge and some shallow preparation, they can then easily ace the redhat Enterprise Linux certification exams.

Next, I cover SQL and database administration. Usually the places I work / consult at have Oracle, so I teach them how to administer an Oracle database, show them where the documentation can be found, and generally prepare them to take the Oracle database administration exam. If we have it, I will also cover PostgreSQL, and I cover SQLite. Finally, I show them all the bugs and all the issues in MySQL with a warning to stay the hell away from it and never use it for projects. By the time I'm done with them, they are comfortable taking on a database administrator's job or programming applications in PL/SQL inside of the Oracle database. And where there is Oracle, sooner or later, there is Automatic Storage Manager (ASM), so covering that inevitably leads to covering storage area network administration on the OS side, which ties into their UNIX administration I taught them earlier.

By the time I'm done with them, they are able to comfortably program applications in shell, AWK, or C, in addition to being able to administer UNIX systems and relational databases.

From that point on, they have enough knowledge to master pretty much anything in computer science.