The Art Of Readable Code

The Art Of Readable Code by Dustin Boswell and Trevor Foucher

art-of-readable-codeI didn’t know much about this book. I knew that it was written by two Googlers. It was under 200 pages. And the title was intriguing. Sounded great, let’s see how good it is.

After reading it I have to say that it’s really good. Again, an incredible book for beginners something everybody should read between their first and second year programming. Really well written, no clutter, funny cartoons. Really good book.

Code should be easy to understand. AND
Code should be written to minimize the time it would take for someone else to understand it.

These are the two main mantras in the book. I would even say one mantra. The idea that you write code for some other person to read is great. They also say: “Maybe that person is you in 6 months”. And I agree. I noticed this in the beginning of my ‘career’ (for a lack of a better word). I looked at code I’ve written 6 months before and had problems understanding it. Today, I can look at code I’ve written 3 years ago and have not many problems understanding it.

Use a thesaurus

Because English is my second language I often do this while searching for better names. But I think even for native speakers there’s a payoff. I try not to make it too non-obvious, though.

Append important information to variable names. e.g. delay_ms, unsafe_user_comment, textfield_utf8, etc.

I like this idea and it’s extremely valuable in non-static typed languages. Which makes me think whether you should, for example, define two types of input. Save and Unsafe text. You write all your ‘internal’ function only using save text and therefore have to check your unsafe text you’re getting from the user / input.

Names should be non-ambigious


Comments as “director commentary”

Love this. If there’s something non-obvious describe it. If you tried a few things describe it. Really good advice.

Examples in the comments / docstring

I love when library writers do this. Python has a great implementation which allows you to define examples and tests in the docstring. But nonetheless, something worthwhile.
All in all, really good! I knew most of the stuff thanks to

  • functional programming (bottom up, dreaming about what you want to do, no side-effects, )
  • edw519 who said that naming is one of the most undervalued activities in programming. His comments got me started to use clean and consistent naming.
  • my own laziness (writing as little code as possible)

I would recommend it to new comers, i.e. with about 2 years of experience. They will probably get the highest payoff. Absolute recommendation!

The 5S for the Office User’s Guide

The 5S for the Office User’s Guide by Don Tapping

If you can’t do 5S then forget all the rest!5s-office-guide

This book is great. It’s practical, it’s easy to read and it’s full of actionable advice. I can recommend it especially given the lack of good books in the service / office environment.

We did 5S quite regularly in our office even before I was a QM. It just felt freeing and people felt good after they threw out a few trash cans of old paper.

Lean eliminates waste or non value-added activities. Waste is defined through the eyes of the customer (i.e., client, patient, other process owner, etc.).

That’s one of the basic idea of lean. Erase non value-added activities. These are basically all activities “that customers are not willing to pay for”.

Non value-added activities are usually symptoms of a problem within a process.

The idea of creating value for the users ‘at all cost’ is pretty revolutionary and challenges the status-quo. You can defend something as ‘we always did it like that’ if the customer isn’t willing to pay for that. It’s a customer-driven environment and it’s cultural. Therefore it isn’t easy to do lean management well.

Now that we can think about customer value, we can think about waste which is everything that doesn’t add value. These are the different kinds of waste:

  • Unnecessary Services (or overproduction of those services)
  • Mistakes (or defects)
  • Delays
  • Unnecessary Motion
  • Overprocessing
  • Excess Inventory
  • Excess Transport
  • People Utilization

Most organizations find that 5% to 20% of the work or service provided is value-added.

If you start measuring processes you quickly learn how much time is actually spent on value-added activities. Here are some examples:

Examples: Excessive copies of emails, Duplicate reports, Ineffective meetings, Irrelevant data to customers.

Examples: Data entry error, Missing information, Wrong information, Scheduling issue, Customer returns.

Examples: Searching for data – electronic or paperbase, Ineffective email distribution lists, Scheduling issue.

Examples: Unnecessary data collection, Redundant paperwork, Ineffective meetings and reports.

Where do we start?

  1. How can we start to communicate about these wastes throughout the organization?
  2. What are some “low-hanging fruit?”
  3. What can be done immediately to improve a process and reduce costs with minimal cost to the organization?”

One of the most important success factors will be the commitment of the management. Without their commitment it won’t work. They will provide financial resources, time for training and participation, and consequence if the employees won’t go the new way.


There’s a lot written about 5S and I will just take quotes out of the book:

  • The essence of Sort is found in the saying, “When in doubt, move it out.”
  • The essence of Set-In-Order is found in the saying, “A place for everything and everything in its place.”
  • Shine involves cleaning everything, keeping everything clean, and using cleaning as a way to ensure that the areas are maintained as they should be.
  • Standardize involves creating guidelines for keeping the area organized, orderly, clean, and making the standards visual and obvious.
  • Sustain involves education and communication to ensure that everyone uses the applicable standards.

