Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 6,128 | Comments: 45,550

filter by tags archive

Low pain tolerance

time to read 2 min | 364 words

I am coming back to a project that I haven't been a part of for about six months. It was in active development during that time, and I was happy to get back to it, since it is a really good code base, and a fun project beside. The team that handle this project is top notched, but my first reaction was something in the order: "how could you let it turn so hard!"

Then I toned it down a bit and started Big Refactoring. About fifteen minutes later, I was done, which didn't match at all my initial response, and took some thinking. Why did I react this way? Why did it took ~15 minutes to turn something that I found awkward to something that was really pleasant to work with?

How could the other team members, all of whom are very good, have gotten into this situation?

The answer is both that I over reacted and that the expectations that I had from the project where high. We have made working on this project very smooth experience, but as time passed, it started to get awkward to work with. By that time, I wasn't around, and the developers just dealt with that. It isn't painful or hard, it is not bad or annoying. It is just that it began to get awkward, in a project that was really smooth sailing.

Those 15 minutes were spent mostly in breaking apart a few services, setting up a registration rule in Binsor and relaxing in the glow of content that Things Just Work once again.

I came to the conclusion that different pain tolerance levels are responsible for my reaction. I have very high expectations from my code, and I expected that it would continue to be as easy as it was in the start. The devs in the team would have likely performed the same actions as I did, at a later date. But I found it painful now.

It is especially interesting in light of the recent discussion about code size and scaling a project higher.

I think that having a lower pain tolerance level is a good thing, if kept in check.


Mischa Kroon

Personally I have a very high tolerance for pain.

And I like it, not only can I get work done until I actually start feeling the pain. But I can look / re-use other people's code without having to do serious rewriting.

That said when I do have to refactor I'm probably worse of then you :)


Personally, I have a low tolerance for pain. Keeps my projects as simple as they can be (for having software involved) and makes them a joy to return to work on.

Alex Simkin

What I do not believe is that all that you did took you 15 minutes. Just checking in the changes through the automatic build/test takes me 15 minutes or more. What size of project is that?

Ayende Rahien


not sure how to answer that. 170 KLOC or so, but I don't like this measurement.

As I said, it was mostly modifying the way some key parts works. Routing them through Binsor and extracting a few interfaces.

Pierre Henri

When I start working on an existing project with a relatively complex structure, my first inclination is to refactor it the way I feel it should be.

Then I realize that I mostly made "cosmetic" changes and the reason I was feeling uneasy was because I wasn't used to the architecture yet.

In your case, try asking to the developer of this project what they think of your changes; my bet is that they will also feel uneasy about them at first :)

Ayende Rahien

Pierre Henri,

That is my project. I was the lead there for about 9 months with the same team.

Pierre Henri

I meant "the other team members"; those who "got into that situation".

Alex Simkin

My question wasn't about number of LOC's, it was about timing:

  • Check out

  • Write test

  • Build/Run Test see it fail

  • Write code

  • Build/Run Test see it green

  • Check in (Build/Run all tests)

Everything for ~15 minutes. Plus some documentation that system has one more configurable parameter now.

We have a lead developer on one of the projects with very "low pain tolerance". So low that she touches all of the code written by other developers. Sometimes it offends people, like:

Dev: Why did you change the parameter of lambda from c to p? (Changed c => c.Name to p => p.Name)

L.D: P stands for Person

Dev: C was for Customer

L.D: Customer can be Person or Company, c is misleading here: someone might think that c stands for Company or Corporate Customer

Dev: Whatever...

Ayende Rahien


Checkout is not needed, I already had the code.

Tests were not needed, I refactored the code, not changed the behavior. I could utilize existing tests.

Writing code was mostly unnecessary, I mainly moved files and code around.

Running tests doesn't take that much, but I wouldn't include it in the 15 minutes that I quoted.

Hernan Garcia

Twelve years ago I have hight tolerance for bad code, I didn't mind and keep going doing my thing fixing the bugs with the minimum changes needed to keep things working.

As time pass my level of tolerance is getting lower and lower, I can't even left my own code along if I know that refactoring needs to be done.

This is generally a good thing, but lots of times I found myself doing way more work that's needed.

Later on I decided to fix the bug asap, and open a case in our defect tracking system to re factor later, this is working pretty well, since I can get patches faster and them do the refactoring one or two days later.

Comment preview

Comments have been closed on this topic.


  1. The worker pattern - about one day from now

There are posts all the way to May 30, 2016


  1. The design of RavenDB 4.0 (14):
    26 May 2016 - The client side
  2. RavenDB 3.5 whirl wind tour (14):
    25 May 2016 - Got anything to declare, ya smuggler?
  3. Tasks for the new comer (2):
    15 Apr 2016 - Quartz.NET with RavenDB
  4. Code through the looking glass (5):
    18 Mar 2016 - And a linear search to rule them
  5. Find the bug (8):
    29 Feb 2016 - When you can't rely on your own identity
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats