PPSD: The Fake Surgeon

“I just trust my intuition taking into account the psychology of things. Therefore, I am not persuaded by facts, but by behaviors.”
― Maria Karvouni

In his classic book on software engineering, The Mythical Man-Month, Fred Brooks presents a radically different approach to organizing development teams, which he coined the “Surgical Team.” His idea is based upon three key insights:

1. Great software developers are easily 10 times more productive than average developers.
2. Conceptual integrity is the key to the success of every software product, especially large software products.
3. The bigger the team, the more communication paths are required, which is detrimental to conceptual integrity.

Consequently, according to Brooks, a software team should consist of a single super-programmer (the “surgeon”) accompanied by nine “assistants,” give or take. The surgeon is not only the boss of the team, but he also does the main work; that is, thinking and programming, all for the sake of minimal communication and conceptual integrity. The assistants have clearly defined roles, all aimed at making the surgeon’s life easier and boosting his productivity: for example, they support him as backup programmer, editor, tester, and secretary.

To grade A developers, this approach looks quite appealing, as they finally get the resources, recognition, and status that they crave so much, while at the same time still being allowed to do what they love to do most: programming.

Alas, for various reasons the whole idea was stillborn (boo-hoo!), but that’s not what I want to focus on today. For the rest of our discussion, you just have to bear in mind these facts about Brooks’ analogy:

1. The surgeon is a talented and experienced developer.
2. The surgeon is the boss and has the company’s official mandate.
3. The assistants respect the surgeon and fully accept their roles as subordinates.

A Fake Surgeon, by contrast, is a wannabe surgeon—a surgeon that has no official mandate and his imagined assistants neither accept him nor their ascribed roles.

Early in my career, I was part of a fake surgical team. The Fake Surgeon was very prolific, worked ridiculous hours, and never went for lunch. Why? Because he wanted to make himself indispensable by keeping a massive head start on the rest of the team.

Sometimes, he would leave the office late at night for only a couple of hours, to take a quick nap and a shower. When the other team members arrived in the morning, they couldn’t believe their eyes: so much had changed overnight! They really didn’t know how or where to contribute. Instead of filling them in, the Fake Surgeon’s solution was to assign his “assistants” only non-critical, menial work because, according to him, he was way too busy to explain what he did during last night’s blaze of glory. This tactic ensured that he remained the keeper of the crown jewels. Managers, sales, customers—they only talked to him, because he was the authoritative source of everything, thus isolating the rest of the team even more.

He put up such an act, always looking so busy and stressed, that you didn’t dare disturb him. If you finally got up the courage, he’d only give you short, superficial, sometimes even misleading replies.

Reading his code was far from easy—it left you puzzled and gave rise to many questions; questions, that you were too afraid to ask. Obviously, mysterious, unreadable code was yet another element of his cunning plan: job security by code obscurity.

APPEARANCE

Regarding the choice of clothing, a Fake Surgeon is pretty average, at least clothes do not define him. By and large, he doesn’t spend much time on looks; instead, he invests his time speeding ahead of everyone else. It’s highly likely that he appears rushed, always hustling about the office, never socializing over coffee, just swiftly refilling his mug before running back to his keyboard.

PERSONALITY TRAITS

Most likely, the reasons for a Fake Surgeon’s behavior are deeply rooted in his low self-esteem and fragile ego. Deep down inside, he’s aware of his limited skills and is in constant fear of losing his job. To compensate for his insecurity, he tries to establish a regime of control, keep as much of his knowledge to himself, and make sure that his enigmatic code can only be understood by him and nobody else. A self-confident programmer, by contrast, knows that he’s indispensable because he shares information and writes clean code that can be extended by others.

Of course, such a pathological type of developer can’t thrive all by himself. Every Fake Surgeon forms an unhealthy symbiosis with an extremely weak manager who condones such egoistic behavior. In most instances, the Fake Surgeon’s boss doesn’t see through the Fake Surgeon’s ulterior motives and might even praise the Fake Surgeon for his unusual commitment. After all, the Fake Surgeon takes care of everything and thus gives the boss plenty of time to work on his own career.

