pmb

GUI Programming rant gone long (nerds only)

Feb 21, 2007 18:56

If given the choice between programming a WIMP graphical user interface and repeatedly punching yourself in the junk, I say go for the junk punching.

I'm trying to make a low budget one of these using a webcam and a laser pointer and a normal projector that can be found in your average college or upwardly mobile nerd's home (they use a $2k projector, nice video camera, expensive video capture card, and $300 laser), and wouldn't you know it, the hardest part is not acquiring images from the webcam, nor is it the theory behind image transformation nor is it determining where the laser pointer is on the screen. It is the damn "draw this to the screen please, pretty please, I'M BEGGING" library calls and webcam libraries that are required. And I pretty much have to do this in Java, because the webcam image acquisition libraries are Java and/or Objective C, and all programs that use objective C (even the python bindings for objective C) seem to want me to learn about NIBs and Interface Builder and managing my memory by hand and all sorts of stuff that I came to graduate school to avoid. In Objective C it takes 4k lines just to pop up a window with a webcam display in it for Pete's sake. A lot of these lines are autogenerated, but that's still 4 thousand lines of code that I have to dig through, and it's not even counting the webcam drivers.

So instead I just spent a few hours fighting with Java Advanced Imaging library and now I'd like that life back please - a library more dedicated to assbackwardsness and fighting its own implementation language I haven't seen in quite some time.

Screw all this.

It remains true that the hard part of computer programming is not the hard stuff, but the "trivial" stuff. Making sure the camera doesn't go into auto-light-balance mode, drawing to the screen and setting up a GUI, and basic image transformations are all REALLY easy in theory. But doing them involves working with too many poorly specified libraries and no example code anywhere to be found. What is the way out? This is pretty clearly an unacceptable situation on a bunch of levels, but I'm not seeing any light at the end of the tunnel.

Joel on Sofware might be right: We used to write algorithms. Now we call APIs.
Are our students being adequately prepared for this brave new world? I doubt it, since I'm not prepared for it and I'm teaching them, but can the "skill" of hacking at code based on crapass documentation and ugly code samples in order to get something that mostly works even be taught? Should it be? It's a valuable skill, but it only serves to make the problem worse as more and more people do it more and more. Eventually all the cruft is going to build up and then what? Are we going to end up in a Vernor-Vinge-type situation where everything is built on everything else to the point where the old knowledge becomes lost and "hacking" and "archaeology" are the same?

tech frustration

Previous post Next post
Up