23 January 2012

Courage now


A.


What is virtue?


Perhaps the question is wrong, but suppose you were to characterize the habits and behavior you wish everyone would cultivate. What would make your list?


There are many considered answers. For example, the ancient Greeks listed prudence, justice, fortitude, and temperance. Catholic catechism takes those and adds faith, hope, and love. The YMCA promotes caring, honesty, respect, and responsibility. A friend of mine once worked at a nonprofit (the one that runs the Hope and Healing Center in Memphis) that had its own list of virtues (one was gentleness, which gets a big thumbs-up from me). We got to talking about it and I remember asking if she thought fortitude was a virtue. She said no.


B.


You can read the transcript of “Petty Tyrant” here. Or you can listen to it online for free. It’s the story of Steve Raucci, a school district maintenance manager and small-time terrorist in Schenectady, NY. If you crossed him, Raucci would get you fired and brag about it to his buddies in the maintenance department. Or he would vandalize your home and your car with spray paint. He would put a bomb on your doorstep. It went on for years, eight years at least.


Finally a couple went to the district attorney. Raucci was convicted on 18 felony counts. He got 23 years in prison.


Why didn’t someone stop him sooner?


Everyone was afraid of him.



Carl Strock You’d like to think you’d be different. You’d like to think that I would have done something different if I had been in that position. I would’ve stood up. I would have been righteous. But you don’t know until you’re in the position. You can’t be sure.


Sarah Koenig Some of the people who worked for Steve Raucci also thought they’d be different. They were good people. They knew right from wrong. But they tell me, “You had to be in it to understand.” Ellen Frederick said it was almost like being in a cult, being brainwashed.



Hmm. Koenig doesn’t pursue the brainwashing angle; she changes the subject. When she comes back to this aspect of the thing a few minutes later, it’s like this:



Sarah Koenig … When you see pictures of Raucci from the trial sitting there quietly at the defendant’s table, it's hard to imagine that he caused this mayhem all by himself. But of course he didn’t. He was surrounded above and below by people who looked the other way.


Even Carl Strock, the newspaper columnist, told me regretfully that he too had gotten complaints about Steve Raucci from maintenance workers in the past, but didn’t really follow up. And it’s understandable why. Their stories seemed too small and bureaucratic, not something the rest of us would be interested in.



In other words, I see what you’re saying. And you’re not off the hook.


A.


From catechism:



Fortitude is the moral virtue that ensures firmness in difficulties and constancy in the pursuit of the good. It strengthens the resolve to resist temptations and to overcome obstacles in the moral life. The virtue of fortitude enables one to conquer fear, even fear of death, and to face trials and persecutions. It disposes one even to renounce and sacrifice his life in defense of a just cause.



It is possible for good ideas to go out of style. They don’t seem particularly useful in certain places at certain times.


When I consider the future, and what I’ll need for it, I think the time for courage is coming.

Why do we indent code?

Apparently one of the rules of Stack Overflow is that if enough people read and like a post, it gets deleted. Here is one of mine from two years ago. For a time, it was my top-voted answer.


Q: The firm where I work has programmers who still don't seem to understand the importance of indentation and write all the code aligned to left margin. What arguments can I put to convince them of the importance of indentation? —Phulore R, 16 Feb 2010


A: Clearly we’ve all internalized this so much that no one can remember why we do it. At least, none of the other answers so far. ;)


Why is indentation so useful? Because control flow jumps around in a program, and indentation helps you find where it's going. For example:


if (k == 0) {
if (!foo.hasKey(bar))
foo.put(bar, 1);
if (order.held())
order.release();
else
order.markUpdated();
}
Notifications n = order.getNotifications();
if (n != null)
n.sendUpdate();

On the first line, what if k isn't zero? Where do we jump to?


With indented code, you can just visually scan down to the next bit of code directly underneath the if:


if (k == 0) {
    if (!foo.hasKey(bar))
        foo.put(bar, 1);
    if (order.held())
        order.release();
    else
        order.markUpdated();
} //<---- here!
Notifications n = order.getNotifications();
if (n != null)
    n.sendUpdate();

Similarly, at the end of an if block, indentation helps you visually skip over the else block. And at the end of a loop, your eyes can easily zip back up to the top.


Once you're used to it, you can easily follow a break or continue.


Persuading people of anything is hit-or-miss no matter how right you are. :) It seems like it would be best to try to convince one person at a time, in a totally non-confrontational way, using respectful language and real-world examples.


I hope you can convince your colleagues to use indentation, but if not, remember they are human beings doing what works best for them. And remember they’re your teammates. Treat them humanely. Write code they can work with. If you like, spin yourself a little emacs mode that auto-indents the file when you open it and un-indents it when you save it. It’ll be fun, and you’ll have a story to tell. Life is too short to spend it bickering over stuff like this.