rc3.org

Strong opinions, weakly held

Month: March 2009 (page 1 of 4)

GM mortaged the future

FiveThirtyEight.com has a simple explanation of why GM is dying:

GM was willing to cut its employees some very attractive deals in the 1950s through the 1980s — provided that they took them in the form of retirement benefits rather than salary, which wouldn’t hit GM’s books until much later and which until 1992 weren’t even required to be carried on its balance sheets all, making its financial statements (superficially) more appealing to its shareholders. That health care costs have risen so substantially in the United States have made a bad matter worse.

This issue is wrongly portrayed by both the liberal and the conservative media as one of management versus labor, when really it is a battle between General Motors past and General Motors present. In the 50s, 60s and 70s, everyone benefited: GM and its shareholders got the benefit of higher profit margins, and meanwhile, its employees benefited from GM’s willingness to cut a bad deal — for every dollar they were giving up in salary, those employees were getting a dollar and change back in retirement benefits. But now, everyone is hurting.

Thoughts on Continuous Deployment

Eric Ries posts about continuous deployment at O’Reilly Radar. This is the second post on this approach I’ve seen lately, and I find it to be something interesting to think about, if not to be adopted.

Point five in his five step plan for migrating to continuous deployment is root cause analysis, or “the five whys”. He has a whole post just on that topic that’s definitely worth reading. The case for using root cause analysis is self-evident, the rest of the continuous deployment process is more interesting to discuss.

The basic idea is simple: deploy changes to the application as rapidly as possible, where the definition of “as possible” means “without breaking things”. This is a technique that clearly works for big sites. What I’d really like to do is spend a day or a week watching this process unfold, because it leads me to all sorts of questions.

My first question is, how does quality assurance play into this process? The process Eric describes involves lots of automated testing, but most shops have testers as well. Do they test on the production system as changes go live?

The second question is, what kind of version control strategy is being used to back up this process? I’d expect that each developer has their own branch, and that they merge from the production branch to their branch constantly, and only merge back to the production branch when they have a change they are ready to publish. That way developers can commit code frequently without worrying about it being deployed by mistake.

My third question is whether this process is more suited to some kinds of applications than others? Let’s take World of Warcraft for example — they have a big, heavy release process that involves lots of internal testing and lots of customer testing before important releases go out the door. Even with exhaustive testing, after every release there’s a round of tweaking to deal with all of the unintended consequences of their changes. A change to one constant in World of Warcraft (say, the amount of attack power a warrior gets per point of strength) has changes that ripple through the entire game. It also seems like they’d have to group changes to see how those changes interact with one another without inflicting them on players first.

They could try continuous deployment to the Public Test Realm, but everything that happens there is reported to and dissected by the player community. It’s risky.

I’d love to read a whole lot more about this kind of process and how it scales. It’s pretty much how everybody works on small applications that they maintain by themselves, but I’m very curious to hear more about how it works for big teams.

Earth Hour

Earth Hour was totally worth it just so this post at The Big Picture could be compiled.

Hulu remembers the early adopters

For their one year anniversary, Hulu sent special T-shirts to the first 100 people who registered for the site. Very cool.

Links from March 30th

PHP Frameworks, a series of last straws

Over the past couple of days, I’ve been looking at PHP frameworks for a project. I’ve dug into the PHP MVC world any number of times, and have even used a couple of these frameworks before, but I’ve never been really satisfied with any of them. I’d make a table comparing them, or something, but that’s not really how I work.

Generally, the way I evaluate software is that I just pick something and start using it until I run into a problem that I am not willing to accept or work around, then I move on to something else. Sometimes it takes an hour, sometimes a single project, and sometimes it takes years, but the methodology never changes.

Here’s how it went.

Zend

This time around, I started with the Zend Framework. Why? It’s made by the people who work on PHP itself, so I assumed it would be the most idiomatically sound framework for PHP applications. In other words, applications written using Zend would make sense in the context of PHP expertise.

I downloaded it, set it up on my computer, and got started. The setup was easy enough, and the configuration process seemed reasonable. Then I started going through the Quick Start guide, working through the example application. I got to the section on creating a model. When I started really looking at how Zend models work, I decided that the framework requires too much typing, and moved on to other things.

CodeIgniter

CodeIgniter is a much simpler framework created by EllisLabs. I’ve used it on two other projects, and was vaguely dissatisfied with it, but decided to give it another shot, because I really do appreciate its strengths. My main gripe in the past has been that CodeIgniter models are really DAOs and I’ve been spoiled by Hibernate and ActiveRecord. What’s particularly frustrating is that the documentation is written by someone who doesn’t understand the difference between the DAO pattern and real object-relational modeling, so it’s easy to get the wrong impression of the capabilities of the framework.

