Archive for the ‘Uncategorized’ Category.

Tinderbox on Dreamhost

Tinderbox is a tool that helps software developers run continuous builds and tests. There are other similar tools, like Buildbot, which I actually prefer over Tinderbox. The problem with Buildbot, though, is that it requires continuously running processes and these are not allowed under Dreamhost’s shared plans. Luckily Tinderbox does not require a continuous process, so it is suitable for Dreamhost.

I wrote the Tinderbox on Dreamhost wiki page on the Dreamhost wiki detailing the instructions.

Yearly Donations to Open Source Projects

For the past few years I have taken the habit of financially supporting some of the open source projects whose products I use. I of course support the projects in many other ways as well, for example by reporting bugs, sending in bug fixes, advocating for open source software and helping other users of open source software. But in the end even open source projects need to pay bills. And it wouldn’t feel fair for me to make a living using open source tools without giving some money back as well.

This year I decided to donate to:

Some of the others that I considered include Gnome, Eclipse, Apache, jQuery, Pidgin and Enigmail. I also considered SQLAlchemy and Pylons, but didn’t actually notice any way to donate to these two. I also considered Mozilla Thunderbird, but there does not seem to be any way to target a donation to Mozilla to Thunderbird specifically.

In previous years I have supported at least the following projects and organizations:

  • Wikipedia
  • mozdev
  • The Python Software Foundation
  • The Electronic Frontier Foundation (ok, so not a software project but well aligned)

In some cases I have donated money directly, in other cases I have bought merchandise that benefit these projects. I am sure I have donated to about half a dozen other projects as well, but I just can’t remember for sure which ones. Which is one of the reasons for this post, to help me keep track of where I have sent money and to get some ideas where to contribute next year.

Have you contributed to your favorite open source project yet?

Update: SQLAlchemy does accept donations, right from the homepage (scroll down) as was pointed out in the first comment. So I made a small donation to SQLAlchemy as well.

Free Usenet News Servers for Comcast Customers

I have been a Comcast customer for years without major problems. But Comcast is shutting off Usenet newsgroups access completely at the end of October 2008, which is a real bummer. I am already paying quite a chunk of money for internet and definitely don’t feel like shelling additional bucks for something which, frankly, I have always expected to be provided by an ISP. I even checked some competitors, but the ones I checked couldn’t offer comparable speeds for my location.

I want to use Usenet newsgroups from my desktop news client, which excludes things like Google Groups. But I remembered a great resource for finding free access to Usenet newsgroups: Free Usenet News Server Index. Finding read-only servers was never much of a problem. Previously when I checked the before mentioned resource I was unable to find a server that allowed posting, but this time the first one in the “Best Overall” category voted by users turned out to work for both. It also happens to include the groups I care about. So for the time being I am content.

Another great resource for people who prefer Usenet newsgroups over mailinglists is Gmane, which turns mailinglists into newsgroups you can access with your favorite newsreader. I wonder if there is a tool that would make web forums accessible with a newsreader…

Some Blog Maintenance

Over the past week or so I spent some time hunting for Wordpress plugins I have found useful on other blogs, and while doing so I stumbled into a handful of other useful-sounding plugins.

The one thing I probably find most frustrating about blogs is that once I have taken the trouble to post a comment on someone’s blog, I tend to promptly forget where I did so, and will miss any answers to my comments. So I was really happy to find the Subscribe to Comments plugin. Now when you post a comment on my blog, you can request emails to be sent to you if and when there are replies.

I also like the related posts features many blogs have. At first I tried one plugin (I forget the name), but it occasionally gave no output, and occasionally put output on the blog home page. I then found the Similar Posts plugin, which has worked fine at least in my tests. Time will tell if I’ll stay with it.

Security being close to my heart I was happy to find AskApache Password Protect, which can write all kinds of advanced .htaccess files for your blog to prevent unwanted access to your blog. The name is a little misleading, since it can do more than provide just password protection. Unfortunately some of the features don’t seem to work for my blog, for example the password protect features and a few of the other “safe” settings will just render my blog inaccessible. I haven’t yet tracked down the causes to these.

I was also on the lookout for a plugin that would enable me to fix the keywords and descriptions for each of my posts, and while there were several alternatives I settled on All in One SEO Pack. It actually let me fix a few additional issues I was not even aware of.

I tried two different plugins that were supposed to make my blog mobile friendly, but in both cases this seemed to play badly with caching. If a mobile browser hit a post first, then all subsequent viewers - even on desktop - were served the mobile version, and vice versa. So I am still on the lookout for a good mobile solution that works with WP Super Cache.

And speaking of caches, I also installed WP Widget Cache and Plugin Output Cache, although I am not yet convinced they help much.

While I was in the maintenance mode, I also cleaned up the PHP templates a little from some experiments I had tried earlier. And before I actually started on these plugin experiments I wrote a little backup script to rsync my blog directory and dump the blog database so that if something went wrong I could easily recover. Dreamhost provides backups too, but the hourly interval was not enough for my needs when I was testing several things in an hour.

PS. This is my 101st post!

Cool New Layouts

