Archive for March 2011

I hate C++

I hate C++. I will never ever use it by choice to write software again.

C has been my favorite programming language for many years, but I never really did anything with C++.

I’ve decided it’s incredibly wordy, error messages from the STL are really hard to read, there are so many things I need to do myself instead of having the compiler take care of them for me, there are many ways to do everything, it takes an incredibly long amount of time to compile my small application, and the standard library is so small and painful to work with. I could go on and on.

I don’t hate pointers, I don’t need automatic garbage collection, but holy moley it feels like everything that’s been implemented in C++ has been done in the worse way possible.

Why is this language so popular? It has almost an infinite number of features, which can be nice I suppose. If you want a fast, compiled, object oriented capable language then there traditionally aren’t too many options. Some others are Ada and Objective-C.

I may have made a mistake. Before working on my first C++ application, I wrote my first Python application. I think Python spoiled me.

I wish there was a language that was like Python but compiled like C. I’m sure many programmers want the same thing. Maybe one exists, but if it does I don’t think it’s very popular yet.

For now, I think I’m going to start using Python a lot more. Throughout my life as a programmer, I’ve written software in assembly and C. I’ve learned a lot about good programming principles and managing all of the details in the code myself.

But I’m getting of tired of it. Writing code in a language like C++ can be kind of fun, but I never get anywhere. Alternatively, with Python I can have fun and actually finish an application.

Contributing to the FOSS community

In what ways have I contributed to the free and open source software community? And what can you do to help? Here are some thoughts.

I love helping FOSS projects, but it can be difficult to decide what to do.

Keep it simple

Choose a project where you need to learn one thing at a time.

There are languages (examples: Python, C), libraries (examples: GTK, Qt), and programming paradigms. (examples: GUI programming, threaded programming) When you begin working on a project, you will probably need to learn something new. Try to learn only one thing at a time. For example, if you have to learn gstreamer and GTK (two libraries) at the same time then you might become frustrated. Or, if you have to C++ and Qt (a language and a library) at the same time then you might become frustrated.

So, try to learn one thing at a time.

Working with other FOSS developers

I love working online with FOSS developers. When I get to talk to the lead developer of a project, it feels like I’m talking to a celebrity.

Of course, you should join the mailing list and bug tracker for the project you want to work on. I don’t usually introduce myself. Instead, I just start helping, and people will know me soon.

My FOSS experience

Here are some examples from my FOSS experience.

Many years ago, I wanted to write a new FOSS application. I couldn’t think of any new applications to make, so I decided to make a video game. There are never too many video games.

I learned many things by making video games:

Languages: C, Objective-C, Java, Assembly, Ada

Libraries: Allegro, SDL, Java SWING

I’ve submitted many bug reports to many different projects, such as wxWidgets, Allegro, Udiskie, and Haiku. I really like submitting bug reports and working with the developers to fix the problem. It’s easy to do and I get to use better software.

I maintain some AUR packages. (very easy, but it helps FOSS)

I helped write the documentation for some software from the Arch Linux community, such as Packer and Udiskie. I’ve contributed to the Arch Linux wiki.

Recently, my wife and I wanted a new application for budgetting. I decided to write one. I used Python and wxWidgets. It works pretty well. My next goal is to convert it to C++ and wxWidgets, and then make a version for Haiku using C++ and the Haiku API.

Interesting things

You should definitely work on something that you think is interesting. To me, that’s Arch Linux, Haiku, bug reports, and documentation. Try to find things that are interesting to you!

Lastly, don’t make your goal too big and don’t try to do too much. There are many many people helping in FOSS. If everyone does a little bit, then we can make something great.

GNOME 3 pre-release opinions

It was announced on the GNOME developer list that GNOME 3 won’t have minimize or maximize buttons:

http://mail.gnome.org/archives/gnome-shell-list/2011-February/msg00192.html

That’s a huge change. My initial reaction was “Whaaa?”, but then I started thinking about how I use my window manager (currently FluxBox). I almost never use the minimize and maximize buttons, and certainly wouldn’t miss them if they were gone.

The mailing list message talks about helping users learn a new work flow. This reminded me of when I started using Haiku. Haiku has a powerful file manager called Tracker. Tracker is a spatial file manager, which means every folder opens in its own window. The first thing I wanted to do was change it to a navigational file manager. So, I went to the Haiku documentation.

I found the information I was looking for, which included this comment:

Before you switch Tracker to Single Window Navigation mode, because that may feel more familiar to you, we recommend giving the menu based browsing a try first, as that may actually work much faster for you after getting used to.

So, I decided to continue trying Tracker as a spatial file manager, and now I really like it.

Now, in regards to GNOME 3, it’s hard for me to express how I feel about it. Let’s see if I can summarize it:

  • There are too many things that move around the screen. Things go from the window view, which shows almost nothing but the window you’re actively using, to the activities view, which shows everything at once. And I mean everything, every workspace, every window, every running application, every recently used document, directories, and search. And those things were all designed to move and live and grow as you use your computer, which means things are shifting around a lot.
  • It forces a new workflow on users that doesn’t appear to be better than another workflow. This may not be a bad thing. Haiku kind of enforces a new workflow, but I quickly learned to like it. With GNOME 3, I have no idea how the new workflow is supposed to benefit me. Which leads to:
  • How will they train people? When GNOME 3 is released, the new design may be great for many many people, but they need to learn how to use it before they can benefit from it.
  • It requires accelerated graphics.

GNOME 3 hasn’t been released yet, and my opinion will probably change. I hope the GNOME developers know what they’re doing, because I sure don’t know what they’re doing.