Wednesday, June 30, 2010

The Book is *This* *Close*

After about a week of what felt like futzing around with my book, Learning to Program with Haiku is just about published. I ordered the proof copy this morning, so in about a week I'll have a hard copy of my work, and barring major problems, it will be available for the general public, both in dead tree format and as an e-book. I'm really excited!

Friday, June 25, 2010

More PalEdit Progress

For those who didn't know, I've been finally getting around to cleaning up PalEdit, Paladin's text editor. It is based on Pe and in its current publicly-available state, isn't all that different from Pe. I'm in the process of fixing that. On the surface Pe is a great all-purpose text editor. I'm not that fond of it personally just because I only write code in C++ under Zeta and Haiku with rare stints into Python land under Ubuntu.

When I started working on Paladin, I needed a text editor to go with it, and Pe won over Scintilla for quickly getting things going. Since that time, I haven't really done much with it aside from some integration with Paladin's build system -- that is until now.

The actual code for Pe is a mess. I've mentioned multiple times my disdain and loathing of the resource system that it uses and the tool that compiles them, rez. Rez is hard to use because the errors it generates are not at all helpful and it merely compiles C-like text file into regular resource files. Very few of the extensions are actually useful, and with Paladin being specifically a C/C++ environment, all the extra languages used are unneeded. Internally, the archictecture also needs cleaned up, especially the code that handles the syntax highlighting for the different languages.

Rather than rewrite the thing, which is foolish, I've been doing some major refactoring of the code. The result at this point is a stripped down editor with syntax highlighting that is one quarter the size of the current PalEdit executable. It still needs quite a bit of work to be feature complete and there are bugs still left to squash, but when finished, it will be much easier to add stuff on, to maintain, and to also embed into other applications. It will be possible to finally integrate the editor into the rest of Paladin, whether or not I do it remains to be seen, though.

Tuesday, June 22, 2010

Lesson 23: Polish and Packaging Our Project

This lesson finishes up the project that the last two have been about: HaikuFortune, a program which randomly chooses and displays a fortune in a window. It's not a very complicated one, but it exemplifies a reasonably well-coded real-world project. Although it was code complete as of the end of Lesson 22, it was not finished, missing icons and other resources. This concludes the project with adding resources, a basic discussion on source code licensing, and packaging a program for Haiku.

This also concludes the Learning to Program With Haiku lesson series. It's been a good run. Rest assured, though, that this is not the last lesson on Haiku programming that I will write. This series has been intended to turn a motivated power user into a developer using Haiku. It's been a lot of fun and many people have encouraged me with their kind words regarding it.

Later this summer I will start another yet-to-be-named series which will continue where Learning to Program With Haiku is leaving off and introduce novice and intermediate developers to real coding specifically for Haiku and its nuances, such as multithreaded programming, add-on coding, queries and attributes, Tracker and more.

In the mean time, I am working on revising the lessons into a complete book available for a reasonable price in dead tree and possibly e-book format. These PDF lessons will continue to be freely available and redistributable. More details to come soon.

Monday, June 14, 2010

Lesson 22: Designing a GUI

Usability is one of my pet topics. Although less so now that in years past, it is all-too-often ignored or not given enough priority. This lesson scratches the surface from a developer's point of view. I'm no usability expert, but I do know a thing or two. This lesson is a must-read for any budding developer, and by the end of it, we will have a good real-world program to show off which is just shy of being ready for a release.

Project Sources:

Friday, June 11, 2010

Lesson 21: Reading and Writing Files

This lesson continues with delving into the Storage Kit, reading and writing files. We also start writing code for the final project of the Learning to Program With Haiku series which will be developed over the course of several lessons.

Sunday, June 6, 2010

Count Me Flattered

I just won Haikuware's 17th along with Pier Luigi Fiorini for my work on Paladin and all of the programming lessons that I've been publishing. My Haiku golf shirt came yesterday and it looks really nice. I didn't start either one to achieve any recognition, but it's really nice to be appreciated. Thanks everyone!

Tuesday, June 1, 2010

Lesson 20: All About Storage

Moving on from exploring the Interface Kit, we turn our attention to the Storage Kit in this lesson. We take a look at the kit from a broad perspective and also begin using some of its many of the classes. We take a break from writing GUI applications and, instead, write a console directory-listing program using C++.

Source Code: