Non-solicitation clause considered immoral

I hope I am not unusual in that, whenever I join a company, I actually read the Employee Agreement. One term that is becoming increasingly popular is the (generally overbroad) non-solicitation agreement, designed to prevent employees from “solicitation” of colleagues after they depart from the company. Their purpose is to prevent “talent raids” whereby well-liked people encourage their colleagues to move along with them to their next company. By doing so, they create a culture in which to present an employee with a better opportunity is treated as comparable to stealing corporate property.

First, let me state that the fear of “talent raids” is vastly overstated. Recruiting’s hard, yo. No one is “raided” from a company. A person does not get “stolen” from a $140,000-per-year software job and forced to throw 75 hours per week into a risky startup. People move from one job to another when they perceive a better opportunity at the new job. That’s it. As long as the latter opportunity is represented honestly and properly, nothing wrong is happening.

I’m a veteran talent raider. I’ve helped startups hire brilliant people I met in middle school through national math contests. I’m also extremely ethical about it. If I don’t respect someone, I don’t want him or her in an organization that I respect. If I do respect someone, I’m going to do everything I can do to provide all information (positive and negative) about an opportunity. This isn’t a bullshit “I’m not selling” defense. I consider it a success when I sit down with a friend, tell him about an opportunity that I think is great, give him all the information he’ll need to make his decision, and he appreciates the information but rejects it. It means that I’ve done my job well. When I’m talent raiding, I’m usually trying to convince someone to make a risky move, and most people don’t like risk. So a conversion rate of 60 percent (which would be very high) would suggest that I’m doing something seriously wrong. Overpromising to a person whose talents and character I respect is the last thing I want to do. Careers last a lot longer than jobs, and companies can decay so rapidly (management changes) that sacrificing a relationship to improve a job is just a terrible idea.

Unethical solicitation I despise. It’s unethical when the company’s prospects, the role into which the person will be hired, or the type of work the person will be allocated, are overstated. This is, of course, not a behavior limited to small companies or intentional talent raids. It’s very common for companies of all kinds and sizes (as well as managers within generally ethical large companies, as I found out recently) to pull these bait-and-switch antics. There’s no legal recourse against companies that do this– and there shouldn’t be, as companies have the right to end projects and change priorities. If contract law doesn’t cover bait-and-switch, then what is the socially useful purpose of non-solicitation clauses? Absolutely none.

Of course, companies don’t have non-solicitation clauses to prevent unethical talent raids, and those clauses aren’t in place to protect employees (ha!). In fact, these companies would rather see their people lured away on false pretenses: they can hire them back. They’re much more afraid of ethical talent raids in which the employee is presented with a genuinely better opportunity. This represents an attitude in which employees are considered to be property, and it constitutes restriction of trade.

Worse yet, non-solicitation contracts discourage startup formation. If the “talent raider” moves to a large company like Google, he can reconstruct his team behind the scenes, but if he moves to a startup, he faces the risk that the non-solicit will actually be enforced. History does not know how many great startups have never formed because people were scared off by non-solicitation clauses.

These need to be ended. Now.

Lottery design: how I’d do it.

Here are some thoughts I’ve had on how I would design a lottery if it were my job. I find computer programming and real game design to be more fulfilling than the design of these sorts of mind-hacking gambling games, which is why I would consort with a cactus before I’d ever work for Zynga. That said, someone has to do that job. Here’s how I’d do it if it were mine.

A toy example is the mathematically interesting, but impractical, “no-balls lottery” driven by “strategic luck” (to use a game-design term). It works like this: at each drawing, players choose a number between 1 and N (say N = 60). It costs $1 to play, and the payout for choosing the winning number is $N. Where’s the house edge? The winning number is not chosen at random; it’s the one chosen by the fewest number of people (with ties either split or resolved randomly). What’s cool about this lottery is that it has the appearance of being “fair” (zero expectancy, no house edge) but it produces risk-free profit for the house no matter what, because the winning choice will always be chosen by less than 1/N of the players. The more uneven the distribution of choices is, the better the house does. Game theory (Nash equilibrium) predicts that we’d see a uniform distribution of choices over time; I have no idea how it would actually play out. The house edge would unlikely be enough to cover administrative costs, but it’d be an interesting social experiment.

At any rate, the press loves lotteries. Not the small, reliable, boring kind, but the big ones. The $640 million jackpot for the MegaMillions has been a major news item of late– it’s the largest U.S. jackpot lottery in history. I even chose to play, mainly for epistemological reasons related to recent and extremely unusual events in my life that lead me to suspect supernatural trolling. Let me explain. There’s somewhere above a 99.999% chance (call this “prior” p) that the universe acts the way we think it does, and that there’s no correlation between balls drawn at a lottery and personal events in my life. It’s actually very likely that the correct value of p is much higher than 99.999%. I can’t put a true probability on it for the same reason I can’t put one on religious questions: probability enables us to reason about uncertainty of known structure, and this is about uncertainty of unknown structure. That said, there’s a 1 – p chance that the universe is deeply weird, that it has the tendency to troll the fuck out of people, and that playing the lottery right now (only right now, because this is a singular moment) might lead to profit. I don’t know what this “1 – p” is, but I’m willing to pretend, for the moment, that it’s high enough to buy a few lottery tickets.

(Technically speaking, the MegaMillions already has positive expectancy. This is practically irrelevant, as it is for the notorious St. Petersburg lottery. Almost all of that positive expectancy is concentrated in the extremely-low-probability jackpot and, between taxes, split jackpots, discount rates applied because lottery payouts occur over time and, far more importantly, the extreme concavity of the utility curve for money, I don’t know that it has a meaningful expectancy. I’m buying because, despite my scientific training, weird events cause lapses into superstition.)

A lot of people think the way I do, and the vast majority of them never win lotteries. People are very bad at managing low-probability events. Cognitive biases dominate. What actually ruined my interest in the lottery, as a child– my dad played about once a year, and let me pick numbers– was realizing that a Super-7 outcome of {1, 2, 3, 4, 5, 6, 7}, which “would obviously never happen” was precisely as likely as for me to pick winning numbers. (Actually, {1, 2, 3, 4, 5, 6, 7} is a bad play because of split jackpots. Dates are common fodder, so pick numbers 32 and higher if you want to minimize that risk.) Moreover, this type of magical thinking tends to surround the largest lottery jackpots, which appear “historic”. Of course, I know how silly it is to think this way, because large jackpots are nothing more than an artifact of Poisson processes and very long odds: it would be possible to build up a $5 billion jackpot (assuming people would play) just by designing the lottery so that the odds of winning are very small.

So if I were designing a lottery, how would I do it? Let me say that I’m ignoring the ethical question of whether I think gambling and the lottery are good things. I’m assuming the position of a person who thinks lottery gambling provides a social value. (My actual position is more uneasy.) I would not be happy to design some small scratch-off game. I’d want to build the lottery responsible for the first billion-dollar jackpot.

First, 7 balls is too many; the ideal number seems to be 5 or 6 (short-term memory). Two-digit ball ranges are also desirable, with 50 to 60 being typical. Numbers in the 50s seem moderate on account of the “inverse Benford effect”, whereby numbers with leading digits of 5 and 6 seem “moderate”. (Falsified financial figures tend to lead with ’5′ and ’6′ digits, although log-normally distributed real-world variables should lead with ’1′ over 30 percent of the time.) A typical 6-ball lottery, with 50 balls, gives odds of 15.9 million to 1. That’s clearly not enough. It might produce a piddling $30 or $40 million jackpot on occasion. Congratulations: you’ve earned ten months’ salary for an upper-echelon corporate scumbag (and by waiting in line for 3 minutes for that ticket, you’ve had to do more work than that well-connected blue-blooded shit has done in his whole life). Since it’s long odds that produce large jackpots, how do we push those odds into the billions?

The idea’s already there. Consider the 6-ball lottery that I described. The odds can be made 720 times longer by distinguishing or ordering the 6 balls. This is how the Powerball and MegaMillions work. One ball is distinguished as “special”. This makes the lottery more “fun”/engaging, and it makes the odds of choosing a perfect ticket longer. My target, in designing this lottery, is going to be to aim for odds in the 1- to 2-billion-to-1 range.

First, I think we’re ready for two distinguished balls, one red and one green. In fact, we’ll need that to get the kinds of long odds we want. The range for each is going to be 1 to 31. Why 31? Because, from a design perspective, it fits. One of the most common sources of lottery numbers is dates, so why are we cluttering up the card with these higher, less useful, ungainly numbers? For the other four balls, however, we need a wider range: 1 to 80. Yes, 80 puts us afoul of the “inverse Benford effect”, but we’re selling a premium product, so 80 is appropriate.  How many possible tickets are there? 80!/76!*4! * 31 * 31 = 1,519,898,380. With 80% of ticket revenues going into the non-discounted dollar amount jackpot (which means we’re actually only putting about 50% in, because we’re paying an annuity over about 25 years) we’ll be seeing billion-dollar jackpots on a regular basis. Not only that, but we’ll be seeing $1-billion non-split pots on a regular basis. For the first time ever, we’ll be minting billionaires from a lottery.

Of course, it’s the jackpots that bring ticket-buyers in, but it’s the small prizes that keep them coming back. The prize is a free ticket if you hit either the red or green ball (16:1), $100 if you hit them both (961:1). (A $100 payout on 1 in 1000 tickets, for jackpot lotteries, is unheard-of.) We’re paying 16 cents on each ticket there, but I think it’s worth it to keep continued engagement. We also want to make the second-to-top small prize large: $1 million for a ticket that matches the 4 white balls and one of the colored balls. The odds of that are 25 million to one, so we’re paying 4 cents per ticket there. We can shave expectancy on the middling prizes, which will be low compared to the odds against them. No one really looks at those, anyway. It’s the frequently-won small prizes, the second-best prize, and the jackpot, that actually matter.

Here’s why I think we should do this. Here’s the real ideology behind what I’m suggesting. I don’t care much either way about lotteries. Nor do I have a need to make that kind of money off people who, in general, need it more than I do. I do think Instant Games are a bit unethical (pathological gambling, and the fact that winnings almost always go into buying more scratch-off tickets, often on the same day) but also I think that, compared to alcohol, tobacco, and trans fats, lottery tickets are one of the less harmful things sold in most convenience stores. This said, the lottery I described is a starter in giga-lotteries: 1.5-billion-to-1 odds, three-digit millionaires and billionaires being made out of random people on a regular basis. Sure, the odds are very long, but most lottery players don’t give a damn about the odds: they’ll play as soon as they see $500-million jackpots, for the novelty. I do it, just to see the huge numbers. It’s gossip. But to paraphrase Justin Timberlake, a billion dollars isn’t cool (or won’t be, after it becomes commonplace). You know what’s cool? A trillion dollars. Or, at least, $85 billion or so. U.S. lottery revenues are about half that, but I think we can do more. Way more, once we establish a lottery where billion-dollar jackpots are the norm.

