Thursday, January 29, 2009

Finding the time for a Free Software project

I have in relatively recent history had breakfast with my upstairs neighbor, a cunning and ambitious system engineer for VM Ware. We tend to talk about various tech things, which can be interesting because we are both from rather different disciplines of the tech sector. His understanding of low level systems does put him in a somewhat higher technical category than me, while I tend more toward... well, sometimes don't feel like I tend toward anything, and yet everything at the same time. My pursuits tend to place me closer to the user. Trying to write software tools, APIs and even user interfaces. Somehow or another, like talking about the weather, we inevitably came to the topic of Free Software. You know, Free as in The Freedom, not free, like a purfume sample. My neighbor had a few interesting points about why businesses should normally choose proprietary software over free software, and how this is related to long term and reliable maintainability, which he argues should be a primary factor in choosing what software to use. It was really rather like talking to Bill Gates, all the more so because the guy actually looks a little like Bill Gates. Ok, a better looking version of Bill Gates. I'm not going speak to whether or not using proprietary software is better than free software. I do indeed have different opinions from him on the matter - mainly "It Depends", although there is are additional compelling social reasons why one should use Free Software, in addition to some mythology regarding the dependability of proprietary software.

In the end, however, this kind of conversation leaves me feeling guilty about my hypocrisy regarding Free Software. I have produced Free Software, the most important of which is the Human Rights Data Analyzer. Indendent of a funding source, I've also written a weird Scripting Inter-Operatbility Protocol that nobody uses and various other unused stuff. But I've never actually contributed to a project, which I've always felt should proceed trying to run your own project (see the hypocrisy?).

It turns out that a few of the people I work with have contributed to the Python programming language. Since these fellows are hanging around, it's probably a good idea for me to get involved with this. This is a good idea since it's something I use, something that a LOT of people use, and something that I can actually get my job to support me doing in my 20% time. Most imortantly, however, is that it's about time I did something. I've been going on inside my very noisy and echoy head that I should join a good and proper software project. Excuses mainly center around finding a perfect project to work on. This is a fairly poor excuse. There is very little perfection in the world, and whatever there is surely won't come from me.

Joining a Free Software project is not quite like trying to get a job. You don't normally have to interview to contribute, and you probably won't get fired. But you will have the opportunity to gain from the experience of others. The benefits of this are obvious, even if you are not going to partake in the blessings of Freedom. It can also be an equalizing opportunity for cultural exchange between various places on earth. Many projects have contributors from every continent on the globe, even, I'm sure, Antarctica!

