Mark Shuttleworth on Testing Driven Development(TDD)

Thursday, May 29th, 2008

Mark Shuttleworth, father of the de facto linux desktop OS — Ubuntu, recently weighed in on a few different issues. He wanted to address some recent moves towards getting the Gnome and KDE crowd to talk nice to one another. The continual effort to make the linux desktop something that is more stable and recognizable to normal non geek users is something I have to applaud unendingly. If it wasn’t for all his work in that arena I would probably be considering what version of nastiness that is called Vista I would run next year.

He also talked a little bit about Source Control Management(SCM). SCM is just a fancy name for the overall business practice of making sure developer’s develop and collaborate in a way that makes sense. Oh, we screwed up with this idea 3 weeks ago? Well, let’s pull that code out of there. That sounds simple enough, but as it turns out the other thousand employees in your company have continued to write new code from when you started this change 3 weeks ago. So if you just back your change out, it might not work with the code they wrote over the last 3 weeks.

One of the tools used to handle these sort of problems is called a Version Control System(VCS) and there are hundreds if not thousands of these things. You’ll recognize them by names like CVS, Subversion, etc. Apparently Mark is hot to trot for one that’s called Bazaar.

Another tool, and the point of this post, is that you need a testing tool/suite and a methodology. Now I wish Mark had talked about the name of his testing suite, but the more important thing is how he changed the way the code is written. By implementing or creating Testing Driven Development he basically put a stake in the ground and said, “You will not check code back into the repository unless it passes tests.”

That doesn’t sound that revolutionary, but it’s not how code is traditionally written. Most developers write and write and write, checking in code all the while and then they test. Well, frankly that may be a bit of a waste of time. If it turns out that your basic idea sucked, then wouldn’t it be better to figure that out at the starting point? And it also disciplines lazy programmers to correctly code their exit codes and other basic frameworks of good code right at the beginning, rather than trying to put all that “boring stuff” in at the last few days before the release.

His methodology probably feels like he’s slowing down the development process, but in the long run it’s probably as efficient and it also probably makes the prediction of release schedules more accurate.

Finally, how does this apply to me and possibly you? Well, I always swear I’ll set up a testing suite for what I do, but I don’t really do a dev/test/production cycle for Wordpress. I think that the next time I actually write a full application I will probably find a VCS and Test Suite combo that will allow me to implement TDD. I’m just as lazy as the next programmer and so having a computer add a little discipline wouldn’t be a bad thing.

For Wordpress, I think I’m going to set up some basic monitoring. I already monitor uptime, but page load times I’m not and I’m unhappy with how the ads are bogging my load time down. If I don’t measure that, then I’m sure I’ll never start working on it. Also, the ability to comment on posts is something that I haven’t been monitoring and it’s something that has already broken during one upgrade. Drive space is rarely an issue because Dreamhost sells me so much but it wouldn’t hurt to monitor.

Well, that’s my plan. Do any of you plan on using any of these sorts of development tools?

RedHat I bid thee adieu

Thursday, February 16th, 2006

I’m tired enough of redhat that it’s time to explore other options. I’ve been having yum issues for years now(yum is the program you use to patch RedHat) and it’s finally time to just look to another OS. Asking for $180 a year for updates to an operating system is just unrealistic. All of this for a silly little box that is running a Pentium 2 processor. The box is literally worth $5. But I’m going to pay $180 a year to run software on it? I generally don’t like variable pricing, that is to say like what Oracle does but in this case it would make more sense.  If you’re running a single processor ancient box, $25 for updates.  If you’re running a 16 processor box that can compute a googl, that will be $1000 for updates. What’s a little silly is that this is an increase from the old prices. They used to beg for $100 a year but give you the updates for free if you wouldn’t donate. I hate to go back to Windows, but at least Microshaft understands that I don’t want to license my OS. Actually, I’ve read that Microsoft explored the idea and realized it wasn’t feasible, probably due to the strong competition by Google.

