Sitemap
CS Thinking

Coding is not just remembering syntax! More important are the deep and widely applicable ideas from Computer Science that can be taught using everyday examples.

Put the Ketchup on the Table

CS Thinking

--

My son has also noticed that it tends to be “fancy” restaurants that cut you off from easy access to condiments. Maple syrup, jam, you name it, they like to insert unnecessary interactions with the waiting stuff at every juncture. In CS terminology, their interface is bloated. They have introduced unnecessary dependencies that cause information, in this case which condiments you like to put on your food, to be exposed to the waiters who really don’t need to know or care.

The opposite of a bloated interface is a narrow interface. Narrow interfaces tend to reduce complexity by minimizing dependencies and information sharing between components. Obviously there is important information that needs to be shared, but hiding away details of how a component works reduces the possibility of unnecessary dependencies being introduced. With narrow, well-defined inputs and outputs between components, programs can be broken up into relatively self-contained and composable functions and modules. The opposite of this kind of design is sometimes referred to as “spaghetti code” or “big balls of mud.”

Company Culture and Netflix

Work can also be frustrating at times because of interfaces that are too broad. For example, I’m sure many of us have engaged in the work place theater of surfing the web, pretending to be productive, until it’s time to go home. Or felt like you had to sneak out early to go to the dentist. A narrower interface in this context would be to assess employees on their overall contribution and eliminate unnecessary dependencies, like having to track how many hours you’ve been in the office. The well known Netflix culture
deck
is a good example of this kind of CS thinking being successfully applied in practice.

In contrast, micro-managers create big balls of mud because they introduce deep and unnecessary dependencies into areas where they don’t belong, in this case into the details of your job and even your personal life. Instead of providing a narrow interface with high-level goals and context, a micro-manager will obsess about low-level implementation details of how you do your job. Details that are usually best left for you to decide.

Debugging and Steve Jobs

Get funge’s stories in your inbox

Join Medium for free to get updates from this writer.

Debugging is an important example in software development when you need to be prepared to dive into the details. The hard part can be finding out where the problem lies and you may need to delve into some very dark corners. Once the bug is identified, it can be a simple tweak to fix the problem, although that sometimes then reveals other bugs! Other times the conclusion you come away with is that the code is a mess and needs to be replaced, although you should be aware that this can be fraught with difficulties.

We can all probably identify “buggy” work colleagues. A manager or colleague may need to delve into the details in order to figure out the source of the problem. Often the person simply didn’t realize there was a problem and some appropriate feedback is all that is required. Just as in software, once uncovered the “bug” may have a simple fix.

The key point is that while detail-oriented, hands-on managing and micro-managing might share some superficial similarities, they are very different in intent and outcome. Hands-on management involves diving in to the details to debug a problem or make something better, micro-managing is an incessant obsession with details for no outward purpose other than a desire to control for the sake of control. People like to bring up Steve Jobs as an example of a wildly successful micro-manager. But from what I’ve read and heard, Steve Jobs was more of a debugger and narrow interface designer than a micro-manager. He constantly saw “bugs” in product designs and he was successful by paying attention to detail, root-causing those flaws, and inspiring people to design products with less bloated interfaces. To quote his close collaborator, Johnny Ive: “Simplicity is not the absence of clutter, that’s a consequence of simplicity.” Where “clutter” here is referring to precisely the same problem of bloated interfaces and “simplicity” is analogous to a well-designed narrow interface.

In terms of debugging the restaurant example, the reason you mostly see ketchup on the table in less expensive restaurants is probably more about reducing how much work a waiter has to do, and hence cost, than providing a better experience. Perhaps, there is then an even better design to narrow the interface with the waiters that doesn’t involve cluttering the table with more bottles. In particular, Japanese restaurants, of any calibre, tend to put a great deal of effort into designing how to present meals. For example, Bento boxes typically come with dipping sauce, wasabi, ginger and even utensils — everything you need to maintain a narrow interface with the waiters.

Relationships

It might seem like more of a stretch, but the same CS thinking principles can also potentially be applied to making personal relationships less frustrating. For example, my wife can become exasperated by the amount of money I waste on electronic gadgets and, to be fair, I often feel skeptical about some of her purchasing decisions. But she is also a computer scientist and so the CS thinking solution we came up with to narrow the interface between us was to have three bank accounts. A shared one that we use to pay the bills and one each over which the other has no authority or visibility.

Of course, while the goal of some personal relationships might be to get as entangled with another person as possible, there might be value in avoiding introducing some unnecessary dependencies. So if your partner attempts to unnecessarily control implementation details of your life, you might suggest, being careful to be clear on what you are suggesting slimming down, making your interface less “bloated.”

Acknowledgements

Thanks to Tong Acken and Kathleen Kovatch for feedback on early drafts of this post.

--

--