Data Integrity: Resurrection

flame signFaced with a need to recover images from Robert’s camera after a defective card-reader nuked the filesystem superblock, a quick utility came to mind. Nuked superblocks mean no file allocation table. It means no metadata. But it does not mean no data.

  • Target medium: 1GB XD card from a digital camera.
  • Data to recover: JPEGs. Lots of them.

Whipping out some jpeg-format-and-filesystem-jutsu, here’s the solution (for less than that $20 shareware recovery utility):

Who was that MAC'd man anyway?

A3 20/60 1/6 CCBFor those that deal with complex networking, having a device’s MAC address can be very helpful in diagnostics, configuration, and firewalling. Often just using a device’s IP address is enough, but what about DHCP? Unless you can control the device’s IP range, this can cause many hours of troubleshooting. This is where having a MAC address helps.

Somebody set up us the Beowulf

emergency showerRecently we had an interesting opportunity to deploy 7 identical customized machines for one of Kosada’s consulting clients. We’ve been working on disk images to make this quick and painless, and have more or less succeeded. However, getting an archived image onto the machines has a few different methods, depending on circumstance. We also get to pay a penalty every time the underlying hardware changes, since the image bundles in specific drivers. Usually we’re able to work around this with minimal pain.

Excitingly, these new machines broke the mold (they’re slightly older, considerably cheaper machines), so we had to tweak the image a bit.

The Secret Life Of a Patch

Thunderbird.appMozilla is an open source project that produces some widely used software. Their most noteworthy product to date is Firefox, a standards-compliant web browser.

Being open source, their projects and products are often enhanced by the contributions of others. These contributions often come in the form of a “patch” – a file that tells the computer what to change in the source code to add the contribution.

Malus Sylvestris Migration, Part 2

water dropletsIn Part 1 of Malus Sylvestris Migration I went over some basic differences between Mac OS X, Linux, and Windows. Basic configuration, Application installation, and linking were discussed. In this, the second installment, I intend to cover some more interesting features. These include virtual desktops, configure scripts, and the like.

At the point where I left off, I figured I was pretty good to go. I had Xcode installed, so I grabbed the Thunderbird 2.0b2 source so I could compile it – hacking on Thunderbird is one of my soon-to-be all-encompassing projects.

Divining Oracle's TCO

There are many options in the database world. Many solutions for all kinds of work loads, and solutions for all kinds of financing models.

Oracle, a database vendor, is pretty tight-lipped about its financing. Nowhere on the website is price listed. Today, we managed to breach this obfuscation. We had to call them.

Licensing for Oracle is offered on a per-CPU basis for the database servers, and on a per-machine basis for the user clients. They weren’t clear as to what constitutes a CPU – does Hyperthreading count as 2 CPUs? does Dual-Core?

Either way, the price per CPU is $40,000.

Per client machine, the license cost is $800.

Plus a support contract.

So, instead of spending well over $200,000 on this…

We’re replacing one of Kosada’s consulting clients’ ancient Oracle servers with one running PostgreSQL.

Cross-compiling on Malus Sylvestris

After working my way through most of the migration to Mac, I came across a common problem for multi-platform developers like myself. The problem is the creation and use of applications targeted for another platform. For example, using a Linux compiler to develop Windows applications, or using an OS X compiler to develop Linux applications.

This is a fairly common problem, and also fairly simple to solve. The resultant tool kit is referred to as a Cross-Compiler, because is crosses platforms, and it compiles source code into target code. For Linux, my cross-compiler of choice was created and maintained by SDL, and can be found here. This allowed me to write Windows programs without needing to actually run Windows. Since both Linux and Windows were my complete set of frequented platforms, that sufficed. Now, however, one more platform has entered the mix.

Malus Sylvestris Migration, Part 1

Mac OS X Install Disc 2Anybody who’s anybody has used an Apple computer before. Whether at home, abroad, at school, work, or at that one weird guy’s house, chances are you’ve dabbled with a Macintosh.

And there’s a pretty steep curve attached to switching Operating Systems. This is especially the case when you’ve used a very dynamic, customizable operating system like Linux the majority of the time. In this article I’d like to address some of the issues noted, less than 12 hours after I’ve opened the box, to perhaps help others get reoriented.

For much of my computer-using life, I’ve been an Intel-based computer user. This means that I grew up on

Opteron Meltdown?

For one of Kosada’s consulting clients, we’ve set up this dual-core AMD Opteron server. Normally it runs all happy-like and does what it needs to. We take care of its basic needs, and it takes care of the rest.

Opteron after meltdown

However, Tyan – the motherboard manufacturer – saw fit to include only 1 of the typical 3 heat sink mounting tabs. Somehow, this 1 tab managed to suddenly break on Sunday, March 18, at about 4:45pm.

And now the processor has Opteron Cancer.

The Sentinel

Today in Barton’s compsci class we went over simple user-controlled looping.  This allows us to collect variable amounts of input from user, without asking them explicitly for the number of fields in advance.

We used Barton’s Constant (-999) as a sentinel value to trigger the end of the data set.  In many ways this is a lame solution, since -999 may be a valid data point for some data sets, and it also requires additional instructions at each prompt to let the user know how to exit the loop.  In the future, we’ll hopefully learn how to trap Ctrl-C or Ctrl-D to make this simpler, or maybe we can simply detect a null input to indicate list completion.

Of course, all of the above is moot once we get into Graphical User Interfaces.  But for command-line stuff, I guess there aren’t really any better solutions…