The data object. Every application’s object model has one or more of these things acting as a container for some stateful data, often in the form of record-level data sourced from outside the application. When approached top-down this usually requires gobs of boring code to implement that are redundant, a pain to maintain, and a downright chore to test.
Over time, with the addition of new data members we usually see new getter/setter pairs added, tweaks to print functions, and maybe manual edits to some critical serialization logic. Aside from being risky if there’s not adequate testing infrastructure in place, this is not the best use of your time — you could be writing far more important business and application logic. All in all, maintaining data objects is alot of work for something that should be braindead simple and done auto-magically.
Here’s an approach for providing flexible data objects built on boost::tuple that are geared toward rapid development, ease of use, and extensibility.
Continue reading…
On
boost,
programming,
c++ @ 12/10/2008 |
Unlike alot of people that ran right out and upgraded to Leopard on the first day it was available as a general release, I waited. I wanted to upgrade. And I was looking forward to it. But having experienced an upgrade that broke applications in sometimes unexpected ways before, I thought it wise to sit and wait this one out.
Why Upgrade Now
Now that the first major patch release is out (OS X 10.5.1) and after having read numerous reports about the new features, OS improvements to stability and the user experience, and the recent bug fixes, I upgraded. The upgrade went smoothly, but it wasn’t without quirks.
Continue reading…
On
osx,
apple @ 19/11/2007 |
I did something stupid last night. I tried to make a modification to the partition table of a drive while it was in use. For obvious reasons, this was not what I had intended and I corrupted the partition table and lost all my data on that drive — temporarily. Then, I fixed it with parted.
Continue reading…
On
osx,
apple,
linux @ 17/06/2007 |
With all the hype surrounding appleTV I’ve started to rethink the whole PVR vs. TV-media client tradeoff. I have a server at home, a bulky black box with 2×250GB hard disks that I use for storage and backups. I’ve recently considered turning it into a PVR or a TV-serving media server, but the lack of good HD options has stopped me from doing so. I have an HDTV, and I pay for HD cable. Naturally, I want an end-to-end HD solution. I could purchase and install a tuner in the server (which runs Ubuntu, by the way), such as the pcHDTV550 that’s guaranteed to run on linux — but it only takes analog inputs (coaxial and s-video) and only decodes ATSC, which is already exported via firewire by the cable tuner. When I thought about it, I noted that all I really want to do was capture the video stream.
After a little research, I found that any Firewire-equipped Mac can be made into an HD-PVR for unencrypted content at the expense of an appropriate firewire cable. Apple even provides the necessary capture software that you need, provided that you know where to look.
Continue reading…
On
osx,
apple,
media @ 14/01/2007 |
DB2 is one of the few industrial strength, fully featured database systems that has a community edition available for free use. It supports stored-procedures, and all the standard MySQL-esque features, in addition to triggers and all sorts of data partitioning. And it even ships with a full set of administrative GUI tools. Unfortunately, nobody has taken the time to document the process of getting DB2 installed on Ubuntu Dapper (6.06 LTS). This is my attempt to do so and save others some of the confusion that I went though getting it to work.
If you’re feeling adventurous, you can read the official DB2 9.1 documentation and the many, many DB2 Manuals available on IBMs site.
Continue reading…
On
db2,
ubuntu @ 02/01/2007 |
Every good dev environment needs and uses source control. If you’re a programmer, and you don’t use source control of some sort, well, then you’re not really a programmer.
Continue reading…
On
osx,
fink,
apache,
svn @ 21/08/2006 |
Installing the Apache2 HTTP web server on OS X is extremely simple when one uses Fink. The usual source based installation procedure (with docs found on the official ApacheHTP Server documentation page) requires manual download of the server and all the modules you wish to use. Fink simplifies this considerably.
Continue reading…
On
fink,
apache @ 17/08/2006 |
Every flavor of *nix has some form of package management system. Gentoo has portage, Debian has the apt toolset which is also borrowed by Ubuntu, Red Hat, and now Suse, have RPM. Mac OS X, having *nix at its core, is no different.
Enter Fink. Fink is a powerful source-based package management system for OS X written in Perl and maintained by the Fink Project. While there are a number of binary packages available through the project, the available packages are primarily distributed as source and usually require the standard GNU dev toolchain to compile (gcc, make, etc). Either way, it’s easy to use, makes everything you’ll probably ever need to develop software in an OS X dev environment immediately available, and is terminal-based in the good-old unix tradition. There is a GUI that offers basic package management capabilities, but who cares– in my experience I spend so much time at a shell that switching back to the gui costs more time than it saves.
Here’s what you’ll need to install Fink:
- Mac OS X Developer Tools (XCode 2.4 with gcc 4.0, X11)
- The Fink installable binary
Continue reading…
On
osx,
fink,
xcode @ 17/08/2006 |