Test First

Posted in Development, Zen on October 17, 2008 by osake

I got a great lesson in test first today.  I had fixed a bug earlier in the week, but I really didn’t get much gratification.  I also had to test it, realize another problem, fix again.  You should see a pattern forming here.

So I called up another team member and asked for some help figuring out how to get a spec (a.k.a a test) to cover this error in the event that there is a change in the future.  It was kindly brought to my attention at this point that I should have written the spec first anyway.  This is part of the whole methodology that we’re following anyway.

I reverted my code and wrote a few specs, passing each as I went along.  Sure enough, there was the gratification I was longing for.  Now the code is a bit more hardened.  I could have easily written the specs after the code fix, but there are two problems:

  1. The specs may not have enough coverage, it’s just too easy to be lazy in this direction
  2. You understand the solution to the bug better because you are describing how the application should behave

Here’s my light analogy: Your lightbulb burns out, finding a bug and fixing it is like just replacing the 60W bulb with the other one that came in the 2-pack you bought.  Writing a spec first, then fixing the bug is like putting in a 75W equivalent CF bulb to replace that incandescent.  Hoo ahh!  Yeah, it’ll cost more, but you’ll save money over the long term and burn a heck of lot brighter (at least mine do).

It’s A Boy!

Posted in News on October 3, 2008 by osake

Just found out yesterday that we are going to be having a boy.  I am more interested in a healthy baby, but definitely preferred a boy.  This will be my first baby and he should be coming out sometime early first quarter.

Shortest post ever!

Changing Jobs

Posted in Uncategorized on September 6, 2008 by osake

A week is in the books at my new gig.  I’m not a consultant (at least by day), I’m a pretty typical nine-to-five guy…okay, nine-to-six.  This is more about the emotions of the transition rather than a guide for changing jobs.  I am composing within “Josh’s Journal” after all.

I will rewind back to Thursday, August 14th.  I had a slip of paper in my bag that was making me gut-wrenchingly ill.  When I work for a company for more than five years, uprooting myself is extremely difficult and painful.

I was actually heading into the final quarter of my seventh year.  I should also elaborate by saying that I’m a very dedicated person and don’t like to move around too much.  I’m sure that not everyone feels the same attachment to five years in a position, but felt a deep bond with my company forming and became all the more drawn into it, adding hooks day-by-day.

There was a point, that Thursday, where I considered going home sick.  The insightful readers might be seeing a bit of my non-confrontational side coming into play.  I said a prayer, and headed into the big office, my 8.5×11 “Get Out Of Jail Free” card in hand.  I didn’t feel like I was truly imprisoned, but I did feel like I was fixin’ to make my way to Free Parking to pick up some spending money, then on the way down to Boardwalk.

After a bit of dicussion and inquiry from the recipient, I headed back to my desk.  Feeling a bit better, I still had a little over two weeks of work to be done.  For the state of my employer there is no reason to really give any notice and there is no reason for them to hold to any such terms either.  It’s called “Right To Work”, which I believe is more intended for unions, but still plays a part in my employment.

The days to come were all over the board for me.  I don’t recall it being all that interesting.  Likely, the most interesting bit was stating my last day was the 29th, but that I’d be happy to help out.  So, I got to help alright.

The 30th was my first day of helping.  It wasn’t too bad.  Then there was September 1st.  Dread.  That’s the emotion that you feel for a few days when it clicks that you agreed to help out.  Ah yes, a chance to work on Labor Day.  Well, I must have done something right.  Monday rolled around and there was no work to be found.

Tuesday came quickly for me.  I hurried out the door to start my new job.  I always liked the first day of school and this day, as with my other jobs, is just like a first day of school for me.  Most people like Friday, when the “What is your favorite day?” question arises.  Mine, to be honest, is my first day of school.

At the end of my first day, I was very tired.  It’s not a physically exhausting job, but I didn’t even care to do much when I got home except eat and sleep.  Maybe I’m starting to sound like Michael Phelps (swim, eat, sleep).  He’s pretty good at what he does, maybe it’s a good formula.

Summing up Tuesday’s emotion: confused. (This isn’t bad, I just wanted a one word summary.)

