tutorials

Lesson 15: Making a New File Type

Blog post by darkwyrm on Sun, 2010-12-12 17:52

Depending on what kind of projects you write, you may have to create a new file type from time to time, such as a document type for the next Word-killing word processor. While not difficult, making one needs a bit of knowledge from different places in the OS and the API. In our final lesson which focuses on the Storage Kit, we will learn about MIME types, how to show the OS how to automatically identify files of your new type, and more.

Programming with Haiku, Lesson 15

Lesson 14: I Node What You Did Last Summer

Blog post by darkwyrm on Fri, 2010-11-26 13:26

A holiday treat! In this lesson we continue to work our way through the Storage Kit, learning about one of the lesser-known features of the Haiku API: node monitoring. For those new to Haiku, it notifies programs of changes to the filesystem, such as changes in a name, etc. If you're looking to turn a good Haiku app into a fine one, this is one way to do it.

Programming with Haiku, Lesson 14

Lucky Lesson 13: Queries

Blog post by darkwyrm on Thu, 2010-11-18 02:05

I'm not talking about databases, either. In this lesson, we examine one of the most distinctive features Haiku has: the query. We get a good, long look into the murky depths that are the query's official syntax, Reverse Polish Notation, and a few other weird and wonderful tricks. Enjoy!

Programming with Haiku, Lesson 13

Lesson 12: All About Attributes

Blog post by darkwyrm on Tue, 2010-10-26 11:51

You might think that I took a short vacation, but I've just been buried in Real Life. You might also be wondering about where lessons 6-11 went. They'll be published later, but you're not missing anything, as they are edits of the last several lessons from Learning to Program with Haiku with an experienced developer in mind. If you've worked with the previous series, there isn't anything in 6-11 that you haven't seen before -- they're more to make the Programming with Haiku series complete on its own. This lesson is all about attributes -- what they are, how they can be useful, and how they are manipulated from code.

Programming with Haiku, Lesson 12

Programming with Haiku, Lessons 3-5

Blog post by darkwyrm on Thu, 2010-09-30 11:54

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.

Programming with Haiku, Lesson 3
Programming with Haiku, Lesson 4
Programming with Haiku, Lesson 5

Programming with Haiku, Lesson 2

Blog post by darkwyrm on Thu, 2010-09-23 21:07

Lesson #2 in my new series of development tutorials continues with a fast and furious course through the rest of the Standard Template Library with some of the Standard C++ library thrown in for spice. We learn about associative STL containers like map and set and examine the C++ string class.

Programming with Haiku, Lesson 2

A New Series of Lessons: Programming with Haiku

Blog post by darkwyrm on Wed, 2010-09-08 01:21

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