Lesson 22: A First (Bigger) Project

Blog post by darkwyrm on Wed, 2011-12-28 16:58

After a long hiatus, here is the next lesson in the series. Lesson 22 begins a project which will delve deeper into what is involved in developing larger projects in Haiku. In this case, we begin working on a text editor, QuickEdit. Programming with Haiku, Lesson 22 Lesson 22 Source Code

Programming with Haiku, Lesson 21: Replicants

Blog post by darkwyrm on Wed, 2011-07-06 00:49

Here is a topic that for the longest time as a BeOS/Haiku developer, I had no idea how to do and didn’t really feel enthused on the concept of learning. Of course, now all the major platforms have desktop gadgets. Ironically, writing a replicant is really easy if you already know how to write basic Haiku GUI applications already. Find out how in this lesson. Programming with Haiku, Lesson 21

Lesson 20: Drag and Drop

Blog post by darkwyrm on Tue, 2011-05-17 11:38

In this lesson we seek to understand the part of the Interface Kit which lets us move things around in Tracker using the mouse. We will examine both ways of transferring information from one program to another, both the simple way and the more flexible (and complicated) method. Programming with Haiku, Lesson 20

Lesson 19: Deeper in Application Scripting

Blog post by darkwyrm on Wed, 2011-04-13 00:34

When we last looked at application scripting in Haiku, we merely scratched the surface. Using the hey command and the basic concepts behind the Haiku scripting model, we were able manipulate running applications to do our bidding. Now we will delve into the C++ code which can do the same thing with much greater flexibility and even implement scripting support in our own GUI controls. Programming with Haiku, Lesson 19

Lesson 18: Application Scripting

Blog post by darkwyrm on Wed, 2011-03-16 00:30

After a long hiatus, Lesson #18 is available for your reading pleasure. The topic? Scripting Haiku applications, possibly one of the least understood aspects of the operating system. Learn about hey command, its uses, and even see some of the most English-like bash commands ever. Also see how to make almost any Haiku application answer your beck and call and tinker around the operating system with an updated version of the ScriptWorld demo application, Scripting Explorer.

Lesson 17: Writing a New Control, Part I

Blog post by darkwyrm on Mon, 2011-01-31 20:39

This lesson is one of several which delves into the art of control writing for Haiku – not just a quick-and-dirty hack on an existing one, but writing a new control which rivals existing ones in quality and features. Learn how controls handle drawing themselves and write a basic color display control. Programming with Haiku, Lesson 17

Lesson 16: Fonts

Blog post by darkwyrm on Sun, 2011-01-09 13:46

Most people think of fonts as merely a means to an end, but in this lesson we will take a crash course in typography and the very basics of displaying text in Haiku. Also included is a review of the second unit, lessons 6 through 15. Programming With Haiku , Unit 2 Review Programming With Haiku, Lesson 16

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.

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.

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.

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

Ohio LinuxFest 2010: Didn't Disappoint

Blog post by darkwyrm on Mon, 2010-09-13 12:15

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.

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.

Learning to Program With Haiku Now Available in Book Format

Blog post by darkwyrm on Thu, 2010-07-22 17:21

The book is finally done! Getting through the proof copy took so much longer than I ever expected. Luckily, right now I’m out of town with a lot more time on my hands, so I had a lot more time to be able to sit down and get through it. It has been published through Lulu.com so that a great deal more of the profit from the book goes to me instead of the pockets of a book retailer.

Lesson 23: Polish and Packaging Our Project

Blog post by darkwyrm on Wed, 2010-06-23 00:41

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.

Lesson 22: Designing a GUI

Blog post by darkwyrm on Tue, 2010-06-15 02:02

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.

Lesson 21: Reading and Writing Files

Blog post by darkwyrm on Fri, 2010-06-11 18:04

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. Learning to Program With Haiku, Lesson 21

Lesson 20: All About Storage

Blog post by darkwyrm on Tue, 2010-06-01 23:58

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++. Learning to Program With Haiku, Lesson 20 Source Code: 20ListDir.zip

Lesson 19: Resources and Pictures

Blog post by darkwyrm on Tue, 2010-05-25 12:32

Ten years ago when I first started to learn to write code using BeOS, I had a lot of questions that I couldn’t any documentation to give me the answers. Luckily, there was the Be Code Talk mailing list and kindhearted members of the community, like David Sowsy (Animaxo, Vesa Accepted). Resources are one of those things that eluded me. Eventually I figured them out, but Lesson 19 lays some of it out in plain conversation.

Lesson 18: Working With Lists

Blog post by darkwyrm on Wed, 2010-05-19 12:15

