Haiku for Developers

Why I like Haiku OS as a developer

So I’ve been using Haiku OS in anger for a while. But why? I’ll explain that with my developer hat on.

I’m an old so-and-so that remembers BeOS, but like many people didn’t ever ‘run’ BeOS in anger on my own system. Probably one of the reasons the OS went away…

Haiku is different though. It came from OpenBeOS and shares many of the same wonderful features, but now after 16 years of independent development, it’s its own beast, as I mentioned in my Beta 1 release review video. So why do I like it?

There are many reasons. I’ve even bought a new laptop just for Haiku (more on that when my custom build arrives!). Some of the reasons were discovered with my ‘general computing user’ hat on, and some of them with my ‘developer’ hat on.

I’m still figuring out the user pull – it involves a bit of an X-factor Haiku seems to have that I can’t put my finger on yet – so I’ll concentrate on why, as a Developer, I really like Haiku OS.

If you want to get Haiku OS, you can get a copy of Haiku from their website. They have a live boot image so you can try it without damaging your existing install.

A note on comparisons

Many of the Haiku reviews have concentrated on why Haiku is different or the same as other OS’. I don’t really care for the comparison – comparing Windows and Linux always seemed odd in the 1990s.

Comparing Haiku OS against a dead BeOS is kinda unhelpful – a lot has happened in the last 16 years.

Likewise, comparing against Windows or Linux isn’t particularly helpful other than to show how many developers and money it truly takes to get a full Operating System working for the majority of people.

So I’m not going to do that here. I’m going to discuss Haiku OS, as it is now, and how I’m finding it for myself, without comparisons. You can draw your own conclusions.

My developers wants

We’re all different people, so every developer has different needs. So this list may be drastically different from yours.

Developers turn up, roll their sleeves up, and sculpt the areas they want to work on. It’s like an artists workshop open to everyone. And I love that.

I like an Operating System that specifies a core set of ways to do things, and then leaves me free to play around with those pieces of base functionality.

Having said that, I like *one* way of doing things. I don’t like the fact that in the world today there are many ways to write 3D graphics applications, or multiple GUI toolkits for the same language. Just give me an API and let me learn it.

Haiku’s GUI Application Kits

So I quite like the fact that Haiku has it’s own C++ API for GUI applications tied tightly to the OS, rather than always rely on other toolkits or abstraction layers.

For some reason, the feel of the API is quite organic and sane. I like that my BWindow subclass gets given a set of bounds, and internal to my class I draw within those bounds however I like.

I like the way Invalidate and Draw work together, and how resizing a window or a control within it doesn’t require a lot of complex code to redraw their contents.

Banner image for Haiku for Developers
Haiku for Developers – showing Layouts and Insets for the Project Window on the left

I even like the Layout API for laying out elements within a Window. Although there’s a lot to it, it has sensible defaults, and you can composite multiple layouts together easily within a single window.

I like the fact that when the default layout doesn’t quite work for me, I can play around with Insets to get things right (see the scroll bar code in the image for this article) – rather than abandon the layout API entirely.

Messaging within and between applications

Whilst coding some Pull Requests for the Paladin IDE project on Haiku, I spotted the concept of passing messages around.

This is a great way of abstracting one action in one part of the UI with the handler in another part. Not explicit addListener / removeListener calls on each window – just messages bubbling up in your app until they’re handled.

The same mechanism can also be used to interact with the Haiku OS Roster‘s Launch method. This method opens the specified file or application and passes a BMessage to it. It’s used extensively in Paladin to open external editors and invoke other commands.

You can use Launch with the normal string of arguments too for apps, but passing messages around has some advantages. For example, opening a text editor file but specifying the exact line number is possible by passing a message with a be:line property set. This is supported by many different editor applications, making app-to-app integration easier.

A sense of community

Something that always makes me chuckle a bit at the same time as feeling warm and fuzzy is when someone asks on the Haiku OS Discuss forums who the leader is on Haiku OS.

There isn’t one. No Linus, Gates, or Jobs-esque personality. Not even a committee of them.

Developers turn up, roll their sleeves up, and sculpt the areas they want to work on. It’s like an artists workshop open to everyone. And I love that.

Additions via Pull Requests are reviewed in a friendly way, with constructive feedback, and impressive breakneck speed. I think my first PR on Paladin was accepted in to the master branch within an hour – and that time is including feedback on my code and some re-working!

