Sunday, April 7, 2013

Painting Ourselves Into a Corner

I both love and hate Amazon's recommendation system. It has an amazing way of finding things I didn't know existed that I will probably like. It has become my primary source of finding new books to read. But the same relevancy engine that finds me new books to read also frequently boxes me in to very specific types of books if I'm not careful. 

Nearly all item based similarity engines have this problem. I want to learn more about Ruby. I browse through many different Ruby books, maybe add a couple to my wishlist and even buy one or two. If I go to my recommendations list, its filled to the brim with Ruby and other programming language specific books. What happens two weeks later when my mood and interest changes and I want something a little different? 

I run into this a lot with Pandora as well. I create a few stations that all seem to end up very much alike with subtle differences but then the breadth of what I'm listening to stops expanding. I no longer am able to easily discover new genres of music I hadn't tried before because I've used Pandora's own recommendation to paint myself into a musical corner.

To me this is a really tough but useful area of improvement in information relevance. How do we find information a person didn't know they wanted? How do we expose a person to something radically different with a good probability they will be interested in it? How do we use machines to constantly expand our horizons? 

Saturday, March 16, 2013

The Path of Least Resistance


I drink a lot of tea. These days I only drink loose-leaf tea. Brewing loose-leaf tea is two parts science, one part art form. Temperature, amount of tea, brewing time, even the material of the pot and the pureness of the water can affect the flavor of the tea. 

When I make tea, I don't want to think too hard about brewing. I want to get my tea as soon as possible then sit down and get to work. I need a method of brewing tea that is consistent, reliable, and easy.

Here is my system: I use a ceramic cup that came with a ceramic infuser and lid. I pour the tea leaves into the infuser until the infuser is approximately one third full, put in the hot water, then take it and a disposable coffee cup, the one you always find in the break room next to the coffee pot, back to my desk. I get to work, then after 5-10 minutes or however long it takes me to remember I’m brewing tea I take the infuser out of the cup and set it inside the coffee cup. I put the lid back on and let it cool down to a more drinkable temperature. This takes about another 10 minutes. After this I can sit back from whatever I’m working on and take a quick tea break, or start sipping as I continue along.

The real secret to this system is that I’ve found a black tea I really enjoy that tastes good even after being over brewed. This makes it incredibly hard to screw up my tea. Even if I let it sit and cool off too long I can throw it in the microwave and reheat it easily.

What I’ve done is I’ve designed a method of brewing tea that is almost impossible to completely screw up and always leaves me with a satisfying hot cup of tea. In fact, if I deviate from this method I will make it easier to screw up my tea. If I change the type of tea I will easily over brew and have a cup that tastes terrible that I wont want to drink. If I make a big pot of tea I’ll have too much and now I have a big pot on my desk I have to deal with. I’ve designed my path of least resistance in the tea brewing process to result in a good cup of tea.

What I like about my method is that I shape my own behavior by making it as easy as possible to not fail at brewing. Other people who design things shape behavior in similar ways.

When an architect designs a building, they are shaping the behavior of the people who work in, live in, or otherwise use that building. If the building has a large open room with lots of lighting that building may be used to hold large gatherings of people. If the building has lots of small, well-insulated rooms each with a bed and a bathroom you may find lots of people sleeping in that building. 

When a graphic designer designs an e-commerce site, they are shaping the behavior of the way people find and purchase items on that site. If the front page of the site has a large, prominent search box most people will probably search for what they want to find rather than browse around looking ideas of what to buy. If the site has lots of large, noticeable buttons for sharing on social media, you may find a lot of people tweeting about the items on that site.

When a programmer creates a new web framework, they are shaping the behavior of other programmers who use that framework to create sites. If the framework has a lot of secure default options most of the sites built with that framework may be more secure than others. If the framework has an intuitive, simple directory structure many of the sites built on that framework may have very intuitive, simple code organization. 

At its most basic level, design is all about shaping behavior. The next time you are designing something, whether it is a website, an API, or even your own exercise plan, consider for a moment what behavior you want to encourage. How are you going to setup the person using what you design for success? Where do you want your path of least resistance to lead? 

Saturday, February 23, 2013

Chasing the Dragon

I have a confession. I'm not in love with building software. What I love is that building software affords me the opportunity to make a living while chasing the high of the zone. 

