Thursday, September 30, 2010

Programming with Haiku Lessons 3-5: C++ Triple Play

In an attempt to move on and get on to just the Haiku API, here are the final three lessons on C++. Lesson 3 introduces C++ file streams, formatting and printing using C++ streams, and lightly touches on exceptions. Lesson 4 takes a break from actual coding and spends time on a critical development tool: source control -- what it is, how it is used, and why it is used. Lesson 5 ties together all of the C++ concepts covered in this series with a project. I hope you enjoy them.

Thursday, September 23, 2010

Klutzo Strikes Again

As is typical for a geek of my athletic ability, I'm a near-total klutz. It's not uncommon for me to bang some part of my body on something each day. Last night I managed to do a real doozy: a computer bit me on the foot. Hard. It wasn't even mine, either. I'd brought home 3 different machines from school, 2 of which were left lying around for parts and the third was good except for a dead hard drive... or so I thought. The CD drive needed replacing, too.

The machine is a Gateway E series mini desktop which has a tool-free case -- fold up the top and pop off the front bezel and you can remove the CD drive and the hard drive. I foolishly left the thing sitting on the floor beside my computer desk, sans front bezel. Unfortunately, I kicked the thing and one of the plastic edges in the front put a nice slice into the outer side of my foot near my pinky toe. Ouch. A new low in clumsiness-related injuries in my life. On the upside, I can put a sign on it when I take it back to school: "CAUTION: this computer bytes. Use at your own risk." Yeesh.

Programming with Haiku, Lesson 2

I had an unexpected day off from school today, so I took advantage of the time in getting a bunch of writing done. The result? Lesson 2 is available for your reading pleasure. In this lesson, we go on a fast and furious flight through the rest of the Standard Template Library.

Programming with Haiku, Lesson 2

Monday, September 13, 2010

Ohio LinuxFest 2010: Didn't Disappoint

This weekend was my second year at the Ohio LinuxFest at the Greater Columbus Convention Center in downtown Columbus, OH. I arrived at the convention center at about 7:15am. Unlike last year, there was hardly anyone there outside of the OLF staff doing checkin and a few vendors. Joe Prostko was already there, having stayed at a hotel nearby the night before. It was good to see him again. We started talked for a bit and then started getting the table set up. I made sure that we had enough supplies for the table and each of us had brought a demo machine. Joe brought an MSI Wind netbook which was running a nightly build and I brought my Dell Latitude D620 running an almost-stock Alpha 2. Both machines proved to be valuable for demoing different aspects of Haiku that day. Soon enough we started seeing some traffic.

Most of the day itself was spent at the Haiku table talking to convention-goers. I even spoke with some people who I recognized from last year. Unlike last year, my laptop only KDLed once. Wanting to see what the sessions that were offered were like, I spent a little time in the Ubuntu on ARM session, which was quite technical but reasonably interesting. It gave me a clue about what to expect if I were going to speak at a session. I'm pretty sure that I'm going to give a session next year on Haiku. Mike Summers had managed to come, albeit later than last year. He rolled in about 3pm, but it was good to see him again. He might've been late, but his presence was felt, becoming the resident "chick magnet." All of us were surprised by that one. ;-)

The people that come to OLF are always really interesting to talk to and, being fellow open source fanatics, quite receptive to Haiku as an operating system. Many of them are intrigued by Haiku's boot times, feature set in combination with its hardware requirements, lack of an X server, and its unique features like queries and the extensive use of attributes. Joe had the Stack and Tile decorator running on his netbook and everyone who saw that were really impressed, myself included. Only those people who were familiar with BeOS or Haiku were not suprised by the number of movies playing simultaneously without dropping frames. My favorite demo was running 3 videos on one workspace, switching to another workspace to start a lengthy project build with Paladin, and switching back to show how responsive Haiku was even with the CPU maxed out. We've got a great OS here.

Some of the main questions that I ended fielding were about stability, where people could try out Haiku, and what Haiku offered in the way of an office suite. It would seem that right now, according to the conference goers, that having or KOffice or something is quite important. Perhaps someone might be willing to step up and finish the work on Gobe's Productive suite given this thought.

It was a great conference and I'm looking forward to the next one!

Update: A couple of photos taken while we were there.

Mike Summers and I, defending our table from the hordes
Joe smiles while I continue to blather on.

