Tuesday, June 26, 2007

The Day from Hell

I know it is cliche, but Mondays can really be hell sometimes. On Sunday, I received an email from the mail/web server at work, notifying me that one of the hard drives in the RAID-1 array (mirrored) had failed. So, I readied myself for some server work on Monday.

I pulled out the faulty HD, and replaced it with a backup drive. I then start up the server, and watch the handy messages go by, until the system freezes at the partition check. Oh... no... Try a few more ideas, and still no go. Both hard drives died at the same time? Come on!

Time for the backup plan. I had prepared a Debian Etch server just for this event, and it was time to press it into service. I got it up and running, accepting email and serving web pages. Unfortunately, the server was not serving its role as a gateway to the regular desktop systems behind it. Frak! Something was (not) going on with the ip masquerading functionality. I installed the ipmasq package, but all packets were being dropped by the server, so no outgoing connections were possible. The server could access both subnets, but no joy for the desktops.

Damn, damn, damn! Now what? 6 hours later, and I am now seriously screwed sideways and upside down. I am sweating profusely, and am almost ready to give up. I call a local "Debian" consultant, but it turns out he's not real familiar with iptables/nat. What to do... what to do?

I finally get the idea to try the hard drive from the additional server in another box, as I kept coming back to the fact that having two hard drives fail simultaneously seemed a bit suspect. I powered up the box, and voila! She booted, and everything looked good! I moved the NIC cards over from the old box, placed the spare hard drive in her, and fired it up. After partitioning the new drive and marking said partitions for linux raid auto-detect, I was able to add the new disk partitions to the existing raid array, and everything seems good so far.

Needless to say, I learned a few lessons:

  1. My backups of the mail from the mail server worked well. However, there was additional information that should have been backed up but wasn't. This has been remedied.
  2. Even if you go to the trouble of making a backup server, you need to test it in exactly the same kind of conditions in which you need it to function. I tested out the services and such, but not the iptables/nat requirement (thinking it would be a breeze - ha!)
  3. I need to find a way to move my OS from one set of hardware to another. I'd rather avoid the reinstall and subsequent system build up if at all possible, but this might be too much to ask. If you have any ideas, lemme know!
  4. I *really* need to buy some new server hardware.
So, things are bck to normal now. I figure I lost at least a year of my life in those eight hours, and it wasn't until T+24 hours that I actually started feeling normal again. Maybe I should look into Google hosting our email...

Friday, June 08, 2007

An Amazing Overview of the WWII Eastern Front

If you are interested in the Eastern Front of World War II, or you are a fan of military history, then do yourself a favor and visit POBEDITELI - Soldiers of the Great War. It is a flash application which takes the viewer from 1941 through the end of the war in Europe in 1945, providing information on battles, historical notes, video clips, and audio (subtitled in English) from those who lived through that time period.

It is very thorough, and extremely interesting. Make sure to click on the boxes with red/green arrows for further detail. You'll need a bit of time to explore it thoroughly, so plan accordingly!

Wednesday, June 06, 2007

Odd GCC Optimization Issue

I am working on a modification to some C code for a customer, and stumbled upon an odd problem with the GNU C Compiler (gcc version 4.0.3-1ubuntu5). The code computes payments and amortization schedules for requested loans, and returns the information in data structures.

I noted the problem when writing a payment stream generator (e.g. "x payments of $a", "y payments of $b", etc.). With optimizations turned off, the payment stream was being output correctly for the loan in questions (2 payments of $47.26 followed by 4 payments of $2530.39).

However, once I turned on optimization (-O2), the payment stream gave me a hiccup and reported: 1 payment of $47.26, 1 payment of $47.26, 4 payments of $2530.39.

Hmmm - odd. Printing out the first two payments to 15 decimal places revealed an extremely slight difference (47.259999999999998 vs. 47.260000000000005), even though the two values are computed using the same factors, rounded in the same manner, etc.

I wish I could reduce the code to something simple for demonstration purposes, but the code is extremely complex and has many dependencies on other units, so it would not be a trivial matter to say the least.
For now, I have replaced the -O2 optimization flag with the following: "-finline-functions -floop-optimize -falign-functions -falign-loops -funroll-loops". With those optimization options turned on, the results are as expected.

I just checked to see if the same issue occurred with an older version of gcc (version 3.3.5 Debian Sarge) and the same problem does appear. Odd.

Thursday, May 31, 2007

New Board! 6' 5" CI MSF Bonzer

It has been a while since my last surfboard purchase, and for good reason - I've been very happy with all of my boards. However, while checking out craigslist.org one day, I came across what sounded like a very good deal.

I called the person offering the board for sale, and after talking with him a bit, it sounded like just what I was looking for: a Channel Islands Merrick Singe Fin (MSF) which had been retrofitted with Bonzer side bites. It was in almost new shape, and was the same dimensions as my MSF.

So, I decided to sell my MSF first, chip in a little bit of extra cash, and then pick this one up. Here she is, in all her beauty:

IMG_3882
Top side with nice slob job resin tint

IMG_3883
Dimensions

IMG_3884
Bottom

IMG_3886
Close up of fin cluster

IMG_3890
Bottom view from the nose

IMG_3891
Translucent fins from Rainbow Fin Co.

Near the end of my photo shoot with the new board, Ace came on out and decided to get in on some of the modeling action. What a ham...

IMG_3892
Ace seems to like it as well

I got her all waxed up this morning and just need a bit of juice to try her out on some "waves of consequence".

Wednesday, May 30, 2007

Baseball Season - Tournament Wrap-up

Turn out the lights, the party's over...

The AA tournament is done, and the Raptors finished in 4th place. We had a tough seeding draw (4th) which saw us face the Iron Birds for our first game. The teams were randomly seeded, and the two teams (out of six) which are seeded first and second have a tremendous advantage, as they get a by in the first round of the double-elimination schedule.

We lost our first game against the Iron Birds, and headed down to the loser's bracket. There, we faced the Storm and won a tight game with a 5-4 score. All 5 of our runs were scored in a single inning, and our pitching proved fairly solid throughout the game.

Our third and final game found us facing the Iron Birds again. Their star pitcher was untouchable, and the Raptors struggled at the plate. We scored a single run off of a single hit, and that was all she wrote.

So, the season is no over and we get to relax a bit until soccer season starts sometime near the end of summer. I was very pleased with the improvements my son made over the course of the season, and he really enjoys just playing ball with me outside. We've scheduled a few Padres games this summer, and both of us are looking forward to them!

Thursday, May 24, 2007

Thursday Afternoon Surf Report

Swamis - March 10, 2005

I've been able to get out in the water these last three days, and the conditions have been pretty decent compared to the lull we've experienced the previous week. On Tuesday , the sky was overcast and the wind was almost nonexistent, dishing out waves that were glassy, peaky and extremely fun. Wednesday and Thursday saw the sun make an appearance - unfortunately the wind also showed up and the waves were not nearly as nice as on Tuesday.

I've been surfing my GH canard quad fish and loving it. We'll see if we get some of an expected southern-hemisphere South swell early next week. If we do, it might be an opportune time to try out my new board (pictures and more information coming soon)!

Wednesday, May 16, 2007

Baseball Season - Regular Season Wrap-up


The Raptors finished up three games over five days, with one win, one loss, and one tie. Our overall season record ended up being 13 wins, 3 losses, and 1 tied - not too shabby!

The Thursday night game was against the Storm, and our offense struggled early. However, we scored a few key runs late in the game, and after 4 & 1/3 innings of play, took the lead 4-3. Time was called due to the 2 hour limit during the regular season, and the team left happy.

Saturday's game against the Bulls was problematic. Alan had a very tough time getting pitches over the plate, and our offense was quite lackluster. We ended up losing 9-4, and hoping for a better performance during our last regular season game and tournament.

Monday night's game found us facing the Iron Birds again - the same team which has beaten us twice the last two games we have been matched up. The Iron Birds have one very good pitcher, whom they pitched for a single 1-2-3 inning. However, their other pitchers are nowhere near as good as the #1. So, after he left the game, the Raptors jumped all over the Iron Birds and put together a nice eight run second inning. The game was called at the two hour time limit with a 10-10 tied score.

The Raptors looked a bit rough defensively during our final game, which worries me. We will face the Iron Birds (again) for our first tournament game, and I am sure that their #1 pitcher will be out in force. I can only hope that the Raptors put the bat on the ball and do their best. Due to pitch counts, I don't think the #1 pitcher will be able to stay out the entire four innings needed for a regulation tournament game, so if we can keep the Iron Birds in check until that time, we may have a chance. It's all about the pitching...

So, wish the Raptors luck tonight as we begin our post-season journey - we could use it!

Score cards for the final three regular season games are found below.

Friday, May 11, 2007

