Thursday, August 19, 2010

Airport security... Bah!

I was flying home a few days ago and ran into an interesting "issue". While going through security, one of my bags got flagged for having "organic materials" on top of "wires". Well, put that way, it sounds kinda scary. On the other hand, a few bags of ground coffee and some ear buds sounds a lot less threatening.

The up shot is don't pack food and wires together.

Friday, July 16, 2010

Ice skate dentistry.

My current project at work ended up handing me a mess to deal with. In short, I ended up with a few thousand lines of code to get code reviewed and no clean and easy way to break it up. After thrashing around for a while trying to create several change sets in the same directory, I reluctantly concluded that the source control system we use doesn't support what I wanted to do. I was reluctant because the alternative was push individual commits through in series or to have multiple copies of the full set and all the fun with propagation of edits that causes.

Well, I chose the seconds and it's working. OTOH it reminds me of the scene where Tom Hanks does dentistry with an ice skate. Just because something work, or even is the best solution, doesn't make it even remotely pleasant.

Thursday, July 8, 2010

A gratuitously cute name.

I'm reading Effective C++ 3e and in the OO section Mr. Meyers has one point he wasnt people to remember: The battle of Hastings was in 1066... OK, the real bullet point is that public inheritance models "is-a". To illustrate his point he uses the example that a Penguin is-a bird, but then goes on to point out that this can get you in trouble if you assume that all birds can fly. Well, not all can and several ways to deal with this are brought up including one that brings me to my point:

class Penguin: public Bird {
public:
virtual void fly() { error("Attempt to make a penguin fly!"); }
};

This struck me a remarkably funny, particularly if you include exception handling:

virtual void fly() { throw new PenguinError("Attempt to make a penguin fly!"); }

Q: How do you attempt to make a penguin fly?
A: You throw it.

Q: Well how does that work out for ya?
A: The penguin seems to be 'in flight' for a bit and then crashes.

Right now I'm really regretting that I can't use exceptions at work because I can't wait to derive a Penguin class from Exception just for that case!

Monday, July 5, 2010

Another looks at David Weber's world.

First of all: WARING: MASSIVE SPOILER ALLERT! If you haven’t already read ‘Torch of Freedom’ and ‘Mission of Honor’, Stop Now! I’m not even going to attempt to tell the stories so you will spoil all the surprises and get none of the fun.

A while back, I made some predictions about what was going to happen in a pair of forthcoming books. Well the no longer forthcoming; my copies are sitting on the desk in front of me. So time to see how will I did:

-When the Sollies attack the Lynx terminus, Manticore pounds them flat. - Sort of 1/3 outright kills, 2/3 abject surrender.
-Honor and 8th fleet is sent through to Talbott putting a substation portion of the Apollo equipped ships and their auxiliaries in Lynx. - partly right, 8th fleet is out of place, but at Haven. On the other hand, a lot of Apollo munitions are in Talbott
-While they are out of position the Oyster Bay ballistic pods attack. - Yup, but only the yards are the target.
-Most of the Manticore yards and many of home fleet ships that didn't go to Lynx get severely damaged. - All the yards get trashed but the fleet is untouched.
-The yard tech crews get out somehow. - The techs get toasted but ALL the R&D types get lucky.
-Oyster Bay is blunted to some extent but still hurts Manticore a lot. - Spot on.
-Somewhere in all this, the Mesa spider drive ships attack. - Spot Off
-The Mesa manned units, take a royal beating including most of the units getting captured or destroyed. - Ditto
-Non of this shows up in Torch of Freedom. - A little foreshadowing but otherwise nothing.

-Zilwicki and Cachat infiltrate Meas. - Check
-They learn of Oyster Bay, Mesa's other plans and both the spider and streak drives. - Nope, sort of and yes.
-They don't get the full story. - No, but they came sooo close.
-They capture documentation, hardware or complete examples of a spider drive. - They got one of the people who designed the thing.
-They get enough to figure out how to detect the spider drive. - Nope.
-Zilwicki and Cachat capture a functional Mesa streak drive courier ship. - Nope
-They get back about the time Oyster Bay kicks off. - Nope
-Torch of Freedom ends with Zilwicki and Cachat on the way from Mesa to Manticore. - Almost, they are heading back but not directly to Manticore.

