rc3.org

Strong opinions, weakly held

Month: November 2009 (page 3 of 4)

Commit access on work projects

Jacob Kaplan-Moss on who you let commit code to your projects:

What’d you do the day you started your job? Got a little tour. Found your desk. Some HR paperwork. Figured out the network. Set up your new company machine. Got your VPN credentials.

And got your commit access to the company’s source control.

Normal first day procedure, I know. And yet, that day-one-commit-bit is one of the starkest differences between the corporate and the open source development model.

I can think of good reasons for the difference, but I’m going to think about this one for awhile.

Why the US budget deficit is so large

Here it is in terms any Republican or Democrat can understand, courtesy of Congressional Budget Office director Doug Elmendorf (via Ezra Klein):

The country faces a fundamental disconnect between the services the people expect the government to provide, particularly in the form of benefits for older Americans, and the tax revenues that people are willing to send to the government to finance those services.

The search engine confessional

Everybody’s posting about this, but if you haven’t gotten a chance to play, definitely do so. Slate did some digging into what we can learn from Google’s search suggestions, and the results are fascinating. Via Marginal Revolution (among others).

The trimming of ambitions

Ezra Klein on the future of health care reform:

Failure does not bring with it a better chance for future success. It brings a trimming of future ambitions.

Writing readable boolean expressions

Fairly often I find myself writing complex boolean expressions. For example, let’s say I’m writing a function in a controller that renders a page, and I want to check whether the current user is authorized to view that page. Here’s some code:

if ((!($a || $b)) && $c != $d) || !$e) {
    // Do something.
}

Aside from the variable names, that’s real code. There are two things about that code that to me greatly hinder readability. I rewrote it as essentially the following:

if ($x != $y || !$z || !$w) {
    // Do something.
}

The second code has two advantages. First, no internal parentheses are needed, and second, there’s no mixture of “and” and “or”. Whenever I can, I like to use only one boolean operator in a complex boolean expression, because sorting out different operators can be confusing. In the second example, I know that if any of the expressions evaluates as true, then the code in the block will be invoked. When you mix operators, things aren’t so straightforward. And not requiring parentheses is related. When you mix operators, precedence comes into play, and you can use parentheses to manage precedence. So as soon as you bring either of them to the party, you can no longer read your expressions from right to left.

This just occurred to me so there’s probably something I’m missing, but for the time being, I’m going to try to be disciplined about sticking to one boolean operator at a time in cases like this. (And yes, I’m not counting the “nots”.)

Blogs in 1998

tawawa.org has done some research into early blogs, making the argument that attributing the sources for links was the spark that ignited the blogging phenomenon:

The blogosphere arose on 24 April 1998. On that day Steve Bogart made the announcement that he was adopting Jorn Barger’s recent practice of attributing the source of the links he was posting to his weblog. Barger’s innovation of crediting the origin of his outbound pointers, adopted by Bogart first and by many others afterwards, infused an earlier, mostly dormant network with a dynamic it had previously lacked, turning the aspiration of a self-aware social medium into the reality of such a medium.

I’m very glad all of the old blog content is archived so that this sort of analysis can be performed. Both Jorn and Steve are still at it, on blogs and on Twitter.

Close votes are a feature, not a bug

I’ve seen a somewhat common piece of bad analysis I’ve seen over the past week, and have been surprised to see people correct it. As you may know, the House of Representatives passed a health care reform bill last night, 220 to 215. 39 Democrats voted against it. The fact that the Democrats couldn’t get everyone on board is being treated as a flaw in their strategy when in fact I’m sure their leadership sees it as the key. The bill passed in the House will be merged with whatever bill is passed in the Senate, and that’s the bill both the House and Senate will vote on again to be sent to the President for signature.

Every vote over the minimum necessary to secure passage represents compromises that the Democrats as a group would prefer not to make. It’s not that Nancy Pelosi was lucky to pass the bill, it’s that the Democrats wrote the strongest bill they could that would get enough votes to pass. That’s good strategy.

Making a full commitment

I ran across a guest post at Smart Football this morning when I was trawling around looking for more takes on UH’s ridiculous last second 46-45 win over Tulsa last night that I think applies to just about any field as well as it applies to football coaching. The piece is a provocative argument about how to implement offensive schemes in football, but it could just as easily apply to adopting agile development practices on a software development team. Here’s the part that really resonated with me:

Before discussing the technical benefits, let me first say that operating exclusively out of a four-wide environment is the first step a coach makes towards acculturating his program to the offense. To run the run and shoot effectively, it is necessary to commit to it entirely. Coaches that retain the ability to use tight ends, h-backs, and multiple-back sets create a crutch upon which they can fall back on when things don’t go as well as they’d like in the early going. Inevitably, what happens then is that the team becomes a multiple-set team that uses some run and shoot packages on passing downs. What never happens, however, is that the team converts to the run and shoot culture. And without that, the coaches and the players never become fully comfortable in the system, and then when the team struggles more, they blame the system.

When you decide to run this offense you need to burn your bridges with the past. You have to declare, “This is what we will sink or swim with. We are a run and shoot team.”

There’s a lot of wisdom in those two paragraphs, in that they describe the difference between a plan on paper and what happens when actual humans try to implement a plan. As a coach (or software development manager), the temptation is always to try to keep your options open so that you can adapt to any situation that arises, but what often happens in those cases is that it can leave the team confused. The more branches you have in your logic, the easier it is for team members to make poor decisions and to second guess the decisions other people are making.

Let’s take test-driven development for example. I don’t believe it can work without a full commitment. Either you demand that tests are written in all cases, in the manner prescribed, or you can watch your TDD regime wither away as competing pressures give people a reason not to write tests. In some cases, applying TDD may not make the most sense, but using it anyway creates a culture that practices TDD. This doesn’t answer the question of whether TDD is the right or wrong practice for a particular team, but once the decision has been made that it is, only a full commitment will lead to its successful application.

You can apply this logic to any practice a team wishes to adopt, whether it’s as small as always writing a descriptive comment when checking in code or as big as using pair programming.

Just as team members must have the discipline to implement the philosophy that the team leader prescribes, so too must the team leader have the discipline to choose a philosophy and make a full commitment to it. Or at least that’s the argument that the poster makes.

The world is a better place

Greg Knauss describes the beauty of life in the Internet era. It’s a great piece of writing, go read it.

Quote of the day

This is courtesy of Felix Salmon, in a brief history of former heads of Goldman Sachs:

Paulson seems to have spent a large amount of the crisis throwing up in his office bathroom, and even into Nancy Pelosi’s wastebin. Of course, he couldn’t simply go see a doctor, like the rest of us, because he’s a Christian Scientist. Similarly, he hobbled his ability to communicate by refusing to ever touch email: instead, any time he wanted to say anything to anybody he’d have to do so over the phone or in person. No wonder he was semi-permanently hoarse, and his phone records are insane.

That’s writing, people.

Older posts Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