Baseball Season - Week 8 Wrap-up


Week 8 found the Raptors facing first the River Cats on Thursday, and then the River Dogs on Saturday. Did the Raptors continue their torrid winning streak, or would they fall down as the regular season nears its closing? Read on for details...

Our Thursday game against the River Cats saw an explosion of offense, as the Raptors scored 12 runs in 3+ innings. The game was called in the top of the 4th due to the 2 hour time limit on AA games. Our two pitchers did fairly well, and the Raptors ended up only allowing 2 runs to score.

On Saturday, we faced the River Dogs. The River Dogs won the end of year tournament last year, and have some experienced pitchers on their team. I had a feeling that the game would be a closely contested match, and was right. The Raptors scored 7 runs off the River Dogs first pitcher in the first two innings. Our first pitcher allowed 3 runs over the same span of time. The River Dogs' second pitcher only gave up one run over the final 2 innings, with a total of 8 runs for the Raptors.

Alan pitched the final two innings for the Raptors, and pitched extremely well, allowing only two runs. We've been practicing a bit, and it is showing. He is now throwing much more accurately, and there is some definite "pop" to his velocity.

Thus, the Raptors go 2W and 0L for the week, and 12W and 2L for the season so far. Score cards are below for those interested:

Surf Report - "You got NOTHING!"

That's your surf report, folks - "You got NOTHING!".

We had some nice waves last week, but this week has seen the Pacific Ocean transform into Lake Pacific, with waves no more than knee high in most locations. The weather has been beautiful, with clear skies and high temperatures, but the swell is just not cooperating.

Furthermore, it doesn't look like things will not improve in the next week or so! Gah.

Tuesday, May 08, 2007

Porting a Win32 Delphi Library to Linux


As I have mentioned in different posts, the primary product at my place of employment is developed for the Windows 32 bit platform, using Delphi. In the two previous posts, I looked into moving this code over to the .net platform, and came away fairly successful in the endeavor.

One of our existing partners asked us about providing our library on platforms other than Windows. This partner wanted the library to exist natively on many different Unix / Linux variants, and wanted to know would this be possible, etc.

A while ago, Borland offered Kylix, a product for both Windows and Linux. Unfortunately, that product is no longer offered, and I can only assume that the product was not as successful as Borland would have liked, given that it is no longer available. Furthermore, it was only functional for a given subset of the Linux platform, so I went looking for other ideas.

Next stop - Free Pascal. After looking over the site, I noticed that it seemed to offer quite a few platforms - 32 and 64 bit Intel processors, Windows, Linux, FreeBSD, Mac OSX, etc. However, how compatible is it with Delphi code?

There was only one way to find out, so I downloaded the .deb files (usable with my Ubuntu Linux box) and got hacking. After roughly one week of looking over the tools and available documentation, I have successfully compiled a shared library which contains a subset of the functionality provided in our native Windows product. I have compiled a C application which successfully links to this new shared library, which means that just about any language our there should be able to talk to it. Not too shabby!

Next, I need to port over the XML processing code to use the components provided in the Free Pascal component library, which may take a bit more time. However, I am very happy with the productivity and compatibility so far, and our partner was enthusiastic as well!

Friday, May 04, 2007

Baseball Season - Week 7 Wrap-up

Week 7 has come and gone, and the end of the season looms ever-closer. Will the Raptors develop any solid pitching before season's end? Will our batters get comfortable hitting off of kids instead of the pitching machine? Time will tell...

Our Thursday game found us facing the Bulls again, and also saw the performance of our last potential pitcher. He pitched the first inning, delivering 2 strikes out of 30 pitches - not exactly the balls-to-strikes ratio a manager dreams about. However, some timely defense and a runner thrown out by the catcher while trying to steal second salvaged that first inning, after giving up 3 runs. Alan came in to pitch the 2nd and 3rd innings, throwing 12 strikes in 46 pitches, and giving up three more runs. Obviously, I am hoping that our pitching improves over the next few games we have left! While the pitching struggled, the defense looked better, with another base runner caught stealing at third in the second inning. Furthermore, our offense really cranked it up, scoring 16 runs as we cruised to victory.

Saturday saw our fortunes turn South as we played the Iron Birds. Our pitchers actually did much better, both pitching two innings and throwing 16 strikes out of 40 pitches and 17 strikes out of 56 pitches respectively. However, the defense was very flat, giving up all of our seven runs due to throwing and fielding errors. Our offense was no better, as 11 out of our 12 outs over the four innings of play were due to strike outs. We lost 2-7, and our record now stands at 10 wins and two losses. We'll be focusing on throwing and fielding during our two remaining practices.

