rc3.org

Strong opinions, weakly held

Tag: software development (page 10 of 16)

On the GPL

Daniel Jalkut posts on the disadvantages of the GPL. He argues that the viral nature of the GPL is off-putting to some developers who may otherwise contribute to a project that is licensed under a BSD-like license. That’s completely true. But it’s also beside the point. The GPL is explicitly and intentionally political. The goal is to force more software into the open source world.

The political nature of the license is certainly going to alienate some people, but any true advocate of the GPL will be completely OK with that. Knowingly choosing the GPL means you’re willing to take the “bad” with the good. The problem Jalkut describes has more to do with people who mistakenly equate “open source” with “GPL”.

Developers need to study the licenses before they choose one to release their software under. I’m not sure the GPL is the ideal license for WordPress, but clearly it hasn’t hindered its success. Complaining about the GPL’s encumbrances is sort of like complaining about the fact that when you buy Sierra Club merchandise, part of the money funds environmental causes. That’s the whole point.

Practicing Test Driven Development

Tim Bray posts on the actual practice of Test Driven Development.

Here’s my thesis: As a profession, we do a lot more software maintenance than we do greenfield development. And it’s at the maintenance end where TDD really pays off. I’m starting to see lapses from the TDD credo as more and more forgivable the closer you are to the beginning of a project. And conversely, entirely abhorrent while in maintenance mode.

I am definitely not an orthodox member of the TDD tribe. I write code before I write the tests. On a good day, I build out the tests and the features simultaneously. On a not so good day, I don’t do as well. But my main goal with TDD is to have a skeleton of tests for every feature so that when bugs crop up, I can add in the tests that confirm the fixes and expand the regression test suite. So I’m on Tim Bray’s side — the key is to have enough tests initially to make writing tests an essential part of your maintenance process.

Links from June 8th

Pivotal Tracker versus bug tracking

I am a long-time fan of bug tracking applications. One day I’ll post my basic toolkit for setting up a new development team, but suffice it to say, a good bug tracking application is a key part of the picture. Obviously this isn’t revolutionary — most software development teams use a bug tracking tool of some kind or another.

Lately, though, I’ve been using Pivotal Tracker, a project planning tool that resides somewhere between Microsoft Project and your favorite bug tracking application. The idea behind it is that it allows you to enter all of the tasks associated with a project, put them in order, chunk them into iterations, and then track your progress toward milestones.

Bug tracking tools are great for dealing with tasks, and are usually OK when it comes to grouping those tasks into releases, but what Pivotal Tracker provides beyond that is the ability to easily keep track of how quickly you’re completing tasks and how that pace affects the project calendar.

To set up a project in Pivotal Tracker, you tell it how long your iterations are (one week, two weeks, or longer), enter your tasks, and then add estimates for each of those tasks. Pivotal Tracker’s idea of estimates is very simple — you give tasks one to three points. It keeps track of how many points you’re finishing per iteration, and then estimates how long it will take to finish your project based on your historical performance. So if you have an 80 points left on your project and you’re finishing 20 points a week, it calculates that you’ll be done in a month. If your progress slows to 10 points a week, it’ll spread the remaining tasks out over two months. This sounds really simple but the fact that it all works without requiring the administrator to manually move tasks from one release to the next is a huge convenience. In fact, it’s the key convenience that sets Pivotal Tracker apart.

This addresses the largest difficulty I’ve run into in building software — catching schedule problems early in the process. All too often, projects get behind early but the impact of being behind isn’t felt until it’s too late to do much about it other than push back the delivery date. This is what processes like Scrum are really about — shrinking the feedback loop to catch problems early. Pivotal Tracker is the tool that makes those kinds of processes easier to implement.

I have a lot more to say about Pivotal Tracker that I’ll be writing up soon, but I wanted to just introduce it first. If you’re managing software development projects, I strongly encourage you to check it out.

Building stuff at Google’s scale

Here’s the difference between what a company like Google can do and what most can do. Google Wave was the big news yesterday, but it’s not exactly a new effort. It’s been in the works since 2007:

Lars had already moved to Sydney, and made the case that Wave could best be created there, where the team could operate as a kind of independent startup. Jens moved over, and they built the first prototype over nine months with a team of five, during 2007. Since then, the team has grown to about 100.

Not many companies can afford to dedicate 100 highly paid people to what is essentially a completely speculative effort. Google has almost certainly invested more resources in Wave than Twitter has utilized over its life, and Twitter has millions of current users.

It’ll be interesting to see how Wave does once the demos are over and real people start using it. Google Wave’s evolution clearly runs counter to the “release early and often” culture that pervades Web development these days and I’ll be interested to see whether it works out well.

Quotable: Douglas Crockford

On why you should never leave out the space between ”if” and the expression that follows in JavaScript: The Good Parts:

I placed a space between ”if” and ”(” so that the ”if” didn’t look like a function invocation.

I’m just quoting this because it’s one of those little things that drives me nuts when people are sloppy about it.

Are great programmers hired or made?

As sports fans know, the NFL draft is this weekend. In many ways, it’s the most exciting event of the year for football fans. Every team gets to participate, and fans have the chance to believe that their favorite team has improved itself, at least until games are played and reality sets in. Mike Tanier has written the best article I’ve read analyzing the meaning of the NFL draft — Made, not Born. I don’t want to talk about it in terms of football, though, but rather in terms of hiring software developers.

Years after the draft, players are called a “bust” or a “steal” based on how they perform, but Tanier’s inarguably true argument is that how players develop once they reach the NFL is more important than their qualities when they were drafted. Incredible athletes who are drafted into a bad situation often have short, unimpressive careers. Lesser athletes who are drafted into good situations wind up in the Hall of Fame. People obsess too much over draft analysis and not enough over how well teams develop players. (Indeed, many teams that are considered great at picking players in the draft are more likely great at developing the players they pick.)

What does this have to do with software development? Obviously hiring developers is different than drafting football players. What I think is similar, however, is that what you do to enable programmers to succeed once they start work is just as important is hiring the right people in the first place. There are all kinds of situations a talented programmer can be placed in that will lead to their writing poor quality code and developing bad habits that are hard to break. A lesser programmer on a good team with solid processes and better mentors can produce great software.

This is one of the things I wonder about when I read articles about Google’s hiring practices. Does Google produce the software that they do because they hire incredibly talented people, or do they create an environment for developers that enables them to make the most of their talent? I expect that they’re good on both counts, but people seem to obsess more over the former than the latter.

Quotable: Alex Payne

Alex Payne on online technical debate:

In practice, the conversations that are most widely heard in the tech community are full of inaccuracies, manufactured drama, ignorance, and unbridled opinion. In discussing these Internet-spanning debates with non-technical friends, comparisons to Hollywood tabloids come first to mind. It’s a time sink for an industry that should be a shining example of how to use the newest of media for constructive debate.

Tim Bray weighs in citing Sturgeon’s Law — 90% of everything is crap, which works both ways. Yeah, most everything is crap, but a bigger pie leads to more crap, but more non-crap too. A rising tide lifts all boats.

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.

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.

Older posts Newer posts

© 2025 rc3.org

Theme by Anders NorenUp ↑