And that’s basically it. It’s easy but incredible powerful. And I agree with the leading quote. If you can’t do 5S don’t try to do more complicated QM.

I won’t go into the PM part of introducing 5S but it’s discussed in the book. Here are some of the tips for doing 5S.

Some tips

  • Create legends for labels that are in common areas.
  • Areas that are clean and well-lit allow for more satisfied customers as well as employees.
  • Participation in development of standards is the best training.
  • Locate visual controls at point-of use.
  • Perform management “walk-abouts.”

It boils down to: Make it easy and accessible.

Breakthrough advertising

Breakthrough advertising by Eugene Schwartz

breakthrough-advertisingThere’s a lot written about this book. I won’t go into detail. But one of the most stark things about this book is its high price (used hardcover costs $396.00):


Some say this book made the most millionaires. Some say it made their career. So what it is about?

the copy writer does not create the desire of millions of women all over America to lose weight; but he can channel that desire onto a particular product, and make its owner a millionaire

This is probably one of the main points in this book. Creating trends is incredible hard, riding them not so much.

All in all, I think it’s an incredible book. It’s truly a manual to make money. That doesn’t mean that you can just grab the book and money is pouring out but the books describes in depth each step in writing copy and explains strategies in detail.

Analysis is the art of asking the right questions and letting the problem dictate the right answers.

Mass desire

  • copy channels desire onto a particular product but doesn’t create it
  • Mass desires are the pubic spread of private wants
  • Using these trends allows for leverage
  • a) permanent forces: health, -technical problems => differentiates of the product + freshness
  • b) forces of change: detect & chart possible trends

Stage I: Choose the most powerful desire that can possibly apply to your product

Each desire has three dimensions:
a) urgency, intensity, degree of demand to be satisfied aka. pain level
b) staying power, degree of repetition, the inability to become satiated aka. frequency of pain
c) scope aka. how many people have this problem

Stage II: Acknowledge the desire (reinforce it / offer means to satisfy) in the headline

Stage III: Show how your product performances satisfy the desire

a) Start by listing all different performances it contains and group them against the mass desires each satisfies

Your prospect’s state of awareness

You copy connects the market with the product. Your headline is the first step.

The headlines is based on three questions:

a) What is the mass desire that creates this market?
b) How much do these people know about the way your product satisfies this desire?
c) How many other products have been presented to them before yours?

How aware is your prospect?

I) Customer knows your product and what it does and knows he wants it
II) Customer knows the product but doesn’t want it yet

Your headline should focus on one of these tasks:

a) reinforce desire
b) sharpen / extend the image of the product
c) introduce new proof / details
d) announce new mechanism for better satisfaction / elements former  limitations
e) completely change the image (USP)

You use the brand name / logo and point out the product’s superiority

III) Customer knows that the wants the product but he doesn’t know yet that there’s a product

IV) Customer has a need but doesn’t understand the connection between him and the product

Start with the need / solution in the headline. Dramatize the need and present the product as the inevitable solution

V) Prospect isn’t aware of his need or he won’t admit it // need is very general

a) Price means nothing yet
b) The name means nothing
c) Function and desire mean nothing

You are echoing your market (emotional, attitude). You are defining them for themselves. The reader has to own the headline: his headline, his problem, his state of mind.
You’re not selling the product, you are selling the ad. Your goal is that they keep on reading to that they can get through each awareness phase.


The young Lincoln, poring over borrowed school-books far into the night – seeking in the dim light of his log fire the transforming light of knowledge – eager to grow – eager to do . . . here is an example which has inspired the man who strives against the odds of circumstances to make his place in the world.
To-night, in cities and towns and villages . . . thousands of men will drop their daily labors to fight, beneath the lamp, the battle that Lincoln fought. . .
Up from the mines, down from the masts of ships . . . from all the places where men work, they will go home and take up their books because they yearn to grow, because they seek higher training, greater skill, more responsibility. . .
Some of them are men who work in one field whereas their talents and desires are in another. Some . . . are halted in their progress because they do not understand the higher principles of their business or profession. Some left school in boyhood because poverty made it necessary. . .
Fifty years ago these men . . . would have had no place to turn for the courses of study and for the personal guidance that they need.
Thirty years ago there was founded a school to help them – a school created for their needs and circumstances – a school that goes to them no matter where they are – a school . . .
Created in response to a need, the International Correspondence Schools have developed their scope and usefulness to the growth of that need . . .

