Don't Go Dark

June 14, 2008

Ben Collins-Sussman on programmer insecurity:

What do you do when somebody shows up to an open source project with a gigantic new feature that took months to write? Who has the time to review thousands of lines of code? What if there was a bad design decision made early in the process -- does it even make sense to point it out? Dropping code-bombs on communities is rarely good for the project: the team is either forced to reject it outright, or accept it and deal with a giant opaque blob that is hard to understand, change, or maintain. It moves the project decidedly in one direction without much discussion or consensus.

And yet over and over, I'm gathering stories that point to the fact that programmers do not want to write code out in the open. Programmers don't want their peers to see mistakes or failures. They want to work privately, in a cave, then spring "perfect" code on their community, as if no mistakes had ever been made.

hidden behind a window

I don't think it's hubris so much as fear of embarrassment. Rather than think of programming as an inherently social activity, most coders seem to treat it as an arena for personal heroics, and will do anything to protect that myth. They're fine with sharing code, as long as they present themselves as infallible, it seems. Maybe it's just human nature.

Ben's talking about open source development, but this anti-pattern exists in commercial software development, too. The very same phenomenon is documented in Jim McCarthy's 1995 book Dynamics of Software Development. It's presented as Rule #30: Don't go dark.

You have to manage the granularity of development tasks in such a way that you emerge with visible deliverables over short intervals. In our group, we argue back and forth over how big the intervals should be: five days, ten days, three weeks? In our world, three weeks is going dark.

I don't know what's appropriate for your world, but we want team members to have contracts with the other parts of the team so that they surface pretty often with visible components. When somebody surfaces and the deliverable isn't done, we know right away. We know that this week we slipped one day. That's worth knowing, much better than getting to the end of the project and observing, "Oh, we slipped six months!" At that point it's too late to even bother counting up how much you've slipped.

Rule #30 is directly followed by a related rule, Rule #31: Beware of a guy in a room.

Specialist developers who lock themselves away in a room, who go dark for long stretches, are anathema to shipping great software on time. No matter how brilliant a developer might be, don't give the developer a significant assignment unless he or she understands and buys into the type of development program you intend to run. The brilliant developer must be capable of performing on a team, making his work visible in modest increments and subjecting it to scrutiny as it matures. Some people find this intolerable, and although there is a role for people of this disposition in the software world, it is not as a part of a team devoted to shipping great software on time.

This is easier to deal with in the workplace, because you typically have some kind of (theoretically) rational project management in place, and everyone works under the same umbrella. It's effectively impossible to go dark if you're practicing any form of agile software development. For example, Ron Jeffries borrowed this concept from Jim McCarthy's book and codified it into extreme programming lore. Tasks are always sliced up so they fit into a single iteration, and you never let them spill over into multiple iterations. You'll always have something to show at the end of each iteration. You can't go dark without quitting the project or, perhaps, your job.

An open source project is a very different animal. It's a motley collection of widely distributed, loosely coupled volunteers. There's no project manager breathing down your neck, urging you to break your work into short, shareable increments. The risk of going dark is severe. The burden of proof falls on the individual developers, not only to make their work on the project visible in modest increments, but also to get over their code insecurity and share their in-progress code with other people working on the project. How do you expect your fellow coders to take you seriously if you aren't regularly showing them code? It's the only form of currency that matters on an open source project.

Don't go dark. Don't be that guy in the room. Hiding your code until it's "done" may feel safer, but it isn't. Sharing your ongoing code with your coworkers is scary, much less the world -- but it also results in feedback and communication that will improve your code and draw you closer to the project you're working on. And isn't that why we all write code in the first place?

Posted by Jeff Atwood
105 Comments

At one project I was more or less ordered to go dark, because it had been started despite objections from some of the developers. The result was "sprung" after it was shown to produce much better output than the old code, and resulted in a bit of a shift in the way code was produced in the team. Releasing the code during development in this case could have lead to objections like wasting time on something they "knew" wouldn't work, and might have doomed it altogether. In the real world, ugly as it is, politics are also important.

Victor Engmark on June 15, 2008 2:05 AM

I was told something invaluable in my first year of university, that the IT world was a very lonely place when you're on your own, so networking and communication is the most important part of your professional life.

Due to the work we do I think it's natural for people to lose their touch when it comes to basic communication with work colleagues. I've worked with a number of developers that occasionally wouldn't even turn up to meetings because they wanted to stay downstairs and carry on working.

Mike on June 15, 2008 2:19 AM

" I always liked the book, "One Minute Manager" for its simple but effective analogy for creating a successful working relationship. Although, I think it was written before stock options which assumes only one motivating factor.
http://www.scribd.com/doc/335040/The-One-Minute-Manager "

DJ: I just spent the last little while reading that whole book. Thanks for the link!

Although I thought the story line was a bit cheesy, it all makes sense and reminds me in some ways of 'transformational leadership' (http://en.wikipedia.org/wiki/Transformational_leadership). I've bookmarked it and I'll be keeping it in mind when I'm put in charge of people.

David on June 15, 2008 2:26 AM

Just because code is open source doesn't mean it will be reviewed.

Code reviewers themselves have just as big of a responsibility and in the open-source community they rarely take it seriously.

Remember a few years back when Linux released their daily build and the ports/socket code snagged credit card info and dished it out to a Russian server? Not a single "code reviewer" found it but after over a 1000 installs people started wondering what all that traffic was in their log files.

If you can post a link to this story I think it would be great. Google seems to have been able to completely remove it from their index. I don't blame them, it was bad timing because Google was touting their inexpensive Linux server farms and others were pushing hard to have the Federal Government go open-source for "security" reasons. Whoops!

Linux Hack on June 15, 2008 2:34 AM

Very useful article, it made me re-think my previous decision. I have started my first open source project (a really small one). I created the project on sourceforge without even having a plan and then started coding.

Haven't had alot of time to work on it though so I don't like that I made it public from start. For the next project I was going to "complete" it before open sourcing it. This post made me re-think that and think that it might not be so bad to start from scratch even though alot of mistakes will be visible.

Johan Soderberg on June 15, 2008 2:46 AM

This reminds me of the various talks/articles I've read about distributed source code management tools. One of the arguments that proponents of Git/Mercurial/BitKeeper continually bring up is that by making branching and merging cheap, you discourage the practice of 'going dark' and working in your own sandbox (which isn't under source code management) and then having a nightmare of a merge at the end of it to try and integrate it into the main trunk without obliterating all the changes done since you started your implementation.