OK, so if you’re a non-geek and still here I’ll attempt an allegory. Imagine that instead of buying the transmission to your car you instead decided to lease it. You own the car and you get to design the cockpit…but you have to pay an annual fee(FOREVER) just in order to get the thing to move. It’s just an absurd idea initially. Then when you price it improperly there’s no reason to bother with it all. Imagine if they asked you to give them $3000 a year for your transmission, in addition to your usual car loan payment.

So anyhow, this begins my foray into freeBSD. Never had a reason to not like it…it’s just that fedora and redhat were always so cheap and accessible. Time for a change.

jeez

Sunday, April 24th, 2005

One of my computers blew a motherboard a few days ago. It’s an old duron 1Ghz system that isn’t worth fixing. Instead I’ll throw in a new mobo and processor. Probably will set me back 100-200 but it’s my raided file server, so I need to get it back up and running. I could also buy a wal-mart $188 linux system. But I despise customer support so much, I think I might prefer to just buy the hardware I prefer and know how to troubleshoot.

something I’ve been monkeying around with

Saturday, February 26th, 2005

1. Install Fedora Core 3.(do not install the graphics libraries…freetype-devel, gd-devel, libpng-devel, libjpeg-devel, xorg-x11-devel)
2. Update my /etc/yum.conf:

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

[base]
name=Fedora Core $releasever - $basearch - Base
baseurl=http://mirrors.xmission.com/fedora/core/3/i386/os/

[updates-released]
name=Fedora Core $releasever - $basearch - Released Updates
baseurl=http://mirrors.xmission.com/fedora/core/updates/3/i386/

3. Install Gyum and update
4. install gnome-desktop-devel.i386, gd-devel.i386, libpng-devel, libjpeg-devel, perl-Compress-Zlib.i386

geeky

Wednesday, January 26th, 2005

Nothing says unhappy like moving 10 GB from a non-raided non-linux device to a raided linux device…..

ONLY TO REMEMBER THAT YOU FORMATTED THE RAIDED LINUX DEVICE AS A NTFS DEVICE THAT WON’T WORK ONCE I LOAD LINUX!!!

SO NOW I HAVE TO MOVE ALL THE DATA BACK AND REFORMAT THE RAIDED VOLUME! THEN I CAN FINALLY START LOADING LINUX!

GRRRRRRRR

New ultra-high speed cable modems in KC

Sunday, November 28th, 2004

So for another $50 a month I could double my download speeds. Upload only moderately increases from 384 to 512. I considered it, because my recent work stuff has really been waxing my throughput. ULing a 800MB file to sun is a pain, FYI.

The price increase is only supposed to be $25, but since it would break the package I’m in, it would really cost me $50. It’s money better spent in other areas at the moment.

I also talked to the Time Warner gal about the new Hidef DVR that has a 160GB HDD in it. The new DVR only runs a nickel more a month. I’m probably going to take my box in sometime next week and see if I can get some more capacity out of this deal.

As a sort of side note…I’ve got a new pet project that I’m considering working on. It’s really just an extension of many of my other projects. Controlling my life through computers.

I’m interested in a HAL type interface. I’d like a system that can query and respond verbally. You know, a “What time would you like a wake-up call?” kind of thing. I initially just started jaunting down the linux possibilities. But with a little thought I’ve decided I should see if anyones making any progress on this area in Perl.

Fedora Webserver

Wednesday, October 13th, 2004

I’m also trying to rig up a new webserver that’s on Fedora so I can get regular updates to the packages. I installed Fedora Core 3, test 2. It’s been patching itself for a few hours now. Hopefully after that I can get the mail up and running. Then I’ll work on the webserver. Maybe I’ll try and get the campage back up and running too, now that my wireless network is actually extant.

if you do install fedora core 3

Wednesday, October 13th, 2004

this link will be helpful for a while: http://www.redhat.com/archives/fedora-test-list/2004-October/msg00364.html