How many products have been there before you?

I: First to market

If prospects learn about your product, they become more interested, more enthusiastic and believe more

Be simple, be direct, don’t be fancy; dramatize the claim, bring your product and prove that it works

II: You’re second

If the direct claim (I) still works
copy it and enlarge on it; drive it to a limit

III: People already bought products and (II) is at its limit

People accept their fate but still have the desire; they are looking for something new
Introduce a new mechanism; shift from what the product does to how it works; reduce the claim from (II) down and integrate it; e.g. „I am 60 pounds lighter“ => „lose fat“; integrate the claim into your first paragraph

IV: Elaboration on the new mechanism

Make it easier, quicker, surer, solve more problems, overcome old limitations, promise extra benefits (like II)

V: Dead market

Use the technique of fifth awareness phase

38 ways to strengthen your headline

I. Verbalization

Reinforcing a claim by binding other images to it

  • Measure the size of the claim
  • Measure the speed
  • Compare it
  • Metaphorize it
  • Make the prospect feel, seek, touch, see or hear it
  • Show prime examples
  • Dramatize the claim / results
  • Use paradoxes
  • Remove limitations
  • Use people / values the prospect wished to be identified (celebs, professionals, etc.)
  • Show how much the claim does in detail
  • Use a question
  • How to
  • Use authority
  • Before – After
  • New, Now, announcing
  • Stress exclusivity
  • Turn the claim into a challenge for the reader (Does she or doesn’t she? Which?)
  • Use quotations
  • Symbolize the claim / find parallels
  • Use contradictions to common sense
  • Offer information
  • Give the problem / need a name
  • Warn about possible pitfalls if the reader doesn’t use the product
  • Break the claim into two sentences or repeat (part of) it
  • Compare your product to other usages (if you can count to …)
  • State the difference
  • Surprise the reader that former limitations that have now been overcome
  • Address people who can’t buy your product (If you already…)
  • Address the prospect directly
  • Dramatize how hard it was to produce the claim (When X did A we had to …)
  • Accuse the claim of being too good
  • Challenge the prospects present limiting beliefs
  • Turn the claim into a Q&A

The Art of Creative Planning

I: Word-Substitute technique: Use headline substitute words
II: Use formulas
III: Analytical approach (see above)

A man will not visualize future disasters occurring to himself, but he is perfectly capable of visualizing, and buying preventative from, the image of such future problems affecting others around him.

Inside your prospect’s mind — what makes people read, want, believe

I. Desires

expand, sharpen, channel them and give them a goal
Your prospect must want

II. Identifications

roles or traits the prospect wants
your product must represent

III. Beliefs

opinions, attitudes, prejudices, etc your prospect lives by
your product must fit


  • fill out vaguest desires with concrete images
  • your writing the scripts of your prospect’s dreams (xI000)

When limited space:

  • Compression: boiling down into key words
  • The campaign: Repetition of key words with progression

I. Present the product / result directly by a thorough, completely detailed description of its effect

II. Put the product in action / describe what will happen to him

  • Let your reader visualize himself proving the performance of your product (provide a test) in the most specific and dramatic way

  • Extend the vision over a longer time horizon

  • Viewpoint from someone your reader can identify with (ordinary people, experts, celebs)

  • Use the disadvantages of the old product as compare it to the new one

Rereading hacker news, April 2009 – Sep 2011

April 2009 to September 2011 was my first absent period of tech. In this time I spent most of my time with economics and politics. I want to make up the leeway by reading good articles which I missed back then.

I decided to use hacker news as my source in the hope that most good articles were posted here.

The first thing that surprised me how few concrete tech articles are in the top ones. Most of the stuff are gimmicks or ‘feels’ stories so far. Also a ton of news articles which isn’t surprising. The most surprising fact was that the best articles in my opinion were the mildly popular ones. I read about 1500 headlines, skimmed about 150 articles and these were the most interesting things I found:

This is a beautiful post which shows how important randomization is in cryptography.

Jerry didn’t seem to care. I was confused. I was showing him technology that extracted the maximum value from search traffic, and he didn’t care? I couldn’t tell whether I was explaining it badly, or he was just very poker faced.


I remember telling David Filo in late 1998 or early 1999 that Yahoo should buy Google, because I and most of the other programmers in the company were using it instead of Yahoo for search. He told me that it wasn’t worth worrying about. Search was only 6% of our traffic, and we were growing at 10% a month. It wasn’t worth doing better.


  But they had the most opaque obstacle in the world between them and the truth: money. As long as customers were writing big checks for banner ads, it was hard to take search seriously.

