Posts Tagged ‘Life’

If Today Was Your Last Day… To Code

February 6, 2011 3 comments

This post comes courtesy of Nickelback, one of my “top 20” bands. I’m listening to their song “If today was your last day” and thinking happy thoughts, so walk with me for a bit. Pretend it’s your last day to code, what would you do?

If today was your last day [to code], and tomorrow was too late…

Would you spend time in meetings discussing the next cool project? Sit through yet another status update meeting while a coworker reads bullets from a powerpoint?

Would you write new wiki pages / document all the arcane parts of the system that nobody else understands? Would you finally finish the interface documentation you keep putting off? Would you clean up your desk and blurt out epithets at random passers-by?

Would you spend an extra hour teaching a coworker or junior engineer how to write cleaner/better code? Would you spend your last day tutoring, mentoring, making sure those you leave behind get the last ounce of wisdom before you go?

Would you start a new project, cut your teeth on the euphoria of starting something new and creating something from the ground up? Or would you rush around trying to fight the last few bugs blocking your product from shipping next week, in the hopes that your efforts will make the product better for the customer?

Would you seek out the hardest, gnarliest, most beasty multi-threaded race condition and kick it to the curb? Would you grab the nearest flyswatter and quash a few bugs just for old times sake? Or would you coast through, take an extra long lunch, and try to enjoy the last few hours of your coding existence?

Would you rewrite that one butt ugly section of code you’ve been ignoring? You know, the one that makes your skin crawl and makes your eyes bleed. Would you rip it to pieces and give it another go?

Would you explore new tools, migrate to git, drop MySQL for PostGres, check into the new code profiler or finally use valgrind to kill memory leaks? Would you improve the validation for your project, check out cruise control or Hudson / Jenkins?

Would you write in C, assembly, python, perl, Ruby, Haskell, C#, Java, Erlang, Go, Lisp, or would you invent your own language just for fun?

Would you write a new compiler, OS, GUI, database, web browser, or iOS/Android app? Would you migrate up the stack to functional programming or get into research? Or would you learn more about hardware, get closer to the processor and learn more about transistors?

Summarizing the song… Live today like it’s your last day, and do what you really wanted to do all along.

“It’s never too late to shoot for the stars regardless of whoever you are. So do whatever it takes…”



Categories: Life Tags: , ,

Running Towards Something

January 21, 2011 Leave a comment

Warning: this post contains no code, no technological jargon, nothing interesting to the average geek.

Instead, I want to tell a semi-personal story which I hope will inspire others to greater heights. Failing in that, I’m sitting on a train and have nothing better to do… so here we are.

I had an interesting conversation with an acquaintance a few months back, he was talking about the importance of running towards something. His point was basically that too many people spend their careers (lives?) running away from the things they don’t want to do, when instead they should be running towards the things they want.

I know, he’s a flippin’ genius.

But in general I think he’s spot on… You tend to get what you focus on in life, so why not put your focus into figuring out what you actually want to do, and go do it? Instead of running away from bad decisions… Make good ones.

I know I’m belaboring the point, but it’s pretty awesome that something so simple can have such a profound impact on your life. Well, in this case, my life.

A few months ago, I started getting a little bored at work. Things were a bit slow, and I always get a bit moody when I’m not insanely busy or when I have too much time on my hands. I shouldn’t have been bored – I really loved my job, it was challenging and rewarding technically, socially, and many other ‘ly adverbs. I had carved out a niche where I was respected and treated well, and the team had some top notch people on it. We were working on some pretty revolutionary technology that could someday make big headlines and change computing in cool new ways.

But I found myself getting agitated. Well, maybe that’s not the right word. More like, unfulfilled. I’ve always had some vague general career goals, but never really put the whole game plan together. I just knew that someday, somehow, my goals would take me away from my current job and in search of something else.

So when my friend brought up the “run towards something” speech, it really hit home for me. I had a great job, was comfortable, my family was settled into a nice routine in a great family town, and everything was status quo. So I knew with 85% certainty that I should just put my head down, enjoy life, and take a chill pill. And above all, not give up what I had for the wrong reason… I shouldn’t run away from a great thing.

But what he said bothered me a lot too, because it made me realize that I didn’t have a concrete plan for my career. I honestly didn’t know what I would run towards, career-wise. I’m a low level, OS and drivers and filesystems type of guy who loves tinkering with Linux and wants to make an impact on the real world and real end users. But what do I actually want to DO with my career?

When I get to the end of my career and look back at what I’ve done, will the world be any different because I was here? And if not, will I be OK with that? What do I want to look back on and be proud of because I did it, and did it well?