Tuesday, September 7, 2010

A New Series of Lessons: Programming with Haiku

Since I started publishing my Learning to Program with Haiku lesson series back in January, I have, on many occasions, seen comments asking for lessons aimed at current codemonkeys who want to break into development for Haiku. Here begins a new series of programming lessons aimed at people who already have a basic grasp on C++: Programming with Haiku.

The direction of the series is pretty straightforward. First, we'll be spending some time (i.e. the first unit) delving into some less-commonly-used features of C++ which show up in Haiku from time to time. This is partly to bring up to speed those who are picking up the series after finishing the first one, but also to examine ways that features like containers from the Standard Template Library can be effectively used in combination with the Haiku API. There's even a quick primer on source control thrown in for good measure -- something which any developer should at least understand, if not use religiously. Following the first unit we will dig into the API. Depending on how things work out, there may or may not also be a crash course on GUI programming in there before diving into the kits themselves. Some of the lessons will deal directly with getting to know a particular kit. Others will examine important topics or the "Haiku way" of getting a task done. They should provide a good working knowledge of Haiku development methods that can easily be expanded into more advanced usage.

While I have a basic outline for the series, it's very general and I'm not exactly sure how long the series will run. It certainly will be quite a while, though. A word of warning: my school schedule is completely insane from the start and I will not be publishing largely on a weekly basis like the first series. Instead, I'll be posting them when I am able. I really like writing these things, so they'll happen, but it may take some time.   Now, without further adieu, Lesson 1, which starts by looking at templates and some of the containers in the Standard Template Library.

Programming with Haiku, Lesson 1

Monday, September 6, 2010

Learning to Program with Haiku Color e-Book Available

My first book on learning how to write programs using the Haiku operating system is now available as a color e-book. Until now, it has been available in print and for download, but only in black and white. Unfortunately, this lacks the syntax highlighting for the code that the original programming lessons had, but it was initially necessary because color printing costs at are exorbitant in my opinion and publishing the book in color would have made it prohibitively expensive. E-books have none of these limitations, so without further adieu, it can now be downloaded $10 from its own page on The original black and white version is still available for those who would prefer it.

Saturday, September 4, 2010

Another Serving of News Soup

Aside from the new Stack and Tile decorator that Clemens Zeidler just made public, there isn't much going on this weekend in the Haiku community. I figured I'd pass along some minor news from the last couple of weeks.

Next weekend I'll be heading off to the Greater Columbus Convention Center to help host a Haiku table at the Ohio Linux Fest, armed with Alpha 2 CDs, flyers, a demo machine, and a bunch of other stuff. I'm looking forward to the time. It was a busy, but fantastic time last year.

A couple of weeks ago a news post was made to HaikuZone about my book. As part of a collaboration effort with Jorge Mare (a.k.a Koki) and some notable Japanese developers in the Haiku community, Learning to Program With Haiku is going to have a special Japanese edition published. There is also some discussion of a Spanish translation, too, and Haiku contributor Kurain is in the process of translating my programming lessons into Chinese. I'm flattered to see some of these opportunities arise -- when I was writing the first few I never thought these would be as well-received as they have been.

As if it weren't already easy to install -- at least if you ask me, anyway -- Paladin is also on its way to becoming an optional package thanks to the effort of developer Scott McCreary (scottmc). The neat part is that -- at least at the moment -- it's possible to build the current 1.3 release or build straight from the sources in Paladin's Mercurial repository on Sourceforge. Pretty slick, if you ask me, and props to Scott for pioneering the effort!

Since the 1.3 release, I've been working on a self-extracting packaging system. It's similar in many ways to the packages used in Zeta 1.2 and 1.5, but creating them can be done using PSfx, a graphical program which closely follows the interface of the PackageBuilder tool which comes with the BeOS 5 Development Tools archive. These packages can also be created from the command line, and this ability is one of the main motivations behind the system. The system is still under development, but it's showing promise. I can't wait for it to be ready, if for no other reason than to make the next Paladin release go from sources to release package in one command, which would be really sweet.

School's back in now, and instead of primarily performing custodial duties like I've had the last couple of years, I'm back to doing what I love most: teaching music. I very much have a full load, so coding is pretty much limited to the weekends, but I'll be working on stuff like this packaging system as I'm able. Best wishes to all of you in whatever you do. :)