March 16, 2014

4 Life Lessons I Learned from Programming

You know how when you do something a lot, you start to see parallels and metaphors connecting it to the rest of your life?  Well, I guess I've been spending too much time programming lately.  And in the spirit of the book about life lessons from Kindergarten, here some things I've learned from software engineering:

1. Don't leave broken windows.
This is actually a famous public policy study that was applied to programming in a famous programming book (and now I'm applying it again to my life).  They studied the effect of a broken window on a neighborhood and found it tended to attract graffiti which in turn encouraged petty crime which lead to serious crime.  It's like dirty dishes in the sink- one turns into a sink full so quickly.  Or how you feel about your diet after a donut ("I've already botched it so I'll just have some ice cream too").  It's human psychology to think "it's already messed up, what's one more little thing?"  But if it's clean, you're more likely to keep it that way.  So if you make an effort to fix those little broken windows, you'll probably save yourself from a lot of problems down the road.

2. They do what you tell them to do, not what you want them to do.
This is one of the most frustrating parts about computers.  I can't tell you how many times I've cursed a program for not working only to find it was doing exactly what I told it to.  Much like raising children- they do what you model, not what you preach.  It doesn't matter how many times you tell them to be nice to people or to clean their room or eat healthy, they will end up mimicking whatever they see you do.

3. Words are important.

In programming, you constantly have to come up with names.  Names for variables, names for packages, names for concepts.  Technically, it doesn't matter what they are- your program will work the same whether you call your thing fooBar or String1 or customerFirstName.  But you (and all your teammates) will be cursing yourself if you don't go with the last option.  Similarly, words are important to relationships.  Don't say mad if you really mean frustrated and don't say I hate you if you really mean you hurt me.  And say I love you even if you think they already know it.

4. Be clear about your expectations.
When two pieces of code talk to each other, they need to be extremely precise and explicit about what they expect.  Misunderstandings wreck havoc.  Likewise, in relationships, being on the same page is crucial.  And no one can read your mind so you have to tell them.  Clearly.  Also, clarifying your expectations to someone else helps you understand them more yourself.

I read an adage once saying for each equation that appeared in a book, the readership dropped by 50%.  I'm a bit worried that even mentioning programming might have the same effect so, if you made it this far, thanks!

P.S. Photo taken on this trip and available here!

1 comment:

  1. I love this, so insightful Amber! These are all things I really need to work on. Thanks for the reminder!