There’s not multiple communities either – one for OS hackers, another for Media apps, yet another for gaming apps – there’s one community where everyone tries to help each other. No competing teams of people with their own agendas vying for their view of the world to become dominant.

Choice of software in Haiku OS

This level of freedom does have its drawbacks of course. When I looked for a Developer IDE I found about 10 projects, most with one or two developers that contributed for a year, and then went quiet.

This means there’s a lot of dead/rotting wood kicking about. Haiku has thought of that though. The Haiku Depot software ‘app store’ has ratings and reviews, helping to spot the projects others have found useful.

Multiple projects is no bad thing in itself either. It gave me the ability to find a project with the concepts and basic UI I liked, and then contribute to that.

Learning to code in Haiku OS

I chose to contribute to the Paladin IDE rather than roll my own, and I’m very glad I did. It provided me with a quick way to learn the Haiku OS UI toolkits. I could find a bug, then look at that specific area of code and fix it, learning about those API functions along the way.

So far I’ve learned about passing messages, laying out a UI (and fixing issues with Layout!), invoking other applications, the app build process on Haiku, app porting and release cycles on Haiku OS and its app, and how to do translations.

All within a few short weeks via contributing bug fixes.

Within Paladin too there were a couple of quick-start template projects. I’ll definitely be extending those in the coming months to make other developers’ learning curves easier to handle.

Ownership in the Haiku OS community

There’s an old adage – “Decisions are made by those that show up”. This is very true of the mantra in contributing to Haiku OS apps.

I started working on Paladin one day, and contributed about 10 small bug fixes in the first week or so. I logged every single bug I found, and logged ideas as future enhancement requests. I fixed some of my own reported bugs, starting with low hanging fruit as I learned the codebase and API set.

After a couple of weeks I was offered ownership of the Paladin GitHub project that was on Haiku Archives, where Haiku software lives.

Think about that for a second. I didn’t spend months plotting to take control, I didn’t have to fit in to a particular social circle to be accepted, I didn’t have to have the right friends or the same group think mindset as current contributors (who were all lovely people anyway!). I was encouraged to contribute, and helped to contribute effective patches.

So I was asked if I wanted to run with the project as I was then actively developing it. So I did, and am now the proud parent of an adopted Haiku OS app in Paladin!

I’ve been contributing to Open Source projects for 20 years. I can’t think of another place and time where this would happen in such a friendly, open, and speedy manner.

I’ve even decided to get to the annual BeGeistert conference in Hamburg this November. it’s a small gathering (oh so small!), but I’m hoping for friendly banter and plenty of good quality German ale.

With how welcoming people have been online, I have no concerns about having a good time at conference.

Conclusion for developers

The facilities in the OS are great for developers. The community spirit is strong and friendly, and new people are always welcomed.

If you want to get in to contributing code to a community and aren’t sure where to start then I highly recommend you find a piece of Haiku software you like, get on the Haiku Forums or GitHub in HaikuArchives to find who’s actively working on the project, and get involved!

Because in the Haiku OS community, everyone is welcome.

6 comments

    1. Well. Fedora community is bigger. It’s still very warm and welcome. Very friendly.

  1. why put effort in a os that has virtually no uselful productivity app after SIXTEEN YEARS in the making! STILL IN BETA and resembling a 2000 os that ran on 2000’s limited hardware, other than nostalgic purposes? I guess that BeOS lovers live still in the past, when yes, BeOS was advanced and nice looking FOR THE YEAR 2000 (compared to crappy apple os and windows); but other than a “programming school project” I dont see the point in waste your time and effort in haiku

    1. I suppose some of us like BeOS, others want something for old hardware, whereas for others there’s a chance to work on an operating system, which is very different from other types of project. It’s also very different from the day job. Individuals are free to choose how to spend their time. Better coding Haiku than smoking or drugs 😂😂😂

    2. Before Linux became usable, it was also such a “programming school project”. Back then there were malcontents saying, “I don’t see the point in wasting my time and effort for Linux.” But more and more people joined and something came out of it. It should also be mentioned that some corporations also contributed to the development of Linux (of course not for free). Another thing is that the development of Linux, unfortunately, went in the wrong direction – a “bazaar” was created instead of a “cathedral”. This is probably the main reason Linux is almost completely absent from workstations to this day.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.