I must admit, I've never really worked on a big project, so I'm not really qualified to argue the pros and cons of distributed versus centralised SCM. Is there anyone around who can contrast the two approaches, and what impact they have on your working habits etc?

Murali Suriar on June 15, 2008 3:20 AM

I actually think Git might enable people to go dark. One of the flaws with SVN is its centralized, however that means that everyone has to check their changes into the same codebase.

Git is still the best scm out there, but if an organization switches to it, the team needs to be extremely disciplined about integrating their code back to the shared repositories on a regular basis. 1 weeks of coding alone can equal 2 weeks of integration nightmares.

jc on June 15, 2008 3:56 AM

"Rather than think of programming as an inherently social activity, most coders seem to treat it as an arena for personal heroics, and will do anything to protect that myth. They're fine with sharing code, as long as they present themselves as infallible, it seems. Maybe it's just human nature."

No, it's the gigantic ego of "teh coder".

Teh coder on June 15, 2008 6:13 AM

How does this happen in the commercial world? Aren't there design and progress meetings? Code reviews? Friday brown bags? Hallway meetings? Project manager stopping by occasionally? Customer meetings? Customer progress demonstrations? Arguments in the bathroom? Peer pressure?

I guess I don't understand how an organization, large or small allows someone to go dark. I think it must be more to do with how managers encourage or discourage communication and how the group handles dissent. It does make me wonder...

Old Coder on June 15, 2008 6:27 AM

I think the situation is exacerbated by the community itself: we praise, and constantly look for, perfection. We admire the mighty developer who is able to bend space and time, crafting flawless code along the way. Why do you guys think code reviews are so despised? Because we, in our megalomaniacal minds, find the prospect of having our code dissected in front of our peers simply dreadful. We just don't want to go through them. "How could I be wrong? Are they crazy!? Impossible!"

As many of you have mentioned (or implied) already, I think we should detach our egos from our code. I know it's not an easy task. But, we'd all be much better of if we did. There's always room for improvements and continuous learning. As someone much wiser than me said once, the name eludes me now, "Don't look for perfection. Look for excellence".

Elvis Montero on June 15, 2008 6:30 AM

Great topic. I am actually guilty of that: I code-bombed the Subtext project with a port of their blogging engine to MySQL:

http://www.angryhacker.com/blog/archive/2008/03/30/subtext-port-to-mysql---take-2.aspx

But i did keep the group informed, more or less. There were reasons that I did not work within the confines of the process, mostly having to do with time, but next time around I'll definitely work with the group.

Robert G on June 15, 2008 7:03 AM

"Remember a few years back when Linux released their daily build and the ports/socket code snagged credit card info and dished it out to a Russian server?"

Uh, no Mr. Linux Hack, I don't. I'm also not sure what you mean by "Linux released their daily build" but whatever. Care to elucidate?

Julian on June 15, 2008 7:05 AM

Interesting post. Waiting to release your code due to insecurity appears to be very common. A lot of us are guilty of this, as another commenter stated. I think what I find troubling is that code a developer spent time on without releasing can lead to management decisions that have already been made, hence making the developer's time wasted and therefore the code useless.

Patrick on June 15, 2008 8:08 AM

It's as always: communication is the most important aspect of every project, open source or not. Providing code is a very nice form of communication, because it exactly describes what you were thinking. A big blob of code hides this communication effort and makes it less effective. Communicate early, communicate often.

Another beast: continuous integration. How to cope with the changes your teammates are doing while you are 'in the dark'? You keep synchronizing your local tree more than you'd want to. With a fast-moving project, it sucks all your valuable coding time to just keep up with all changes.

Share your code with your team mates, really.

Daan on June 15, 2008 10:02 AM

What's to say? My own heart is riddled with insecurities. I see my code as part engineering, part artform. On the one hand I acknowledge that, while I'm a good programmer, there's a lot that could be improved by being HOT (honest, open and transparent). On the other, I'm in my garret, high above the rabble in the streets below, sweating, and weeping, over my latest work. I'm guilty, many times over, of going dark. Journeying into the light can be a frightening thought. I'm working in the light at the moment, but the temptation to drift back into the twilight and then into the darkness is always there.

Bruce M. Axtens on June 15, 2008 10:09 AM

Another positive side effect of using Agile is that the client cannot go dark. Preventing the client from going dark is just as critical as preventing other developers from going dark. Showcasing implemented features, and recalibrating them and the requirements in modest increments is critical to delivering software, but we all knew that already... Right?

But who plays the role of the client for open source projects?

Mukkarum Amin on June 15, 2008 10:10 AM

One problem is that others will laugh about your code.
They will laugh how crappy it is.

This has happened with PHP for example.

markus on June 15, 2008 10:34 AM

That post was worth a thousand UML documents of a Monopoly game in advancing the notion that people should, well, you know, *talk* to each other.

Good post.

Shawn Leslie on June 15, 2008 10:36 AM

I've been in a bit of the opposite situation.
I was working on a major reworking of a part of an open source program, I did try to make frequent commits of my changes to a branch, I didn't go dark. But nobody wanted to inspect my code, look for oddidites in design, bad implementation or whatever. "Oh no, I don't understand that part", "You're probably doing fine", "Just get it done and into the main trunk". I could barely get anyone else to discuss details about the work I was doing.
I could just as well have gone dark, it wouldn't have made a difference.
I ended up merging my branch into trunk a bit early, but it turned out fine and it's quite mature by now.

Niels on June 15, 2008 10:38 AM

The problem is that when you tell people what you are planning to do, there is always some a**hole who knows less than you who is going to criticize your plan. It takes a brave developer to continue with their original plan after getting flamed in public.

If it's a small team, you'll probably get good feedback. If it's a large team or publicly open source, the likelihood of getting flamed increases.

Mushroom on June 15, 2008 10:43 AM

No doubt different programmers have different motivations for "going dark". But, I wonder if there is similarity to other "artistic" endeavours? Many painters and authors loathe discussing work in progress. There is a feeling that talking about a project before it's fleshed out can ruin or displace the train of thought before it is fully formed.