It might be interesting to try to conduct a survey to see what the national make up and level of contributions are to Free Software projects. Undoubtably, there are significant gaps between contributions from developed countries and the less developed ones. But it might also be interesting to see if there is a correlation between contributions and the relative tech levels of a country, or if there are some other cultural factors at play (I'm thinking of YOU India, how much do your increasingly tech savvy developers do the Free Software Samba?). If there is a gap, how does it relate to other gaps?

I should write a paper.

Sunday, January 25, 2009

Teaching for the clouds

I've recently learned from my colleague at the University of San Carlos in Guatemala City that they are endeavoring involve my favorite project in three of their courses. In the interest of disclosure, this is not a coincidence. When I visited the University in November, I committed the dubious act of mixing a little business in with my pleasure, and trumped up the benefits of using this lovely project of mine. This should not surprise anyone seeing as I am one of its core engineers.

In all honesty, members of my team reject the term "Clould Computing" which I'm sure has become center piece in many-a recent games of buzzword bingo. Whatever you want to call it, there is less and less doubt every day that there are advantages to moving your software to someone else's infrastructure and making the day to day maintenance, operation and even scalability the other persons willing problem.

A lot of places in the world are riding the Information Service-road (as opposed to the Superhighway, get it? - another chip for your bingo card), and being able to put your web application up on one of the most efficient parts of the Internet for free (to get started) could be a real boon. It's not like hosting it in country is necessarily going to make things better for users as depending on what ISP is being used in a given place, the actual internet packets could be traveling half way across the world and back anyway.

The thorny bits to look out for are that "Could Computing" platforms are an evolving standard. So they're not necessarily "Shovel Ready" in todays parlance. That doesnt mean they don't work, but most perspective users are worried about problems of lock-in. These problems will probably smooth themselves out, because I'm sure most cloud computing players (and I know that Google is one of them) is looking to define standards that avoid the main danger. Smart cloud-service providers will recognize that lock in is a barrier to adoption.

What about using these kinds of new, cutting edge, non-standard platforms for teching to IT/CS students? Personally, I'm a believer that teaching strictly to standards could create an inflexible developer force, so I would not be afraid of a lack of standards, just as long as there is good learnings to be found in there. When I was a student at Victoria University of Manachester, the primary language they had early students work with was one called SML (Standard Meta Language). I didn't even like SML as a functional language. I liked Gofer better. Neither language has any sort of practicle industrial use, indeed, I can't even find a useful reference to Gofer on the Internet. Again, if one focuses on ideas rather than standards, the student will be cross-standard ready.

A big issue popping up around the cloud computing stuff is the fact that all the data and programs for a given application necessarily resides on someone elses server. That's probably not a new issue, as I think people have been doing that ever since the creation of the first time sharing computers. But it does mean you must have some level of trust in the folks who are holding all of your eggs. This problem is most vocally highlighted by Richard Stallman, who thinks that this whole "Cloud on the Computer" thing is a sure way to proprietary software surfdom. It's possible that Stallman's vision is somewhat extreme on the subject. But they're definitely worth paying attention to because they do define the boundaries of a worst case scenario of a particular technology outcome.

Ultimately, I always find it interesting to be in on the early rise of a technology or standard. You get to see its evolution and understand some of its reasoning. The end result, for example, is that you take on the manner of an old-timer reminiscing about the bad old days and how when Java was introduced, the lack of operator overloading was considered a big feature. It also may ensure that the next generation of nerds have seen the process for themselves and come to see standards and platforms as an ultimate given.

Like many buzzwords before it, like eXtreme Programming, Virtual Reality and Push Technology, the term Cloud Computing may mercifully dissipate to the vaporous winds from which they came, but the core concepts and basis for the next evolutionary step will have been laid.

Saturday, January 10, 2009

An example of what I like to do

On my last post I talked a bit about how important it is to find things that you like to do in order to drive learning. I have recently been sort of swept up in this thing, and when it happens to me, you can be sure that I'm going to be absorbed for days.

First let's talk a little about some of the kinds of things that I've seen from people when they get swept up in a learning rapture. The one that comes most prominently to mind was a kid I met on my recent trip to Guatemala, a favorite recent topic of conversation to be sure.

This youngster was an undergraduate who wanted to show me the project he was working on. I could tell that whatever it was would be cool, given his enthusiasm. I was not denied. And I think I even had a few surprises in store for him. I might have been the first person he'd ever met that he didn't have to describe what a Theremin was. This fellows project was to build his very own. I think that's bloody awesome! When I was a youngster myself I was quite interested in early electronic musical instruments. In high school I was fortunate enough to be able to save up to buy myself a decent digital keyboard. It sort of what a let down, because what I really wanted was a Moog or even better an Oberheim, I mean when I dared to dream. It's pretty clear to me, however, this kid is a better musician than me, and certainly a better electronics engineer. It was really cool talking to him. We got talking about early electronic music, like Robert Moog (who went to my high school - if I may name drop) and Wendy Carlos.
What needs to be underscored as that this fellows passion for music was driving an enormous amount of learning on his part. Even if he never ends up working in music, he will have developed enough knowledge to propel him in to a wide variety of useful, interesting and rewarding fields.

The fellow I used to work for when I was doing Human Rights work is another good example of someone who allows his interests to drive his learning. He's a Sociologist by education and degree, but at some point he began to become intensely interested in this computer stuff. He was particularly able to combine his unrelenting passion for social issues with technology which drove him in to the loving clutches of the Free Software movement. This is sort of double dipping of learning potential. For fellows like Patrick, the niftiness of technology is enough motivation by itself, in some ways, even more so for him than myself. But if you combine this with the Free Software movement, you now have a motivated person exposed to an unprecedentedly large body of technical knowledge. Arguments over the merits of free software vs. proprietary software (I am mainly an advocate of Free Software, but my latest exploits have awed me with what is under the hood of some proprietary stuff), there is some very high quality and professionally robust projects out there. Anything you want to learn about is essentially out there.


This sort of brings me to my latest obsession. As I mentioned before my original primary motivator for pursuing technology are video games. It's really kind of sad, but there you have it. When I was a kid I was pretty in to them, and of course in those days, there were no video games of note worth playing in the home. They were all in the "arcades". When thinking back, there was some pretty nutty stuff out there, but what holds my attention were the old cathode ray vector games where instead of rendering pictures using familiar TV scan lines, the shapes were drawn on the screen directly using the electron gun. The result was something that resembled an analog game more than the earlier clunky jaggy raster games. This more analog look and feel lent itself to interesting games that were closer to modeling physics than some of the others. One strange one that always caught my attention but was never very popular was one called Gravitar. It's a successor to the popular Lunar Lander game, except that it throws in a few more elements than just landing on the surface of a planet to make it more interesting. Someone recently came up with a retro take on the game which naturally I had to check out.

Well, when I was a kid I always had the delusional thought I could do even better than those games, and even though I am unlikely to succeed, I decided now was the time to try to do something simple. When I was at University one of my roomates started experimenting with
SDL and wrote a simple 2-D particle simulator. Well, it turns out SDL is still around, and since my language d'jour is Python, I went in for SDL based PyGame. Did I mention that this decision making process happened at 5am (this is prime mind activity time, I'm telling you)? Laptops, especially Macs, make it very easy to start writing projects in bed at this kind of our. By sunrise, I had a rudimentary 2-D particle system where you could introduce object oriented elements which would encapsulate their own behavior and each phase have the opportunity to interact with other particles (like inter-planet gravity vs. single directional gravity).

