Thursday, June 26, 2014

Come On Over For A Drink

Yes, I chased a rabbit across our "lawn"
to capture this shot.
I have to admit it, I am no longer the young whipper-snapper I once was. I have been programming for over 33 years if you count teaching myself Basic when I was 7. As a professional programmer I have been working in the field for over 14 years. So I have seen a lot of code and written a lot of code. 

As a seasoned dev, I am the opposite of the Get Off My Lawn crowd when it comes to new devs. I read My Lawn by Uncle Bob who is preaching the Come to My Lawn mantra, not get off it, and it opened my eyes to my position.

In the article he points out that 1 in 16 developers are 40 or older. That is me.

Is the population of older devs quitting? No, not at all. We are still working but the inflow of new devs is causing the developer population to double about ever 5 years. So, the ranks of the older dev is shrinking in proportion to all devs, but not really decreasing in size.

The article by Uncle Bob made me think of the value I bring to a team. When I talk to younger devs I often see my younger self in them. They express frustration with many of the same challenges that I faced when I was younger. For some of those challenges I have figured out a path that works for me and some I am still figuring out. 

I am also reminded of my younger self's hubris. I used to think older devs were foolish when they told me to take it easy. Reign in the late nights. But I was being a hero! I was producing tons of code compared to them. Why chill and work a normal day? I was unstoppable!

The flipside was that I was debugging my late night mistakes, spending time trying to figure out what I had written, and finding bugs in code I had not fully tested. Then I inevitably removed code that was not needed. 

At some point I smartened up. Probably when I got married and we had kids. I had to work more efficient.

I decided there had to be a better way. I stopped and started to look at my practices. I started to do things like keep a journal of my bugs. I did this for a few months and then started to attack the repeating problems/bugs I had. This got rid of a lot of my bugs and taught me to slow down and reread what I was about to commit.

Then I started to look at the meta me. What outside of work and programming had an impact? 

    • Get 8 hours sleep. Ok, that sure helped.
    • Exercise daily.  When I do, it makes me a happier and more alert person as a whole. Bonus for work.
    • Eating right. Makes me less groggy after a heavy meal, reduces the high/low of sugar rushes, and helps me think clearer.
    • Reducing my coffee intake to just caffeinated (1/day), not high octane caffeinated!

    Then I looked at how I planned and wrote my code. I started to look at how to make my code easier to read and maintain.
    • I started to practice TDD or unit testing of some sort. No more, large integration tests for all my testing needs. I have been freed to refactor code to make it even easier to read and maintain.
    • Minimize methods to do concise chunks of work. I never was one for sprawling full page or multi-page multi-methods but I started to reduce the number of input parameters so that each method was concise and did a well defined job.

These activities took months/years of introspection, controlled experiments and then putting new practices into place to help me be a better programmer. It has meant I have had to become realistic with my time and how far I can push myself. My desire to be superman has had to be tempered.

Superman syndrome I have learned leads to one thing: Burn out! 

Burn out leads to frustration. Frustration with yourself and then when you are tired of blaming yourself you blame others. You start looking for another team if your org is large enough or you look for another company if it is not. This does not need to be the case.

The worse part of leaving one job for another is that you are thrust into a situation where you, most likely, will feel you need to prove yourself. Enter Superman and repeat cycle.

In the short term, people love you and you get a buzz from being such an awesome code god. But burn out creeps back in and bam, sucks-ville. It's not fun in the long run and not sustainable.

The Come to My Lawn article got me back to thinking about how I can help pass this hard-won experience on to other teams. For a while, I have noticed I am working with younger teams these days and then realized it's not the team that is young. It is me getting older. 

Well, I am fine with that. 

I love coding, I love learning, I love teaching. If I can help my teammates to not burn out and look for greener pastures, then I look forward to my "programmer old age" and sharing a drink with you on my lawn.

3 comments:

Ken said...

You should try to get this valuable advice published.

Unknown said...

Thanks Ken. Someday if I have enough articles, I might do that. For now I will keep working on my writing skills and sharing what little wisdom I have.

mch said...

Hi Mark,

It's a really good post by you.

I see on daily basis how eating less but more often changed my mind and how I can be more focused by longer period.

After couple of years working in software industry I see how valuable for me would be having some older mentor from my early days in programming.