We have all been there before. In the momentpresentin the zoneon a rollwired inin the grooveon firein tune... All those wonderful terms for the state of concentration where high skill meets high challenge. 

In the zone time is irrelevant. In the zone you make your reality. Anything is possible and you are in control. You are invincible. In the zone hunger and thirst don't exist. Even the urge to relieve yourself is external and it must raise itself to a priority level high enough to rip you out of the zone. 

In the zone nothing else matters. You forget your worries, forget what plans you had for the weekend, and forget that vacation you were looking forward to. Your ego evaporates like water in the desert. 

In the zone you create something from nothing. From a canvas comes a portrait. From a page comes a novel. From a repository comes an application.

The zone itself is fragile and at times fleeting. All it takes is a person asking you a question, a phone call, or even a loud noise to jolt you back into reality. Its fragility can make it difficult to enter. A fight with your spouse, a loud room, or the wrong breakfast can leave you on the zone's doorstep but never allowing passage. 

It takes practice and preparation to enter the zone consistently. Circumstances rarely provide you frequent opportunities to enter unless you create them yourself ahead of time. You must carve out space for the zone from reality.

You must separate yourself physically, socially, and emotionally from reality for it. You have to have your cave you can enter to lock yourself away from the people and events that will pull and weigh down your attention. You have to practice focus to gain the mental strength necessary to ignore the distractions and cut right through to the important. You have to hone your skills to ensure that no challenge is beyond you. You must keep your tools sharp so that they cut through the challenge for you, rather than forcing you to laboriously chop away at it over and over.

I'm lucky I can do what I do. I may not be the best engineer, but I'm good enough that I can tackle an array of challenging problems with the necessary skill to take them into the mental boxing ring of the zone, beat them to a pulp, and come out with something the world can use. 

Your art, your method of creation, your skill may be different but the world we enter to create is the same. It is infinite, it is open, and it is the reason we find joy in the work we do. 

Tuesday, February 19, 2013

Starting Is Easy

Do you know what the best part of a project is? 

Its the beginning. In the beginning the project is bold, wonderful, exciting, challenging, intellectually stimulating. It's a new thing that barely exists except in your mind. You sit in your chair and you can see the whole complete picture  buzzing along doing all the things you want it to do. Think of the users! Their lives will be made so much better by it! People will be impressed at this technological miracle you have birthed. 

This fantasy is made possible by a combination of energy and excitement brought on by a change to your status quo and the blind faith that what you make will be as wonderful in reality as it is in your head. 

You break open your trusty text editor, fire up a new repo, and file new project that idea right into existence. Now your idea has become a little more concrete and now instead of being purely in your head some of it is real and tangible. Sure there's not much there but its something you can point to as proof it is more than just an idea. It even has the name you've given it. 

Now a feeling of invincibility is sweeping over you. You think to yourself "I'm going to do this the right way. I'm not going to take all of those short cuts in the name of deadlines. I am going to make something that I am proud of."

And so you do...

Tests are written. Well designed interfaces and models are drawn up on your whiteboard. Levels of abstraction seem so clear and obvious. 

Now reality begins to creep into your project, and reality is a cruel mistress. She brings with her a cold, bright light that follows her illuminating every dark dirty corner of everything she touches. 

A test is failing.

Good! The tests are supposed to fail at first. A failing test is like a to-do. It tells you that you need to write some code to make that test pass, no problem. 

Ten minutes go by and you have made no progress. This is difficult. You think to yourself, "I have good momentum that I don't want to break. I'll come back to this." Your momentum seems unprecedented. You could easily graph the number of tests you need to get this working and see the rate at which you are making the tests pass and you will have this whole project done in record time. A genius you are! Everyone else are such lazy fools to not complete all of their projects at the rate you are finishing.

The next day comes, starry eyed and barely able to sleep because your mind is racing with thoughts and energy to pour into the project. But that test is still failing. 

Progress continues, but it doesn't seem to be at the rate it was yesterday. Yesterday you were invincible. Today suddenly frustration seems close at hand.

Come to think of it that interface isn't going to work out like you hoped. 

And your models aren't as pure and well thought out as they seemed yesterday. You are violating some clear design principles but it would mean so much extra code to make them conform and work "the right way." If it wasn't enough, Super Awesome Framework you are using to build this with has some abstraction leakage and quirks that force you to write ugly work arounds.