This is a great insight. Some call it the golden cage. You feel so good that you don’t care about possible threats anymore.

  That’s why Yahoo as a company has never had a sharply defined identity. The worst consequence of trying to be a media company was that they didn’t take programming seriously enough. Microsoft (back in the day), Google, and Facebook have all had hacker-centric cultures. But Yahoo treated programming as a commodity. At Yahoo, user-facing software was controlled by product managers and designers. The job of programmers was just to take the work of the product managers and designers the final step, by translating it into code.


  In the software business, you can’t afford not to have a hacker-centric culture.

Your usefulness as a developer is only indirectly related to your ability to code. There are bona fide geniuses working in poverty and obscurity, there are utterly mediocre programmers doing amazingly useful and important work. Github is overflowing with brilliant, painstaking solutions to problems that just don’t matter. Your most important skill as a developer is choosing what to work on. It doesn’t matter how lousy a programmer you are, you can still transform an industry by simple merit of being the first person to seriously write software for it. Don’t spend good years of your life writing the next big social network or yet another bloody blogging engine. Don’t be That Guy.


Nifty trick. It could be especially interesting in combination to longer articles.

Lots of threads about the decline of HN:

I talked with Ward Cunningham once about this – any good community helps you to grow, but after a time you outgrow it. Perhaps they should be like a book – you read them, and then after that you dip into them for a bit, then less often, and eventually you don’t pick them up again.

I experienced that myself quite some times. You just outgrow communities over time. While some are great for beginners you’ll get annoyed after some time not progressing and then you start switching your community.

But there are also many valueless comments that nevertheless get upvotes, and there’s definitely a more snarky feel. I’ve felt myself being dragged into that at times and had to pull myself back. That didn’t used to happen.

See Reddit or every publicity in general.

Upvotes need to be weighed by karma, and karma of exemplary members of the community needs to be seeded by you (and other exemplary members). This way cliques of mean/non-insightful users can upvote each other to their heart’s content without making any appreciable difference in their karma value.

I found this an interesting idea. And wondered if you can rank comments by something like Pagerank. Would be interesting to implement and test that.

Your only chance, really, is to build something which can spread like a virus after being announced on a col-de-sac party. Something utterly addictive, unusual and truly amazing. A great self-selling, self-propagating viral-on-steroids idea (assuming you can code) is your only chance to succeed.

If you want to make it big fast I agree. My soundboard is an example of that. It blew up and now it gets around 160K visits per month. I didn’t advertise it but just hit a nerve. There was a trend, there was demand and I supplied it.

In Breakthrough Advertising Eugene Schwartz wrote about a similar thing – about riding waves. It’s a great book I have my notes somewhere lying around. However, it isn’t the only way to success.


jdietrich wrote:

You seem to have been terribly misled. Only very rarely do products sell themselves. 99% of the time, the product is largely incidental to the sales process. Your idea doesn’t matter one jot, what matters is how well you can connect to customers and really sell to them.

And here’s the other side. Hard work but it can pay off.

Interesting article about using perceptual hashes for image recognition. I love the simpleness of the average hash algorithm. The author also talks about pHash which was used to crack Google’s captcha.

Programmers are most effective when they avoid writing code. They may realize the problem they’re being asked to solve doesn’t need to be solved, that the client doesn’t actually want what they’re asking for. They may know where to find reusable or re-editable code that solves their problem. They may cheat. But just when they are being their most productive, nobody says “Wow! You were just 100x more productive than if you’d done this the hard way. You deserve a raise.” At best they say “Good idea!” and go on.

Good insight. That’s something that can’t be seen normally because there’s only one outcome. I wonder how you can visualize that added value.

Angry Bird’s “overnight success” just took 8 years

Tiktaalik wrote:

Blizzard for example had mild success with Rock n’ Roll Racing and Lost Vikings prior to Warcraft 2. […]

Nintendo made lots of arcade games since 1973, many being blatant clones of successful titles, before striking gold with Donkey Kong in 1981. Some of these may have sold fairly well, but the titles are ignored today so they couldn’t have been all that good. […]

Pokemon developer Game Freak seems to have had it pretty rough prior to hitting the big time with Pokemon. The company has existed since 1989 and they put out a number of relatively unknown games before Pokemon in ’96. Pokemon wasn’t a strong seller at the beginning either.

Batsu wrote:

Harmonix (creators of Guitar Hero, which they sold, and Rock Band) has a similar story. They created a handful of games over a decade or so, all music based, that never really caught on. When they released Guitar Hero and a few karaoke games, they did a little better than breaking even, and with the release of Guitar Hero 2 sales exploded.

Yup, it can take quite long.