Monday, November 12, 2007

Blowing stuff up

I recently had the opportunity to go on a weekend excursion with a group of National Guards... A demolitions group.

As a picture is worth a thousand words, I thought I would let pictures do most of the talking with a little commentary from me.

First we unpacked everything. The materials included shock tube, detonation cord, cratering charges, detonators, initiators, and C4. There were no shaped charges but I will get to that later.

We set up an assembly line to prepare blocks of C4 to tie in to the main line of detonation cord for each firing. This involved tying special knots in the detonation cord, cutting the C4, inserting the detonation cord and taping up the cut C4.

Here are the boxes of prepared C4 charges from our little assembly line.

What happens when you set off 15 blocks of C4 explosive in an old broken microwave brought along for the ride? We aren't quite sure... the only piece remaining afterwards was a length of mylar that I think came from the microwaves power supply.

Here is my friend Kirk. Someone he knows works for the National Guard and made this opportunity available to us. Kirk has just finished tying two blocks of C4 strapped to a 40lb cratering charge into the main line of detonation cord for this firing.

We all had to wear kevlar helmets and flak vests. Here I am in my sexy getup (the kind of sexy only my wife can appreciate).

Here is the cloud from our detonation of five 40 lb. cratering charges and a large quantity of C4 that was getting old and needed to be disposed. I wished I could have taken some video, but a Major and a Colonel showed up for the detonations and insisted that we take shelter in the bunker. Otherwise, I think the team leader would have allowed everyone to watch from the top of the bunker 300 yards away from the range.

And finally, the hole left by the detonation. It would have been bigger, but we had to dig the holes in the clay soil where we placed the cratering charges. This meant the charges were near the surface where they couldn't work to their full potential. Normally shaped charges would be used to create 6-8 ft deep post holes in the dirt. The charges would then be placed in the bottom of these holes where they could work most efficiently.

It was several hours of hard work, but well worth it when the initiator was pulled.

Wednesday, October 3, 2007

Functionally deficient

I have recently returned to looking at and learning functional programming languages. Right now I am looking most closely at Haskell and Objective CAML (ocaml for short). There are many others out there ( Eiffel, Erlang, Lisp/Scheme, etc. ) but those are the two I am concentrating on now.

Haskell is interesting because it is purely functional and adheres very closely to mathematical principles (Lambda Calculus, category theory, type theory, etc).

On the other hand Ocaml is a more commonly used nearly-functional language that is known for its performance.

You may be thinking, "My programming language 'X' has functions, what is this 'Functional Programming' thing?" Chances are, your language 'X' falls into the category of imperative/procedural languages.

To help explain the difference and get you started off, here are some great resources to whet your appetite:
In particular, Functional Programming For The Rest Of Us is a great starter article I recommend for people who are new to functional programming.

Monday, September 24, 2007

Thieving $#@!

Over the past 2 weeks I have had change stolen off my desk several times. The first time I thought that I had forgotten about using it or giving it to somebody. But then it happened again... and again. Either I am going senile, or someone is taking my property for a walk.

I can be tolerant of a lot of things, but I have problems with not being able to trust cubicle neighbours.

So, it is time to figure out who is pilfering my spare change. My desktop machine is a nice little linux desktop. So after a little searching I came up with a nice little solution that will utilize a 6-7 year old webcam I have laying around. It's a nice little package, called motion, that detects motion based on video changes using a standard web camera and then records it to images and video files.

Who knows, maybe I don't want to know who is stealing from me. On the other hand, I really don't appreciate working with/around someone who has so little respect for others.

Motion was very simple to set up. I came across another package, called ZoneMinder, that seems geared towards full CCTV setups that I am going to research but motion was simple to set up and does exactly what I need for this particular problem.

Rhythmbox and blues

Linux has two iTunes-like applications available for the Gnome desktop - Rhythmbox and Banshee. I lean more towards Rhythmbox for several reasons, but it has always bugged me that it doesn't have the option to minimize to tray when the application close button is pressed.

So instead of continuing to complain about this missing feature, I dug down into the code this weekend. And the code was pretty straightforward, so I added the feature and created a patchset.

While I was researching whether this feature was planned or not, I came across the fact that this feature had been added before and taken out. The removal of the feature was due to the original modification not being an option and the developers did not want ambiguous behavior when the close button was pressed. Well, thank goodness my patch included modifications to the preferences so that the close to tray functionality was configurable :-)

That just leaves the much debated topic of should an app close to the notification tray (this is the subject of many long mailing list/forum threads). I think there is a good case for providing this behavior for long running applications (Gaim/Pidgin also provides this behavior). For the most part, audio players are long running applications that you interact with very little once you start them up. And when I am doing other tasks on the computer, I really don't need an extra application cluttering up my task bar.

I believe that this is all leading up to a long battle with the developers to get this patch added, but it was fun to dig down into the code and make the modifications. Hopefully campaigning for the inclusion of my patch will be just as enjoyable.