Skip to main content

User interfaces are getting worse

gps watch

When I'm not in front of computer, I like to spend my time outside and moving. While I do some biking, I run enough to keep making the mistake of signing up for long distance races. Now, I would like to take advantage of wearable fitness tech for training. I have this GPS watch which has a beautiful form factor. It is the size of normal watch and fits well on my wrist.

The main problem is the touch-screen. Since the launch of the iPhone, industrial design has seemed to skew strongly towards touch screens. A touch screen that is roughly 1 1/4" by 3/4", on a device that is designed to be operated while moving and with sweaty hands, should be an outlier of bad design when everyone is talking about UX. Unfortunately, prettiness seems to be winning out over usability everywhere.

Read more

How to talk about C

According to the StackOverflow 2017 Survey, nearly 20% of programmers use C. There are many good C programmers whose knowledge of technical details and terminology is well below their ability to write good code in C. This can lead to people under estimating the skill levels of these programmers, and in some cases can lead to very unpleasant bugs. So below is a basic set of things to know about C to sound like an expert.

Read more

Move constructors, (N)RVO, and non-copyable objects

C++ is a hard language to learn, and a hard language to master. I was reminded of this other day when I came across an incorrect use of move semantics. I saw a method of class that returned an rvalue reference to a stack object (technically it is actually an xvalue). It looked something like this:

Foo && createFoo()
{
  Foo foo(1,2);

  ...

  return std::move(foo);
}

This is undefined behavior, as a reference to a stack object is being returned (thus a dangling reference is the result). I made the same mistake when I started using C++11's features.

Read more

Process vs. People

dish washing

I do not have a dishwasher in my kitchen. When washing dishes by hand (and choosing when to wash them), the real objective is to minimize the amount of time dirty dishes spend in the sink. So the right process, would simply be to wash dishes as soon as they are used. Like most good programmers, I'm quite lazy, and stop following this process within a day or two. I then revert to the process of necessity, which is to wash dishes right before they are needed, which works well for frequently used dishes, but poorly for the ones that are used once a month. So the process that I've found to work the best, is when I need to wash dishes that are about to be used, I wash at least some of the infrequently used ones (like I said, I'm lazy).

So it turns out the best process for washing dishes for me, is not the "optimal process". The same is true for software development. When developing software, the most important thing is the people: the customers and developers. Your processes need to fit them. Its too often we see the rules of scrum or other practices rigidly enforced, software developers evaluated on how well they conform to certain processes, and tools chosen independent of the developers who will use them.

Read more

Pruning Inheritance Trees

dinasour national monument

This weekend I began tackling some technical debt in my WildRiver library for reading and writing matrices and graphs. When I started writing the library a few years ago I made the mistake of re-using lots of code via inheritance. It stemmed from a desire to have a couple of methods that a class for reading and writing a given file format would need to implement.

Read more

How to build Linux packages with PackageCore and Travis-CI

packagecore logo

We recently put up the GitHub repository PackageCore, which is the core functionality of our BytePackager service. PackageCore is a python library for automating the building of Linux packages as part of your development process. It works by spinning up Docker containers, generating the required .spec, DEBIAN/control, PKGBUILD, etc. files, and compiling and building packages for your software on each distribution. It also automates running a series of tests on the package after its been built on a fresh container.

Read more

Unsigned Types

Most modern languages have stopped offering the use of unsigned types. However, in C and C++ we do have the choice. Why would you use unsigned types?

One benefit of using an unsigned type for variables whose domain does not include negative numbers is that we get to use that extra bit. So if we represent the number of non-zero entries in a sparse matrix as uint32_t instead of int32_t, we can have four billion non-zeros instead of just two billion. This use to be a pretty strong argument when most workstations/compute nodes could only operate on matrices with less than four billion non-zeros (~32GB).

Read more

Portable GUI with wxWidgets and CMake

Building portable command line applications is fairly straight forward. The only problem you really have to solve is whether to prefix arguments with a "-", or with a "/" if you want to conform with Windows utilities.

However, if you want to make a portable GUI application, your life is quite a bit more complicated. One of my favorites for the way it solves OS 'feel' issues (i.e., GUI equivalent of "-" versus "/" problem), is wxWidgets. By using the platform's native GUI components, it gives the right look and feel of a native application. Furthermore, it has a commercial friendly license.

Read more