gunther on June 15, 2008 11:01 AM

The concept must be universally human. As a feature film animator, I've witnessed animators who insist on locking themselves away for days or weeks intending on springing a glorious and completed shot upon the director. 9 times out of 10 it's not what the director was thinking and it's back to square one.

I think there's an insecurity in not wanting to show your insides. An unfinished animated shot (much like code), reveals your thought process, and can be frankly, ugly to look at. In a collaborative environment however, it's critical to be able to iterate these ideas out in the open.

Fitzcarraldo on June 15, 2008 11:07 AM

Oh good, I guess this means I get to start reviewing the stackoverflow code soon! Yay!

Joel Spolsky on June 15, 2008 11:34 AM

One problem with such social interaction when writing code is when you have a weak team lead and at least one guy on the team with a completely different programming philosophy, strong opinions, and a love of debate. If you show it knowing that your brilliant idea will get turned into a committee-designed, mediocre compromise, it feels a lot better to wait until it's done.

This happened to me on a team once. Two of the guys had a really strong MSSQL background, but less Java experience, and were always pushing for DB stored procedures to do everything. Every design decision was a massive lobbying effort, because two members of the team were guaranteed to have a radically different take on the decision.

I know this may be an edge case, and under most circumstances I agree with the post. But sometimes going dark is an act of self defense.

Andy on June 15, 2008 11:49 AM

If this is indeed the problem and cause, I think it is perhaps a newer phenomenon and a reflection of working with people with different backgrounds and life experiences, leadership, and/or our current economic environment more than an inherit trait of people that are in the IT profession.

It seems programmers are enthusiastic to share their code and knowledge, because they can learn as much as they give, and they get satisfaction out of the interchange (as long as it is constructive and non-personal). If they are coding ("in the dark") and dumping, I'd ask, "what is the root cause", and address that issue.

From huge computer conventions to every size of computer user group out there, they exist to share information, learn, grow, and an opportunity to get out of "the dark". If programmers only wanted to work in "the dark" these wouldn't exist in the form they do, and generate millions in revenue in tourism dollars.

Certainly this isn't localized to the IT profession. This topic often comes up when talking about telecommuting and work. Why hasn't it caught on in corporate America? Everyone talked about it over a decade ago, bye-bye cubicle, hello home office. An accountant working from home, maybe even creating a desktop DB or spreadsheet, doesn't that constitute working in "the dark"? No one is examining their technique, logic, or how it fits into the larger system. In this case, the answer usually boils down to management doesn't know how to manage people without seeing them actually doing it (how do we explain outsourcing then, hhmmm %-? I guess you outsource the watching too. ;-)). Perhaps that is similar to your "going dark" though.

I always liked the book, "One Minute Manager" for its simple but effective analogy for creating a successful working relationship. Although, I think it was written before stock options which assumes only one motivating factor.
http://www.scribd.com/doc/335040/The-One-Minute-Manager

Another good book, "Becoming a technical leader: an organic problem-solving approach".
http://www.amazon.com/Becoming-Technical-Leader-Problem-Solving-Approach/dp/0932633021
Or Weinberg's other book, "The Psychology of Computer Programming" (although dated). Or "Mythical Man Month""

The failure rate in IT projects in general, suggest there might be more to it ;-)
http://www.computing.co.uk/computing/news/2197021/failed-projects-hit-half-uk
http://www.it-cortex.com/Stat_Failure_Rate.htm
http://www.itworld.com/Man/3883/041015poor/

dj on June 15, 2008 12:25 PM

Each of us occupy different positions in political environments (PEs) we work within. There are more or fewer lines which are risky to cross, for each person. The mature expertise knows when embedding a nice-sounding rule is worth it or not (unless they're wrong, but at least they're wrong less often ...).

I've long preferred what I call "MIT-like" environments where there's a healthy fraternity-like fun in being crazy and showing off. At a former small company, we had 3 senior developers and 3 or 4 juniors, and most of us had been there 6 years or more. We constantly hopped on code someone else had coded, to fix or revamp it, and usually we'd make occasional 'ewww' remarks about this or that, often with a q of what drugs the original coder was on at the time, or what relationship problems they had then. But most of the fun was in positivity --- we improved what we came upon, and we made it all much better. My fave rules are: constantly improve, and disrespect shows respect.

Tony on June 15, 2008 12:34 PM

I think a perfect example of not going dark is Scott Hanselman. He's working on BabySmash to learn WPF and XAML. He's using CodePlex to share it with others and learn from them as well as help others to learn along with him.

Matt on June 15, 2008 12:39 PM

Often going dark points to a larger problem.

Sometimes people want to make a change they know other programmers won't like, or they're afraid that the other programmers won't understand it. They fear their project will be derailed or misguided through ignorance.

This points to a lack of empowerment in the environment, whether it is the power of the individual to be heard or respected if they are not team leadership, or the lack of power to enforce decisions if they are. It can also point to a stifling environment where decision making is funneled through very few people, and those people don't appreciate input or different points of view.

At that point, folks should ask if they really want to take part in the project or not. Maybe there's no choice, maybe the project is too important to go wrong. On the other hand, there's a billion problems to solve, work on one where the politics and society are better.

RAnonB on June 15, 2008 1:11 PM

Sometimes with open source projects you can reach the same "code-bomb" status even if you are sharing your code every step of the way. I recently started writing a patch for a popular open-source media player. I posted each step of my process in the bug report, but did not get any responses. As a result the patch is now about 1000 lines and probably has no chance of getting committed. The onus is not only on the patch writer to remain transparent, but also on the project developers to keep on top of things.

Lee on June 15, 2008 1:12 PM

"...and although there is a role for people of this disposition in the software world..."

i'm curious. what role would that be?

n on June 15, 2008 1:24 PM

Hi Jeff,

I kind of find it ironic that going dark would be flagged as an anti-social pattern.

Isn't it their anti-social traits that characterize great developers in the first place? i.e. their greater affinity with machines than with people...

Going dark is bad, sure, and I would also prefer it if gravity was a little lighter (kidding).

Going dark sometimes, as a act of self-defense, is something that makes sense to me when one lives in an hostile world. And who claims the world is always a nice place?

JeanHuguesRobert on June 16, 2008 2:05 AM

Once you go dark, you never look back...