I don’t care here, as I said, about revenues. My goal isn’t to make money off of peoples’ cognitive biases with regard to low probabilities. It’s not to get rich. (Since I can’t legally implement this idea– only governments can– I never would.) Making money isn’t the goal. We should shove as much of our ticket revenue into the jackpot as possible. Rather, the goal is to make huge fucking jackpots. Two distinguished balls (one red, one green) is just the start. For the real act, we can have six different colors (white, red, gold, blue, green, and silver). This colorful lottery will be so engaging and so well-hyped (once $10-billion jackpots are old hat) that we can charge $5 per ticket. The ranges on each ball will be 1 to 84. We’ll need a lot of high-profile small prizes, and a two- or even three-tier jackpot system will be in order, as the odds of a perfect ticket will be 351 billion to 1. Top-tier jackpots will swell and swell and swell, building for months and growing exponentially. We might have to make this a world lottery to get a winner a couple times per year or so. But at some point, however, someone out there will win a huge amount of money. It will take a long time to get there, but a trillion-dollar jackpot will, at some point, happen.

What’s the redeeming social value of a trillion-dollar jackpot? Complete and total humiliation of the world upper class. Mockery of the world’s most destructive dick-measuring contest. A person, chosen completely-the-fuck at random, being catapulted to the top of the Forbes 500 for no fucking reason whatsoever. So fucking awesome. I would buy $1000 of these fucking lottery tickets every month and hand them out to the most undeserving randoms, solely in the quixotic, long-shot pursuit of the noble goal of humiliating every single private-equity asshole on Park Avenue at once by having a lottery player out-win all of them by orders of magnitude.

Is this evil? I’m not sure. I don’t actually want to see this experiment happen. I fully support humiliation of the existing upper class, but this sort of extreme lottery would just create a new upper class. The only difference is that this would be an elite made for no reason, as opposed to our current elite, which exists for mostly bad reasons. Moreover, I just don’t think it’s the best use of my time and talent to encourage mathematically naive people to pump trillions of dollars into a process of no social value.

The objection I have to it, again, isn’t gambling: we gamble all the time. Every blog post I write has an effect on my career– mostly positive, in that I can establish myself as knowledgeable about technology, progressive management, mathematics, software engineering, and computer science– but potentially negative, as well. This post, in which I describe the application of game design talent to an extremely perverted social project, is probably riskier to me than buying a few hundred lottery tickets. And this blog post, unlike the MegaMillions, has no chance of ever earning me $640 million.

There is another problem with this trillion-dollar lottery (TeraTrillions, and I am fucking trademarking that name). I am afraid that someone would fucking Occupy that shit.

Radical Transparency #1: who gets fired, how, and why.

Personal note: I wrote the bulk of this material in February 2011. I recently left a job (from which I was not fired) and admit the timing is less than perfect. There’s no connection between this essay and my personal situation, although its insights are derived from dozens of observations over the past 6 years.

I’m writing this post for a political purpose, not a personal one. Namely, I wish to provoke an epic showdown between the cognitive “1 percent” and the socioeconomic “1 percent”– a pleasant euphemism in the latter case, since it’s really 0.1% of Americans who are in access to make major decisions. I wish to force this conflict as fast as I can I believe technological trends are in our favor and we will win. It is not enough to defeat the socioeconomic “(0.)1 percent” as a class or as individuals. It is far more important that we dismantle the ugly world that they have created. If we destroy them personally but not the execrable processes they’ve set in motion, others will step up to replace each one we remove from power. We need to change the processes, which involves changing the discussion. Radical transparency is the first step toward doing this. 

I’m going to shed some light on the processes by which people are separated from companies. Involuntary termination. Layoffs. Getting fired. Shit-canned. Pink-slipped. There’s obviously a lot of nastiness surrounding this function, despite its absolute necessity to the health of an organization. I don’t intend to say that firing people is mean, or wrong, or unethical. Far from it, it’s something that all organizations will need to do from time to time. Some people are frankly toxic or unethical, and others are just not able to perform well within the organization, and must be let go.

In fact, I’d argue that the results of what happens when incompetent people are rarely fired can be seen in U.S. politics, where we face one of the most disastrously ineffective legislatures in human history because voters are so bad at firing idiots. Political officials are subjected to periodic elections (360-degree performance reviews) which are supposed to be intensely competitive. Yet the incumbent-victory rate is astonishingly high: over 95 percent in American political elections. The job-loss rate of political officials is less than 2 percent per year, despite their poor performance. In finance and technology, even people who are extremely good at their jobs have higher risk of involuntary termination than that. That contrast, I consider illustrative. For reasons like this, I will never say it is wrong to fire people, although it’s important to be decent about it. More on that later.

Two years ago, one of my friends was served with a Performance Improvement Plan (PIP) issued to him from a large company. If there is a TPS Report Museum, there must be an entire wing dedicated to PIPs. I’ll say one thing about these: they should never be used, and they don’t work. The first way in which PIPs fail is that they don’t work at improving performance. A manager who genuinely wishes to improve an employee’s performance will address the matter, one-on-one, with the employee in a verbal meeting (or series of meetings) where the intention is discovering the cause (“blocker”) of low performance, and decide either (a) to resolve this problem, if it can be done, (b) to accept transient low performance if the cause is a temporary one such as a health problem, or (c) to determine that the problem is irresolvable and terminate the employee (preferably in a decent way). On the other hand, written negative communication about performance (formalized most finally in a PIP) is universally interpreted as an aggressive move and will lead to distrust of the manager, if not outright contempt toward him. As soon as a manager is “documenting” negative performance, the relationship between him and his report has failed and he should progress immediately to a decent termination. Never PIP. Fire, but do it right.

What’s a decent termination? It’s one in which the employee is allowed to resign, provided with a positive reference (both in writing, to guarantee it, and verbally when needed) and a severance package equal to between 1 and 1.5 times the average duration of a typical search for jobs of that kind (between 2 and 3 months for junior-level positions, and 6 to 9 months for executives, and with an additional multiplier to 1.5-2 granted to those who are “overexperienced”) to compensate the employee for the unexpected job search. Of course, companies have no legal obligation to any of this, but it’s the right way of doing things. In fact, because financial pressures can result in a suboptimal job search, I’d argue that severance (when the cause issue is fit or performance rather than unethical behavior) is an ethical obligation.

Speaking of this, a lot of extremely unethical things happen in American workplaces, and that is a result not of “bad people”, but the bulk of this behavior comes from morally-average people who are scared. One of the things people fear most at work is a sudden, unjust, badly-structured termination that leads to a long-term career problem. This fear motivates a lot of the bad activities that occur in workplaces that lead to unsafe products and defrauded customers. The best thing a company can do for its culture, and for its macroscopically visible good citizenship, is to establish a policy of managing terminations in a proper way– to say that, yes, we’ll fire people whose poor performance constitutes an unacceptable cost to us, but we’ll always do so in a way that ensures that good-faith low performers (i.e. decent people who are a bad fit for their role) move on to more appropriate jobs.

How does a PIP actually affect performance? First, it destroys the relationship between the manager and the employee, who now feels “sold out”. If claims in the PIP suggest that others contributed to it, it may destroy the working relationship between the employee and his colleagues, causing isolation. PIPs usually carry a biased or even inaccurate summary of the employee’s work as the motivation for the Plan. Second, PIPs often generate a lot of additional work for the employee, making it harder to perform. A PIP usually contains deadlines equivalent to a 40-hour per week work schedule. This seems reasonable, except for the fact that many work demands are unplanned. An employee who faces responsibility for an emergent production crisis during a PIP will be forced to choose between the PIP work or the emergent crisis. A PIP’d employee ends up actually ends up with four conflicting jobs. The first is the work outlined in the PIP, which is already a 40-hour obligation. The second is any emergent work that occurs during the PIP period (which is usually unspecified in the PIP, but claimed to be covered by a vague “catch-all” clause). The third is the legalistic fighting of the PIP– the employee must contest false claims about his performance or the company will represent him as having agreed with them, which damages his position if he ends up in severance negotation. The fourth is the job search process, which must be commenced right away because the PIP usually ends in termination without severance.

This brings us to the real purpose of PIPs, which is to legally justify cold-firing employees. The PIP is the severance package. Defenders of PIPs represent it as cheaper (and it’s not, because of contagious morale effects) to keep a burned-out, miserable employee in the office for a month or two than to fire him and pay a 3-month severance package. Employees who are terminated under a PIP are usually granted no severance, because their termination is “for cause”. There’s a lot of intimidation that usually goes on here. Because the PIP is confidential, employees are usually told they will be breaking the law if they show the PIP to anyone, even an attorney. (Not true.) They’re also told that they can be terminated “for cause” (read: without severance) and that it will damage their ability to get a reference if they don’t sign the PIP, damaging their ability to contest it later. This one is true (employment is at will, and severance is not a legal obligation) but a company that gives a bad reference, especially for retaliatory reasons, will not fare well in court.

I was once privy to managerial statistics at a large company. Over a 12-month window during a time of average job fluidity, 82 out of 100 of PIP’d employees left their jobs within the duration (30-60 days) of the PIP. These might be judged to be “success” cases (they left) but if this was the desired outcome, it could have been suggested in an in-person discussion without involving nasty paperwork. In another 10 cases, the employee fails the PIP and is usually fired. In 6 more cases, the PIP is ruled “inconclusive” because of factual inaccuracies, or because the PIP’d employee is able to garner support from elsewhere in the organization, and transfer to a more sympathetic manager, who kills the PIP. Only 2 actually “pass” the PIP. Also, a PIP’d employee is likely to face another PIP within six months if he stays with the same manager, while most managers don’t want to take a chance on someone who faced a PIP (even successfully) because, statistically speaking, an unblemished new hire is a better bet.