CodeIgniter is trivial to set up, and I got as far as creating a new application and implementing some test functionality. The first (minor) disappointment was the fact that CodeIgniter has no built in support for layouts. Fortunately I was able to find a simple workaround on the forums that works quite well.

Then I learned about CodeIgniter’s philosophical stance against the query string. I knew I was in trouble when I read the following in the documentation for the Input library:

Destroys the global GET array. Since CodeIgniter does not utilize GET strings, there is no reason to allow it.

Let me just say, CodeIgniter may not use the GET array, but my application certainly will. Let’s say I’m writing a report that takes parameters like sort_field and sort_order and timeframe. The most sensible way to approach the problem is to include name-value pairs in the URL. Using POST is not an option for reasons of bookmarking alone.

Eliminating the use of parameters in the query string completely is just an awful thing for a framework to do. Given that this is blindingly obvious, lots of people have asked about it on the CodeIgniter forum. There are workarounds that require modifying the core CodeIgniter code (no thanks), but the official word is not good:

It can be fairly polarizing in the forums here, and there are plenty of existing topics to read through, so I’m going to decline to say anything other than it’s the way the framework is designed. CI wants you to use URL segments and have clean, query string free URLs. I understand if that’s not an answer that satisfies you, but I do encourage you to read through the many existing topics on the subject—the workarounds are not very severe nor hard to keep up with across updates. If it’s a feature that’s very important to you and you want to use CI to build your application, you would either need to modify CI (which is one of the great things about open source frameworks) or be willing to work around it with an external solution.

I moved on.

At this point I felt a little stuck, as I thought I was down to PHP ports of Rails. I love Ruby on Rails, but Ruby and PHP are very different languages, and the thought of PHP on Rails brings to mind Samuel Johnson’s most famous quotation:

“Sir, a woman’s preaching is like a dog’s walking on his hind legs. It is not done well; but you are surprised to find it done at all.”

CakePHP

I dismissed CakePHP out of hand, based on minimal involvement in an unpleasant project that used it and lots of complaints about it that I’ve heard second hand. I thought about it for a second, but quickly decided against it.

Symfony

My next thought was to try out Symfony. I had just started digging into some really scary looking documentation when I received a recommendation for …

Kohana

Kohana is a fork of CodeIgniter that keeps all the stuff I like and gets rid of some of the dumb stuff (like the GET method problem). It was easy to set up and easy to get started with, so I’m trying to figure out exactly which parts are the good parts and use those. We’ll see how long the relationship lasts.

Do what you can’t not do

I really wish I’d gotten to attend Merlin Mann and John Gruber’s SXSW talk on blogging for a living. Mann posits that the successful formula is: obsession plus voice. It reminds me of what I usually tell people who are wondering what kind of career they pursue, which is: do the thing that you can’t not do.

There’s a lot of misguided career advice out there that suggests doing what you “love”. But there are a lot of people who love to do something but would no longer love it if they were forced to do it for 2,000 hours a year. Loving to cook and wanting to stand in a restaurant kitchen for 11 hours a day are two different things.

So my suggestion would be find a way to get paid to do the thing you can’t stop yourself from doing. The best programmers are people who can’t stop programming. The best writers are people who find themselves wanting to write when they’re doing other things. Do what comes naturally.

I can say for certain that it’s a lot easier to get up in the morning and go to work if what you do at work is what you gravitate toward regardless of whether or not you get paid to do it. That’s more likely to be driven by compulsion than love. Go with it.

Quotable: Mohammad Sephery-Rad

Mohammad Sephery-Rad, minister of Iran’s High Informatics Council, on replacing Windows with Linux for reasons of security:

All the software in Iran is copied. There is no copyright law, so everybody uses Microsoft software freely but we cannot continue like this much longer.

Apparently Iran is also seeking admission to the WTO, which would require them to respect international copyright laws.

Food myths

The New York Times has a list of food myths, solicited from a variety of experts. The main takeaway is that all you really need to pay attention to when it comes to diet is Michael Pollan’s 2007 article on nutrition, in which he provides a simple suggestion:

Eat food. Not too much. Mostly plants.

Everything else seems to be subject to change based on the latest of the research and the fashions and hysteria of the day.

Update: More evidence that eating lots of red meat is really bad for you. My advice is to turn to fried chicken for refuge.

Links from March 23rd

There are a whole ton of links in the backlog today.

Older posts

© 2024 rc3.org

Theme by Anders NorenUp ↑