Soon you are left questioning why you are working on this. The enthusiasm and intrigue towards the project are sapped. Problems with the interface keep coming up. There are use cases that no one seemed to think through that have the potential to clutter your interface just to get it working. 

After awhile, the deadline, real or imposed, is rearing its ugly head. 

This function is so simple and obvious, it must work right? Certainly you will save yourself some time by not writing tests against this obviously working code. After all, you're a genius remember? One of those 10x programmers? 

Shortcut after shortcut is taken. Ideals are traded for pragmatism. Technical debt is accrued and you are left wondering just how proud you really are of this creation. Is this something you want to point to and have people remember you by? Would you forever engrave your name into this? 

As reality takes its toll on the project, the weight and burden of the project on you personally begins to grow. It will cause you to constantly reevaluate what you are doing and how you are spending your time. Is it really worth it? Is it really worth all the time and energy you are putting into it? If you put it off for a week will it still be as important and worth a continued time investment?


Will it ever be complete? 

The stakes of the project have the greatest impact on whether or not it will. If you are doing this for a business that is counting on increased customer satisfaction and/or improved revenue, that business will ensure that one way or another this project will be completed no matter how late it is. 

For personal projects it may never get this far. Was this an interesting academic exercise you wanted to show off on Github? Was this something you were trying to make for your own personal use, or were you making it with the intent that someone else could directly benefit? Is this something that you know quite well will most likely never see the face of a real user?

Of course everyone says to just start. Starting is the hard part right? Once you start the hard part is over isn't it? Not so Kimosabe.

Starting a project is easy. Starting just means showing up and taking one step. Finishing means taking thousands of steps, mile after mile, pounding the pavement until your feet are blistered, your body aches, and sweat drips from every pore in your skin. Starting is easy. Finishing can be the most difficult thing you've ever done.

Saturday, February 16, 2013

My Productivity Advice


Computers might very well be both a blessing and curse to our society. The Internet has improved communication thousands of times over and with continuous improvements in speed and design it seems to be improving exponentially.

That is for some definition of improving. As a software engineer working with largely network-based systems, I am right at the forefront for all of this. My day job consists of building faster and more innovative ways to make you, the lowly consumer, buy more stuff you don’t need.

But since something has to put food on the table, and I actually do enjoy it, I find myself in front of a computer far more than eight hours a day typing, reading, scrolling, and reading some more. I always have at least one web browser open, ten chat windows, a code editor of some kind, and a terminal window. For all of us desk jockeys toiling away at our networked computer screens, the siren’s song of information is never more than a click away.

Have you ever thought about why you keep finding yourself wanting to check Facebook? Or why you know you shouldn’t but you find clever ways to rationalize reading the latest tweets in your feed? It’s all about dopamine. Whenever you go to check for some new information whether it be on Reddit, Facebook, Twitter, Hacker News, or any of those other ugly time sucks your brain releases a hit of dopamine as soon as you read something new. This is not unlike chemically what happens in your brain when you take a hit of cocaine.

As you check more of this information over and over you begin to crave more and more. It becomes harder to focus on a given task for longer than a few minutes. If go to work, maybe spend 10-20 minutes catching up news, the front page of Hacker News, and your Facebook feed, then continue to check back in on these things over and over throughout the day you may vary well find that you have easily spent up to half or more of your entire working day on suckling from this fire hose of a teat.

We know its wrong, but yet we still do it, over and over, day after day. It’s a not unwarranted joke that when Reddit goes down productivity among white collar workers improves.

I’m here to say there is a better way. I’m here to inform you life does not have to be like this. I’m here to tell you that you can make a measurable improvement to your happiness and quality of life by tackling this wretched demon.

Thankfully, the alcoholics from before our time have given us some tips to rid ourselves of this beast.

The first step is to admit you have a problem. I know I do. I am weak and powerless in front of these rationalized dopamine dealing drug peddlers.

The second step is to quit cold turkey. At this point you are probably skeptical of me. I was you at one point. I understand your apprehension towards this idea. I challenge you to try this just for two weeks. At the end of those two weeks you can go about your business gorging on a backlog of tweets, likes, updates, and posts.

But before we go further I’ll tackle some of your skepticism head on.

But the Pomodoro technique….
No. This is not well suited to tackling this problem. This is best suited for the manager facing a barrage of emails, phone calls, and face to face interruptions that prevent him or her from doing meaningful work in the day. Do not use the Pomodoro technique as a rationalization to allow “just a little hit.”

