Evan Teran's Blog

Getting The Look & Feel Of An Editor Right

As developers, we all have an editor of choice. We all have one that we consider to be "perfect for our way of working" and no others will do. Sure, in a bind we can make do with alternatives, but they never seem to "feel" right. For me, this editor is nedit. I guess it's because it was the graphical editor suggested by my professor in school. But I often feel crippled when I have to use something else. Unfortunately, nedit is showing its age. It was made in a time before Unicode was even a concept, using a widget toolkit that has simply not kept up with the times.

Read More...

(Not so much) Fun with QSharedPointer

Qt has a wonderful way of dealing with memory management. The core idea is simple. Most objects have a parent, and when the parent gets destroyed, it will first destroy all its children. Using this technique, you can often write your Qt applications with little to no concern for memory management. Often, you literally don't have to have a single delete in your entire application. That's pretty sweet!

In addition, since Qt 4.5 QSharedPointer was introduced, which is very similar in concept to boost::shared_ptr (and thus std::tr1::shared_ptr). I have long been a huge fan of the idea of smart pointers. They solve the need to worry about memory management for almost all usual cases. Unfortunately, when you combine these two concepts, sometimes you can go awry. I was surprised by this one, so I figured I'd shared my findings :-).

Read More...

Combining Qt’s Signals and Slots with c++0x lamdas

Qt is a fantastically designed library. However, every now and then I think of something that I wish they offered that they don't. It's almost always something small and easily worked around, but it would be nice if it were just there. This time around, that feature is the ability to connect a signal to a function which is not a member of a class/struct. Specifically, I think it would be really cool if I could connect it to a c++0x lambda! Especially now that the [ISO C++ committee approved the C++0x final draft][1].

Read More...

GMP error handling frustrates me

The GNU Multiple Precision Arithmetic Library (GMP) is a wonderful library. It offers arbitrary precision math in a relatively simple, easy to use package. It is currently used in kcalc as the core for all basic math operations. The only problem is, the error handling it offers, is broken by design.

Read More...

The Default Browser on Linux Debacle

The concept of a default browser on linux is a complete mess. There doesn't seem to be any central, agreed upon method of defining what the default browser is. First there is the $BROWSER environment variable. This seems like a good idea, it can be set globally, and on a per user basis. On the command line, all you need to do is type $BROWSER http://... and you on your way to the website of your choice. If only it were that easy...

Read More...