We’re starting to get closer to the end of this Learning to Program series. After toying with menus and interface colors in the last lesson, we apply some of the concepts used with menus to get the hang of using list boxes and discover along the way a few bizarre sports that really exist. Games people play. Sheesh. Learning to Program With Haiku Lesson 18 Sources: 18ListTitle.zip

Lesson 17: What's on the Menu?

Blog post by darkwyrm on Mon, 2010-05-10 12:26

After an unintended wait, Lesson 17 is finally out. We are back to learning about hacking on the Haiku GUI after taking a short C++ language break. Today’s topic? Menus. Also in this lesson is some expansion of what we know about messaging and BViews. Learning to Program With Haiku, Lesson 17 Project: 17MenuColors.zip

Lesson 16: Locked and Overloaded

Blog post by darkwyrm on Tue, 2010-04-27 00:03

It’s strange how a week goes by so quickly now, but it’s good motivation to keep writing! This lesson takes a break from hacking the Haiku API to learn a few C++ language concepts needed to continue progress as an aspiring developer. Function overloading and operator overloading are examined in detail. Enjoy! Learning to Program With Haiku, Lesson 16.

Lesson 15: The Haiku API at 10,000 Feet

Blog post by darkwyrm on Tue, 2010-04-20 13:04

Having written our first program, Lesson 15 delves further into what writing basic applications are all about, looking at the API and its organization and focusing on an essential: messaging. Also included in this lesson are the finished sources for those who don’t want to mess around with typing the project out. Learning to Program With Haiku, Lesson 15 Lesson 15 Project Sources: ClickMe.zip

Lesson 14: Our First GUI Program

Blog post by darkwyrm on Tue, 2010-04-13 23:47

It’s about time: our first program which does more than print stuff to the Terminal! Now the real fun begins! Learning to Program With Haiku, Lesson 14.

Lesson 13: Programming With Class(es)

Blog post by darkwyrm on Sun, 2010-04-04 00:48

Today we’ll be diving headlong into the murky depths of C++ programming: classes and inheritance – struct’s with fancy tricks aplenty. It’s also our last lesson before writing our first windowed Haiku program, so get ready and study well. Enjoy! Learning to Program With Haiku, Lesson 13.

Lesson 12: OOPs I Did It Again!

Blog post by darkwyrm on Sun, 2010-03-28 11:37

This would be the only time I will capitalize on a really bad Britney Spears reference. I promise. ;-) This lesson introduces us to the wonderful world of C++ and Object Oriented Programming. It’s not terribly code-heavy, so this might be a good time to look over past lessons to make sure you understand concepts pretty well – it only gets bigger from here. :-) Also, there is now an archive of all programming lessons at the redesigned version of my old website, now titled DarkWyrm’s Library.

Lesson 11: More Data Structures and Types

Blog post by darkwyrm on Sat, 2010-03-20 15:58

This time around, we will be examining some important kinds of data structures and ways to create custom data types, a critical stepping stone in getting to understanding the Haiku API. This is the last C / C++ lesson – the rest will be C++ only. A couple more lessons and we’ll finally be ready to write GUI programs for Haiku! Enjoy! Learning to Program with Haiku, Lesson 11.

Lesson 10: More Pointers and the Command Line

Blog post by darkwyrm on Sat, 2010-03-13 02:19

Here it is: Learning to Program with Haiku, Lesson 10. Now we’re starting to tie up loose ends before moving on to just C++. In this lesson, we learn more about pointers and kinda-sorta pointers called references, and we examine the basics of getting information from the command line. Also included are the answers to the review questions for Unit 2.

Whole Lotta Lessons Goin' On

Blog post by darkwyrm on Sat, 2010-03-06 01:56

There have been quite a few comments on people being excited about when these start addressing the Haiku API, so I'm going to speed things up a bit. I originally planned on calling this week a Buy One, Get One Free week, but that won't fit now. Why? I had planned on publishing review questions after Lesson #5, but I must have forgotten to upload them, so I'm making them available along with Lessons 8 and 9 and the questions for review after Lesson 9 has been completed.

Lesson 7: Losing My Memory

Blog post by darkwyrm on Sat, 2010-02-27 00:56

It’s hard for me to believe that I’ve been publishing these mostly-weekly lessons for almost a month and a half. It’s been really fun. I hope that those of you reading them have been enjoying reading (and hopefully learning from) them as I have in writing them. This one covers two major topics: memory management and binary math, nothing terribly exciting, but really useful and necessary nonetheless. Learn to Program With Haiku, Lesson 7.

Lesson 6: More Loops and Conditions

Blog post by darkwyrm on Sat, 2010-02-20 01:25