Score sheets for both games are found below.

Friday, April 27, 2007

Peter's Stitches


My youngest son, Peter, has had a very rough week. After 6 days of a low grade fever, the docs put him through a battery of x-rays, blood tests, as well as miscellaneous probing and prodding. He was diagnosed with pneumonia and put on antibiotics, and on Sunday was feeling back to normal.

So, Sunday afternoon we were over at our friends' house when Peter and his amigo/partner-in-crime decided to play tug of war with an elastic exercise band (the kind used for basic resistance exercises). As should be expected by parents in situations like this, one of them is guaranteed to let go, and Peter was on the losing end of the *snap* that we heard out in the living room.

Peter let out a scream of pain and anguish unlike any I have ever heard. It was a completely new type of scream, if you get my gist. You would classify it with the tags "what the ^$%!", "extreme pain", and "mom, help".

We ran to the next room, whereupon he jumped into his mother's arms and proceeded to cling tightly to her, as he continued to howl. Oh yeah, and he was bleeding all over her shirt and there was blood all over the floor. Nice.

The handle from the other end must have hit him on the left part of his chin, cleaning splitting it open and leaving a nice, gaping wound. Can't fix that one with a band-aid and kiss - no way, no how.

So, off to urgent care. Three hours and seven stitches later, and the ordeal was pretty much over. The bleeding stopped by the time we arrived at urgent care, which was a relief, and Peter was a champ getting the stitches.

He gets them removed today, as his pediatrician doesn't want to leave them in too long to help prevent scarring ( "No, not the face!" )

"It's OK dad, chicks dig scars!"

Thursday, April 26, 2007

Baseball Season - Week 6 Wrap-up


Week 6 saw us play a single game on Thursday against the River Dogs, as the Saturday game was rained out. We have missed only one game due to rain this season, so I can't complain too much even though I want the kids to get all the practice they can before the tournament at the end of the season.

So, Game #10 saw us facing the River Dogs for the second time this season, and we expected a good game. Our offense really came alive, with the boys hitting off the pitching machine well for the first three innings. We scored 3 runs in the 1st, 4 runs in the 2nd, and three more in the 3rd. When we switched to kid-pitch, our team scored 1 run in the 4th and 5th as well - not too shabby!

The defense was very tight this game. We had three pop outs, one of which by the pitcher going backwards towards the shortstop position, stretched out to his limit. Our team (away) only got to pitch for one inning, which was a disappointment. I still have not gone through all seven of the kids who want to pitch, needing one more inning before I start back at the top of the rotation.

We now transition to full kid pitch, and the pitching machine stays in the equipment container. After 10 games, we are 9 and 1. The score sheet for game #10 is below.

Friday, April 20, 2007

Donning His Armor


As the time to do battle on the fields of war approaches, the resolute knight dons his armor, making sure each fastener is snug and secure. For he knows that his armor and wits are all that protect him once he takes his place.



With a determination forged out of his years of training, he goes about his duties as if the whirling maelstrom about him is nothing but a gentle breeze.


Look into his grim visage and tremble, ye who would challenge him!

Wednesday, April 18, 2007

Baseball Season - Week 5 Wrap-up


Spring break was over as of last week, and baseball is back in full swing with two games. I always worry about those first couple of games after spring break, as the kids tend to take a mental and physical break during their time off from school. I held practices during the two weeks off, including two sessions of batting practice, to try and minimize the disruption.

So Monday night, we found ourselves playing the River Cats again. Unfortunately, of their 12 players on the team, only 6 showed up. We decided to put three of our players in their outfield when we were up to bat, switching them around as needed by the batting order. As I feared, the players were very rusty. We still won with a 14-10 score, but it was not pretty.

On Saturday, we faced the Storm. Let's just say that of all the managers and teams we play, the Storm is the team I like to beat the most. I'll just leave it at that, and add that we beat them 14-4 with a very solid performance from our team. Defense was spot-on, and the kids had a couple innings where they knocked the ball around the grass real nicely.

So, half way through the season we are 8 and 1. Not too shabby! Score cards for the two games mentioned are found below.

Tuesday, April 17, 2007

Tuesday Afternoon Surf Report