My advice to PIP’d employees is as follows. As I said, you’ve got 4 jobs now: (a) the PIP work, (b) emergent work, (c) legalistic fighting, and (d) finding another job in the event of failing the PIP. Regarding the first, don’t blow off the PIP work entirely, or at least not openly. It may seem like it’s pointless to do this work (and it is, because your future at that company has ended) but one needs to show a good-faith effort in any case. PIPs are not guarantees of employment during the specified duration; they can be “closed” early if it is judged as obvious that the employee will not meet the PIP’s deadlines. However, in the rare case that the PIP is actually fairly structured and you can complete it in time, do not use the “surplus” to move forward on the PIP work. Instead, use this time to learn new technologies (for the job search) and contribute to open-source projects (only on your own resources). Even if you pass the PIP, your days are numbered. Regarding the second, request in writing that the manager place any emergent responsibilities on the PIP calendar. Now is the time to document everything and be a pain in the ass. If he ignores these requests, you can make a case to HR to rule the PIP inconclusive, buying you time until the manager’s next opportunity to be PIP (usually a quarter or two later) you comes along. You should have a new job before that happens. On the third of your four jobs– the legalistic wrangling– document everything, but keep communication terse, objective, and professional. Don’t spend more than an hour per day on it, but if you can waste your manager’s time with HR paperwork in the hope of getting the PIP ruled inconclusive, do it. The fourth of these– the job search– is where one’s highest priority should be focused. Represent interviews (in email; again, document everything) as doctors’ appointments. This is also a great opportunity to disclose health issues, which reduces the probability of being fired without severance.

My advice for companies or managers considering the use of PIPs. Don’t. Sure, you’ve got version control and backups, but do you really want an essentially fired employee in the office for a month? It’s amazing to me that companies have security escort employees out of the building when they are officially terminated (at which point the shock has passed and emotions are likely to be resolved) but keep them in the office for months on PIPs, when they are effectively fired. PIP’d walking dead are far more damaging to morale than terminations.

Finally, my advice for employees who actually get fired is simple. Don’t be a dick. Disparaging firm-wide emails will ruin your reputation, and property damage is illegal and fucked-up and wrong, and therefore not in your interest at all. Depart cordially. On references, there are two kinds: unofficial (which can be a peer you select) and official (manager or HR). Usually official references say very little, but have your reference from that company checked by a professional service and get an attorney involved if anything negative is being said about you. Cultivate positive relationships with colleagues after your exit. Most importantly, move on quickly. When asked about the previous job, stay professional and represent the termination as one that you initiated. If your ex-employer ever contradicts you and says you were fired, then congratulations: you get a huge settlement for a negative reference.

Also, don’t let it hurt your self-esteem. There are two rites of passage in the modern corporate world. The first is getting fired. The second is learning that getting fired is not usually a reflection on the employee (more on this later, on who gets fired). Your self-esteem will benefit if you experience the second before the first.

Ok, so that’s a bit about the process. It’s important for people to know this stuff, so they know how to box if the fight comes to them. Now, I’d like to shed some light on who gets fired. Low performers, right? Well, not always. Companies initiating impersonal layoffs for financial reasons will usually drop low-performing teams and businesses, but not all those people are individually low performers. Personal firings are a different story. These don’t occur because “companies” choose to fire these people; people do. So what are some of the motivations that lead to this? First, let me say that political (non-necessary) firings usually occur in the middle-bottom and middle-top of an organization’s performance spectrum. The bottom 10% are usually so used to lifelong, serial incompetence that they’ve mastered office politics as a survival skill. The top 10% are objective, visible high-performers who tend to have political clout on account of the value they add to the organization. The middle 60 percent rarely stick out enough to get into trouble. This leaves two deciles– the 2nd and the 9th– that are most exposed to personal terminations.

Second-decile firings tend to be “trophy firings”, initiated by managers who wish to impress upon higher-ups that they “take action” on low performers. They aren’t the worst people in the organization, and whether it’s of economic benefit to retain them is not strongly resolved either way, but they’re weak enough that if they leave the organization, they won’t be missed.

Ninth-decile firings are “shot-from-the-bridge” firings, initiated against a high performer by a jealous peer before she develops the credibility and capability to become a threat (i.e. graduate into the objectively and visibly high-performing 10th decile). These people are usually fired because they’re creative, passionate, and opinionated. Now, managers don’t initiate ninth-decile firings, at least not willingly. Managers want more people to be more like their 9th- and 10th-decile reports. Rather, those firings to be initiated by “young wolves”, who are typically same-rank co-workers, but sometimes insecure middle managers, who sabotage the target’s ability to perform. The textbook young wolf is Pete Campbell in the early seasons of Mad Men, the slimy and machiavellian junior account executive who lies and threatens his way to the top. (Disclaimer: I wish the term for such people wasn’t young wolves. I like wolves. I like them better than most people.)

A direct confrontation with a manager about a 9th-decile report is not a politically wise idea, because managers know that 9th-decile employees are highly valuable. So young wolves focus on giving the target some disadvantage in project allocation. Most technical teams have a “people manager” (who is savvy to political machinations) and a technical lead (who is not usually politically savvy, but has authority to allocate projects, make technical decisions that affect the team, and delegate work). Tech leadership is a hard role because (a) it involves a lot of responsibility with minimal glory, and often no additional compensation, and (b) tech leads are responsible as individual contributors in addition to their leadership role. Thus, the tech lead is usually overburdened, and young wolves usually cozy up to him, with the intention of “helping out” on work allocation. Then they start delegating impossible, discouraging, or unsupported work to the target, the 9th-decile employee they want to shoot from the bridge before they become 10th-decile. When the target’s performance drops (transiently) to about the 7th or 8th decile, they begin to speak about how she “does good work, but isn’t as good as we thought she’d be”. As she sees leadership opportunities and the most interesting projects receding from view, her motivation declines further. By the time she’s at the 5th or 6th decile (because she’s now beginning to look for other opportunities, and prioritizing work that benefits her external career) the party line is that she’s “not giving her best”, which is, by this point, entirely true and equally irrelevant to whether it’s economically beneficial to employer to retain her. Social rejection of her is encouraged through gossip about her being “not a team player” and whispered suspicions that she’s looking for employment elsewhere. When she enters the 3rd or 4th decile, the young wolves engage her manager and– if the manager is unaware of what’s happened (a young-wolf situation)– she receives the first official warning signs, such as negative feedback delivered over email instead of in spoken form. This is an aggressive move that confirms this now-declining employee’s suspicions that her future there is over. If she’s still working there (unlikely, in a decent economy) by the time she falls into the 2nd decile, she’s now a trophy-fire.

This process of targeted, intentional demotivation, prosecuted not by managers (whose interests are aligned with the success of the whole team) but by young wolves, can occur over years or over days, but it’s a discernable pattern that I’ve seen play out dozens of times. The problem is that “flat” managerial arrangements don’t work. I don’t like the alternative (official hierarchy) much, so I wish they did work, but they almost always fail. A “flat” organization means “we’re large enough that we need hierarchy but we’re too socially inept to have hard conversations”. In most cases, I actually think that large companies (for post-industrial knowledge work) are inherently broken, because neither the hierarchical model nor the flat model results in good products. Why is “flat” so bad? It means that a manager has a ridiculous number of reports (sometimes over 50) and that it’s impossible for him to be on the lookout for young-wolf behavior, which is immensely damaging to the company because it tends to drive out the most creative individuals. Young wolves thrive in environments of managerial inattention.

How does one combat a young wolf within an organization? As with any progressive, but curable, parasitic infection, early detection is the key. A decent manager who identifies a young wolf will send it to the pound and have it put down, but effective young wolves evade managerial detection for a long time. Defining the term helps, but there’s a danger here. If “young wolf” enters the business lexicon, it will just become a term of disparagement that young wolves use for their targets. The most effective young wolves, instead of declaring their targets “not a team player”, will instead attempt to paint their targets as young wolves. So here, I don’t have the answer, but I have a thought.

I’ve been coding for five years, and I’ve made a serious mistake. At this point, I have no open source contributions. Two and a half years I put into a failed startup that should have allowed me to open-source my work (30,000 lines of Clojure code to build a custom graph-based database, and some of the best technical work of my life) but because the CEO of that failed startup is a vindictive asshole who wishes to punish me for “leaving him”, so that work is gone. For this entire five years, I was a “company man”, pumping 50 to 60 hours per week of software effort into companies with which I no longer have a relationship. I have a “great resume”, but nothing in the open-source world to show that I can actually code. I’ll be just fine, and I’m going to take some time to write some open-source work, but that’s a serious regret I have over how I’ve spent the last half-decade. Why’s open-source software so important? Radical transparency. It provides a socially beneficial mechanisms for programmers to demonstrate, objectively, high levels of skill. It provides sufficient job security to the best programmers that they can fearlessly avoid most office politics and focus on work, which generally makes the quality of that work a lot higher.

I think radical transparency should apply within large workplaces as well. Many middle managers discourage line (i.e. non-managerial) employees from taking initiatives that would make them visible to other departments, for the fear that it would make them a “flight risk”. Managers of undesirable projects are aware that external visibility for their reports will lead to transfers, and managers of average projects are often insecure that their projects might be undesirable. Moreover, many companies discourage unmetered work, such as education, career development and extra-hierarchical collaboration (i.e. helping out other teams) which further isolates line employees. The result of this is that, for many employees, the manager is literally the only person who knows what the employee is doing. This gives the manager free rein to represent his opinion of that employee (which, if the manager has 25 reports, is very probably unreliable) as objective fact. Human Resources (HR) is supposed to ameliorate conflicts that occur when this leverage is abused, but the truth about HR representatives involved in manager-employee disputes (and terminations) is that they work for the company’s lawyers (and that’s why they think PIPs are a good idea) and no one else. At any rate, this pattern of dysfunction and outsized managerial power is sometimes called “manager-as-SPOF”, where SPOF is a technical abbreviation for “single point of failure” (the weak point of a system).

Manager-as-SPOF, isolation, and a lack of transparency about who is doing what allow socially manipulative twerps (young wolves) to succeed. In this kind of environment, 9th- and 8th- and 7th-decile performers get almost no visibility and are defenseless against a political campaign against them. The solution is to make the contributions of these employees visible. It’s to make everyone’s contributions visible and to foster an environment that makes many of the worst manifestations of office politics untenable. It’s to encourage employees to share their contributions with the whole company, and to work on things that benefit all of their colleagues– not just their managers.

A future RT post will focus on this: how to construct a radically transparent workplace, and what it would look like.

Why you can’t hire good Java developers.