Matt on June 16, 2008 2:17 AM

Hi Jeff. I'm looking forward to seeing you post your articles paragraph by paragraph, as you write them, rather than going dark on us and springing your blogging gems upon us fully formed ;-).

Pete on June 16, 2008 2:35 AM

Nice article. 100% agree.

I cannot write a single line of code without a svn/cvs repository, continuously committing at every compilation. Doing differently is suffering for me. (I don't care of people watching my mistakes: I never do mistakes :-) )

Luigi R. Viggiano on June 16, 2008 2:36 AM

If you get code reviews frequently then the quality of the code you check-in improves. Even if the person you're explaining it to says nothing you'll probably notice potential improvements yourself while doing this.
Depends on what you think is most important, the quality of the software or how people perceive the quality of you.

Jax on June 16, 2008 2:38 AM

This is a problem in two parts.

First, we coders tend to have (from my perception) rather soft and somewhat large egos that don't like to get pressured by appearing wrong. I consciously try to not feel bad about public mistakes but it still gets to me. That's part human nature, part the obsessive personality that tends to 'fit' better with the coding profession.

Second, not a lot of managers understand the value of things like code reviews. If my manager says I have 5 days to get a feature implemented, knowing that I can probably do it in 4-4.5 days with a bit of contingency, they never think that they need to schedule a co-worker or someone else to also review my code. Add on to this that my manager is a producer and doesn't know an int from a double and there is a pretty big problem.

Spencer on June 16, 2008 4:12 AM

Of course it would be nice if the world was black and white, but it's not. Sometimes it's perfectly OK, and even necessary for a good eveloper to shut the fucking door for a week or two and get things done. If the dev is good, he will put flexibility into his design to satisfy fringe cases. If he's really good, he will improve on the original design and produce reliable, tight code that will run like a clockwork and satisfy the requirements perfectly well. The "social" part is needed for people who can't get shit done to put up this illusion that they're actually doing something. You know the types, they sit around, socialize till they're blue in the face, while the "anti-social" dude with skills locks himself up in a room and gets things done.

Whoa There on June 16, 2008 5:33 AM

Committing lots is not always a good solution either, do you want to be the guy that breaks the nightly builds every day for the next four weeks? Adding small working bits is a must of course. BUt yeah better smaller working bits then bigger not working bits, makes it eassier to debug too.

Christiaan Baes on June 16, 2008 5:43 AM

Everybody writes crappy code. Everybody.

It's just that some people don't want to admit it.

Don't get me wrong, we all occasionally have the light of inspiration shine down upon use and create something really beautiful.

However, it has been my experience, that most of the time we are programming solutions to mundane business problems and guess what? We wind up with mundane code.

Because of this, a lot of programmers don't develope the 'new', 'in', 'at the fore front', 'sizzelin' coding styles that we all are taught is the 'correct and cool and happenin' way.

If you'r in this boat do you really want everyone else looking at your 'sub-standard' code?

Mac on June 16, 2008 6:08 AM

@fdgsdfg:
Must... resist... clicking... on... obvious... spam...

Tom on June 16, 2008 6:12 AM

"What do you do when somebody shows up to an open source project with a gigantic new feature that took months to write?"

Reject it. At the very least, nobody should be coding huge, undiscussed features over several months.

This links in with the principle of "do one thing, really well". If a huge new feature is ever added, it should be initiated by the core developers, not a general contributor, because *most of the time* it won't be The Right Thing to do.

This is something that open source generally does really well, being more associated with the unix world than the windows' philosophy of 'a few programs doing masses of stuff'. In my experience, 'going dark', particularly in terms of adding a huge new feature, is far more problematic in the proprietary world than the open one.

bobby on June 16, 2008 6:16 AM

"Isn't it their anti-social traits that characterize great developers in the first place? i.e. their greater affinity with machines than with people..."

Not really, no. If you were designing machine to machine software, it might be, but most software's man to machine. Also, at least some of the best developers I've ever met have been great with people.

Tom on June 16, 2008 6:26 AM

Going dark is bad, and I strongly believe in code reviews and regular iterations. But man am I sick of hearing about "agile". Many of the concepts contained in agile have been used for quite some time. Others take things too far such as peer programming-only environments. What makes me sick about agile is: the way people act like it's so f'n special, and so original. It's not.

I like to say the most important skills for a developer are communications and attention to detail. Verbal and written communication are both extremely important. It's not a matter of being social. It's a matter of being able to describe what you did, or what you are doing, and knowing when to speak up. Way too many developers aren't able to do that.

Luke on June 16, 2008 6:28 AM

From gunther: "But, I wonder if there is similarity to other "artistic" endeavours? Many painters and authors loathe discussing work in progress. There is a feeling that talking about a project before it's fleshed out can ruin or displace the train of thought before it is fully formed."

Programming is not art. It can be right or it can be wrong. There is no in between. If a group of people disagree on the function of a button, then the button is wrong. The button should describe exactly what it will do. There should be no confusion.

If people disagree on the meaning of the red berries on the bush behind the girl reading a book, that's art. People don't die if they don't understand the red berries.

Fred on June 16, 2008 6:38 AM

This is a topic near and dear to me right now. I was forced to go dark. I'm new to C# (.Net in general) and was given a large part of a new project to develop. The client kept changing requirements, which changed the data model so I kept having to rewrite my code.

I asked my "manager" to review my code often -- I'd ask him at least once a week of not more, over the past 3 months. He said he did and it was fine.

I was unable to mock up test data (the DB is very large, uses some MS specific ASP.Net user management stuff that I don't understand, so I was unable to just make a temp DB on my own system for testing.) I was not allowed to create records to test with will-nilly because another guy on our team was testing with some of the same tables, and his data "should have covered every use-case we have."

The result of all this is that a programmer who doesn't know .Net was forced to code lines that he was never even able to step through in a debugger.

When this went to testing, things blew up. Really badly. Well, no kidding! I got the code to compile, but was really unable to test a large portion of it. The client got pissed, called the owner of the company and told the owner to fire ME (I'm the most senior programmer, if the most junior in terms of .Net).

So, coding in the dark, for me, was a disaster. I'm now relegated to a different part of the project, and I believe that some people, if not all, have lost confidence in my over here. I'm depressed, dejected, and generally pissed off.

Now I go and sit with my "manager" for hours until he gives in and pulls down my code and looks at what I've done. I've also gotten him to finally configure my machine with all of the ASP.Net user management stuff so that I have my own database.

Since I finally got what I needed to do my job, my speed has increased, my understanding has increased exponentially, and the last thing I pushed out to the client worked 100% bug free (so far).

A much better experience.

Matt on June 16, 2008 6:47 AM

The opposite of 'going dark' is coding by committee, which is anathema to creative people. Most coders who undertake such a project view themselves as a sort of Michelangelo, and may resent taking advice from those who do not share their vision.

However, even great programmers are willing to take advice from a limited subset of people who have gained their respect. However, even here, feedback needs to be carefully filtered. Nobody likes getting burned by committee, especially a remote one who won't take you out for a beer to soften the blow.

Michael T on June 16, 2008 6:54 AM

I read this piece on the same day as Jason's piece over at 37Signals called "How not to apply for a job." ( http://www.37signals.com/svn/posts/1088-how-not-to-apply-for-a-job ) In that article Jason mocks a job applicant who put a space in the company name. In this article developers are encouraged to show work in progress, to be open and transparent and share code they know to be buggy. In that article developers are told they will not be considered for a job if they have a single typo in their resume. Now I'm not disagreeing with either article, but if you only hire people who are perfectionists, they're not going to share their mistakes.

Craig Smith on June 16, 2008 7:08 AM

We used to call this "under the cover of darkness" or "army of one" style coding.

john on June 16, 2008 7:15 AM

Whilst there is the danger of 'going dark', I think there is also merit in one researching their new idea/feature/fix properly before answering inevitable questions from the team. There's nothing more painful than being presented with work whose author is unable to comment on questions relating to its structure, integration, future, alternatives etc. In these situations there's a big danger of the whole team being forced to reason about your work for you which conflicts with separating workload.

KCender on June 16, 2008 7:27 AM

Some trouble must come when there can be no right way, when to make something clearer for one is to make it more obscure for another. Not too common, I know, but can happen.

eekee on June 16, 2008 7:28 AM

Many times the reason I don't like sharing code is for the same reason I don't like many forums/chat channels: people are dicks.

Whether it's a small error or a huge one, a typing error or a casting error -- it's immediately like feeding time in the badger pen.

N on June 16, 2008 7:46 AM

I live in the dark all the time. I work for a small company and am the only developer here. I often share my code with my boss, who rarely understands it (he is a very competent DBA, but has little development experience). Most of the time, I explain the logic, he gives a nod as to whether he agrees with the logic, gives suggestions, and life goes on.

I dread the day that I leave this place and am forced to work on a development team. Because my job eats up a lot of my time, I'm not able to do "practice" by participating in the open source community. In the meantime, I read as much as I can about accepted development processes and organization, and do my best to follow them. I also try to review my code from another person's perspective (which I liken to the difficulty of an artist looking at his work with another person's eyes) which sometimes works out.

I realize that I'm part of a dying breed. Like the old farts before me, I can work privately and (mostly) unguided for months and then *magically* release new software. Admittedly, I'm a little selfish about my code, but the solitude and the "artistry" of coding is why I wanted to do this in the first place.

Ben on June 16, 2008 7:58 AM

I think there are different levels of going dark and they shouldn't all be considered bad.

If I'm working on something that requires a certain amount creativity then I will usually go dark for long periods. This has absolutely nothing to do with any insecurity in my coding.

I am extremely likely to delete and re-engineer everything many times as ideas develop in my mind. These first iterations are quite simply completely wrong. However, they are invaluable to myself as they often provide inspiration that allows me to produce something that is heading in the right direction.

It is at this point that I can put my ideas out there and get some feedback. I will be clear enough in my mind to explain my reasons for doing things, and the paths I took getting there. The main thing to note here though is that whilst I may have gone dark, at no point would I emerge with anything "perfect" or "finished".

So whilst I agree completely with this article I think there are times when developers need to be left to their "artistic" methods of producing some out of the box ideas.

Robin Day on June 16, 2008 8:13 AM

Going dark should *not* be something that largely depends on the character of individuals. I think the "span of darkness" reflects the unit size of job. If the development system is done right (clear specification, good abstraction, good modularity, well defined interface etc.), the unit size of job will tend to be small. If the size of job is targeted to fit into ,say, one day, it's going to be hard to go dark for more than a couple of days (taking into account the possibility of messing up).

Paulus on June 16, 2008 8:17 AM

Once again, you make a point that reminds me of something my mentor would have said (it's been about 2 years since I've worked with him... but still he harped on this issue more than any other). His point was that he could deal / work with a developer who doesn't know how to program something; but would *NOT* work with a developer who doesn't know how to touch base at least every other day with the tech lead (him).

Wes on June 16, 2008 8:21 AM

Must... resist... clicking... on... obvious... spam...

Jeff is sleeping in today ...

Hartmut on June 16, 2008 8:22 AM

@jc "I actually think Git might enable people to go dark..."

Not really. GIT requires trust and accountability, as in merging code into your code base from trusted sources in your own personal network. It demands a higher degree of accountability.

Charles on June 16, 2008 8:29 AM

@N

That's pretty much the way people are. Anonymity on the internet allows you to be a jack ass to anyone. It's rare to find "constructive" criticism from people unless it’s in a "professional environment"... and even then it’s pretty rare...

HB on June 16, 2008 8:42 AM

In terms of quality and time to market I can't think of reason for going dark but I do it routinely for for two (2) habitually compelling and selfish reasons:
* he who codes, rules. (ownership)
* some might implement your idea [faster/better] ["robbing" credit/kicking your ego]

Even for the most lazy amongst us, there is a desire for control, recognition and authority. Springing huge chunks of code on people gaurantees at least one of these three qualities will come to fruition if it is deemed useful (and mostly working).


Jamie on June 16, 2008 9:40 AM

I don't like being completely alone. I don't want to be the only one responsible over whether a project will succceed, esp. when someone else who knows nothing about programming is repsonsible for gathering requirements.

I'd love to work in a team-oriented environment, but I don't think non-programmers knows what that means. Working with a team certainly does *NOT* mean working side-by-side with your peers all day long which is how managers seem to think of a "team". It's best to work alone most of the time, but have regular meetings every day or two to discuss progress, requirements, design, etc... and use email / IM for quick questions so you don't disrupt anyone else's concentration at inopportune times. That's another thing managers don't understand - the importance of not being distracted when your "in the zone".

Oh, and Fred... most software is not engineered. Safety-critical systems are, but not websites, games, media software, etc... Software development is still a craft, because its more about exploring, tinkering, and just playing around with code until it works. Engineering implies that you can write extensive design documents describing every last detail of every feature before you begin to write code, and it's proven that's extremely impractical.

KG on June 16, 2008 10:07 AM

@Fred on June 16, 2008 05:38 AM
" It can be right or it can be wrong. There is no in between. "

That's where you're wrong. It's not about whether a component works or doesn't work, it's about how well it works. It's about how efficient and clearly written the code is, the level of abstraction, and about it being highly-cohesive and loosely coupled. This is why software development requires a mind that can appreciate the beauty of elegant algorithms and architectures.

KG on June 16, 2008 10:24 AM

I think part of the reason programmers are reluctant to show any thing less than "perfection" (in their own mind) comes from my observation that so many of people in this industry are arrogant, self-righteous jerks.

Seriously. Put yourself in this position: Everyone you work with believes they were the best thing to ever happen to computers. They present themselves as infallible, knowing everything, and producing bug-free, perfect code in less than human time. They're never wrong, and if they're ever proven wrong, it's obviously not their fault (sarcasm).

In this position, wouldn't you be a little self conscious too? You have to be pompous and perfect just to keep up with everyone else!

I like to think that the world knows those arrogant people are wrong about themselves and the work they produce, but sometimes I'm not so sure... They sure seem to get a lot of respect and glory, everywhere I go.

Anonymous on June 16, 2008 11:08 AM

A gross generalization.

Most projects require teamwork. Sometimes there IS a specific problem where you want the resident genius to lock him/herself in a room and not come out until problem solved.

One size does not fit all.

Steve on June 16, 2008 12:00 PM

An open source project is a very different animal. It's a motley collection of widely distributed, loosely coupled volunteers. There's no project manager breathing down your neck, urging you to break your work into short, shareable increments. The risk of going dark is severe.

Sure, there isn't a project manager breathing down your neck. But open source projects most certainly *do* have so-called "maintainers" (i.e. those people who both have access and permission to commit to the code of the main development line). Thus, what for closed source software (not necessarily commercial) is the job for the project manager(s), becomes part of the project maintainer's job in open source software.

How do you expect your fellow coders to take you seriously if you aren't regularly showing them code? It's the only form of currency that matters on an open source project.

Exactly! And this very fact gives the project maintainers some form of "power" to demand that submitted patches are delivered as small and digestable incremental changes. You wouldn't want to go through a large amount of effort writing a patch only to get it rejected now would you? Especially not if the code (and perhaps the "ego-boost" associated with it) itself and the time spent on it is the only currency.

For example, we at Warzone 2100 ( http://wz2100.net/ ), i.e. the project maintainers, as a policy request submitted patches to be small and incremental. Small and incremental patches _always_ get priority, not because they're more valueable, but simply because they're easier to understand and thus to apply. Furthermore I, in the role of a project maintainer, quite consistently reject patches that are too large to understand well enough. I almost always request patches to broken down in smaller pieces if I consider them to be too large. If I like the feature or behaviour change of a patch enough, (or like the developer that wrote it enough), I may perform this patch splitting myself. In all cases though, I only commit patches that are small enough so that each changeset is fairly easy (for those who're familiar enough with the code already) to grasp.

Giel on June 16, 2008 12:24 PM

Very recognizable, good post.

As dev of the open source RTS game engine Spring I've experienced all these disadvantages. Besides the issues you mention in your post there's also the fact that submitting a huge blob of code to a project often attracts a lot of compliments from the non-programmer people (in case of Spring: players content developers) in the community.

This alone already increases pressure on the project developers to commit the code as soon as possible by a huge amount, while at the same time there seems to be a strong negative correlation between size of the initial patch and code quality (there are exceptions of course).

Combined this makes that reviewing, fixing and integrating these huge blobs of code is a very costly (in terms of time) and risky operation, which also isn't as easy to cooperate on as when it had been made in small chunks. In practice I observe this means it takes ages before huge patches are entirely integrated, if they get integrated at all.

Tobi Vollebregt on June 16, 2008 12:24 PM

On the flip side of this, voodoo behind closed doors is sometimes essential for job security.

gt on June 16, 2008 1:05 PM

I just had to pipe up and say that I actually have the same situation as Niels, I've been at two jobs now where I couldn't get people to review my code for anything. On the rare occasion that I did get feed back, the reviewer only found a few misspellings in my comments.. The few times in school when we had code reviews, I actually loved it. It was great having someone willing to discuss various quirks in my code or how things could be done better.

Tfdml on June 16, 2008 1:08 PM

In this position, wouldn't you be a little self conscious too? You have to be pompous and perfect just to keep up with everyone else!

This.

The first thing you're told in industry is "you don't have experience". You could have been a hobbyist programmer for 10 years, learning and making all the rookie mistakes (and learning how to aviod them in the future), feeling confident in your ability to contribute to the world. However, because you don't immediately know exactly what the company is doing, everything about the tools used (which change every 2 years), and everything about what is done in the background, you are dismissed as an inexperienced hack, knowing nothing. Going dark is just a way to cope with the politics of being the noob who has to prove yourself. (The only other way to do it is to accept your worthlessness and become a voiceless corporate drone - this isn't exactly an appealing path to everyone).

Another thing to note is that software isn't a right/wrong proposition. Design isn't a right/wrong proposition - it's about tradeoffs between flexibility and ease of use. You choose a design depending on which you want to maximize. When you get other people in the fray, you run the risk of getting into fights about what to maximize/minimize, what would be easiest for the user, etc. Furthermore, you as an individual are less likely to feel joy in your creation, as it is no longer yours.

For some people, software is a vehicle to make money; for these people, going dark is detremental, as it disconnects you from communication with your customer base.

For others, software is a vehicle to prove their worth to society - to express something. Doing anything but going dark is detremental, as it disconnects you from your ability to truly prove yourself.

AA on June 16, 2008 1:13 PM

Speaking of edge-cases, what do you do when, like me, you work for a tiny start-up and you're programming in at least six different languages (in my case, Ada, Assembler, BASIC, C, Delphi, Fortran, Perl and VBScript)? Okay, the CTO reviews my code from time to time, but we just don't have the man-power for consistent checks. And it's proprietary code, though as has been pointed out, even open source isn't necessarily any better off.

Bruce M. Axtens on June 16, 2008 1:35 PM

As a wise 'man' once said, "Do, or do not... there is no try"

Jonny on June 16, 2008 1:42 PM

I've found in the business world this can be measured in two areas:

1 - How fast you want the project done

2 - How easy you want support to be

So for #1 if you just lock the programmer in their cube until the project is done with very little outside interaction or code review, they will finish faster and usually make a good project. But in that case your #2 will be a major pain, especially if you have other people supporting code they didn't write.

If you do a lot of intensive team code reviews then support should be easy, but your project timeline will be in the gutter.

Dave on June 16, 2008 1:58 PM

In my recent performance review, I actually asked for more code reviews. That's because I know myself. And I know at the end of a day when I'm tired I am going to do something stupid.

But I know that if someone else is going to be looking at my code, two things happen.
1. I have a backstop to catch me, thus reducing the pressure and stress to get everything perfect.
2. It also reminds me that someone at some point is going to look at my code and I don't want them to think "What the heck was he thinking!?"

Darrel on June 17, 2008 2:05 AM

It was never my intention to not be civil or professional. :(

Adam on June 17, 2008 2:38 AM

Just like to add that 99% of the project I worked on was coding in C; surely people pointing out flaws and blind alleys in your code forces a redesign otherwise what's the point?

votd on June 17, 2008 2:53 AM

@fdgsdfg

You are the living proof that Jeff is too busy to read all the posts.

An idea: Jeff must write an article about the difficulty of reading all incoming posts while writing new articles... (Gdel, get out of my mind right now!)

oscar on June 17, 2008 3:49 AM

I have to admit that this is one of the reasons I don't try my hand at open source programming. I understand the need for code review. In fact one of my co-workers and I review each others code all the time. As a young programmer I find it a great way to learn.

It's the people who act like they have never wrote bad code that keep me wanting to hide my code. You know the type who looks are your code and says in that condescending voice "Why did you do it THAT way?" My old manager called it "ugly baby syndrome." You code is you baby and you want to protect it from being call ugly.

Mogura on June 17, 2008 4:51 AM

Great post; when I started at the company I work for I had to run a particular system (huge btw) with a few other people whilst programming on other projects; one by one the other people left which left being the only person to understand it.

I was asked to write a new system that would make it easy for other people to run; which boiled down to me writing my own brief, designing the system, writing the system, testing the system, implementing the system, writing the manual for and training people on the system.

This was not good, I would have preferred more people working on this project, after all it's supposedly a company full of programmers but it was needed asap. If anything goes wrong with it I have to maintain it, amend it update it - it's a pain in the arse. Bring on the light!

votd on June 17, 2008 6:38 AM

Don't forget the flipside: When your peers allow and invite you in to see their work, you should actively review it in a helpful and respectful manner. No one is served when you act like an asshole.

Micah on June 17, 2008 7:22 AM

Pardon my innocence, but does "code" include design documents, diagrams, call hierarchies, function parameters, usage of system services etc?

Are those passe? Am I showing my age?
or
Are we assuming that each person is coding in a domain where there is one design pattern?

David

DAKra on June 17, 2008 7:30 AM

You know this isn't cut and dry. Great software rarely comes from a committee. Because without fail there's going to be one or two(or more from my experience) a-holes that are going to come up with some incredibly stupid and illogical suggestions that management is going to agree with and you end up with incredibly craptacular projects that you were forced to be a part of.

Sometimes a really good dev has to roll up his sleeves and grab the bull by the horns.

Plus, when it comes to an application, in my experience hardly anyone ever really knows what they want until you give it to them.

You know, there are times when the chef just needs to tell all the kids to get their grimy hands out of the soup pot so he can concentrate on making something decent he can serve to the patrons.

kenneth on June 17, 2008 8:05 AM

@Craig Smith: I really cannot comprehend the outrage over companies throwing out resumes over stupid, easily avoidable mistakes... I mean, when you get so many applications, you need to weed them down somehow.

Adam on June 17, 2008 10:09 AM

@kenneth: Of course it's not. Where did Jeff imply that it was? Don't put words in his mouth!

Adam on June 17, 2008 10:26 AM

gunther wonders if software development is akin to artistic undertakings. Kenneth uses a cooking metaphor with respect to programming. However, we can clearly see that programming is not any of those.

Yes, creativity is very much part of discovering solutions and may be part of coding as well, but we could not compare the creativity (thought process) that goes into painting, writing (literary works), or even cooking to programming.

Programming is more like manipulate raw materials at the physical level as opposed to cooking or painting where thing are changed at the atomic level and so the final/finished project is a completely different beast. While programming, a programmer acts more like a carpenter --a cabinet maker. Every piece of the project makes sense independently of the rest of it and so is subject to being viewed and reviewed.

In the case of a cook or a painter, one could not say this.

Besides, lets not forget, we do associate programming with sciences and not the arts. It is perfectly reasonable to ask a scientist to repeat his/her work. How absurd it would be to ask a painter to re-paint one his/her paintings. Or, to ask a cook (a real cook not the dude who puts pieces of pre-cooked canniloni on the plate at the Olive Garden) to repeat himself.

Finally, the final works of art have to carry a bit of magic in them ( some mystical factor has to be at work). That is partially why, the same bowl of pasta does not taste the same to me as it does to you. We interpret works of art differently at different times. While with programming, a set of statements are a set of statements are set of statements.

Ivan on June 17, 2008 11:30 AM

@Adam

Oh, really? The title of the post is "Don't Go Dark," and the theme is that programming large blocks of code by yourself is a bad practice. Just read the last paragraph. Doesn't seem like I'm putting words in anyone's mouth.

kenneth on June 17, 2008 11:37 AM


@fdgsdfg

You are the living proof that Jeff is too busy to read all the posts.

An idea: Jeff must write an article about the difficulty of reading all incoming posts while writing new articles... (Gdel, get out of my mind right now!)


Actually, he already did:
I do read every comment that is posted here, and although I am unable to respond to them all -- I can barely get through my email backlog these days -- rest assured that I eventually read every single individual comment left on this site.

http://www.codinghorror.com/blog/archives/001130.html

Also, check out 'Here Comes Everybody'. In this book, Clay Shirky notes that for all that the Internet does to facilitate two way and group discussions, it still cannot solve the 'fame' problem.

http://www.codinghorror.com/blog/archives/001122.html

Jim G. on June 17, 2008 12:24 PM

@kenneth: "Don't Go Dark" does not mean "Only Do Programming By Committee".

Adam on June 17, 2008 1:25 PM

@adam: I think you may be overreacting a little. I didn't get the impression Kenneth thought Jeff assumed that, I didn't get the impression his comment was directed at anyone in particular. One of the things I like about this blog is how civil and professional the people are. Forum comments don't allow for the nuance of face to face communication so it's easy misinterpret someone's intent. In fact it's possible I just did that with you, and I apologize if I did.

I personally don't agree with his comment, but that's because I feel that feedback plays a vital role in getting my projects right.

Darrel on June 17, 2008 1:34 PM

"The risk of going dark is severe"

Love that

Many of the concepts contained in agile have been used for quite some time

Yes, much of it is RAD rehashed (1981 Barry Boehm?)

Ken McCormack on June 17, 2008 1:42 PM

@Darrel: Sorry, you're right. In hindsight, I think my post would have better off without the "words in mouth" comment.

Adam on June 17, 2008 1:42 PM

whew, that was close, I thought we were about to get a "Coding Horror Flame War" (TM pending). between you two. :)

Darrel on June 17, 2008 1:50 PM

"Remember a few years back when Linux released their daily build and the ports/socket code snagged credit card info and dished it out to a Russian server? Not a single "code reviewer" found it but after over a 1000 installs people started wondering what all that traffic was in their log files. If you can post a link to this story I think it would be great. Google seems to have been able to completely remove it from their index."

The simple reason you can't find a reference to it is that it did not happen! If it had Microsoft et al would have had a field day and would have splashed it across the world's press ....

Jaster on June 18, 2008 5:30 AM

PERFECTLY SAID!

Dave Schinkel on June 18, 2008 9:50 AM

The problem is that when you tell people what you are planning to do, there is always some a**hole who knows less than you who is going to criticize your plan. It takes a brave developer to continue with their original plan after getting flamed in public.

Wow, I have to reply to mushroom's comment. The whole point in "questioning" the "plan" is the entire POINT of teamwork. If you think that a subordinate who knows "Less" than you who asks questions is an ass**** you encompass this entire thread.

Here is my definition of a TEAM per this article which goes against that very mind set from Mushroom which is just one example of many attitudes out there from the Dark Side which makes IT a crappy place to work in probably 75% of the work culture out there:

1) You may be an alpha programmer, a Sr. Developer, Lead etc. However, as a professional, it's your duty to help the guys who are still trying to learn and become a better programmer. If you have fellas on the team who are mid-level or Jr's, you should be more than happy to answer questions as long as those developers have made a decent effort to look things up before asking them. Or...you may be in a meeting, and questions just come up. While there is a fine line betweeen YOUR time and the rest of the team and YOUR project...if you are a player on the team, you should try to answer those even "dumb" questions. Granted there are sometimes you may say you do not have time and that's perfectly fine, but do not be a prick about it, and come back to that developer later to see if they are still struggling. At a Sr. level, I feel it's a given responsibility for the better of TEAM.

2) Not sharing the "why" or "intent" on your plan to the rest of the team is bad communication. If you're adding lets say a new validation framework, and you've just checked in code to Subversion or whatever source control you are using, you should at the least not only tell what code you've changed, but why if it affects the rest of the team on things such as new patterns, new frameworks, or even simple intents. Those things should not be hidden from the team, because you're just wasting other people's time since they will just come back to you later to ask you "why". Why not say it up front to save yourself TIME.

3) Tone. Whether you have a bad day, your wife just beat you upside the head with a bat this morning, your kid threw up on you, whatever...do not take it out on team with your tone. If someone asks you a question and you're busy, politely tell them. Don't sit there with an atittude and a free ticket saying "I can be this way because I had a bad day". NOT professional and I expect people to expect the same from me if I am part of TEAM.

4) Just because things are inferred to you, doesn't give you the right to assume they are inferred to all. So just chill... if a developer is asking you for a more "detailed" answer.

that's just part of TEAM...and I think more developers need to change their attitudes in how they react, engage, and work with other developers as a whole both at work and outside of work.

Dave Schinkel on June 18, 2008 11:34 AM

We follow Ajile process in our team,but i still dont understand why we do astory pointing?i feel its just waistage of developer time

Gov on June 19, 2008 2:23 AM

The last sentence of this post enlightened me. o.o The sentense is EXTREMELY right. ^o^ Thanks for the post. :)