I have worked on my blog layout a little bit. I started from the Fluid Blue theme, but it had way too small text for may taste. I generally don’t like pages that touch the default text sizes. So I removed nearly all text size changes from the stylesheet.

I also liked the RSS feed icon in the old layout, so I added one to this theme as well.

One major thing that I still want to do is to provide better layouts for mobile devices. Even though the current theme is somewhat fluid, it does require a minimum width that is not available in most mobile devices. I’d like the sidebar to drop to the bottom if the window width is too small.

Finally there are quite a few browsers to test to make sure everything looks decent. Maybe I’ll eventually get to a state where I could release the theme.

I also gave a face lift for the Dead of Winter RPG campaign pages by using by Matthew James Taylor’s excellent liquid layouts. To make this easier I expanded my earlier Python script to write the headers and footers for all of the pages instead of just splitting the long journal into manageable chapters.

Virtual Tabletop Role Playing

I have played role playing games on and off since the late 1980’s. Most recently I played Dungeons & Dragons 3rd edition both in a home campaign we called the Dead of Winter and the Living Greyhawk in the Theocracy of the Pale. I stopped playing again around 2003.

Wizards of the Coast recently published the 4th edition rules of Dungeons & Dragons and it seemed different enough from 3rd edition (which I actually liked a lot) to pique my interested to buy the three starter books. Just based on reading the rules there is a lot that I like, for example the magic system feels a little better to me. But it also seems any attempts at realism have been thrown out, like teleporting without the apparent use of magic or shooting two arrows at once somehow being easier than shooting just one. All in all a mixed bag, but still interesting enough that I would like to play it.

Now the problem is of course finding a group to play with. Since 4th edition is so new, there aren’t many people playing it yet. Most announcement of games I have seen seem to happen on weekends, which isn’t ideal for me. And when the times would work, the games seem to be too far away. Or use campaign settings I am not terribly fond of. Maybe I am too picky, but I really am looking for the traditional middle-age-like fantasy setting. I have looked at bayrps.com, meetup, Critical Hit and other forums for campaigns to join, but no luck so far. It seems finding one off games shouldn’t be a problem, though, especially if I can spare a day some weekend.

Then I remembered that geography does not necessarily need to be a limiting factor. I briefly participated in a campaign a friend of mine run using OpenRPG, which is a virtual tabletop to enable role playing with the help of computers and networks. The development of OpenRPG has slowed down to a crawl, which is a pity given that it is written in my favorite language, Python.

I did some searches and found that there is actually a pretty good selection of virtual tabletop software. For example, there are commercial efforts like Fantasy Grounds and Klooge.Werks, and also other Open Source efforts besides OpenRPG. My favorite at the moment is the MapTool from rptools.net. It looks a lot more polished and easier to use than OpenRPG. Unfortunately for me, the language used is Java.

From a pure user’s perspective combining MapTool with readily available VOIP solutions like Skype or the like seems like a winning combination at the moment. Too bad most (all?) of the VOIP solutions developed specifically for online games don’t have Linux client support.

Almost all of the software in the virtual tabletop category requires downloading and installing software. This is a bit of a barrier to entry, especially given that one person almost certainly needs to be running a server with all the problems that come inherent with that. I would have expected that someone would have started an effort to do a pure browser-based virtual tabletop, but I haven’t found anything like that yet. I think with new things like canvas tag, SVG and Ajax not to mention almost universally available Flash supported in freely available browsers would make this feasible.

Thinking more along those veins, what would I expect minimally from a virtual tabletop?

  1. shared battlemap, i.e. grid to place and move tokens (images) and draw freehand lines - an enhanced collaborative drawing tool

Well, that is actually it. Of course you will need additional software. VOIP for most of the discussion. You’d also need a chat tool with the ability to roll dice (this is typically integrated into more advanced virtual tabletops); luckily there is IRC and plenty of dice rollers. More advanced virtual tabletops provide additional features, but you don’t really need much to get a usable system. If nobody knows of such a browser based system I might need to take a stab at that myself some day…

Oh, the last piece of software on my wishlist for more enjoyable 4th edition D&D is to find a decent, free character generator (the $15/month D&D Insider is not an option, nor is it even operational yet). My favorite before was PCGen. Not because it was easy to use, but because it had all the needed features and it provided excellent PDF output I could print and take with me to game days. Unfortunately they can’t provide 4th edition tool due to licensing reasons. rptools.net has a character sheet with limited features as well, but they are just working on 4th edition support. Then there is a pure JavaScript character generator although it is not as feature rich as PCGen and the output isn’t pretty (but it does make most of the calculations for you).

Batch Convert Tabs to Spaces

Today I was faced with the problem of trying to review a bunch of Python files which mixed tabs and spaces for indentation. It was so bad it was practically impossible to follow the logic in some cases. I could have changed my editor settings temporarily, but what really needed to be done was change all the tabs into spaces.

Many editors can easily change tabs into spaces, but I couldn’t remember there being a command line utility that would do this.