Before I begin, the title of my essay deserves explanation. I am not saying, “There are no good Java developers.” That would be inflammatory and false. Nor am I saying it’s impossible to hire one, or even three, strong Java developers for an especially compelling project. What I will say is this: in the long or even medium term, if the house language is Java, it becomes nearly impossible to establish a hiring process that reliably pulls in strong developers with the very-low false-positive rates (ideally, below 5%) that technology companies require.

What I won’t discuss (at least, not at length) are the difficulties in attracting good developers for Java positions, although those are significant, because most skilled software developers have been exposed to a number of programming languages and Java rarely emerges as the favorite. That’s an issue for another post. In spite of that problem, Google and the leading investment banks have the resources necessary to bring top talent to work with uninspiring tools, and one willing to compete with them on compensation will find this difficulty surmountable. Nor will I discuss why top developers find Java uninspiring and tedious; that also deserves its own post (or five). So I’ll assume, for simplicity, that attracting top developers is not a problem for the reader, and focus on the difficulties Java creates in selecting them.

In building a technology team, false positives (in hiring) are considered almost intolerable. If 1 unit represents the contribution of a median engineer, the productivity of the best engineers is 5 to 20 units, and that of the worst can be -10 to -50 (in part, because the frankly incompetent absorb the time and morale of the best developers). In computer programming, making a bad hire (and I mean a merely incompetent one, not even a malicious or unethical person) isn’t a minor mistake as it is in most fields. Rather, a bad hire can derail a project and, for small businesses, sink a company. For this reason, technical interviews at leading companies tend to be very intensive. A typical technology company will use a phone screen as a filter (a surprising percentage of people with impressive CVs can’t think mathematically or solve problems in code, and phone screens shut them out) followed by a code sample, and, after this, an all-day in-office interview involving design questions, assessment of “fit” and personality, and quick problem-solving questions. “White board” coding questions may be used, but those are generally less intensive (due to time constraints) than even the smallest “real world” coding tasks. Those tend to fall closer to the general-intelligence/”on-your-feet” problem-solving questions than to coding challenges.

For this reason, a code sample is essential in a software company’s hiring process. It can come from an open-source effort, a personal “side project”, or even a (contrived) engineering challenge. It will generally be between 100 and 500 lines of code (any more than 500 can’t be read in one sitting by most people).  The code’s greater purpose is irrelevant– but the scope of the sample must be sufficient to determine whether the person writes quality code “in the large” as well as for small projects. Does the person have architectural sense, or use brute-force inelegant solutions that will be impossible for others to maintain? Without the code sample, a non-negligible false-positive rate (somewhere around 5 to 10%, in my experience) is inevitable.

This is where Java fails: the code sample. With 200 lines of Python or Scala code, it’s generally quite easy to tell how skilled a developer is and to get a general sense of his architectural ability, because 200 lines of code in these languages can express substantial functionality. With Java, that’s not the case: a 200-line code sample (barely enough to solve a “toy” problem) provides absolutely no information about whether a job candidate will solve problems in an infrastructurally sound way, or will instead create the next generation’s legacy horrors. The reasons for this are as follows. First, Java is tediously verbose, which means that 200 lines of code in it contain as much information as 20-50 lines of code in a more expressive language. There just isn’t much there there. Second, in Java, bad and good code look pretty much the same: one actually has to read an implementation of “the Visitor pattern” for detail to know if it was used correctly and soundly. Third, Java’s “everything is a class” ideology means that people don’t write programs but classes, and that even mid-sized Java programs are, in fact, domain-specific languages (DSLs)– usually promiscuously strewn about the file system because of Java’s congruence requirements around class and package names. Most Java developers solve larger problems by creating utterly terrible DSLs, but this breakdown behavior simply doesn’t show up on the scale of a typical code sample (at most, 500 lines of code).

The result of all this is that it’s economically infeasible to separate good and bad Java developers based on their code. White-board problems? Code samples? Not enough signal, if the language is Java. CVs? Even less signal there. The result is that any Java shop is going to have to filter on something other than coding ability (usually, the learned skill of passing interviews). In finance, that filter is general intelligence as measured by “brainteaser” interviews. The problem here is that general intelligence, although important, does not guarantee that someone can write decent software. So that approach works for financial employers because they have uses (trading and “quant” research) for high-IQ people who can’t code, but not for typical technology companies that rely on a uniformly high quality in the software they create.

Java’s verbosity makes the most critical aspect of software hiring– reading the candidates’ code not only for correctness (which can be checked automatically) but architectural quality– impossible unless one is willing to dedicate immense and precious resources (the time of the best engineers) to the problem, and to request very large (1000+ lines of code) code samples. So for Java positions, this just isn’t done– it can’t be done. This is to the advantage of incompetent Java developers, who with practice at “white-boarding” can sneak into elite software companies, but to the deep disadvantage of companies that use the language.

Of course, strong Java engineers exist, and it’s possible to hire a few. One might even get lucky and hire seven or eight great Java engineers before bringing on the first dud. Stranger things have happened. But establishing a robust and reliable hiring process requires that candidate code be read for quality before a decision is made. In a verbose language like Java, it’s not economical (few companies can afford to dedicate 25+ percent of engineering time to reading job candidates’ code samples) and therefore, it rarely happens. This makes an uncomfortably high false-positive rate, in the long term, inevitable when hiring for Java positions.

The U.S. upper class: Soviet blatnoys in capitalist drag.

One thing quickly learned when studying tyranny (and lesser , more gradual, failures of states and societies such as observed in the contemporary United States) is that the ideological leanings of tyrants are largely superficial. Those are stances taken to win popular support, not sincere moral positions. Beneath the veneer, tyrants are essentially the same, whether fascist, communist, religious, or centrist in nature. Supposedly “right-wing” fascists and Nazis would readily deploy “socialist” innovations such as large public works projects and social welfare programs if it kept society stable in a way they preferred, while the supposedly “communist” elites in the Soviet Union and China were self-protecting, deeply anti-populist, and brutal– not egalitarian or sincerely socialist in the least. The U.S. upper class is a different beast from these and, thus far, less malevolent than the communist or fascist elites (although if they are unchecked, this will change). It probably shares the most in common with the French aristocracy of the late 18th-century, being slightly right-of-center and half-hearted in its authoritarianism, but deeply negligent and self-indulgent. For a more recent comparison, I’m going to point out an obvious and increasing similarity between the “boardroom elite” (of individuals who receive high-positions in established corporations despite no evidence of high talent or hard work) and an unlikely companion: the elite of the Soviet Union.

Consider the Soviet Union. Did political and economic elites disappear when “business” was made illegal? No, not at all. Did the failings of large human organizations suddenly have less of a pernicious effect on human life? No; the opposite occurred. What was outlawed, effectively, was not the corporation (corporate power existed in the government) but small-scale entrepreneurship– a necessary social function. Certainly, elitism and favoritism didn’t go away. Instead, money (which was subject to tight controls) faded in importance in favor of blat, an intangible social commodity describing social connection as well as the peddling of influence and favors. With the money economy hamstrung by capitalism’s illegality, blat became a medium of exchange and a mechanism of bribery. People who were successful at accumulating and using social resources were called blatnoys. The blatnoy elite drove their society into corruption and, ultimately, failure. But… that’s irrelevant to American capitalism, right?

Well, no. Sadly, corporate capitalism is not run by “entrepreneurs” in any sense of the word. Being an entrepreneur is about putting capital at risk to achieve a profit. Someone who gets into an elite college because a Senator owes his parents a favor, spends four years in investment banking getting the best projects because of family contacts, gets into a top business school because his uncle knows disgusting secrets about the dean of admissions, and then is hired into a high position in a smooth-running corporation or private equity firm, is not an entrepreneur. Anything but. That’s a glorified private-sector bureaucrat at best and, at worst, a brazen, parasitic trader of illicit social resources.

There are almost no entrepreneurs in the American upper class. This claim may sound bizarre, but first we must define terms– namely, “upper class”. Rich people are not automatically upper class. Steve Jobs was a billionaire but never entered it; he remained middle-class (in social position, not wealth) his entire life. His children, if they want to enter its lower tier, have a shot. Bill Gates is lower-upper class at best, and has worked very hard to get there. Money alone won’t buy it, and entrepreneurship is (by the standards of the upper class) the least respectable way to acquire wealth. Upper class is about social connections, not wealth or income. It’s important to note that being in the upper class does not require a high income or net worth; it does, however, require the ability to secure a position of high income reliably, because the upper class lifestyle requires (at a minimum) $300,000 after tax, per person, per year.

The wealth of the upper class follows from social connection, and not the other way around. Americans frequently make the mistake of believing (especially when misled on issues related to taxation and social justice) that members of the upper class who earn seven- and eight-digit salaries are scaled-up versions of the $400,000-per-year, upper-middle-class neurosurgeon who has been working intensely since age 4. That’s not the case. The hard-working neurosurgeon and the well-connected parasite are diametric opposites, in fact. They have nothing in common and could not stand to be in the same room together. their values are at odds. The upper class views hard work as risky and therefore a bit undignified. It perpetuates itself because there is a huge amount of excess wealth that has congealed at the apex of society, and it’s relatively easy to exchange money and blat on an informal but immensely pernicious market.

Consider the fine art of politician bribery. The cash-for-votes scenario, as depicted in the movies, is actually very rare. The Bush family did have their their “100k club” when campaign contributions were limited to $1000-per-person, but entering that set required arranging for 100 people to donate the maximum amount. Social effort was required to curry favor, not merely a suitcase full of cash. Moreover, to walk into even the most corrupt politician’s office today offering to exchange $100,000 in cash for voting a certain way would be met with a nasty reception. Most scumbags don’t realize that they’re scumbags, and to make a bribe as overt as that is to call a politician a scumbag. Instead, politicians must be bribed in more subtle manners. Want to own a politician? Throw a party every year in Aspen. Invite up-and-coming journalists just dying to get “sources”. Then invite a few private-equity partners so the politician has a million-dollar “consulting” sinecure waiting if the voters wise up and fire his pasty ass. Invite deans of admissions from elite colleges if he has school-age children. This is an effective strategy for owning (eventually) nearly all of America’s decision makers; but it’s hard to pull off if you don’t own any of them. What I’ve described is the process of earning interest on blat and, if it’s done correctly and without scruples, the accrual can occur rapidly– for people with enough blat to play.