While I think there are much more important things than work and technology — relationships, how you treat other people, your family, people you can teach, etc — these career-centric questions bothered me for weeks.

The good news is, I figured it out.

I have a plan for my career, I know what I want to run towards. I now have several goals I want to reach for, things I think will make an impact on the world in some small way.

My friend was right, this is awesome. It’s seriously an amazing feeling to finally know what I want to do. And in the end, maybe I won’t actually get it all done. Maybe I’ll fail, and fail big a few times. But at least I will have tried.

The tricky part about this knowledge is acting on your plans.

One of my first plans is taking me and my family on a wild sprint out of our comfort zone, to another city and another job… but I’m ok with that. I’ve taken a job that will require us to relocate, and it’s a bit weird because of a transitionary commute while we make the moving arrangements.

So as I’m sitting on a train watching the world go by, I find myself feeling super excited about running towards something I want. Tired, exhausted really, and a bit overwhelmed by all the new ideas/people/work and things to learn… But excited.

And I’m super excited about seeing my family at the end of the train ride… So technically that’s TWO things I’m running toward. 🙂

Anyways, this rambling story has gone on long enough. If I haven’t put you to sleep already, here’s wishing us all insane amounts of success.

Run towards something! You’ll be glad you did.


Categories: Life Tags: , ,

For the Love of Code

Chris Wanstrath of github fame wrote a very intriguing gist the other day, which was picked up on proggit and other geek news sites. Naturally, being a geek myself, I picked up the feed via RSS on my phone, and started geeking out.

Chris starts out with a laundry list of tips on how to become a famous blogger and Rails rock star, and I hate to admit that he had me with the first paragraph. Being an obscure, faceless blogger I was totally eating up his ideas and making a big, long mental checklist of TODOs, planning out my trail to fame and glory as I followed his sage advice. Let’s see… I need to work on my blog template, get a domain name, start contributing to open source code, go to Ruby/Rails conferences… some other stuff… and whammo! I’m a frickin’ rock star!

Yeah, I was pretty into the blog post, having already spent my geek cred before it hatched. Or something.

Much to my surprise, Chris did a quick 180 and started talking up the true Ruby heroes, those who care about the code first and blog as an afterthought. Those people are the real rock stars, the people who are in it for the pure, unadulterated love of code.

Personally, I look up to the good developers. The people who don’t care about their RSS subscription count, who blog as an afterthought. People who aren’t concerned with how many Twitter followers they have and work on their pet project every week because they love it. Who’ve contributed to Rails for years because it’s their passion and aren’t overly concerned with their speaker’s bio.

People who care about code, first and foremost.

This paragraph hit me like a baseball bat to the temple. The way he crafted the post was so masterful, I literally groaned out loud… I walked right into that one.

Anyways, the rest of his post is fascinating and motivating, you should go read it right after you finish this page.

Thinking about Chris’s post and coding for code itself made me think about my own experiences with code, specifically how I got started and how I got hooked. So buckle down, strap in, and keep reading – queue a long boring personal story… right… now.

My first exposure to programming was about 15 yrs ago, when my little brother came home from the library with a stack of computer books. We sat down in awe and flipped through the mystical pages filled with illegible characters and symbols, and finally settled on a sample program written in QBASIC. We spent a good half hour typing up the sample program in edit.exe, and gave it a whirl. Now QBASIC is a ghastly language written to confuse and befuddle those unfortunate enough to come within 100 yards… seriously, it has got to be one of the worst languages on the planet. But I digress.

The program was supposed to be some kind of logic puzzle, you would input the dimensions of a cube. Then the computer would calculate the surface area and tell you how many other boxes could fit inside, or some other stupid thing.

I was surprised and dissapointed by the program, I kept waiting for it to pop up a 3D picture of the boxes and graphically show how to stack the boxes inside each other. Instead I was greeted by some ugly text in the DOS terminal, and that was lame.

I mean, the program was at least 75 lines, that’s enough lines to do anything with a computer, right?

I walked away in frustration, vowing to never code again.

Two years later, my brother got into ASM fires (anyone remember those? Good ole days) and I was hooked. We spent hour after hour hacking on the pallettes, experimenting with different blending techniques, etc. QBASIC logic puzzles? Meh. ASM fires and voxel engines? Now that’s hot. We spent an entire summer once writing a 3D “tank wars” clone, and that was awesome. I had become hooked on code.

But it really wasn’t until years later, after numerous more programs, successes, and failures that I realized I had grown to love code. Code is a language, a culture, a way of living. Once it gets under your skin, it’s there to stay. You can take a coder away from his computer, stick him on a desert island, and he’ll count the days by marking notches in the nearest tree branch… in binary.