Here marks the beginning of the second unit in my series, “Learning to Program With Haiku.” Lesson #6 expands on our knowledge of loops and decision-making constructs. Good luck! Learning to Program With Haiku, Lesson 6.

Lesson 5: Arrays, Strings, and Pointers

Blog post by darkwyrm on Sat, 2010-02-13 02:44

It’s that time again, continuing in the journey from No Code to Know Code. This lesson marks the end of the first unit and is somewhere around halfway from complete neophyte to writing – and understanding – our first program for Haiku which uses windows and buttons. Learning to Program with Haiku, Lesson 5.

Lesson 4: If, For, And, Not, Or

Blog post by darkwyrm on Fri, 2010-02-05 23:34

Hey, that rhymes even! :P Lesson 4 is now out. Decision-making and repeating instructions are on the agenda for this one, expanding the repetoire of basic skills for writing code. Learning to Program With Haiku, Lesson 4.

Programming Lesson 3

Blog post by darkwyrm on Sat, 2010-01-30 01:32

Continued (mis)adventures in programming for all of the curious into the insights of being a codemonkey. In this lesson, we examine the different types of data we can use, a more in-depth look at how to print to the screen, and more! Learning to Program With Haiku, Lesson 3.pdf All previous lessons have received some minor revisions and code is now colored for better readability.

Programming Lesson 2

Blog post by darkwyrm on Sat, 2010-01-23 01:46

A week or so later, there is another lesson for download. These are meant to go at a reasonable pace to ensure that the concepts presented are learned well. Enjoy! Learning to Program with Haiku, Lesson 2

Calling All Haiku Developer Wannabes

Blog post by darkwyrm on Wed, 2010-01-20 13:50

Have you ever wanted to learn to program for Haiku (or something else) but never had the money or the chance? Has something else gotten in the way? Even though I still don’t have any real motivation to write code, right now I have plenty of motivation for writing about code. I’m going to be publishing online programming lessons whenever I have some time. Usually this will be about one per week, but may happen more or less often on occasion, depending on how my spare time runs.

Ohio Linux Fest... What a Ride!

Blog post by darkwyrm on Sun, 2009-09-27 19:13

Well, for not having been doing hardly anything Haiku-related in the last month or so, this kind of made up for it. It all started with almost not getting a table at the conference and then on Wednesday–if I remember correctly, that is– suddenly having one by the power of Greyskull, um, I mean Koki. ;-) This meant a flurry of e-mails, burning what remaining CDRs I had around the house, quickly putting together a Haiku demo machine, and a host of other details.

I arrived at the Greater Columbus Convention Center at about 7:15 am to set up and was quickly met by Michael Summers, whom I’ve known since the first WalterCon years ago, and Joe Prostko. We had been concerned about not having a projector, particularly on such short notice, but as we found out, it wasn’t really necessary. We had a six-foot table, Joe’s MSI Wind netbook, my Thinkpad R40 laptop, some live CDs, a bunch of fliers Urias had sent us, a couple of chairs, and some great neighbors in the non-profit section: the Northeast Ohio Open Source Society (NOOSS) and The Linux Link Tech Show (TLLTS). Setting up didn’t take long, and even at that early hour there were already a lot of people there besides the sponsors.

R2 Desktop Proposal Rev. 2, Requesting Comments

Blog post by darkwyrm on Fri, 2008-11-07 00:12

I just finished (finally) consolidating the two R2-related RFCs that I’ve written and revising them, and I’d appreciate comments, criticism, etc. You can get it from this link. If you have an opinion on what Haiku should look like, I’d genuinely appreciate your input. :)

R2 R&D: The Filer

Blog post by darkwyrm on Sat, 2008-08-09 21:55

Being a go-getter kind of person has, on occasion, actually gotten me somewhere besides into a mess. With having significantly more free time than usual because of being on summer vacation, I decided to work on a document which combined two RFCs I have already written, which can be found here and here. Knowing how it seems like discussions on R2 usability seem to be both endless and unproductive, I decided to put some the ideas into code before publishing it in an effort to demonstrate that most, if not all, of the ideas I propose are practical, reasonable, and worth implementing for the second version of the community’s beloved OS. The first of these to see public eye is the Filer.

Who is Joe User?

Blog post by darkwyrm on Mon, 2007-07-09 12:45

A couple of articles I just read (here and its rebuttal) are written by Linux users about why Linux is the best and how to get a regular person (hereafter referred to as Joe User) to start using Linux. To save you the time of reading the two articles, the first is entitled “Understanding the Common User: Everything should be as simple as it is, “ by Keyto. The article is partly about how a Common User thinks, but primarily that quite a lot of the problem with Linux is the current users – geeks who have trouble relating to Joe at Joe’s level of expertise instead of the geek’s level.