Why is such “blat bribery” so common? It makes sense in the context of the mediocrity of American society. Despite the image of upper management in large corporations as “entrepreneurial”, they’re actually not entrepreneurs at all. They’re not the excellent, the daring, the smartest, or the driven. They’re successful social climbers; that’s all. The dismal and probably terminal mediocrity of American society is a direct result of the fact that (outside of some technological sectors) it is incapable of choosing leaders, so decisions of leadership often come down to who holds the most blat. Those who thrive in corporate so-called capitalism are not entrepreneurs but the “beetle-like” men who thrived in the dystopia described in George Orwell’s 1984.

Speaking of this, what is corporate “capitalism”? It’s neither capitalism nor socialism, but a clever mechanism employed by a parasitic, socially-closed but internally-connected elite to provide the worst of both systems (the fall-flat risk and pain of capitalism, the mediocrity and procedural retardation of socialism) while providing the best (the enormous rewards of capitalism, the cushy safety of socialism) of both for themselves.

These well-fed, lily-livered, intellectually mediocre blatnoys aren’t capitalists or socialists. They’re certainly not entrepreneurs. Why, then, do they adopt the language and image of alpha-male capitalist caricatures more brazen than even Ayn Rand would write? It’s because entrepreneurship is a middle-class virtue. The middle class of the United States (for not bad reasons) still has a lot of faith in capitalism. Upper classes know that they have to seem deserving of their parasitic hyperconsumption, and to present the image of success as perceived by the populace at large. Corporate boardrooms provide the trappings they require for this. If the middle class were to suddenly swing toward communism, these boardroom blatnoys would be wearing red almost immediately.

Sadly, when one views the social and economic elite of the United States, one sees blatnoys quite clearly if one knows where to look for them. Fascists, communists, and the elites of corporate capitalism may have different stated ideologies, but (just as Stephen King expressed that The Stand‘s villain, Randall Flagg, can represent accurately any tyrant) they’re all basically the same guy.

Criminal Injustice: The Bully Fallacy

As a society, we get criminal justice wrong. We have an enormous number of people in U.S. prisons, often for crimes (such as nonviolent drug offenses) that don’t merit long-term imprisonment at all. Recidivism is shockingly high as well. On the face of it, it seems obvious that imprisonment shouldn’t work. Imprisonment is a very negative experience, and a felony conviction has long-term consequences for people who are already economically marginal. The punishment is rarely appropriately matched to the crime, as seen in the (racially charged) discrepancies in severity of punishment for possession of crack vs. cocaine. What’s going on? Why are we doing this? Why are the punishments inflicted on those who fail in society often so severe?

I’ll ignore the more nefarious but low-frequency ills behind our heavy-handed justice system, such as racism and disproportionate fear. Instead, I want to focus on a more fundamental question. Why do average people, with no ill intentions, believe that negative experiences are the best medicine for criminals, despite the overwhelming amount of evidence that most people behave worst after negative experiences? I believe that there is a simple reason for this. The model that most people have for the criminal is one we’ve seen over and over: The Bully.

A topic of debate in the psychological community is whether bullies suffer from low or high self-esteem. Are they vicious because they’re miserable, or because they’re intensely arrogant to the point of psychopathy? The answer is both: there are low-self-esteem bullies and high-self-esteem bullies, and they have somewhat different profiles. Which is more common? To answer this, it’s important to make a distinction. With physical bullies, usually boys who inflict pain on people because they’ve had it done to themselves, I’d readily believe that low self-esteem is more common. Most physical bullies are exposed to physical violence either by a bigger bully or by an abusive parent. Also, physical violence is one of the most self-damaging and risky forms of bullying there is. Choosing the wrong target can put the bully in the hospital, and the consequences of being caught are severe. Most physical bullies are, on account of their coarse and risky means of expression, in the social bottom-20% of the class of bullies. On the whole, and especially when one includes adults in the set, most bullies are social bullies. Social bullies include “mean girls”, office politickers, those who commit sexual harassment, and gossips who use the threat of social exclusion to get their way. Social bullies may occasionally use threats of physical violence, usually by proxy (e.g. a threat of attack by a sibling, romantic partner, or group) but their threats generally involve the deployment of social resources to inflict humiliation or adversity on other people. In the adult world, almost all of the big-ticket bullies are social bullies.

Physical bullies are split between low- and high-self-esteem bullies. Social bullies, the only kind that most people meet in adult life, are almost always high-self-esteem bullies, and often get quite far before they are exposed and brought down. Some are earning millions of dollars per year, as successful contenders in corporate competition. Low self-esteem bullies tend to be pitied by those who understand them, which is why most of us don’t have any desire to hunt down the low self-esteem bullies who bothered us as children. It’s high self-esteem bullies that gall people the most. High self-esteem bullies never show remorse, often are excellent at concealing the damage they do, even to the point of bringing action consequences of their actions to the bullied instead of to themselves, and they generally become more effective as they get older. It’s easy to detest them; it would be unusual not to.

How is the high self-esteem bully relevant to criminal justice? At risk of being harsh, I’ll assert what most people feel regarding criminals in general, because for high-self-esteem bullies it’s actually true: the best medicine for a high self-esteem bully is an intensely negative and humiliating experience, one that associates undesirable and harmful behaviors with negative outcomes. This makes high-self-esteem bullies different from the rest of humanity. They are about 3 percent of the population, and they are improved by negative, humiliating experiences. The other 97 percent are, instead, made worse (more erratic, less capable of socially desirable behavior) by negative experiences.

The most arrogant people only respond to direct punishment, because nothing else (reward or punishment) can matter to them, coming from people who “don’t matter” in their minds. Rehabilitation is not an option, because such people would rather create the appearance of improvement (and become better at getting away with negative actions) than actually improve themselves. The only way to “matter” to such a person is to defeat him. If the high-self-esteem bully’s negative experiences are paralyzing, all the better.

Before going further, it’s important to say that I’m not advocating a massive release of extreme punishment on the bullies of the world. I’m not saying we should make a concerted effort punish them all so severely as to paralyze them. There are a few problems with that. First, it’s extremely difficult to determine, on an individual basis, a high self-esteem bully from a low-self-esteem one, and inflicting severe harm on the latter kind will make him worse. Humiliating a high-self-esteem bully punctures his narcissism and hamstrings him, but doing so to a low-self-esteem bully accelerates his self-destructive addiction to pain (for self and others) and leads to erratic, more dangerous behaviors. What comes to mind is the behavior of Carl in Fargo: he begins the film as a “nice guy” criminal but, after being savagely beaten by Shep Proudfoot, he becomes capable of murder. In practice, it’s important to know which kind of bully one is dealing with before deciding whether the best response is rehabilitation (for the low self-esteem bully) or humiliation (for the high self-esteem bully). Second, if bullying were associated with extreme punishments, the people who’d tend to be attracted to positions able to affix the “bully” label would be, in reality, the worst bullies (i.e. a witch hunt). That high self-esteem bullies are (unlike most people) improved by negative experience is a fact that I believe few doubt, but “correcting” this class of people at scale is a very hard problem, and doing so severely involves risk of morally unacceptable collateral damage.

How does this involve our criminal justice policy? Ask an average adult to name the 3 people he detests most among those he personally knows, and it’s very likely that all will be high self-esteem bullies, usually (because physical violence is rare among adults) of the social variety. This creates a template to which “the criminal” is matched. We know, as humans, what should be done to high-self-esteem bullies: separation from their social resources in an extremely humiliating way. Ten years of extremely limited freedom and serious financial consequences, followed by a lifetime of difficulty securing employment and social acceptance. For the office politicker or white-collar criminal, that works and is exactly the right thing. For the small-time drug offender or petty thief? Not so much. It’s the wrong thing.

Most caught criminals are not high self-esteem bullies. They’re drug addicts, financially desperate people, sufferers of severe mental illnesses, and sometimes people who were just very unlucky. To the extent that there are bullies in prison, they’re mostly the low-self-esteem kind– the underclass of the bullying world, because they got caught, if for no other reason. Inflicting negative experiences and humiliation on such people does not improve them. It makes them more desperate, more miserable, and more likely to commit crimes in the future.

I’ve discussed, before, why Americans so readily support the interests of the extremely wealthy. Erroneously, they believe the truly rich ($20 million net worth and up) to be scaled-up versions of the most successful members of the middle class. They conflate the $400,000-per-year neurosurgeon who has been working hard since she was 5 with the parasite who earns $3 million per year “consulting” with a private equity firm on account of his membership in a socially-closed network of highly-consumptive (and socially negative) individuals. Conservatives mistake the rich for the highly productive because, within the middle class, this correlation of economic fortune and productivity makes some sense, while it doesn’t apply at all to society’s extremes. The same is at hand in the draconian approach this country takes to criminal justice. Americans project the faces of the bullies onto the criminal, assuming society’s worst actors and most dangerous failures to be scaled-up version of the worst bullies they’ve dealt with. They’re wrong. The woman who steals $350 of food from the grocery store out of desperation is not like the jerk who stole kids’ lunch money for kicks, and the man who kills someone believing God is telling him to do so (this man will probably require lifetime separation from society, for non-punitive reasons of public safety and mental-health care) is not a scaled-up version of the playground bully.

In the U.S., the current approach isn’t working, of course, unless its purpose is to “produce” more prisoners (“repeat customers”). Few people are improved by prison, and far fewer are helped by the extreme difficulty that a felony conviction creates in the post-incarceration job search. We’ve got to stop projecting the face of The Bully onto criminals– especially nonviolent drug offenders and mentally ill people. Because right now, as far as I can tell, we are The Bully. And reviewing the conservative politics of this country’s past three decades, along with its execrable foreign policy, I think there’s more truth in that claim than most people want to admit.

What made Steve Jobs rare?

Steve Jobs was one of our generation’s best innovators, if not the best. What he represented was singular and rare: a person in charge of a major company who actually had a strong and socially positive vision. Corporate executives are expected to have some quantity of vision and foresight, but so very few, across the Fortune 1000, ever actually have it that there is a certain surprise associated with learning of one who does. Most corporate executives are mediocrities if not negative in their contribution, meddling with those who are actually getting work done with constant churn and (in the negative sense) disruption. Steve Jobs, on the other hand, was integral to the success of Apple. As Apple’s posthumous tribute to him said, only he could have built that company. Unlike the typical businessman, Jobs was not especially charismatic. He was an effective salesman only because the quality of what he sold was so high; he could sell because he believed in his products. What he was is creative, courageous, disciplined, and effective. He had a sharp aesthetic sense, but also the clarity of vision to ship a real, working product.