Yi Cong on June 20, 2008 1:39 PM

Everything is great but you always have to think about time spent. And instead of reviewing any open source or commercial code it is more profitable to write your own.

Else on June 24, 2008 2:43 AM

http://www.qwantz.com/archive/001126.html

Anonymous Cowherd on June 29, 2008 8:12 AM

Is it bad or too good ?
http://winguard.blogspot.com/
with cyber realm
http://crackzsl.blogspot.com/

winguard on February 3, 2009 10:55 AM

Programmers share this trait with mathematicians, there's in inherent desire to spring your beautiful diamond on your peers as if it sprung from you mind perfectly formed.

How many academic papers include all the dead ends and mistakes made on the way to the final solution? Very few I believe.

Not everyone enjoys collaboration, or more accurately they probably would if they can find someone of the same mind, which is rare. Going dark is likely a reaction to them not trusting the other team members enough to let them into their process. Going dark isn't the problem, it's merely a symptom.

Ramon Leon on February 6, 2010 10:24 PM

@Fred writes,"If a group of people disagree on the function of a button, then the button is wrong. The button should describe exactly what it will do."

Ah, that would be the "Retrieve a Recordset From the XYZ Database, Filtering on the Specified Search Criteria Entered by You the User" button. It's got a nice ring to it, kinda catchy.

Plimpton on February 6, 2010 10:24 PM

More comments»

The comments to this entry are closed.