I figured now would be a good time to get acquainted with ack. I knew I could have found all the files needing to be changed with grep, but given that I was working with a Subversion repository it becomes a bit ugly to filter out the .svn directories. ack does that naturally, and recurses by default too. And I can tell ack to concentrate on just the Python files and forget everything else. This comes out as the following: ack "\t" --python -l.

I then needed to find out how to convert tabs. It turns out there is a small Unix utility just for this purpose: expand.

The final piece was tying these together on the command line: for i in `ack "\t" --python -l`; do expand $i >$i.tmp && mv $i.tmp $i; done.

The inspiration to all this came from this JJ’s post.

Immersed in Books

Whenever I start in a new job, or switch to a new area of responsibility in a company, I end up going over several months of intense reading on new subject matter. This time has been no exception. This kind of tends to burn out my desire to read books for a while unfortunately, so I am trying to slow my intake a little bit this time in the hopes that I can actually build up a sustainable pace of reading new books related to software engineering and work life in general.

This is also only the second time around that I am actually reading several books at the same time. Previously I just finished a book and didn’t start the next until I was done with the previous. But I find that I just thoroughly enjoy some books while some others are hard to digest for one reason or another. So when I notice I am reading something that doesn’t really interest me much (but which I know I will need in my work anyway) I also start another book which I just can’t seem to put down. Makes things more interesting, and hope I can also read through more books faster.

Elements of User Experience by Jesse James Garret was recommended by my boss who has user interface background. I have done very little reading in the user interface area before (and one could argue the few UIs I have created reflect that), so I found this book a good way to quickly get me up to speed on some terminology, how web UI design is different from desktop UI design, and how you can break UI design into different activities and sort of get a blueprint on how to approach the whole UI design challenge. It was a short, easy read, although at times it felt like I was reading marketing material.

I bought Effective Java by Joshua Bloch because I really enjoyed the Effective C++ series by Scott Meyers. I think every language should have a book written in the “effective series” style. I sure wish there was one for Python. The cookbook series comes perhaps closest. Part of the material in Effective Java is going over my head, since I don’t really know Java so well as for this to be useful. I am also finding some things that are applicable to other programming languages as well, which I found kind of surprising given that the Effective C++ series are really tightly coupled with C++ and very rarely is the advice usable in other languages.

Besides Effective Java I also skimmed through the online version of Thinking in Enterpise Java by Bruce Eckel, and I am also skimming through Thinking in Java, 3rd Ed. by the same author. I found Eckel’s style a bit dry, and there is a LOT of material to read, so I resorted to going through stuff pretty fast. Nevertheless, Thinking in Enterprise Java explained a lot of things to me about how to do WEB programming in Java, and there have a been a few useful bits of information in the first six chapters of Thinking in Java as well. I also appreciate the way Eckel writes his book in a kind of Open Source way.

I am also working on a Hyperic UI plugin, where I am using Groovy. There was a quote which summed up Groovy pretty nicely; unfortunately I can’t find the quote right now but it went something like this: “Groovy: they way Java was supposed to be.” For a Pythonista there is a lot to like (read: not too different from Python). I bought Groovy Recipes by Scott Davis to jump start me on Groovy. So far I haven’t been too impressed; some of the recipes I have checked seemed too much simplified to be useful. But I bought the book mainly for language introduction, and I guess I was also partly persuaded by the section on Eclipse integration.

I bought one book at CommunityOne (they had a nice discount): The Pragmatic Programmer by Andrew Hunt and David Thomas. The title alone made me like the book, as I think I have become more pragmatic (as opposed to idealistic) over time. But it turned out that wasn’t exactly what the book was about; it is more about becoming a better programmer (rather than pragmatic). I just started the book, so I can’t comment much on it at this point. But there is one piece (already, oops) that I kind of disagree with the authors. The “Don’t Live with Broken Windows” tip, meaning you should fix bad design, code etc. as soon as you see it. They do amend that tip by saying you should at least do something to amend the situation if you don’t have the time to fix it correctly right away. I very briefly tried to do this early in my career and found I got hardly anything done as I was fixing things left and right as soon as I saw them, and quickly forgot what I was actually supposed to be doing. Now I tend to either put in an XXX comment next to the problem spot or file a bug for the issue I noticed and try to retain concentration on the current main task. Perhaps that is enough to fill the spirit of the tip, but I feel it is worth noting that it can also be very distracting and it can slow you down a lot. I feel it is also better to fix one issue per checkin, because this makes it easier to verify fixes and debug and back out bad checkins. (There are tools that help checkin just the pieces you want even if you have been working on multiple issues at the same time, but these are still pretty rare and hard to use.)

Back in January or February I also read MySQL Crash Course by Ben Forta, which I think did a good job of getting me quickly up to speed with MySQL (the only caveat being that I had to go to the book’s website to figure out how to get started with the samples). I just took a quick look at the cover and was surprised that it was from Sams Publishing, which traditionally has done a pretty bad job with technical books. Maybe this book is an indication that they are getting better. Now that I am working with PostgreSQL I feel like I’d need a similar crash course for PostgreSQL.

I also started reading Beginning Database Design by Gavin Powell earlier this year. It has gotten pretty good reviews, but I put it on the back burner for a while and I need to get back to it soon.