<< June 2008 | Home | August 2008 >>

Machen wir mal wieder ein bißchen Politik...

TELEPOLIS schreibt:
Moderne Demokratien haben seit dem 18. Jahrhundert viel aus einer relativ kurzen Periode des antiken Athen übernommen, die vom Ende des 5. Jahrhunderts bis zum Jahr 322 vor Christus dauerte. Trotzdem gibt es aus dieser Zeit noch viel Interessantes zu entdecken – zum Beispiel die graphe paranomon, die den antiken Athenern eine gewisse Gewähr dafür bot, dass ihre politischen Entscheidungsträger nicht allzu forsch verfassungswidrige Beschlüsse fassten.

Assistant system admin

Apart from teaching Java, I'm also brushing up my admin creds here at AUST, giving the IT guys a helping hand with some teething problems:

  • tracking down a notorious problem with Ubuntu when you have your own partition for /var
  • firewall config, they use Firehol -- funny, so far I haven't seen two shops using the same firewall toolkit in my life. Incidentally, OpenVPN still doesn't work through the firewall. And currently the satellite uplink blows hard.
  • NFS / automounter-fu

and a real novelty for me

On an only semi-entertaining issue, let me quickly list the advantages of tin roofs: a) lots of noise when rain is playing the drums, b) almost perfect insulation against wireless and cell phone signals.

Tags : ,

LDAP authentication for MacOS clients and NFS mounts

A little exercise that might not apply to your problem

  1. Set TLS_REQCERT to never in /etc/openldap/ldap.conf (unless you know what you're doing - that seems to be the stopper for plaintext passwords)
  2. Go to Applications -> Utilities -> Directory Utility
  3. Toggle the lock at the bottom to "unlocked"
  4. Switch on Advanced mode
  5. Select Services-tab -> LDAPv3
  6. Click on pen-symbol at the bottom, then "Show options"
  7. Add entry for RFC 2307-style server
  8. Edit /etc/auto_home to contain only the line
    * -resvport,bg nfsserver:/path/to/home/&
    See 'man mount_nfs' for those two options.
  9. 'sudo automount -c' to make the automounter pick up the changed file

Things that should work now:

  • id someNetworkUser should print UID/GID from LDAP
  • ssh xxx@localhost should use network password and find home directory
  • sudo su xxx should work
  • dirt -u xxx
  • ls /home
Tags : , ,

Oh lawks...

Guess who didn't see Usher, Rihanna and Jay-Z on Friday in friggin' Abuja, Nigera?

Yup, Boubou tried calling me on the cell phone, but signal here is spotty, so he couldn't track me down on the campus. That must have rocked, especially since it's getting a bit boring on campus anyway...

Newsflash: Java unsuitable for beginners!

I've been teaching an introductory course here at the African University of Science and Technology in Abuja, Nigeria, for two weeks now.

My 16 students hold BSc in CompSci and Math from universities all over Africa, but there's only one in the class that already knows Java. There's some unfortunate exposition to VisualBasic, the occasional Pascaler and even Python and Fortran (Heavens!).

I spent the first week teaching the plain programming stuff: declaring variables of primitive types, the usual control structures (if-then-else and for/while-loops), and method definitions and recursion.

That seemed to work rather well, instructing them to create an fresh Java class in Eclipse for each assignment and simply take the magic public static void main() for granted. However, the correct placement of semicolons and brackets did not come easy to them.

A few of them still struggle with the concept of a variable, for example when simply summing the values from 1 to 100 in a for-loop. But that can be forgiven, as I also have a hard time motivating it in a non-memory-centric way. Also, in the presence of multiple methods, it was no longer clear (a) where execution starts, and (b) what happens if you encounter a method call. Similarly, there was a lot of confusion about printing values and returning values. But all in all, it seems they took on recursive solutions more easily than iterative ones (despite the confusion about method calls).

Enter Object-Orientation. Of course there's some startup penalty for motivating and introducing the concept of OO, which seems to stick. However, all the technical/mechanical problems from before (syntax, order of execution) now get into their way. Unfortunately, the math lecturer decided to bring in his teaching assistant which eats up the students' precious time for revisions in the evening with another math tutorial from 20:00-22:00! Which means by now at the end of the second week where we should worry about more conceptual things (inheritance, interfaces, exceptions), most of them still don't manage to write a syntactically correct Java program containing more than the initial class.

The difference between variables and attributes is also still mystifying them: if I write in the main method

Box b = new Box();
b.width = 25;
why can't I use b.width in a method for class Box? Likewise, many prefer to pass the object (subject) as an argument, so occasionally I find code like
class Box {
  int w,d,h;
  int volume(Box b) { // or just int volume(), because that's what the slide said...
    return ( b.w * b.h * b.d );
  }

  public static void main(String args[]) {
    Box b = new Box(25);
    System.out.println(volume(b));
  }
}
which of course doesn't even compile for obvious reasons.

Two more problems are communication and overall problem managing skills. Most of them speak very good English, but lack precision when taking about things: e.g. a boolean variable called open, representing whether a door is open or closed, a method called open(), the notion of a closed door (the value of attribute open is false).

Occasionally I will give fragments of (working) source code on the whiteboard or slides with ... eliding (what I though) well-known details (public static void main(...)) that they either ignore or copy incorrectly, thus spending precious amounts of time on syntax instead of solving the problem.

One more week to go, but I will leave with the definite confirmation that either I'm a bad teacher, or you should really start with Haskell or SmallTalk as an introductory language (which we already new anyway, right?). Java's (syntactical) concepts are by no means clear (to a beginner), it requires a lot of special casing (why is at least one class public, what is the static qualifier), and the important notation of and order of evaluating sub-expressions is not as prominent as it should be (although this could be explained in Java as well as in Haskell).


Did you know that foldr.org pursues the proliferation of functional programming in industry and teaching?
Tags : ,

Dear Microsoft, ...

...I have a file here that reproducibly makes PowerPoint:Mac 2008 hang itself up when selecting the outline-view. Unfortunately, the recommended way of contacting you suckeddid not work out and I currently can't access phone support easily, so please have someone contact me so that I can send you the file. KTHXBYE, Volker.

Abuja-Erkelenz

Who'd have thunk...

GE screenshot Abuja-Erkelenz

Da fliegt man so nichts ahnend rund um die Welt, fährt vom Flughafen zum Campus und dann das...Mit der dreistelligen Postleitzahl für Erkelenz müßte der eigentlich so richtig alt sein. Drin hocken übrigens ein paar Bauarbeiter mit ihrem Zeug.