What ends up happening, in almost all cases, is that the Fake Surgeon sooner or later takes advantage of his distinguished position and extorts the company by asking for a sizable pay raise. Usually, the company gives in, must give in, because they can’t afford to lose such an important person. What these companies fail to recognize is that they already lost him, anyway. Fake Surgeons are sly and anticipate that once they’ve made such a move, their days might be numbered. Hence, they use this promotion just for negotiation purposes and try to land an even better paid job with a competing company. A company, where the Fake Surgeon can rightly claim, “In my previous job, I did everything by myself” and where nobody knows his selfish, dirty little secret. Depending on whether his need for security and power are ultimately met at the new job, he might settle down and mellow out; if not, he might establish yet another cycle of abuse.

RATING

According to the Q²S² framework, a Fake Surgeon’s rating is 5/2/1/1.

TOOLING

A Fake Surgeon likes tools, especially tools that give him a strategic advantage over others. Most likely, some of the tools that he (or the team) employs were created by himself, such that he’s the only person who can operate and extend them. He also fancies rarely used libraries and programming languages and exerts quite a significant amount of effort in mastering them. To a Fake Surgeon, that’s time wisely invested, as it allows him to race ahead on steroids while the rest of the team is limping along.

CONCLUSION

Information hiding is a sound and proven software design principle but it doesn’t carry over to developers working on a team. A Fake Surgeon is the opposite of a team player—he’s a ball hog. He’s a charlatan that dupes everyone into believing that he’s a real surgeon. All he has in mind, however, is advancing his career at the expense of others, often putting the fate of whole companies at risk. He’s such a nuisance to work with that often valuable team members (who never got a chance to prove themselves) leave the toxic environment he created.

A strong manager is required to prevent a company from being taken hostage by such an individual. A strong manager wouldn’t fall prey to a Fake Surgeon’s ensnarement. Instead, he will make knowledge sharing a priority and ensure that everyone leaves the office on time. Managers, beware red flags: If somebody works excessive overtime, tell this person immediately that they should rather use their time to enable others to contribute. This way, the person’s time will yield a high return on investment and reduce the overall risk for the project. If he doesn’t understand, ask him to seek his luck elsewhere. Don’t shed any tears over this person: the only thing that you lost is a problem.

Bug Hunting Adventures #13: Prime Sums (Solution)

The challenge suffers from what I call a “chain of blunders”, where one blunder leads to another. Here are the exact details, in the traditional format.

The first who got close to the true nature of this bug was reader Shlomo who commented directly on the post, but I held back his comment in order not to spoil the fun for others. (Unfortunately, I couldn’t tell him, because he used a bogus email address—boo!). Christian Hujer, hacker extraordinaire, gave the most precise and extensive account on LinkedIn. While many found the blunder in the Makefile (Joe Nelson was the first), it was apparently such a good smokescreen that many people didn’t look any further. To me, the root blunder that started the chain of blunders is in the C language itself, which should have never allowed implicit zero-initialization of constants in the first place (which was corrected in C++).

Some believed that the preincrement of the loop-counter was the culprit as it would skip the first prime, but that’s not the case. The expression after the second semicolon gets evaluated always at the end of the loop body:

is equivalent to

Substitute ++i or i++ for <e> — there’s no difference!

On a general note, guys, please register by entering your email address in the top right corner to ensure that you will get automatic notifications for new posts as soon as they’re published. I also (usually) announce new posts on LinkedIn, but mostly hours if not days later. Nevertheless, connecting with me on LinkedIn is always a good idea and highly encouraged. Your subscriptions, likes, praise, and criticism keep me motivated to carry on, so don’t hold back!

Bug Hunting Adventures #13: Prime Sums

“Why, yes; and not exactly that either. The fact is, we have all been a good deal puzzled because the affair is so simple, and yet baffles us altogether.”
― Edgar Allan Poe, The Purloined Letter

Below, you find a little C project that doesn’t do what it’s supposed to do, namely print the sum of the first 10 prime numbers. The program builds cleanly with gcc and clang; that is, without any warnings even when using -Wextra -Wall -pedantic -ansi as compiler options. It’s well-formed and doesn’t crash.