Why do people like him appear only a few times in a generation? It’s not that there is a lack of talent. Not to denigrate Steve Jobs, because his talents are in any case uncommon, but I’d bet heavily (on statistical grounds) that there are at least a few hundred or thousand people like him out there, hacking away at long-shot startups, cloistered in academia, or possibly toiling in corporate obscurity. The issue is that people with his level of talent almost never succeed in human organizations such as large corporations. A keen aesthetic sense is a severe liability in most corporate jobs, as the corporate style of “professionalism” requires tolerance of ugliness rather than the pursuit of aesthetic integrity at all costs. Creative talent also becomes a negative in environments that expect years of unfulfilling dues-paying before one gets creative control of anything. People like Jobs can’t stand to waste time and so, in corporate America, they rarely make it. When they are set to boring work, the part of their brains not being used scream at them and that makes it impossible for them to climb the ladder.

That human organizations are poor at selecting leaders is well-known, and startups are an often-cited antidote to this problem. The issue there is that a herd mentality still exists in venture capital and startup press. The herd almost never likes people of high talent, and for every independent thinker in a true king-making role, there are twenty overfed bureaucrats making decisions based on “track record” and similarity to existing successes– a fact not in the favor of a 22-year-old Steve Jobs in 2011. To be honest, I don’t think such a person would have a chance in hell of acquiring venture capital funding on his own, unless born into the necessary connections. Elite incubators such as Y Combinator are solving this problem, and quite well, by connecting young talent with the necessary resources and connections. Are they doing enough? Will they succeed in changing the dynamics of startup funding and traction? I don’t have the foresight to answer that question yet; honestly, I have no idea. Time will tell.

I think a lot of people around my age (28) have spent some time thinking: How can I be more like Steve Jobs? That’s the wrong question to be asking. The perfect storm that enables even a moderately creative person (much less an out-and-out disruptive innovator like Jobs) to overcome the enormous obstacles human organizations throw at them is an event that occurs less often than a $100-million lottery windfall. The right question is closer to this: what can I do that makes people with immense creative talents, like Steve Jobs, more likely to succeed? So this, I believe, is a more reliable path to success and an indirect sort of greatness. It’s great to have dreams and work hard to achieve them, but it’s equally noble (and more often successful) to help others with great ideas realize theirs. Right now, most people with great ideas almost always linger in obscurity, with powerful people and institutions actively working to keep them there. That has been the case for nearly all of human history, but technology can change it.

How? I’m not sure. I spend a lot of time thinking about this issue. How can a world with so much creative talent in it (on account of having nearly 7 billion living people, at least a billion of whom now have the minimum resources to express creativity and at least a few million among those having the talent) be achieving so little? Why is there so much ugliness, inertia and failure? How do we empower people to change it? These questions are too big for me to answer, at least for now. I’m going to focus on one thing: the process of turning talent into greatness, the former being abundant and the latter being desperately uncommon. How do we get people with high talent to such a degree of skill that they can, as individual contributors, contribute to society substantially– so much so as to overcome the general mediocrity of human institutions?

This is an educational problem, but not one solved by traditional schooling. Greatness doesn’t come from completing assignments or acing tests, obviously. It requires personal initiative, a will to innovate, and courage. Then it requires recognition; people who show the desire to achieve great things should be given the resources to try. It doesn’t seem like it, but I’ve exposed an extremely difficult problem, one that I don’t know how to solve. Educational processes that encourage creativity make it extremely difficult to measure performance, and therefore fail to gain the social trust necessary to propel their pupils into positions of creative control in major organizations. On the other hand, those educational processes in which it’s easy to measure performance generally favor conformity and the ability to “game the system” over useful creative talents or skills. Moreover, there’s a variety of grade inflation that exists far beyond academia whose effect is socially pernicious.

Grade inflation seems like a “feel good” consequence of people being “too nice”, but from a zero-sum economic perspective, it actually reflects a society that stigmatizes failure heavily. If an average performance is rated at 2 (a C grade) on a 0-to-4 scale, then excellence in one course (A, 4.0) cancels out failure (F, 0.0) in another. On the other hand, if the average is 3.2 out of 4, then it takes four excellent grades to cancel out one failure. This makes failing a course substantially more costly. This reflects risk-aversion on the part of the educational system– the student who puts forth a mediocre performance in three courses is superior to one who excels in two but fails the third– and engenders risk-averse behavior on the part of students. That said, I’m not especially concerned with this problem in the educational system, which is far more forgiving of good-faith failure than most human organizations. A failed course can damage one’s average but rarely results in expulsion. I’m more worried about how this mentality plays out in real life.

This style of risk-aversion is reflected in human organizations such as corporations. An employee who has four great years followed by a bad one is likely to be fired for the damaged reputation acquired in that failed fifth year. People are measured according to their worst-case performance (reliability) rather than their best-case capability (talent). This is a problem for a person like Steve Jobs, obviously capable of hitting the highest of the high notes, but liable to show negative contribution (pissing people off) at his worst. It’s also a more general problem that leaves large organizations unable to tap their best people. Why? Those best people tend overwhelmingly to be “high-variance” people– those whose job performance becomes weak if they lose motivation, and who become so passionate about the quality of work that they invariably end up in personality conflicts. Low-variance individuals– generally lacking creativity but capable of sustaining a middling performance for decades, thereby showcasing “professionalism”– tend to win out in their stead. The creatively desolate world we observe in the leadership of major human organizations is a direct result of this.

In some cases, measuring performance at a person’s bottom rather than top makes sense. As Lord Acton said, “Judge talent at its best and character at its worst.” People who behave in a way that is outright unethical have proven themselves not worthy of trust, regardless of their best-case capabilities. On the other hand, a person like Steve Jobs fails in a mainstream corporate environment fails not because he is unethical but because he’s merely difficult. That is what is in error. In general, human organizations develop a toddler-like, black-and-white view in evaluation of their members and thereby lose the ability to discriminate between those who are outright criminal (and should be distrusted, terminated from employment, and possibly punished regardless of their talents) from those who have difficult personalities or who suffer a good-faith failure (a risk one must be able to afford if one wants to achieve anything).

There’s a solution to that problem, but a touchy one. In technology, programmers have taken to the open-source community as a means of building an organization-independent career. This reflects what academia has had for a long time: active encouragement for its members (graduate students and post-docs especially) to build reputations outside of their institutions. This allows people to demonstrate their best-case capabilites to the world at large. Unfortunately, there is an extremely touchy political matter here. Corporations and managers within them would generally prefer that subordinates not dedicate energy to the cultivation of an external reputation, a process that (a) distracts them from their “real work” and dues-paying, and (b) makes them more expensive to retain. Many large companies forbid employees to take consulting work or publish papers for this precise reason.

Now that I’ve laid out a few problems and ideas, I’ve noticed that both time (9:08 am, and I haven’t yet left for work) and word count (1683 and rising) are encouraging me to finish up. For a closing thought, I’ll admit that I don’t have many answers to the “big picture” problems here. I don’t know what it will take to fix the problems of large human organizations that lead to their pervasive mediocrity. I don’t even know if it can be done. Where to focus? Something smaller and tractable, something grass-roots.

Brilliant people, like Steve Jobs, aren’t born fully-fledged like Venus from the sea. Jobs became what he was due to a thousand influences– his friendship with Steve Wozniak, his early successes, later failures, and yet-later successes. That much is obvious. He was always talented but he became great on account of the opportunities he had– the successes and failures that refined his aesthetic sense until (in his later adulthood) it was a finished product. I also believe that there are thousands of people much like him in existence, their talents unexpressed. I don’t think we need to work hard to “find” them. These people are loud and obnoxious enough that this is an easy task. What we need to do, as much as we can, is enable such people to overcome the hurdles imposed by large human organizations more interested in protecting entrenched mediocrity than in pursuing excellence. We need to fight that battle as much as we can. And yet, we must accept that we aren’t likely to get very far. There’s more we need to do.

We need to rethink education. I’m not just talking about schooling. Instead, I’m talking about technology and business and culture. We need to remove from ourselves the notion that education is a “product” to be “consumed” by those rendered economically useless by their youth and inexperience. Education needs to be an ongoing process. It needs to pervade everything we do. Instead of writing code, managing people, or running businesses we need to focus on teaching people what we can, and on learning from them reciprocally. We need to reinvent corporate and organizational cultures outright so that talent is naturally turned into greatness, and so that excellence isn’t a weird, socially counterproductive personality trait but something that all strive toward.

Half of 56 is 28

Steve Jobs just died. His Stanford commencement speech is already legendary, but I’ll add one more link to it. Call me a “fanboy” or a crowd-follower for liking it; it really is worth listening to.

This is a poignant reminder to all of us that we may have less time than we think we do. Society, with this expressed most prominently in the early rounds of the career game, expects young people to deny their mortality– to delay creative expression and fulfilling work to a distant, prosperous future that might never come. Jobs never denied his mortality. He did what he loved. This is the only reasonable approach because, in the end, mortality refuses to be denied.

Taxation without representation: why code maintenance fails– and how to fix it.

The software industry, as a whole, has fallen into a dismal state. Software development is supposed to be a creative endeavor, but often it’s not. An overwhelming portion (more than 80% on mature codebases) of software engineering time is spent on software “maintenance” instead of new invention, a morale-killer that contributes to the high burnout rate in software engineering. In spite of these sacrifices on the part of developers, code quality seems nonetheless to decline inexorably, to the point where many software projects become intractably unfixable after a certain amount of time. Not only is maintenance painful, but it doesn’t seem to be working very well. What causes this? How does it happen? There are many factors, but I think the biggest problem the software industry faces is organizational: by failing to allocate maintenance responsibilities properly, the result is that these jobs are done poorly and the legacy/maintenance load becomes enormous.

Before reading further, I ask the reader to peruse Jeff Atwood’s excellent blog post, a header for what I’m about to write. In my mind, the most important point he makes is this one: We should probably have our best developers doing software maintenance, not whoever draws the shortest straw. 

Code maintenance, as usually practiced, is dull and lacks creativity. It’s also usually a career tarpit, because new invention is generally superior (from a developer’s perspective) in terms of visibility, education and advancement. Maintenance work rarely delivers on any of these. Maintaining one’s own code is a crucial educational experience, in which the developer sees first-hand the consequences of her architectural decisions. Maintaining the monstrosities created by others? It’s not much of a learning experience after the first time it’s done, and it’s rarely visible either. This incentive structure is perverse, because a working, healthy system that fulfills known, existing needs (i.e. the outcome of a successful maintenance project) is of more value than a new one that may or may not prove to be useful.