The last week or so has seen some significant swell in the water, however the wind in the mid-day has not been kind. Today I noted that the wind seemed to be letting up a bit, and decided to take my newly repaired GH quad canard turbo fish out for a spin.

Let's just say that whereas the waves were good, I was not. Having not taken out the fish in several months, nothing felt quite right. It is a lot shorter, wider, and thicker than my thruster, so I knew it would take me a bit of getting to know it again.

At least the weather was beautiful! As I waited for another wave, the sun broke through the marine layer and it appears as if it is here to stay for the rest of the day. Nice!

Tuesday, April 10, 2007

Baseball Season - Week 4 Wrap-up


Week 4 featured a single game on Monday night, before spring break kicked in. We played the Iron Birds, and it was the first game featuring kid-pitch in the 4th, 5th and 6th innings.

It was a close fought game, with the Raptors taking an early lead. At the end of the 3rd inning, we were up 5-3. After the 3rd inning, the pitching machine came off and the kids took the mound. In the 4th inning, my son took the mound and gave up 1 hit, hit one batter, struck out three, and gave up no runs. Things were looking fairly good so far.

The tide turned in the 5th inning with our next pitcher, when the Iron Birds struck for 3 runs, going up 6-5. We were not able to pick up any more runs, and hence lost our first game taking us to a 6-1 record. Despite a lackluster offensive performance (which is to be expected in the transition from pitching machine to kid pitch), it was a good defensive game and a decent premier of our three rookie Raptors pitchers.

Our score sheet for the game is found below.

Tuesday, April 03, 2007

Tallships in Oceanside Harbor

In mid-January, I learned that two tallships would sail into Oceanside Harbor and provide tours for folks who wanted to look at the ships. So, I took off from work after a half-day, and brought the whole family down to the harbor.


We walked out to the end of the North jetty, and watched the two ships make their way into the harbor. The first ship fired off a canon as it entered the jetty - thankfully, their aim was horrible!


After both ships had docked, tours were provided by the crew of each ship, which actually live aboard the ships. The quarters appeared to be quite cramped, and the lack of personal space would take some getting used to, I imagine.

We went with our friends, and all the kids had a great time - I think they may have even learned a thing or two! Below, Peter and his buddy Andy take a quick break aboard the Hawaiian Chieftain.

Thursday, March 29, 2007

Baseball Season - Week 3 Wrap-up


Week 3 has come and gone, and the Raptors are still undefeated with a record of 6 wins and 0 losses. Monday night's game against the Storm was a test of our patience as the opposing coach went extremely slow the entire game, limiting us to four innings of play rather than the usual six. He also appropriated two additional outs through extremely questionable calls/decisions, and we gave him an additional at bat later in the game as well. We managed to come through that game with an 8-6 win, so we chalked it up to experience.

Our Saturday game found us facing the Bulls again, now having faced each team in the division at least once. It was a beautiful day out (as may be deduced by the photo above), and the Raptors had another great game. The final score was 23-5, and featured a veritable barrage of offense from the Raptors. My son went 5 for 5, with 2 singles, 2 doubles, a triple, 2 runs scored and 4 RBIs. Every player had a hit, and our defense was fairly solid as well.

With the end of game #6, we now prepare for kid-pitching. The next five games will be three innings of pitching machine, with the remaining three innings kid pitch. The final third of the season will say "adios!" to the pitching machine, with all innings now pitched by kids. Good pitching really dominates at this level, so it will be interesting to see how our team fares. It's my goal to get as many of the kids on the mound as possible for experience. Right now, I'm looking at pitching six out of the ten players on the team, so it should be interesting!

Score cards for games #5 and #6 are below.

Friday, March 23, 2007

Friday Afternoon Surf Report

I decided to hit the waves today on my lunch, even though we did get a very small amount of rain last night. My body desperately needed some water time, and I reasoned that not enough rain fell to actually flush the bad stuff from the storm drains into the ocean.

What a beautiful day it is! The waves were chest high, with a light onshore wind putting a bit of texture on the surface. My lack of surfing in the recent weeks made itself known by the fatigue in my shoulders and triceps as I tried to get back outside after catching my first wave. I felt like a newborn struggling to move across the floor as wave after wave of the set pummeled me. Leave it to me to take the first wave of a set...

I finally made it back outside with my arms burning and doing their best impersonation of linguini. I caught several more waves, all of them lefts that had a bit of juice to them and plenty of time to ride. At the end of my lunch, I was exhausted but had that "post surf glow". Nice way to finish off the work week!