What’s the root cause of this bug? What’s the output of the program? Here are the files, you can also find them on GitHub:

prime_table.h:

prime_table.c:

prime_sum.c:

Makefile:

Solution

PPSD: The Q²S² Framework

“Some people come into our life as a blessing, while others come into our life as a lesson, so love them for who they are instead of judging them for who they are not.”
— Yolanda Hadid

As you know, “People-Patterns in Software Development” (PPSD) is a tongue-in-cheek series in which I present personality traits of software developers and arrange them in patterns. In order to make these patterns easier to compare, I came up with an evaluation framework that I’ve dubbed “Q²S² framework.”

Each letter of the Q²S² (or QQSS) acronym represents one of the four dimensions, along which developers are assessed: Quantity, Quality, Social, and Sharing.

QUANTITY

Quantity captures how prolific a person is. Is an individual a doer who creates or rather somebody who consumes things created by others? Low-producing software developers, even highly educated ones, have difficulties writing code. They overthink, get stuck in analysis-paralysis and have a hard time entering insert mode. But even if they do start, they often don’t sustain and end up failing to make it to the finish line. But getting things done is essential: a bridge over a river is worthless if it ends three meters short of the other bank.

High-volume producers, on the other hand, are totally sold on action, they want to get their hands dirty. If they encounter a Gordian knot, they simply cut it. Without knowing the details, they start with a “shitty first draft” and shape it into the final product. To them, software development is like pottery making: they begin with a lump of clay and turn it slowly but steadily into a vase—and then proceed to make another one, and another one. Whether these vases are of decent quality is a completely different story.

QUALITY

According to a popular definition, quality is the degree to which something meets or exceeds the expectations of its customers. While a certain amount of quantity is essential, it’s by no means sufficient. Quality-oriented developers create software that performs well, is easy to use, and has a low defect rate.

There is a type of quality that is not visible to the customer called internal quality. High internal quality means that the software is easy to comprehend and extend by maintenance developers, and thus supports the incorporation of future requirements. Low internal quality means that the code is hard to maintain, that it is full of technical debt. So much technical debt, in fact, that over time—due to compound interest—the maintenance costs becomes so high that a software company is forced to declare bankruptcy, literally, sometimes. High internal quality, by contrast, denotes investment protection and is the foundation of long-term business success.

Since internal quality is so frequently neglected, I stress its importance a lot. Still, for the sake of simplicity, I decided to merge external and internal quality into a single “quality” dimension. Therefore, a developer with a high-quality rating in the Q²S² framework pays utmost attention to both external and internal quality.

SOCIAL

Even a super-productive, high-quality programmer is still only able to achieve so much in a day. The best carpenter in the world may build you the finest log cabin, yet he’s unable to build a skyscraper, let alone a city. By the same token, some of today’s software products are so large and demanding, it’s imperative that their construction is distributed over many shoulders. To achieve great products, people from different disciplines and backgrounds have to work together smoothly.

The biggest challenges a large software project faces these days are sociological in nature, not technological. Hence, the ability to effectively interact with other individuals is a crucial skill for every software developer. This includes being able to communicate clearly, present ideas in a comprehensible way, give and take criticism, and the willingness to compromise.

SHARING

It goes without saying that productive, high-quality developers are a blessing for every company. But developers who are willing and able to share their knowledge with coworkers can lift them to new heights and thus boost the productivity of the whole team. Like Robert Noyce, co-founder of Intel said: “Knowledge is power. Knowledge shared is power multiplied.” Imagine the benefits if all software developers followed the “each one teach one” maxim.

Developers with a great sharing attitude introduce new tools and techniques, host coderetreats, write blogs, and give one-on-one advice. What is important, however, is that this is done on top of their daily work as above-average-quantity, above-average-quality developers. All knowledge sharing must be founded on and validated by practical, real-world experience. Beware wannabe experts who only teach because they can’t do or don’t want to do what they were once hired for.

CONCLUSION

All four dimensions of this framework are all about the product. Quantity and quality are about the individual programmer’s direct influence on the product, while social and sharing are indirect: it’s the individual programmer’s influence on the influence of other programmers on the product.