Great code comes from the minds of those who code for code itself, from projects driven by passionate, motivated people who love the code they write.

So here’s to coding… for the love of code itself.

If you have a great story about your first experience coding or with code you loved creating, post it below for old time’s sake 🙂


Categories: Uncategorized Tags: , ,

Clock Ticks per Lifetime

April 12, 2010 Leave a comment

Okay, so this is a slightly random thought, but I was thinking about clock ticks. And that led to an oddly profound thought, which I’ll share in a minute.

As an engineer, perfectionist, and anal-retentive type of guy, I’m constantly measuring, analyzing, and trying to optimize everything to death.

I am a geek’s geek. The type of geek that is better kept in the basement, the kind you’d be afraid to get too close to a real life customer. I think hacking around reading the Linux kernel source code is fun.

Anyways, part of my job as a software engineer is to “profile” code. I use various nifty tools and gizmos combined with manual instrumentation and analysis to find the slowest/most time-consuming parts of a software project — and then make them faster. Usually, it’s not too tricky to find the worst part, and most of the time it’s not too difficult to make the slowest part faster — it’s generally much harder to work on the right peice of code for the right amount of time.

It’s a lot easier to get lost in optimizing the wrong part of the code, the code you want to fix even though it only impacts 5% of the total runtime. You can spend a week making your program start 10% faster, and not realize that nobody flippin’ cares if your program starts in 2.1 seconds instead of 2.35.

There are other times when you completely miss an important clue, the alarm bells are ringing like crazy and the red flags are going nuts – but you (or someone you know) is asleep at the wheel. The lights are on, but nobody’s home… and you don’t optimize a small but critical piece of code. The reasons this happens are as varied as the seasons, but one common malady is lack of context. The Foo module only takes 749 us (and Bar takes 200 ms), but you don’t realize that Foo runs in a tight loop and is the critical path. So you waste time and money “fixing” Bar and wonder why your software is buggy and slow.

It’s these little contextual clues that make all the difference. These key vital bits of information that provide a frame of reference and give shape to a project.

A good analogy that comes to mind are the corner peices in a puzzle. One of the first things a kid learns about puzzles is that putting the corner pieces in place makes everything just flow together. Trying to build a puzzle without the corners (or sides) is much more difficult. There’s no framework to base the rest of the puzzle on, no structure to latch onto.

Getting to the point of this rambling story, I had a minor epiphany of sorts when thinking tonight about clock ticks. It wasn’t really a corner piece, maybe just a small side of the puzzle that I snapped into place. But I wanted to share it here in case anyone else finds it interesting.

I was thinking about processor clock ticks, and started to do a little math. Common processor clock speeds are in the GHz range, let’s pick 2.66 GHz just for fun. Let’s pretend you’re a respectable geek and you have a Core i7 system which you haven’t overclocked, it’s running at the stock 2.66 GHz clock.

2.66 GHz is a lot of hertz. How many hertz? Well, a gigahertz is a billion cycles per second, so 2.66 GHz is 2.66 times a billion cycles/second.

That means your Core i7 processor has a clock period of

1/(2.66*10^9) sec =~ 375 picoseconds

375 picoseconds is not a lot of time. It happens 2.66 billion times every second, which is amazing because your Core i7 is getting something done every few clock ticks – for simplicity’s sake, let’s say your CPU gets a billion something’s done every second.

That is pretty neat, and totally geeks me out – but it made me think and wonder about how that relates to people. Assuming the average life expectancy is, say, 70 years, how many “clock ticks” do we get in our lifetime?

Drumroll to cue in some more math…

(2.66*10^9 Hz) * (3600 sec/hour) * (24 hours/day) * 
(365.26 days/year) * (70 years/lifetime) = 5.876186 × 10^18

That is a lot of clock ticks.

So, if you’re still with me, and the tedious algebra didn’t send you running for safety – the thought struck me that maybe, just maybe, with approximately 6 x 10^18 clock ticks in my life, I have enough time.

There’s enough spare clock cycles for me to not be a complete perfectionist, to live a little and make mistakes. To learn from those mistakes, and make other stupid mistakes to learn from.

With 6 x 10^18 clock cycles (of which I have at least 3.5 remaining), there’s enough time to relax and enjoy my job, family, church, and life. To not waste time, but choose instead to live it more fully and purposefully.

So the next time someone like me is stressing about some peice of code that doesn’t matter, or stressing over little details that aren’t 100 percent relevant – tell them to relax and burn a few clock ticks being human.

There are enough clock ticks in your life to get everything done, and have fun in the process.



Categories: Epiphany Tags: , , ,