Wednesday was similar to Tuesday, still very new, still learning my way around.  I suspect that I’ll still be in “new guy” mode for a bit longer.  Since I’m not a manager, I don’t really need to assert a strong voice right away.  I don’t mind, I like to learn anyway.

Summing up Wednesday’s emotion: eager.

Thursday was the first day that I really had a ton of time to learn my job directly.  It was simply amazing.  I’ve never done my similar jobs like this before.  The days seem to fly by so quickly.

Summing up Thursday’s emotion: amazed.

Friday ended my weekas I am accustomed to already.  It really didn’t feel like the average Friday.  I usually cannot wait to get my weekend started.  Sometimes there are events that exacerbate the feeling, but today could have gone on forever.  It was simply revisiting Thursday’s glory.  Being able to contribute and having contributions freely accepted is just beautiful.

Summing up Friday: grateful.  Summing up the week: a prayer answered.

It’s easy to stay faithful in success.  It’s the trials where your faith must persevere.

Brothers: Part 2

Posted in Creative Writing on July 21, 2008 by osake

After several days with a group of like-minded adventurers, Sam and Tam realized the folly of their ruse.  One evening, after everyone had fallen sound asleep, Sam and Tam quietly discussed the problem they had caused their new friends and agreed to a resolution.

The next morning, as the party began stretching, Tam called the group to his attention so that he could explain what had been going on.  His reasoning also forced him to take the reigns so as not to draw further indictments against his brother.

Tam spoke in a steady tone, “Fellow adventurers, I have caused a bit of a fuss that I must confess.  I am not Tam.  What I mean is, my name is not Tam.  It stems from a childhood prank that my brother and I have carried on for so long that we forgot to drop our act prior to forming our current group.”

Some of the members eye’s arched slightly expressing curiosity to hear more.  Others begin to roll their eyes as if they expected this game all along from a pair of halfling brothers.

Tam continued, unaffected by the various facial responses, “My name is actually Tulo.  The name Tam, as you have already experienced, is quite useful is causing chaos.  An ill-understood trait of my people of course.  Can you forgive us so that we might continue our adventures?”

The party clearly understanding Tulo’s intent, knew the direction that the more genuine brother was going.  Before he even finished his last sentence, a few had broken into chuckling, but managed to stifle laughter until  he had finished.  Tulo sighed in relief.  He knew that the party understood them better than he had given them credit.  That morning and afternoon, the brothers gratefully prepared meals for their friends.

The Brothers’ Adventure Begins

Posted in Creative Writing on June 18, 2008 by osake

Halfling brothers Sam and Tam Footlick had an adventurous childhood.  Sam was always the troublemaker, while Tam, the younger, was innocent and just.  Tam was a great mediator as well, which came in handy when Sam’s wiles failed him.

One year, a paladin of Pelor by the name of Sir Marin Agdarish was passing near their village.  As he saw the two young halflings he felt compelled to stop and speak with them.

Seeing great potential after just a few moments with them, he took them in as apprentices to his profession.  Under the tutelage of Sir Agdarish, Sam & Tam excelled in the fighting arts.  Their innate cunning made them adroit fighters.

As time passed during their training, Tam adapted to the more upfront style fighting taught by Agdarish.  His older brother, however, only took the lessons at face value.  Lessons of wielding the various implements became rules of thumb as he spent more time honing his natural abilities.  Sam was also noted for spending numerous nights working on Sir Agdarish’s footlockers, drawers, and cabinets under the concealment of darkness.

One summer’s eve, after a hard day of training, the two brothers were assaulted by a small scouting group of gnolls.  As the two beasts bared their fangs, preparing to feast on the siblings, Agdarish sprung into action.

Long, but calculated slices cut the foes down before the eyes of the two inexperienced teens.  In shock, their eyes grew wider as a sword tip plunged through Agdarish’s belly.  Blood oozed down his legs and tears began to well in his eyes.  His legs buckled under the weight of his slumping body.

Digging deep for strength, Marin Agdarish let out a mighty cry for help from Pelor.  A soft glow enveloped him and he stood tall to the surprise of his aggressor.