You may wonder why there are no dimensions for intelligence, experience, and knowledge. Even though most job interviews put a lot of emphasis on these attributes, to me, by themselves, they are pretty meaningless. At best, such attributes can be viewed as necessary but insufficient. All that matters in the end is the product. Or, to put it another way: “It’s the product”, stupid!”

From now on, I will include Q²S² ratings in all people-patterns. Every dimension has a rating, ranging from one to five, just like is the case for most star-based classification systems that are in use today:

1: Far below average
2: Below average
3: Average
4: Above average
5: Far above average

Thus, a 4/3/5/2 rating describes a developer that produces at an above average rate with average quality, has extremely good social skills but is poor at teaching.

For the sake of completeness, I’ve also added ratings to the patterns presented so far:

Codenator: 5/3/1/1
Statler/Waldorf: 2/2/2/1
Programming Hipster: 4/4/2/2

Simplified: Idiot Tax

“If you can’t explain it to a six-year-old, you don’t understand it yourself”
— Albert Einstein

The opening quote is attributed to Albert Einstein, even though it’s unlikely that he used these exact words. Nevertheless, the idea behind it has always resonated with me: If you explain something in easy words the person at the receiving end can immediately grasp it and is enlightened forever. But reducing a topic to its essence and explaining it from the vantage point of somebody else is even well worth the time for the one at the giving end: As always, the teacher learns the most.

I recently held an embedded programming workshop for kids and what I took home is this: if you pick the right examples and metaphors, even 12-year-olds can understand topics like pulse-width modulation. With this post, however, I want to address adults; specifically, I want to talk about something that has puzzled me for quite some time: why do people, even highly educated people, take part in lotteries?

A common knee-jerk reply is that everyone wants to get rich quick, without earning it. But that’s not the answer I am looking for. Let me refine my question: why do people play lotteries even though they know that the odds of winning are infinitesimally small?

Let’s take the German lottery system as an example. In order to become a millionaire, you have to get six numbers right, out of a total of 49. According to their official website, the odds to get these six numbers right are 1 to 15.537.573, or roughly 1 to 15 million.

Even though our gut feeling tells us that this is quite unlikely, we completely underestimate how unlikely it really is. Why? My guess is that it’s because we hear about figures that are in the millions every day. This guy is a millionaire, and that one even a billionaire. Government spends millions here and billions there. Still, we are nothing more than remotely acquainted with large numbers; we constantly fail to truly and fully comprehend them.

Let’s use an approach that has helped me quite a lot and treat big numbers like distances. What the human species has done for thousands of years is walk, so we naturally have a good grasp on distances. Let’s pretend we have a distance of 15 million centimeters.

15 million centimeters divided by 100 gives us 150 thousand meters, which equals 150 kilometers. People are especially good at understanding kilometers. 150 kilometers means roughly a two-hour car ride on a regular country road. That’s quite a distance, isn’t it?

Further, imagine a single M&M chocolate piece. It’s diameter is roughly one centimeter, give or take. Put one M&M after another, on a single straight line that is 150 kilometers long and you get what the number 15 million looks like. Somewhere along that line, there is that one special M&M where they printed a “$” sign on the back, instead of the usual “m”. So you drive along this 150 kilometer line with your car, stop at some random point and flip a single M&M of your choice, hoping to see a “$” sign on it’s back.

Now, how much money would you invest in such a bet? I don’t know about you, but I wouldn’t even invest a single cent. While it’s not impossible to win, it’s very, very improbable. Any money would surely be gone.

This is why the enlightened call lotteries “idiot tax”. It’s the tax that people—out of greed and ignorance—pay voluntarily.

PPSD: The Codenator

“Listen, and understand. That terminator is out there, it can’t be bargained with, it can’t be reasoned with, it doesn’t feel pity or remorse or fear, and it absolutely will not stop…EVER, until you are dead!”
— Kyle Reese, The Terminator

In this day and age, especially in medium-to-large sized, established companies, it’s common for software developers to spend most of their time in meetings. It’s sad but true: There are even developers who brag about how loaded their meeting calendars are.