-Elizabeth, post Zilwicki & Cachat, will send Honor directly (and uninvited) to Haven to offer not only peace but an alliance. - Directly and uninvited? Check. But pre Zilwicki/Cachat/Oyster Bay.
-Honor arrives with a very small task force as a pointed reminder that Manticore can still hurt them but isn't. - Same effect, Big taskforce
-Honor steamrollers her way into what she wants by, with impeccable manors, assuming that she will get it. - Not as much of a bulldog as I expected.
-She gets immediate talks (as in least time to Haven orbit and "meet me at the shuttle pad" immediate) face to face with Pritchart. - Almost exactly.
-After hearing what Honor (and maybe Cachat) has to say Pritchart jumps in on the spot. - Nope.

On the other hand, much of what I missed in this set of points, happens later and in reverse when Pritchart take a trip to Manticore.

-Haven sends units to help protect Manticore. - Sounds like it will happen in the next book and not that they will actually need it in the short run.
-Manticore sends tech crews displaced from the Manticore yards to Bolthole along with the Zilwicki and Cachat's finds. - Not yet at any rate.
-Hemphill and Foraker start working together. - Ditto

-The Sollies eventually turn into a back drop for the Mantcore/Haven vs. Mesa conflict. - Looks that way
- Mantcore/Haven begin to use Mesa’s operations to turn groups of Sollies away from war. - Maybe
-Some sectors fall to Mesa, others to Manticore/Haven. - It still looks like it will go that way.
-The Sollies fracture along the lines of what Honor outlined in Storm From the Shadows. - Still Looking that way.


Score:
-Yes: 8
-No : 6
-Sort of: 8
-Not yet: 7

Not bad. None of the books went as far as I expected them to, but aside from that I was about half right.

Thursday, March 4, 2010

What are the chances?

Well I just got back from an interview trip to California. It was kind of fun. Oddly I found the worrying about driving more stressful than worrying about the interview (or actually doing either). The flight went off without a hitch and (once I figured out how to get way from the airport, man I hate construction) the driving wasn’t even that bad. The interview was fun, I enjoyed chatting with the people and the flight back was mostly on time.

The fun part started in the San Jose airport while I was waiting for my flight back: I got there early and was standing around waiting when someone I knew from collage spotted me! I’m just shy of 690 miles from home in a city I can’t name a sole in and I run into someone I know and they're on the same flight as I am. What are the odds? (It was a Friday and this was the late flight home so if I was going to run into anyone I knew, it would be there and then.) Well it gets better. At Sea-Tac, while waiting for our connection (it sure was handy having someone who knew there way around there to follow), I ran into someone else I knew coming from Alaska and, just before the flight boarded, yet another coming from Boston. What are the odds? (Better than you might think given that it was the last flight to the local airport,.. but three different people in one trip?)

Thursday, January 14, 2010

Bachelor Pad cooking – Meal in a pan.

This is a cheep and tasty recipe that is quick to prepare and serve.
The basic recipe:

  1. Place ¼ cup dried grain (I’ve used barley and several kids of rice) in an 8 inch cast iron pan.
  2. Add water until the grain is awash and just starting to float.
  3. Put a ¼ to ½ lb portion of frozen meat on the grain.
  4. Top with toppings of your choice:
    • Bacon (particularly if the meat is lean)
    • Frozen sliced pepper, onions, etc.
    • Salt, pepper, or other spices.
    • Frozen vegetables; corn, bean, peas. (Or as a side dish.)
  5. Cover and seal with tinfoil.
  6. Bake at 350°F for 50-90 minutes

Cooking time depends on the type and size of meat; For me, pork seems to take about 50 minutes, chicken more like 90. Until you know how long to cook it, check doneness with a meat thermometer or cut the meat open to check for any remaining pink sections.

With a little planning ahead this can be prepared in under 5 minutes. If you keep and eye out you can often get chap meat (I’ve seen it at little more than as $1/lb), cut this into serving sizes and freeze them in individual Ziploc type sandwich bags. Vegetables can similarly be prepared and frozen in advance.