Author: Matt

  • Ada Walking

    On Tuesday, Ada took her first un-assisted steps.  It’ll be a while until she develops the confidence to really get around the house on her own, but clearly that time is coming.

    I was convinced that she would be walking much earlier than this.  She was putting weight on her legs since she was 1 week old and I have been walking her around the house holding her hands for the past 4 months.  During those past 4 months I have been slowly providing less support.  She’s had the strength to walk on her own for a while, but the coordination, balance and confidence needed to catch up.

    We’re starting to see the difficulty that will happen when she run around the house.  Ada’s mobility skills are outstripping her english so we are having to close doors and baby proof the house a bit.  She doesn’t yet understand that rolling off the bed is a bad idea.  There’s no way to explain it to someone with zero vocabulary.

  • Microservices

    The term Service Oriented Architecture has been twisted by so many people now that it has lost some of it’s meaning. Microservices is a software architecture for web apps that aims to define a more specific way of doing SOA that isn’t so fuzzy and hand wavy.

    Web applications have long been developed in a SOA way.  Especially with the advent of PaaSes like Heroku which make it easy to bolt on services.  But even when building an app to run on Heroku it’s easy to create a monolithic application which may better be segmented into separate services.

    By dividing your application into micro services you can focus on clear contracts and well defined APIs. If you have an application that can be divided between people to work on then micro services allow you to reduce the cognitive burden of understanding the entire application.  It makes regression errors less likely, and gives you the focus to produce a high quality service.

    You can go pretty far with micro services.

    Exactly how micro you go can depend on your goals and the size/requirements of your project.

    A project I’m working on now will be creating a separate analytics service.  By pulling this API into a distinct application we were able to choose a different technology stack that  was better suited to the requirements.  For uptime and performance it made sense to write the analytics API in Go, this provides nearly 10x the performance of our usual Rails stack.  Given that we expect the reporting app (in Rails) to be updated far more often than the analytics gathering API it’s valuable to isolate it.

    This separation is just the start. In a micro service architected system you can go so far as to pull out user accounts, generating reports, sending reports, processing various things etc. all into their own stand alone service.  Then tie everything together with asynchronous message bus so that if a service goes down messages are queued and nothing gets lost.

    There are some performance issues to be aware of.  A request going through a message bus adds significantly more overhead compared to a function call.  As a result some thought should be made on how to design the API with some performance considerations. Perhaps adding a bulk update operation as an example.

    The benefits to pulling off a successful micro service architecture can be huge for managing the scalability of a big system.  If you have a project that is going to be big enough to require 4-5+ full time developers then consider micro services so that you can divide the work into multiple stand alone micro services.

  • Rhinoceros

    1024px-Waterberg_Nashorn2

    In a recent meeting with my boss he asked everyone to be more like a rhinoceros.  You can’t stop a rhino when it’s moving forward and you definitely can’t push it backwards.  It’s a situation that many of us find ourselves in.  A project or task runs into a small obstacle so we stop to reassess things or figure out how to get around the obstacle.  Whereas a rhino would have bulldozed right through the obstacle and perhaps made a mess but would have got to the other side without stopping.

    It’s not easy to be like a rhino and just power through the hiccups but sometimes its necessary to just get ‘er done.  Waiting for everything to be perfect is a sure way to not finish anything.

    Be unstoppable.

  • Time Audit Surprise

    When you measure things you can manage them – Words of wisdom from Peter Drucker.

    Every time I have made the effort to measure something whether it be calories, carbs, miles run, heart rate, cash flow, net worth or weight there is always a surprise in what the numbers reveal. Recently I did a one week time audit; writing everything I did to the nearest 30 minute interval.

    Prior to actually measuring things I would be swayed by my perceptive bias.  Things that I don’t like doing would seem to take more time than they actually did, and those things that I enjoy would take more time, and seem like less.  This emotional influence on time perception can deceive you into making poor time management choices.

    Sleep was the biggest single bucket for spending my time.  it consumed 33% of the week.  That is a lot of time I wish I could take better advantage of.  There are other animals in the world that sleep far less often than us humans so perhaps there are some (yet undiscovered) ways to sustainably reduce our sleep requirements.  Until then sleeping will continue to be a big part of life.

    Employment was the second biggest time  consumer. 23% of the week was spent in full-time employment.  An additional 3% was spent commuting to and from work so a total of 26% of my time went towards earning a pay check.

    11.5% was family time.  Taking care of a 8 month old can take as much time as I have to give.  It certainly didn’t feel like I was getting this much family time.

    10% of my time was spent on preparing or eating food.  For me that was a shocking number since I usually have a handful of something quick for breakfast and skip lunch.  Cooking and eating supper was taking a lot more time than I had realized.

    Time dedicated to personal projects on the computer was just 5.5% of my time.  Not enough to make progress and much less than I wanted to  spend on it.

    Rounding out the last few things that took time,  Reading, shopping and housework consumed 3% of my time each and TV was at 2%.

    There are a fixed number of hours in the week (168).  Getting more time to work on my side projects requires taking hours away from something else.  Deciding what to cut is difficult, actually figuring out the logistics to cut out that time is also difficult.  Hours are not easy to re-allocate without major life changes and stressing other things and so it will be a struggle to adjust to a new schedule.

    Change is hard.  Changing how your spend your time, can actually change who you are which can be fundamentally difficult to drive from yourself without an external influence (like having a child).

    This time audit raised some interesting issues. Time is our most valuable resource and yet so few of us understand how to best utilize  the time we have given to us.  A disconnect between your goals and your time  can be a critical underlying issue that prevents your success.  I would encourage everyone to do a time audit.  You may find it as surprising as I did.

  • Time Audit

    It can be eye opening to measure things for real whether it is calories or carbohydrates, or reps and weight, or cash flow and net worth.  Perception is a tricky thing and the spread between reality and perception can be wide.

    With that in mind last week I did an audit of every hour of the day.  It was more or less a typical week so I think the numbers should hold up as being average.  This audit provided some interesting numbers that I likely would not have been able to guess off the top of my head.

    The biggest single use of time fell into the category of sleep. 32% of my week was spent unconscious.

    The next biggest item was Work. which ate 23% of my time.

    Those two big categories were to be expected.  Although seeing sleep take up a third of my life is kind of shocking – I can’t remember very much of it.

    Next on the list was family time. This mostly consisted of watching Ada and playing. That was 11.5% of my time at nearly 20 hours over the course of the week.  It’s amazing how fast this time goes by.  When tracking my hours, more than a couple times I’d find myself asking “What did I just do for the past 4 hours?”  In comparison to work hours it doesn’t feel like I did 2 hours at the office for every one hour with Ada.

    TV time took just 2% of my time last week. That consisted of one movie and one episode of Game of Thrones.

    Time spent on the computer was 5.5% or 9.5 hours.  I’m sure that Heather thinks I spend a lot more than that on the computers.  I need to 4X my computer time if I intend on making progress with my Apps.

    One of the biggest shocks to me was how much time was spent either eating or prepping food.  Especially given that I have a minimal breakfast and often skip lunch. 10% of my time was dedicated to food – 16.5 hours.  That’s an average of over 2 hours per day!

    5 hours was spent commuting (bicycle) which was also the only exercise time I had for the week.

    6 hours each of Reading time, shopping, and housework rounded out the audit.

    With a goal of finding more time to work on my Apps there are a couple of places where time could be better allocated.  Previous to doing this I would have thought that cutting into sleep was the only way to carve out more time for myself.  To get another 15-20 hours per week I could probably make due with cutting from some other categories.  If I could avoid shopping excursions that would free up 5 hours per week. Faster food options might save even more time and trimming my reading list might be enough to create some forward momentum on my projects.

    With that in mind next thing to do is to develop and execute a strategy to free up some time.

  • Applying The Creative Writing Process to Software

    Grabbing the best ideas from other industries and applying it to your own is a fantastic way to learn and discover new ways to do things.

    I was listening to the Tim Ferriss podcast yesterday in an interview with Neil Strauss.  Two best selling authors discussing their creative process for writing a book.  It got me thinking if some of the approaches they discuss could apply to to software development -which is also a highly creative process.

    Let’s break down Neil’s process a bit.

    The first part is to do a lot of research.  For example, when Neil is doing an interview with a celebrity, he will read everything they’ve written, listen to ever song, devour every bit of information he can about the person.  He writes out a list of 100 questions for the person and studies it like you would for exam prep.  Finally when it’s time for the interview he puts the questions in his back pocket and forgets about them.  As a result of this level of preparation and study the interviews can flow naturally.  He has a backup of questions to draw on if the conversation stalls but usually he can riff off the bulk of knowlege he has collected to build rapport and get to the really interesting details.

    With a cache of notes from research it’s time to start writing.  There will be several drafts and the goal of the first one is to “Write to the end”.  Convert the pile of notes into a story as quickly and rough as possible without self editing along the way until you get to the end of the book.  This first draft will be read by no body else.

    After the first draft you are just 1/4 the way finished.  The second draft is done for the readers.  You cut out all the uninteresting pieces, ensure the story arc is solid, characters are developed enough, flow is good, and jokes are funny.  You do this by putting on the hat of a reader and ruthlessly editing your first draft.

    The next step is to put on the hat of a hater.  To deflect criticism before it happens you go through it again with the perspective of someone who wants to debunk your stuff and criticize your ideas.  At this step you fact check everything, and make sure there’s nothing offensive, or at least that the counter points are acknowledged and dealt with.

    Finally it goes to the editor and is test read by anyone who wants to read the manuscript. Listen to their criticism, and adjust your book to improve things and cut parts that people don’t find interesting.

    After enough feedback you’ll know when to lock down the book to a final version and send it to be published.

    For an average size book this whole process can take upwards of a year to complete.

    There are some lessons that we can take from the best approaches to writing books and apply it to writing software.

    Notice that this approach to writing a book is not Agile, and it’s not waterfall, it doesn’t involve sprints, scrums or user stories. It’s completely unique to the way most software is created.

    The first part of Neil’s process is research.  You might roughly correlate this step to requirements gathering but that vastly understates the effort Neil goes through.  I have never met a developer that thoroughly masters the domain knowledge before typing anything the way Neil does.  Taking months and often years to interview people, take courses, and generally immerse yourself in the space you will eventually write about gives you skills and knowledge to be able to write “to the end” without pause.

    Side note: Interruption is one of the most detrimental things to the creative process. Stopping to look something up, or ask a question of the client can waste half a day of productivity.  Agile methods promote this open communication during development… maybe there’s a better way.

    Writing to the end for the first draft is something not possible without having enough domain knowledge to do it in the first place..  There really isn’t a comparable product in any software project I have personally worked on which compares to this first draft.  The scope of Neil’s first draft expands far beyond what is in the final book as he will likely cut 50% of the pages during editing.  It has me wondering if it would be a good software development approach to rip through a 20,000 line first cut of an application knowing that I’d delete 1/2 of the code before being finished, slashing out features along the way.

    If we did write this quick rough first draft application with the intention of whittling away anything superfluous to arrive ultimately at a publishable product then the next step would be to put on the hat of someone who wants or needs to use this software. Can you make the interface more intuitive? Can you give it some life? Are there any features that are more complex than they’re worth? What can be cut without destroying the utility of the application?

    It would be only after these changes have been made that anyone other than yourself would see a demo.

    In Neil’s process the final step is essentially debugging. Going through the application yet again with an eye for correcting errors, fact checking things, getting a lawyer’s review for liability etc.  At this point you would also ask for the input from as many test subjects as you can, gathering and filtering feedback to fine tune rough edges.  Essentially you want to make sure that if someone is trying your software they don’t have a reason to ask for a refund and they can’t claim that you or your company are incompetent.  The final product has to be great.

    Only after enough friends, family and colleagues have used the software that you feel confident in it do you call it done.

    It’s interesting to wonder if this would produce a better product than the typical agile developed software.

    There are a couple of significant differences in software vs book writing however that need to be addressed.  Software is rarely a single developer’s sole project.  There is usually a team to divvy the work between. This team adds some communication load to the project as people need to be in sync.  This team approach doesn’t work well if all the domain knowledge is stuck in scribbled notes and in the head of  one guy that did the research.  Would Neil’s approach scale to writing a 10,000 page book with 4 other writers?  The counter point would be that if you’re looking at writing a 10,000 page book maybe it would be better to write 20 500 page books and only have a single author per book.

    Software is also not written linearly.  When you start to write a book chapter you may be able to start writing and continue without stopping the flow of words.  You probably wouldn’t be halfway through chapter 18 and realize that it would be good to foreshadow what’s happening earlier, then stop and go back through to find a good spot to add that foreshadow element to an earlier chapter. A disruption like that would completely disrupt the flow of your writing.  It’s difficult to write software without jumping around like that.

    Programming languages are much more rigorous than English.  it’s not always possible to skip pieces where you need to know an answer to get a working program. There can be hard dependencies that prevent you from moving on until they get solved.  Again this is an opportunity for interruption.

    It would be interesting to try this method on a software project to see how it translates.

    If you are interested in getting more details from Neil Strauss and Tim Ferriss about the creative process check out this video:

  • too many computers?

    There are quite a few computers in the house.

    • Heather has a MacBook Pro for herself
    • I have a Macbook Air that I use most of the time and leave around the house
    • In my office there is an old 2009 Mac Mini which is showing it’s age but mostly acts as a machine to host my music and movies
    • I also have a Macbook Pro for work which I try to keep my personal stuff off of
    • There is the new PC that I built which currently is a hackintosh
    • There is also a rack mounted server which is currently going unused because it’s too loud to leave on

    Currently I don’t have a backup solution in place.  When I built the PC I salvaged pieces from my backup Linux server leaving it non-functional.  All those computers and no backups in place is an accident waiting to happen.

    So looks like I’ll be rebuilding a Linux server, adding yet another computer to the collection in the house.   Just as soon as I find the time.

  • Finding time to code

    Finding time to write code after work, when you have an eight month old and a full time job is nearly impossible.  I’m not sure how others manage to do this.

    It’s time to do an audit of my time management.  To figure out just where all my free time is going so that I can focus on finding ways to remove my biggest time sucks out of the day.

    I suspect that TV time and running errands are the biggest areas that can be optimized to give me time in the day to get more software written.

    To be sure, I’m going to do a 1 week audit of my time by filling out this print form.  I’ll share the results next week

  • Father’s Day

    This was my first Father’s Day as a father. Man, that’s still kind of weird to say.

    Ada’s personality is starting to show through. She’s going to be a handful and tornado of energy to manage.

  • Polyglot vs Specialization

    I consider myself a fairly well rounded developer. So when it comes time to choose a technology to accomplish a task I will happily choose the one that is the best fit whether it requires Ruby, Python, Java, Objective-C, PHP, CSS, or Bash or anything else.

    Recently I was given a project to take on.  At first it looked like it would be adding some PHP code to an inherited code base.  Upon starting it became apparent that the code was a disaster and too far gone to be recoverable… a full re-write would probably be best however it was way out of the budget for now.  Rather than continue patching in the new features we needed, we decided to create a new side project that tied into the existing database to accomplish what we needed.  It gave me a chance to evaluate how I wanted to build this application.

    Generally we do Ruby on Rails work with my team.  However given that the existing database schema was not even close to normalized or conventional Rails would have been a difficult way to go.  There would need to be a lot of boilerplate code to map things to new field names.  It just wasn’t a good fit.

    Instead I opted to go with a simple, lightweight Node.js App.  It would leverage the SQL queries copied out of the original PHP code with minimal overhead.  The app is heavy on database IO and has zero application logic so Node is a good fit.  We already have Javascript skills on the team and experience with testing frameworks for Javascript code, so support wouldn’t be difficult.

    Turns out, it didn’t go over well with some people on the team.

    “We use Rails as a  technology stack”

    Passion can run high in technology circles over tools. Apple vs. Windows. VIM vs Emacs there are religious fights about which is better.

    I like to be good at a breadth of technologies, that means staying sharp on a fistful of languages and tools, while always looking to learn new things.  Others like to focus on being world-class with one technology stack.

    Which is the better approach?