The worst kind of all meetings is the dreaded regular status meeting where many valuable person-hours go down the drain every week. Tom DeMarco and Timothy Lister really nailed it in their bestselling book Peopleware: “Though the goal may seem to be status reporting, the real intent is status confirmation. And it’s not the status of the work, it’s the status of the boss.”

But while the rest of the team is worshiping the project leader and discussing what could/should/might be done next or at some point in the future, one is already busy implementing and creating facts: the Codenator.

The Codenator is an extremely prolific individual who just can’t sit on his hands. Whereas the Terminator’s mission is to kill, the Codenator’s mission is to code. To him, the keyboard is a weapon of mass construction; he hammers away at it in an endless battle against impossible deadlines, missing specs, and buggy compilers.

APPEARANCE

Just because he’s such a badass, no-nonsense coding machine, don’t get fooled into assuming that the Codenator comes with a strong physique and a loud voice—not at all: the majority of Codenators appear to be timid or nerdy, at least at first sight. The Codenator doesn’t put much emphasis on clothing, either. All he’s interested in is generating as much software as possible.

PERSONALITY TRAITS

One might think that the Codenator holds strong opinions and loves to fight for them. While the former is certainly true, the latter often is not. Being an omega male much more than an alpha male, he avoids direct confrontations and prefers to wage war behind the scenes. If in a design meeting he’s convinced that his approach or idea is superior (and he always is), he agrees with his opponents or at least gives in—just to end the discussion. Then, later, he goes on to implement it his way, anyway.

If he’s not contented with the code of his peers, he doesn’t waste time giving constructive criticism, either; he patiently waits till they are on holiday and then performs a massive overhaul of their components. I’m not exaggerating: I witnessed this happening many years ago when—during the absence of a coworker—a Codenator rewrote a 20 KLOC device driver in two weeks. Needless to say, the Codenator’s design was clearly better plus it fixed all the issues we previously had with the driver. But can you imagine the traumatizing impact this assault had on the component owner, whom it took months to write the original code?

Probably suffering from Asperger’s syndrome, the Codenator is a maverick, hates teamwork, discussions, and compromises. Yet, he’s smart and productive. It’s just his utter lack of people skills in general and empathy in particular, which make him a difficult, if not impossible, team member. You shouldn’t be surprised to hear that he’s unable to take criticism. To him, it’s either his way or the highway.

TOOLING

Remember the scene from Terminator 2 where the Terminator discovers the minigun at the arsenal? Likewise, tools are important to the Codenator as they help him complete his missions. He shows a great level of mastery of the tools he uses daily. Nevertheless, he’s conservative, quite the opposite of an early adopter, and therefore hesitant towards employing new tools. A Codenator is unlikely to try out new programming languages either and will do most of his coding in matured, proven versions of C, C++, and Java. Why? Because the Codenator’s credo is that no new tool or programming language can ever solve the fundamental problem of software development: that people talk instead of code.

RATING

According to the Q²S² framework, a Codenator’s rating is 5/3/1/1.

CONCLUSION

If Sarah Connor were a programmer, she’d probably put it this way: “In a world full of code fear, a Codenator might be the sanest choice.” If he just wasn’t such a heartless robot! But don’t attempt to socialize a Codenator. Even if he honestly tried to change, he would soon relapse. And if you push him too hard, it’s very likely that he’ll just pack his bags and leave. Another big mistake would be to put a Codenator in an environment with strict rules, like a scrum team, for instance. Scrum is a very systematic approach to software development and requires lots of coordination through various forms of planning and meetings. That wouldn’t work for him. He’s a Codenator, mind you, not a coordinator.

Instead, assign him to tasks where his harsh personality can be put to good use. Have him work on prototypes, code ports, and performance optimizations, for instance. Especially when requirements are foggy or non-existent, he will close the gaps, come up with pragmatic solutions that help him carry on doing what he loves most: constantly write code. While some highbrow developers might complain that a Codenator’s code is far from aesthetically pleasing, his code is solid and—more importantly—works. A Codenator is the incarnation of the “finished is better than perfect” adage.

To sum it up, despite his weaknesses with people, he’s a must-keep because he’s never afraid to start. Even better, he’s a finisher. A Codenator doesn’t stop when he’s tired—he stops when he’s done.