Maintenance is extremely important work; it’s the upkeep of one of a software company’s most important assets. Unfortunately, certain systemic aspects of organizational cultures make it unlikely to be rewarded in accord with its importance. The consequence is that maintenance work tends to “roll downhill” until it reaches junior programmers who lack the leverage to work on anything else. The result of this is that maintenance projects are usually done by people who don’t have the organizational knowledge, level of skill, or, most importantly, the political pull to do the job properly.

Inept or even average-case software maintenance fails to improve the general health of the code. A few bugs may be fixed or reactive features added, but the overall health of the software tends to decline. Methods become longer, dependencies are added, junk parameters are added to existing functions, and the architectural intentions behind the original system are buried under thousands of hacks. Code maintenance as practiced tends to beget an even greater maintenance burden in the future.

What needs to change? There’s a simple answer. Give maintainers power. The reason why the vast majority of software maintenance projects fail to improve code health whatsoever is that the developers in a maintenance role (usually junior programmers with no clout) lack the political pull to do their jobs properly. Telling a more senior developer, who was “promoted away” from maintenance duties years ago, to drop everything and document prior work is generally not an option for the maintenance programmer. Nor is removing ill-advised functionality from interfaces (someone more senior is guaranteed to “need” that function) or declaring a project in need of a rewrite. This is the sort of clout that a maintainer needs to have in order to have any shot whatsoever at succeeding.

There’s a flip side of this. If code maintenance work implies power, it absolutely shouldn’t be delegated to junior developers who can’t yet be trusted with that kind of power.

Giving software maintainers power will remove most of the stigma associated with such projects, seeing as they are hated because of the lack of power they often entail. It’s taxation without representation. Often, the maintainer’s job is specified in uninspiring and untenable terms like, “Make it work exactly like the old system, but faster”. Bug-for-bug replications, as well as faithful reproductions of any software without a spec, are doomed to failure. Improving code health necessitates imposing change on client developers. Rarely are such costs considered tolerable for the sake of “mere” upkeep, and maintenance projects usually, for that reason, fail to provide lasting improvement. The low rate of success observed on such projects makes them undesirable, and therefore they are avoided by the most skilled developers.

On the other hand, if maintenance responsibilities were coupled with sufficient power to restore the health of the codebase, such projects could become attractive enough that those with skill and seniority would want to do them. People who work on a daily basis with software generally develop a deep interest in the system’s health, and this alone can be motivation to commit time to its upkeep. Software maintenance has the reputation of grunt work, but it really isn’t intrinsically unpleasant for all developers; there are people who would enjoy such projects immensely if they were properly structured.

On structure, it’s critical that a company of any size separate the “software engineer” job description (which currently entails creative, new invention as well as maintenance) into two separate job descriptions. One (I’ll call it the “software architect” track) exists for the creative engineers who tend to fail at maintenance efforts because of their inability to tolerate ugliness. The other (I’ll call it the “maintenance engineer” track) exists for the “Sherlock Holmes” sort who enjoy deciphering ineptly- or even hostilely-written code. Since qualified maintenance engineers are uncommon, and since most developers find that work undesirable, maintenance engineers should be paid highly. I would argue that a 30% premium is not unreasonable. Moreover, they must be given social status and clout, since their job is to be pains in the asses of developers who are potentially more senior than they are. If maintenance projects are structured and allocated in this way, it’s very unlikely that they will dominate engineering time as they do now.

One thing I would argue against, however, is any suggestion that the maintenance engineer’s existence should absolve developers of the responsibility for maintaining their own code. It doesn’t. Maintenance engineers may be given a supervisory role in code and design review, but maintenance of one’s own work should remain each developer’s own responsibility; otherwise, “moral hazard” kicks in. I will also note that it is a terrible practice for developers to be “promoted away” from maintenance responsibilities, those being delegated to less important folk, as a reward for a successful launch. If the launch’s success came at the expense of enormous “technical debt” (the interest on which is usurious) then a maintenance time-bomb has been built.

I’ve addressed the social changes required in order to allow successful software maintenance. What will this entail in terms of project structure? In-place maintenance of defective systems– any software module that requires full-time maintenance effort fits the bill for “defective”– will become rarer, with outright replacement more common. That’s a good thing, because software either enervates or empowers and the former kind can rarely be upgraded to the latter through incremental changes. Note here that I’m advocating replacement, not “complete rewrites”. In my opinion, total rewrites (unless specific efforts are made to avoid prior mistakes) are often as inadvisable as in-place maintenance; the latter keeps defective software on life support, but the former practice often generates new defects– often more flaws, on account of the time pressure that complete-rewrite projects usually face.

What is gained in doing all this? First of all, job satisfaction among software engineers improves dramatically. Instead of the industry being characterized by a gloomy, never-ending maintenance slog, the proper allocation of such work ensures that it’s done properly and quickly rather than being passed from one hapless junior developer to another. Second, engineer productivity goes through the roof, because engineers with creative and architectural talents can unlock them instead of being forced to contend with legacy misery. Third, employee retention is improved not only for individual software companies but for the industry as a whole. Instead of architecturally-inclined engineers being burned out in droves (I’ll note that people with strong architectural talents tend to be notoriously intolerant of ugliness, to a point that can be emotionally and intellectually crippling in software maintenance) by the legacy burden that is the current reality of the industry, they’re encouraged to make a career of it, the result being better software architecture across the board. The result of these improvements in architectural know-how will be better products– more comprehensible, more attractive, easier to improve and keep up, and more profitable.

Object Disoriented Programming

It is my belief that what is now called “object-oriented programming” (OOP) is going to go down in history as one of the worst programming fads of all time, one that has wrecked countless codebases and burned millions of hours of engineering time worldwide. Though a superficially appealing concept– programming in a manner that is comprehensible the “big picture” level– it fails to deliver on this promise, it usually fails to improve engineer productivity, and it often leads to unmaintainable, ugly, and even nonsensical code.

I’m not going to claim that object-oriented programming is never useful. There would be two problems with such a claim. First, OOP means many different things to different people– there’s a parsec of daylight between Smalltalk’s approach to OOP and the abysmal horrors currently seen in Java. Second, there are many niches within programming with which I’m unfamiliar and it would be arrogant to claim that OOP is useless in all of them. Almost certainly, there are problems for which the object-oriented approach is one of the more useful. Instead, I’ll make a weaker claim but with full confidence: as the default means of abstraction, as in C++ and Java, object orientation is a disastrous choice.

What’s wrong with it?

The first problem with object-oriented programming is mutable state. Although I’m a major proponent of functional programming, I don’t intend to imply that mutable state is uniformly bad. On the contrary, it’s often good. There are a not-small number of programming scenarios where mutable state is the best available abstraction. But it needs to be handled with extreme caution, because it makes code far more difficult to reason about than if it is purely functional. A well-designed and practical language generally will allow mutable state, but encourages it to be segregated only into places where it is necessary. A supreme example of this is Haskell, where any function with side effects reflects the fact in its type signature. On the contrary, modern OOP encourages the promiscuous distribution of mutable state, to such a degree that difficult-to-reason-about programs are not the exceptional rarity but the norm. Eventually, the code becomes outright incomprehensible– to paraphrase Boromir, “one does not simply read the source code”– and even good programmers (unknowingly) damage the codebase as they modify it, adding complexity without full comprehension. These programs fall into an understood-by-no-one state of limbo and become nearly impossible to debug or analyze: the execution state of a program might live in thousands of different objects!

Object-oriented programming’s second failing is that it encourages spaghetti code. For an example, let’s say that I’m implementing the card game, Hearts. To represent cards in the deck, I create a Card object, with two attributes: rank and suit, both of some sort of discrete type (integer, enumeration). This is a struct in C or a record in Ocaml or a data object in Java. So far, no foul. I’ve represented a card exactly how it should be represented. Later on, to represent each player’s hand, I have a Hand object that is essentially a wrapper around an array of cards, and a Deck object that contains the cards before they are dealt. Nothing too perverted here.

In Hearts, the person with the 2 of clubs leads first, so I might want to determine in whose hand that card is. Ooh! A “clever” optimization draws near! Obviously it is inefficient to check each Hand for the 2 of clubs. So I add a field, hand, to each Card that is set when the card enters or leaves a player’s Hand. This means that every time a Card moves (from one Hand to another, into or out of a Hand) I have to touch the pointer– I’ve just introduced more room for bugs. This field’s type is a Hand pointer (Hand* in C++, just Hand in Java). Since the Card might not be in a Hand, it can be null sometimes, and one has to check for nullness whenever using this field as well. So far, so bad. Notice the circular relationship I’ve now created between the Card and Hand classes.

It gets worse. Later, I add a picture attribute to the Card class, so that each Card is coupled with the name of an image file representing its on-screen appearance, and ten or twelve various methods for the number of ways I might wish to display a Card. Moreover, it becomes clear that my specification regarding a Card’s location in the game (either in a Hand or not in a Hand) was too weak. If a Card is not in a Hand, it might also be on the table (just played to a trick), in the deck, or out of the round (having been played). So I rename the hand attribute, place, and change its type to Location, from which Hand and Deck and PlaceOnTable all inherit.

This is ugly, and getting incomprehensible quickly. Consider the reaction of someone who has to maintain this code in the future. What the hell is a Location? From its name, it could be (a) a geographical location, (b) a position in a file, (c) the unique ID of a record in a database, (d) an IP address or port number or, what it actually is, (e) the Card’s location in the game. From the maintainer’s point of view, really getting to the bottom of Location requires understanding Hand, Deck, and PlaceOnTable, which may reside in different files, modules, or even directories. It’s just a mess. Worse yet, in such code the “broken window” behavior starts to set in. Now that the code is bad, those who have to modify it are tempted to do so in the easiest (but often kludgey) way. Kludges multiply and, before long, what should have been a two-field immutable record (Card) has 23 attributes and no one remembers what they all do.