This was a lot of fun, even though I had not yet written a video game. But it got crazier. Ok, so I wrote my own particle system, but after browsing some of the projects on the PyGame web page I had discovered that there were (of course) already existing open source 2D physics simulation libraries including Python bindings. But these were not just simple silly particle systems like what I wrote... These are full fledged physics systems complete with shape collision detection! Here's a game written using Box2D. Is that not the coolest thing you've ever seen!? It's even better than Falling Sands!

And here is where the real insanity begins. See, if I am going to make a game, I need to make an editor. And if I am going to make an editor, I am going to need a GUI. My GUI of choice is wxWidgets, for a number of reasons. That means I now have to integrate wxPython with PyGame, which is possible... But I also want to do some neat rendering, like automatic scaling/zooming and even rotating the whole screen. I actually prepared to do that stuff in the particle system I wrote myself, but I knew that I could not have as well or efficiently than something like OpenGL. So that meant I had to use OpenGL. Besides, wxWidget/PyGame integration doesn't work on the Mac, so I needed another way to draw polygons in to a window. But I still need PyGame to handle the time scaling, so computers with different speeds and drawing abilities can run the simulation accurately, and sound in case I wanted to ever add that.

This ends up being a lot to learn, but fortunately, all three things I needed to work with are relatively easy to install and even repackage in case I want to distribute this monstrosity.

Working with OpenGL automatically ran in to problems because I discovered a bug where PyOpenGL won't run properly on a Mac with a case insensitive file system. That meant I had to go figure out the problem and even submit a patch to PyOpenGL. After I got all that fixed it turned out to be easy enough for me to translate between the shapes being modeled in the 2D physics system and GL. I'm quite familiar with the kinds of matrix mathematics required to do 2D and 3D graphics and physics, so none of that stuff that is introduced by using GL is a problem. In fact, I know that using matrix transformation this way is flexible and powerful!

I don't know if you followed any of that, but it illustrates how many different things that you get pulled in to an how easy it is when it's something that you think is fun.