I’ll just limit myself to only check these things once or twice a day.
No you wont. You must admit you are weak. Checking at all will do to your mind what Buddhists describe as “stirring up the muddy water.” You need to let the dirt and debris in your mind settle, and taking in any of this pointless information is going to leave you just as bad and unfocused as when you were wasting half your day doing it. Plus, from personal experience, you will relapse.

But I will miss out on all kinds of important information.
Doubtful. In todays super connected day and age if you live in a city of any size and talk to at least one person a day you will most likely be unable to miss current world events. Someone will tell you about it, you will catch a glimpse of something on a TV on in a restaurant, you will see the headline on a newspaper as you pass by. All other information is just noise.

I’ll assume at this point you have given up your rationalization of the issue and have given in to the idea that quitting cold turkey is the only way. I will now give you a step-by-step process to help.

  1. Turn off notifications on your phone for all possible apps. Email, Facebook, Twitter, Foursquare, Farmville, all of it goes. My only exception to this is that during my on-call shift I do temporarily turn on work email notifications. Otherwise, no exceptions. While you are at it, just uninstall everything except e-mail. People who matter will call or text you. People who don’t matter will Facebook message you.
  2. Turn off your TV. In fact, cancel your cable subscription right now. Even if you take nothing else away from this blog post cut the cord and don’t look back.
  3.  Limit your email. I recommend only checking twice a day at most. Email is a necessary evil because it is so ingrained in our day-to-day communication. The best you can do is keep Outlook, iMail, or Gmail closed except for dedicated times during the day. While you are at it, spend this time really reading what people are sending you instead of just skimming it, and take more time to write thoughtful messages when you have a need to respond to someone.
  4. You will find yourself with huge amounts of time you don’t know what to do with. Previously you would get bored for a second and use that moment to check your email, or twitter, or whatever. You will need a replacement activity or you will relapse.


a.    I too am a smartphone user, and I highly recommend downloading the Amazon Kindle app, and putting together a reading list of books. Anytime you find yourself with a few spare minutes you would otherwise check the latest Reddit, read a few pages out of your current book.
b.    Take up meditation. I will leave this as optional, but I highly recommend it. There is no real wrong way to do it, the simplest is to sit somewhere comfortable, close your eyes, and focus on your breathing. For beginners, its recommended that you count on the inhale of every breathe from one to ten and restart at one any time you notice your mind drifting onto something else. Eventually you start to embrace any moment of silence because it gives you an opportunity to practice meditation however briefly and stay more in the moment.
c.     Spend time with people. Talk to them in person. Be they friends, family, coworkers, or strangers on the street. Real people are way more interesting than self satisfied strangers online.
d.    At work, if you find yourself with small periods of time where you don’t know what else to do and would otherwise check out the latest unprofitablestartup.io on Hacker News, take initiative and think for a second why you are in this state. Why do you not know what to do next? Are you blocked by someone else? Go find them and figure out what needs to be done to get them moving. Do you not have anything to work on? Check with your manager. Is your manager or not around or do you not have one? Work on that thing you talked about staying late and fixing a few weeks ago.
e.     For longer periods of time outside work, filling this time hole becomes more challenging. Much like you have a list of books you are reading, create a list of things you want to work on. This can be as small and simple as a household chore you have put off, or it may be learning a new language, writing a book, or writing a blog post about how much better your life is now that you rid yourselves of those evil time suck websites.

After your two weeks are up, take five minutes and reflect on how they have gone for you and your state of mind. Have you been more productive at work? Have you done things you don’t normally do? Have you finally gotten around to doing something you have been putting off for a long time? At this point you should make a decision whether or not to continue your self imposed exile from the online world or return to your procrastinating ways.

Here is my dirty little secret. I’m not perfect. For the last five months I’ve been alternating periods on and off the grid. I generally spend about three weeks off, than one to three weeks on. Mostly this is just because I am weak and there is always something that comes up that sucks me back in. Honestly I do find that during my period of time offline I am happier, I am more productive, and my life is generally improved. Eventually I hope to have the willpower to stay in my cold turkey state indefinitely, but like an arctangent approaching an asymptote I may forever more forward without ever fully reaching my goal. Better to try and fail than to not try at all.