To finish this example, let’s assume that the computer player for this Hearts game contains some very complicated AI, and I’m investigating a bug in the decision-making algorithms. To do this, I need to be able to generate game states as I desire as test cases. Constructing a game state requires that I construct Cards. If Card were left as it should be– a two-field record type– this would be a very easy thing to do. Unfortunately, Card now has so many fields, and it’s not clear which can be omitted or given “mock” values, that constructing one intelligently is no longer possible. Will failing to populate the seemingly irrelevant attributes (like picture, which is presumably connected to graphics and not the internal logic of the game) compromise the validity of my test cases? Hell if I know. At this point, reading, modifying, and testing code becomes more about guesswork than anything sound or principled.

Clearly, this is a contrived example, and I can imagine the defenders of object-oriented programming responding with the counterargument, “But I would never write code that way! I’d design the program intelligently in advance.” To that I say: right, for a small project like a Hearts game; wrong, for real-world, complex software developed in the professional world. What I described  is certainly not how a single intelligent programmer would code a card game; it is indicative of how software tends to evolve in the real world, with multiple developers involved. Hearts, of course, is a closed system: a game with well-defined rules that isn’t going to change much in the next 6 months. It’s therefore possible to design a Hearts program intelligently from the start and avoid the object-oriented pitfalls I intentionally fell into in this example. But for most real-world software, requirements change and the code is often touched by a number of people with widely varying levels of competence, some of whom barely know what they’re doing, if at all. The morass I described is what object-oriented code devolves into as the number of lines of code and, more importantly, the number of hands, increases. It’s virtually inevitable.

One note about this is that object-oriented programming tends to be top-down, with types being subtypes of Object. What this means is that data is often vaguely defined, semantically speaking. Did you know that the integer 5 doubles as a DessertToppingFactoryImpl? I sure didn’t. An alternative and usually superior mode of specification is bottom-up, as seen in languages like Ocaml and Haskell. These languages offer simple base types and encourage the user to build more complex types from them. If you’re unsure what a Person is, you can read the code and discover that it has a name field, which is a string, and a birthday field, which is a Date. If you’re unsure what a Date is, you can read the code and discover that it’s a record of three integers, labelled year, month, and day. If you want to get “to the bottom” of a datatype or function when types are built from the bottom-up, you can do so, and it rarely involves pinging across so many (possibly semi-irrelevant) abstractions and files as to shatter one’s “flow”. Circular dependencies are very rare in bottom-up languages. Recursion, in languages like ML, can exist both in datatypes and functions, but it’s hard to cross modules with it or create such obscene indirection as to make comprehension enormously difficult. By contrast, it’s not uncommon to find circular dependencies in object-oriented code. In the atrocious example I gave above, Hand depends on Card depends on Location inherits from Hand.

Why does OOP devolve?

Above, I described the consequences of undisciplined object-oriented programming. In limited doses, object-oriented programming is not so terrible. Neither, for that matter, is the much hated “goto” statement. Both of these are tolerable when used in extremely disciplined ways with reasonable and self-evident intentions. Yet when used by any but the most disciplined programmers, OOP devolves into a mess. This is hilarious in the context of OOP’s original promise to business types in the 1990s– that it wound enable mediocre programmers to be productive. What it actually did is create a coding environment in which mediocre programmers (and rushed or indisposed good ones) are negatively productive. It’s true that terrible code is possible in any language or programming paradigm; what makes object orientation such a terrible default abstraction is that, as with unstructured programming, bad code is an asymptotic inevitability as an object-oriented program grows. In order to discuss why this occurs, it’s necessary to discuss object orientation from a more academic perspective, and pose a question to which thousands of answers have been given.

What’s an object? 

On first approximation, one can think of an object as something that receives messages and performs actions, which usually include returning data to the sender of the message. Unlike a pure function, the response to each message is allowed to vary. In fact, it’s often required to do so. The object often contains state that is (by design) not directly accessible, but only observable by sending messages to the object. In this light, the object can be compared to a remote-procedure call (RPC) server. Its innards are hidden, possibly inaccessible, and this is generally a good thing in the context of, for example, a web service. When I connect to a website, I don’t care in the least about the state of its thread pooling mechanisms. I don’t want to know about that stuff, and I shouldn’t be allowed access to it. Nor do I care what sorting algorithm an email client uses to sort my email, as long as I get the right results. On the other hand, in the context of code for which one is (or, at least, might be in the future) responsible for comprehending the internals, such incomplete comprehension is a very bad thing.

To “What is an object?” the answer I would give is that one should think of it as a miniature RPC server. It’s not actually remote, nor as complex internally as a real RPC or web server, but it can be thought of this way in terms of its (intentional) opacity. This shines light on whether object-oriented programming is “bad”, and the question of when to use objects. Are RPC servers invariably bad? Of course not. On the other hand, would anyone in his right mind code Hearts in such a way that each Card were its own RPC server? No. That would be insane. If people treated object topologies with the same care as network topologies, a lot of horrible things that have been done to code in the name of OOP might never have occurred.

Alan Kay, the inventor of Smalltalk and the original conception of “object-oriented programming”, has argued that the failure of what passes for OOP in modern software is that objects are too small and that there are too many of them. Originally, object-oriented programming was intended to involve large objects that encapsulated state behind interfaces that were easier to understand than the potentially complicated implementations. In that context, OOP as originally defined is quite powerful and good; even non-OOP languages have adopted that virtue (also known as encapsulation) in the form of modules.

Still, the RPC-server metaphor for “What is an Object?” is not quite right, and the philosophical notion of “object” is deeper. An object, in software engineering, should be seen as a thing which the user is allowed to have (and often supposed to have) incomplete knowledge. Incomplete knowledge isn’t always a bad thing at all; often, it’s an outright necessity due to the complexity of the system. For example, SQL is a language in which the user specifies an ad-hoc query to be run against a database with no indication of what algorithm to use; the database system figures that out. For this particular application, incomplete knowledge is beneficial; it would be ridiculous to burden everyone who wants to use a database with the immense complexity of its internals.

Object-orientation is the programming paradigm based on incomplete knowledge. Its purpose is to enable computation with data of which the details are not fully known. In a way, this is concordant with the English use of the word “object” as a synonym for “thing”: it’s an item of which one’s knowledge is incomplete. “What is that thing on the table?” “I don’t know, some weird object.” Object-oriented programming is designed to allow people to work with things they don’t fully understand, and even modify them in spite of incomplete comprehension of it. Sometimes that’s useful or necessary, because complete knowledge of a complex program can be humanly impossible. Unfortunately, over time the over-tolerance of incomplete knowledge leads to an environment where important components can elude the knowledge of each individual responsible for creating them; the knowledge is strewn about many minds haphazardly.

Modularity

Probably the most important predictor of whether a codebase will remain comprehensible as it becomes large is whether it’s modular. Are the components individually comprehensible, or do they form an irreducibly complex tangle of which it is required to understand all of it (which may not even be possible) before one can understand any of it? In the latter case, software quality grinds to a halt, or even backslides, as the size of the codebase increases. In terms of modularity, the object oriented paradigm generally performs poorly, facilitating the haphazard growth of codebases in which answering simple questions like “How do I create and use a Foo object?” can require days-long forensic capers.

The truth about “power”

Often, people describe programming techniques and tools as “powerful”, and that’s taken to be an endorsement. A counterintuitive and dirty secret about software engineering “power” is not always a good thing. For a “hacker”– a person writing “one-off” code that is unlikely to ever be require future reading by anyone, including the author– all powerful abstractions, because they save time, can be considered good. However, in the more general software engineering context, where any code written is likely to require maintenance and future comprehension, power can be bad. For example, macros in languages like C and Lisp are immensely powerful. Yet it’s obnoxiously easy to write incomprehensible code using these features.

Objects are, likewise, immensely powerful (or “heavyweight”) beasts when features like inheritance, dynamic method dispatch, open recursion, et cetera are considered. If nothing else, one notes that objects can do anything that pure functions can do– and more. The notion of “object” is both a very powerful and a very vague abstraction.

“Hackers” like power, in which case a language can be judged based on the power of the abstractions it offers. But real-world software engineers spend an unpleasantly large amount of time reading and maintaining others’ code.  From an engineer’s perspective, a language is good based on what it prevents other programmers from doing to us, those of us who have to maintain their code in the future. In this light, the unrestrained use of Lisp macros and object-oriented programming is bad, bad, bad. From this perspective, a language like Ocaml or Haskell– of middling power but beautifully designed to encourage deployment of the right abstractions– is far better than a more “powerful” one like Ruby.

As an aside, a deep problem in programming language design is that far too many languages are designed with the interests of code writers foremost in mind. And it’s quite enjoyable, from a writer’s perspective, to use esoteric metaprogramming features and complex object patterns. Yet very few languages are designed to provide a beautiful experience for readers of code. In my experience, ML does this best, and Haskell does it well, while most of the mainstream languages fall short of being even satisfactory. In most real-world software environments, reading code is so unpleasant that it hardly gets done at all with any detail. Object-oriented programming, and the haphazard monstrosities its “powerful” abstractions enable, is a major culprit.

Solution?

The truth, I think, about object-oriented programming is that most of its core concepts– inheritance, easy extensibility of data, proliferation of state– should be treated with the same caution and respect that a humble and intelligent programmer gives to mutable state. These abstractions can be powerful and work beautifully in the right circumstances, but they should be used very sparingly and only by people who understand what they are actually doing. In Lisp, it is generally held to be good practice never to write a macro when a function will do. I would argue the same with regard to object-oriented programming: never write an object-oriented program for a problem where a functional or cleanly imperative approach will suffice.  Certainly, to make object orientation the default means of abstraction, as C++ and Java have, is a proven disaster.

Abstractions, and especially powerful ones, aren’t always good. Using the right abstractions is of utmost importance. Abstractions that are too vague, for example, merely clutter code with useless nouns. As the first means of abstraction in high-level languages, higher-order functions suffice most of the time– probably over 95% of the time, in well-factored code. Objects may come into favor for being more general than higher-order functions, but “more general” also means less specific, and for the purpose of code comprehension, this is a hindrance, not a feature. If cleaner and more comprehensible pure functions and algebraic data types can be used in well over 90 percent of the places where objects appear in OO languages, they should be used in lieu of objects, and they should be supported by languages– which C++ and Java don’t do.

In a better world, programmers would be required to learn how to use functions before progressing to objects, and object-oriented features would hold the status of being available but deployed only when needed, or in the rare cases where such features make remarkably better code. To start, this change needs to come about at a language level. Instead of Java or C++ being the first languages to which most programmers are introduced, that status should be shifted to a language like Scheme, Haskell, or my personal favorite for this purpose: Ocaml.