Sam & Tam witnessed their teacher’s final blow to the surprised gnoll flanker in all it’s glory.  Bathed in the white light, they felt comforted for a short while as the last gnoll was beheaded.

As the light faded from the noble paladin’s body, the two brothers came to him quickly and he breathed his final words.

“Had you another season of training, this would not have happened.  Pursue friends of honor and learn to defend yourselves.  Save those in need and do good in the name of Pelor.  Sam, guard your brother’s back.  Tam, never let your brother fall in battle before you.”

With his final breath Sir Marin Agdarish passed into the night.  The boys knew what needed to be done.  Sam felt more of a need for revenge, whereas Tam desired justice under all circumstances.  And now their true journey begins.

RailsConf 2008 Part 2 (Finally)

Posted in Development, Humor with tags on June 16, 2008 by osake

This is a total tangent off of my doings at RailsConf this year.  Before completely losing the topic, let me dump some closing thoughts out real quick.

It’s been several weeks since RailsConf 2008 ended.  As they say, fresh thoughts from short crams tend to fade fast from your memory if you don’t put them to use.  Well, I took notes, so that I wouldn’t have to worry about memorizing the sessions until I could implement what I learned.  I also apologize to anyone who expected me to email them right away after getting many business cards to expand my contacts in this world.

The last few sessions that I attended were pretty non-Rails, which is where I wanted to strengthen myself anyway.  I need more Ruby help and I got exactly that.  I also got to enjoy talking with people more this year.  That was my greatest achievement: Stepping out of my comfort zone and being social in real life.  It was great to not only put faces to the names that I have learned of online.

While at the conference, it’s harder to talk social life instead of shop, but once you get out of the bounds of the conference realm (like the expo area, or even more fun…the restaurant scene).  I only wish I had more time.  Meeting more people this year and having less than a week makes it more difficult to enjoy the interaction.  I was also on a more limited budget, so lunch out and about was not in my itinerary.

So yeah, social life and Ruby were the big moments for my time in Portland.  I think I’ll just re-iterate that Ezra’s talk on the cloud computing management tool (code named Vertebra?) was the cream of the crop.  I also enjoyed the time with Tom, James, and Scott (hobocentral.net), the KCRUG guys, who all seemed to enjoy the conference, and finding out that a buddy of mine from high school is in the Rails scene (at least to some degree).

Anyway, let’s stop this spiral of crazy thinking and move on to the funnier part.  Mind you “funny” is very, very subjective.

So, I was talking on an IRC channel earlier today and realized that I like to emote a “bonk” to the head.  Much akin to the the monks from Monty Python and the Holy Grail.

monk_bonk

In turn, that caused me to think, “Writing Rails apps is as easy as hitting yourself in the head with a wood plank.”  If you’re not following, just ask yourself, “Who can hit themselves with a wooden plank, given the plank is in their possession?”  Okay, good.  That was easy!  Just like Rails!  There is a deeper philosophical meaning and honestly, I’d love to dive into that topic some day.  The only downside is that my comparison isn’t a perfect 1:1 mapping, but it sure is close.

So there you have it.

rails_wood_plank

Bonk away.

RailsConf 2008 Interlude

Posted in Humor with tags on June 1, 2008 by osake

Well, I just expelled a ton of creativity in the wrong place, and this reminds my why I normally write my entries in a text editor first.  Grrr.

Kent Beck’s keynote last night had a great story in there.  He describe technology as having four categories.  They were enthusiasts, early adopters, early majority, late majority.  They talk about how technology is picked up.  The latter two are significantly larger than the first two.

Now, I will give my (hopefully funny) analogy to bad RailsConf sessions.

The enthusiasts is that very small number of folks who try to sneak out, and could be confused with what session they are in, or maybe even need to use the facilities.  At this point, you probably don’t know that the talk is failing.

Enter the early adopters.  These guys are more in tune with their distaste for the talk.  They might have even just been skittish and seeing the enthusiasts take off, they jump the gun prematurely.  Let the snow ball begin.

Early majority is the key to failure.  When you have a roughly 30-45% drop in population maybe halfway through the talk.  I’d say it has failed to inform (or entertain) the masses.

Lastly, the late majority would be your truly interested listeners.  Maybe sprinkle in some polite listeners