“When we last left our intrepid hero, he was elbow deep in PC innards and busily updating his Canvas tools…”
Not long after I wrote my last blog post, Virus 4 hit me with a vigor only seen in criminal assault cases. While I was in Seattle at Game ON!, Claire had warned me that she had caught the blasted virus at work, work being a pediatrician’s office (in the administration department, but still). I knew then that it was only a matter of time after I returned home that I’d be infected.
And infected I was. I’ve spent the past three or so weeks in a fog expelling mucous out of my face by the pound. I was able to accomplish some simple tasks in that time, but anything requiring any kind of deep analysis was simply beyond me. Still, I soldiered on and kept kicking Canvas into shape.
In case you’ve forgotten, Canvas is a foundation layer I wrote to link Ruby graphics development tools to the underlying Cairo and Pango open source libraries. While Canvas had served me well in quite a few projects, opening the project to my friend and co-developer, Paul, prompted me to address quite a few loose ends in the code. It is one thing to work on a project solo and leave some things unattended; it is quite another to give a fellow software engineer eyes into the heart and soul of your design.
This sharing prompted me to not only fix some API issues, and add some functionality that was on my wish list, but I also installed yard, which stands for … (wait for it…) “Yay! Another Ruby Documentation (Tool)”. Silly name aside, it is for Ruby what doxygen is for C/C++/Java code. It allows the software designer to write documentation within the code, via the language’s comment support. But, yard is no mere comment reader. Yard will also evaluate the code within the code file, using Ruby’s introspection tools, and catch errors in documentation. Armed with this tool, I was able to generate a full website worth of linked HTML files. Most of the documentation is still a bit “stubby”, but the concept is there and Paul is reading what is there in order to grok the code.
Meanwhile, I’m becoming very familiar with git, an open source source code control system. Paul and I are using BitBucket for source control and project management. Git rocks! It’s very straightforward on the client side and the tools that the BitBucket provides make branch management and code reviews very straightforward. I haven’t had this much fun developing software in many years.
So, yeah… Canvas. Canvas now has a version number: 0.9.1. The API has been significantly improved and all unit tests have been updated and work quite well. However, all of my older projects were using the older API. That means that something was going to break.
Steel & Steam was the first guinea pig and break it did. Almost all uses of Text objects in the code had some flaw or other. As the Text handling code saw the most work in Canvas, this was not surprising. That said, almost all generated graphics, from maps to cards to player aids, were broken in some form. I had to update a lot of code. Still, the effort was worth it and Steel & Steam is looking fabulous again.
With Virus 4 in my rearview mirror and my emergence from the fog nearly complete, it’s time to check in on my other projects as well.