Archive for April, 2006

The trouble with successful methodologies

I used to say that the main problem with Extreme Programing was its name, especially the “Extreme” part, which doesn’t feel professional enough. No longer do I feel that way.

This is still just a theory, based on my observations and seeing both small and large, very large, companies going from “no formal process” or “big heavy process” to “we need to adopt agile process X”.

Ever since I came across Kent Beck’s white book in 1999, Extreme Programming Explained, I’ve called myself an “agilist”.

I’ve championed, trained, led, explained, evangelized, read, blogged, and of course practiced Agile Methods ever since. Enough to become a go-to guy when it comes to no-nonsense project management practices. Yes, despite all the literature, there’s still a lot of nonsense going on.

I started noticing something strange a few years ago. Teams who insist in adopting agile, sometimes they do it wrong in an obvious way. I mean, I understand doing it wrong if you’re forced to do something, but if it’s your decision, why would you mess it up on purpose?

For example, they would say “I’m doing the same as before, expect I’m no longer designing anything, that’s XP right?”, or “Agilists say that good clear code doesn’t need comments, so I’m removing all the comments from my code” or still “I don’t need to worry about being responsible for my code, because now we practice Collective Ownership”.

These are all terrible misconceptions, and I help correct them as soon as I see them. But why do they happen at all? After all, the reason I liked Agile practices so much, it’s because they make so much sense while being so simple. They’re just, well, obvious.

Teams adopting agile practices tend to have people who fall roughly in three categories:

- Agile is a much better way, and I can’t believe I never thought of this before (I’m there)
- I’ve been programming all my life, and I don’t need no stinking agile practices (smart people with the most experience are the worst offenders and I have a theory why, that I’m saving for a different time)
- I like Agile if it’s hot and I can put it on my résumé or it can help me sell if I mention it.

This last category is the one I’m talking about.

I’m now seeing companies, who tend to be slow to adopt new things, starting to push for no-nonsene ways. At first this seems like great news. If agile becomes so mainstream that it’s featured on People Magazine and everyone is getting on board, it can only be good for Software Development as a whole. I’m not complaining.

Where I start complaining is when these companies, at the same time push for agility, but also encourage lip service. Why would a company, for example, insist on iterative development with short iterations, and at the same time, insist that the scope of the project to be fully defined, 100% clarified, before implementation starts. It could be confusion or misconception of what agile is, but I don’t think so.

Well, misunderstanding could be true at first, but if they persist after clarification, you know something else is up. Marketing seems to it.

There’s a push in the industry for agile methods, and companies don’t want to do what they would if a project was a car, they don’t want to slow down while taking a turn (to use one of Ron Jeffries analogies). Instead some companies decide to do whatever they were doing before, and then rebrand it with new, fresh terms. It’s as if the important thing is to be able to slap a “Built with Agile Practices” sticker on the box when the product ships.

This is bad for several reasons. In the short term it’s not helping the company go faster and improve quality. It might help sell a little bit more, but eventually reality will come back and bite them.

More importantly even, is that it dilutes and corrupts what it means to use agile practices. We will no longer be able to point at projects using agile software development, and use that as a reason for their success. Instead, all these projects, failed and otherwise, will have the “Built with Agility” sticker on the box.

Given that apparently agility is not that easy to grasp, especially if you’ve been in the industry for a long time, why else would people sign up for a ScrumMaster program for example? It’s supposed to bring you from “I have no idea what agility is” to “I’m a master” in just two days. Why would this even be possible? Is it because:

- Companies are sending their people to 2-day ScrumMaster classes, so the company can justify those “built with agile” stickers.
- Individuals are doing it themselves, so they can put it on their résumés.

And this is the trouble with successful software methodolgies (or anything successful for that matter). It gets hijacked by people who are more interested in the packaging than in the content. If buyers like X, because X has been known for doing good things, let’s skip the step where we actually use X, and jump straight to the part where we *say* we use X.

With dubious ScrumMaster and RUP Certifications being commonplace now, it may be time to start thinking about the next “Real No BS Agile Methdology”. This new technique should have a name that companies won’t like to advertise on their boxes, even if they still want to use it because it helps them (in a real way).

Extreme Programming didn’t go far enough. Certainly the word “Extreme” was and still is, hard to swallow for many, but not enough.

Just to be on the safe side, the next methodology should be called something like “Loser Practices” or “Stinking Programming” or even “No Bullshit Software Development”. Maybe that will help companies focus more on what these practices can do for their projects, and less on what pretending to use it, can do to sales.

Comments (4)

Mac Envy

Sure I got a Thinkpad instead of the MacBook Pro, but that doesn’t mean I can’t make this fine Windows box look a little bit more like a Mac. It’s not that hard actually.

First clean the desktop. Organize everything in folders for example, then move them to your “My Documents” folder. Also make sure you auto-hide your taskbar. At this point you should only have the usual suspects on your desktop. Things such as the My Computer icon, Network, Recycle Bin, etc.

Your desktop should look something like this

Clean desktop

Now add the desktop bar to the taskbar (right-click the taskbar -> Toolbars -> Desktop) then hide the desktop icons (right-click the desktop -> Arrange Icons By -> Show Desktop Icons).

Now your desktop looks something like this. Almost save as the previous, without the desktop icons.

Clean desktop - No icons

Not really like a Mac yet, you’re just setting the stage at this point.

Now get the nifty (and free) ObjectDock and just install it. Your desktop looks like something like this now.

If you make your dock show on top, and move your mouse over the ObjectDock bar, you’ll have that cool Mac-like animation. Now we’re getting there.

ObjectDock

Since you’ve installed ObjectDock, go one step further and install also WindowBlinds. It’s not free, but comes with a 60-day trial version. It’s only $50 though.

It comes with a few cool skins. I like Aura by Mike Bryant, because it’s very clean, and it has those shadows around the windows.

WindowBlinds

At this point your system should feel much different. Not just windows and dialogs, but also toolbars, buttons, etc.

Now download a different Firefox theme (Tools -> Themes). Pick iFox, the closest I could find to a Mac look.

iFox

Finally, change the wallpaper. There are some here and here that I like a lot. This is what it looks like

done

Good enough while I wait for the OS X to run on my thinkpad.

Comments (2)

TV Addict

Apparently it’s TV Turnoff week though they don’t tell you that stuff on TV, so how am I supposed to know?

Interestingly enough (to me at least) I know that I’m not too far from pulling the (cable tv) plug. I must be an addict, since I can’t quite do it. It’s all Jon Stewart’s fault. Sure I can buy his shows on iTunes or even watch parts of it on his site, but somehow it seems I need my daily dose of Jon Stewart on a big screen TV.

Down to 4 x 20 minutes a day of TV…so close, and yet, still so hard.

Philips has just patented a device for making it impossible (well, at least hard) to skip commercials. I can’t wait for that thing to come out, and push me over the edge. I’ll be free at last.

Niagara, an 80’s French band had an excellent song about this, “T.V. Addict” from their also excellent album Quel Enfer. Ths song rings more true now than it used to back then for some reason. If you can read french, here are the lyrics.

Okay, now I have that song stuck in my head and might as well just listen to it now…

Comments

BIRT at Nasa

I’ve been doing things with Eclipse BIRT and in general I’m pretty impressed with it. Especially everything around extensibility: their own Report Object Model (ROM), the Open Data Access (ODA) which is like an extra layer around JDBC allowing for data retrieval from any type of data source, not just relational, and finally the integration with Javascript and Java.

One thing I like a little less though, is that despite the claims, it seems to me that it doesn’t scale so well. Simple reports with only a few pages, can take a good 10 seconds to show which seems like a lot. I hope I’m doing something wrong (or not doing something right), because one of the big things in this new version of BIRT, 2.1, is performance. Also, I know that NASA, or more specifically the Jet Propulsion Laboratory, uses Eclipse and BIRT for reporting data generated by one of their Mars Rover apps, as reported here for example.

I imagine that those apps generate *a lot* of data and therefore the reports will be huge. I also imagine that 3-4 seconds per page is probably not acceptable.

I must be doing something wrong…but what?

Comments (2)

Five Numbers

Speaking of numbers, 1337 is a cool number of course, but for “alternative” reasons. There are some numbers which are must more interesting. The BBC Radio had a series of short talks on some of those numbers, such as:

Pi, The Golden Ratio, Zero, Infinity and the imaginary number.

Fascinating stuff.

Edit: More numbers here.

Comments

Ruby - elite number of messages

Slow today, even less to say than the usual :-)

Comments

GSpace, while you wait

You have been waiting for GDrive. You use Firefox. You have a GMail account. Then you want to install GSpace. This Firefox extension uses your gmail account space as a remote drive.

I find this extension pretty convenient, though there are alternatives, such as here.

Comments

BayXP meeting again

I had mentioned that the BayXP group was getting ready to meet again, and last night it finally happened. Jorge Borbolla from ATC not only was nice enough to host the meeting at his company, he even threw in pizza and beer. Very cool.

The meeting didn’t have a specific agenda, other than getting the ball rolling again. Roughly 12 XP and Agile enthusiasts showed up and started chatting. We covered topics such as remote-location, build breakage and how to prevent it, continuous integration and its limits, pair programming and how to “sell” it to a team who is willing to be agile but not to pair - and is pairing really that important that it needs to be forced? - and the original 12 practices vs the now “20-or-something”.

Though I did enjoy all the conversations, I particularly enjoyed having even just a glimpse of what the build process looks like at Google and also Slava’s discussion on the Five O’clock Check-in Pattern.

The agenda for next time (3rd Wednesday of the month?) has not been discussed, though the group seemed motivated to meet again. That’s good news.

Comments

Programming Lisp

Shortly after I started learning Lisp (Scheme really) of which I only knew that it involved parentheses, I started hearing (and reading) that Lisp was a programmable programming language. For example, from the preface of Paul Graham’s On Lisp:

It’s difficult to convey the essence of a programming language in one sentence, but John Foderaro has come close:

Lisp is a programmable programming language.

Though I understand what it means, I couldn’t see why Lisp was more programmable than say, Java. What I was hearing was just by adding new APIs, I was extending the language and even inventing a new one. The SICP authors for example, at some point mention this new language built on top of Scheme: Picture. It’s a language for manipulating images, rotating them, creating new images using existing ones, etc. All I saw was a new function for making interesting things with pictures. Though I found it interesting, it wasn’t very satisfying in terms of meta-programming.

I think Scheme and Lisp are beautiful languages, it was love at first sight :-) . But when I’m doing my little silly programs in these languages, I cannot honestly say that I am programming Lisp. Certainly I’m programming *in* Lisp, but not programming *it*. Could it be that Paul Graham and everyone else in the Lisp community had a looser definition of what it means to program a programming language? I doubt it so something was not right

Then the SVP group moved on from SICP and Scheme to Common Lisp and more specifically, to one of the most interesting aspect of Lisp that we had left out during our Scheme run: macros. This is when it hit me, this is where the notion of programming a programming language was hiding. Lisp macros are more than C macros where most of what’s happening is string substitution. With Lisp macros you can write code that expands into Lisp functions. In fact, you can write macros that expand to macros, that expand to macros, eventually expanding to actual code. This is something you clearly cannot do in Java for example.

Let’s say “if” is not working for you, and you want an “unless” instead. Instead of saying


if( statement ) {
    ;
}
else {
    do();
}

You wanted to say


unless( statement ) {
    do();
}

Since this is a very simple macro, I suppose you could do it even in C, using #define, but still not in Java. In Lisp this is a “trivial” thing to do but Lisp books have whole chapters on macros, and it gets more interesting than just trivial stuff.

The unless macro:


(defmacro unless (condition &body body)
  `(if (not ,condition)
      (progn ,@body)))

Then I can say:


(unless (= A B) do)

Peter Seibel’s Practical Common Lisp has an example where he builds a unit testing framework using macros, in 26 lines, including comments and empty lines! A thing of beauty.

Comments

Sieve of Eratosthenes, Iterative vs. Recursive

A few weeks ago, some of us in the Silicon Valley Patterns Group implemented Java solutions for the Sieve of Eratosthenes as described in the most excellent Structure and Interpretation of Computer Programs (SICP). The book of course, implements it in Scheme.

Kevin and I were talking about it, and Kevin came up with a very tight, Java solution. His solution was not recursive though, instead it would iterate over the primes the program had already found so far. It certainly worked but I wanted to do it using recursion. I imagined a recursive approach would be more elegant. It would certainly look more like the Scheme version:

(define (stream-car stream) (car stream))
(define (stream-cdr stream) (force (cdr stream)))

(define (divisible? x y)
  (= (remainder x y) 0))

(define (filter-stream pred stream)
  (cond ((null? stream) '())
        ((pred (car stream))
         (cons-stream (car stream) (filter-stream pred (stream-cdr stream))))
        (else
         (filter-stream pred (stream-cdr stream)))))

(define (sieve stream)
  (cons-stream
   (stream-car stream)
   (sieve (stream-filter
           (lambda (x)
             (not (divisible? x (stream-car stream))))
           (stream-cdr stream)))))

(define sieved-primes (sieve (integers-starting-from 2)))

As it turned out, I was wrong about elegance. Performance is also much worse.

This is the iterative method, inspired by Kevin’s solution. The idea is very simple. For every new number starting with ‘2′, see if the number is prime by trying to divide it by all numbers in the “prime pool”. If the new integer is not divisible by any of the numbers already identified as prime, then this new number is itself a prime. The next integer coming in, should also be divided by the new prime. This is Eratosthenes algorithm, nothing new there.

package primes;

import java.util.Iterator;

public class IterativeSieve implements Iterator {

	private int[] primes = new int[]{};
	private NumberNode numbers = new AllNumbers(2);

	public boolean hasNext() {
		return true;
	}

	public Integer next() {
		return new Integer(nextprime());
	}

	public void remove() {
		throw new UnsupportedOperationException();
	}

	private int nextprime() {
            while(true) {
                    int number = numbers.value();
                    if(prime(number)) {
                        addprime(number);
                        return number;
                    }
            }
        }

	private void addprime(int number) {
		int[] newprimes = new int[primes.length+1];
		System.arraycopy(primes, 0, newprimes, 0, primes.length);
		newprimes[newprimes.length-1]=number;
		primes=newprimes;
	}

	private boolean prime(int number) {
		for (int i = 0; i < primes.length; i++) {
			if((number % primes[i]) == 0 ) {
				return false;
			}
		}
		return true;
	}
}

Below is the recursive approach. Here we have two streams of numbers. One is the just the series of integers starting with 2, and the other stream is a linked list of prime numbers. Every time a new integer comes in, we see if that number divides by any of the numbers in the prime stream/linked list. If it doesn’t, we create a new node holding this new number (since this is also a prime) and add it to the list.

package primes;

import java.util.Iterator;

public class RecursiveSieve implements Iterator {
    private NumberNode numbers = new AllNumbers(2);

    public Integer next() {
        int number = numbers.value();
        numbers = new PrimeNumbers(numbers, number);
        return new Integer(number);
    }

    public boolean hasNext() {
        return true;
    }

    public void remove() {
        throw new UnsupportedOperationException();
    }
}
package primes;

public class PrimeNumbers implements NumberNode {

    protected int factor;
    private NumberNode previous;

    public PrimeNumbers(NumberNode previous, int factor) {
        this.factor = factor;
        this.previous = previous;
    }

    public int value() {
        while(true) {
            int number = previous.value();
            if(number % factor != 0) {
                return number;
            }
        }
    }
}
package primes;

public interface NumberNode {
    int value();
}
package primes;

public class AllNumbers implements NumberNode {

    private int number;

    public AllNumbers(int number) {
        this.number = number;
    }

    public int value() {
        return number++;
    }
}

Then I ran the two sieves using the following code.

package primes;

import java.util.Iterator;

public class SieveTest {

    public static void main(String[] args) {
        test_sieve_recursive();
        test_sieve_iterative();
    }

    public static void test_sieve_iterative() {
        long t0 = System.currentTimeMillis();
        System.out.print(”Iterative: “);
        for (int i = 0; i < 10; i++) {
            lots_of_primes(new IterativeSieve());
        }
        System.out.println((System.currentTimeMillis() - t0) + " msecs.");
    }

    public static void test_sieve_recursive() {
        long t0 = System.currentTimeMillis();
        System.out.print("Recursive: ");
        for (int i = 0; i < 10; i++) {
            lots_of_primes(new RecursiveSieve());
        }
        System.out.println((System.currentTimeMillis() - t0) + " msecs.");
    }

    private static void lots_of_primes(Iterator s) {
        for (int i = 0; i < 5000; i++) {
            s.next();
        }
    }
}

The outcome wasn’t that surprising after all. The iterative approach is faster and uses less memory. The recursive version throws a StackOverflowError after 7000 (with a 512 MB VM) whereas the iterative solution happily keeps going. So the recursive method takes longer, fails, and is uglier.

Output for 10 runs of 5000 integers with both methods:

Recursive: 2109 msecs.
Iterative: 1125 msecs.

Comments

Disabling the Windows Super Loud BEEP

The Thinkpad has an extremely loud BEEP, even when the volume is just one notch above zero. If I type fast enough, I tend to fat-finger the keys, and then it sounds like I’m playing the piano on my keyboard. Unfortunately it sounds horrible and only one note comes out of the speakers.

I figured I don’t need Windows to tell me that I’m not a fantastic typist, so I’ve disabled the beep thing. I thought it was going to be done at the sound card level, but when you think about it, it is the system beep, so it’s going to be done at a lower level.

This is on XP:

- Right-click on “My Computer” and select “Manage”
- Double-click “Device Manager” under System Tools
- Select “View -> Show hidden devices”
- Expand Non-plug and play drivers
- Right-click “Beep” and select “Disable”
- Reboot

Ahh, sweet silence….

Comments

Nature is late

Last year in March, I decided I was going to check on nature. More specifically on the tree right outside my bedroom. For more than a year (it’s still going) I took a picture of the tree every single weekend. I’m really sorry to say this, but we can’t count on the seasons anymore!

See for yourself - March 05 and March 06:

March 05
March 06

Because I don’t want you to hate me for forcing you to download a bunch of images, I was nice and put the larger set here. One picture per month!

You can also get even bigger pictures from Flickr.

Comments (1)

Eclipse 3.2 Release Candidate 1 is here

You may get it here.

If you’re using Eclipse 3.1, see what to expect one milestone at the time:

M1, M2, M3, M4, M5, M5a, M6.

Comments

I still haven’t found what I’m looking for…

That’s right, I still haven’t found a really good decent Personal Information Manager.

So far I have tried several outliners, eclipse with cvs, notepad, Konfabulator lists, email, databases, 3×5 index cards , post its, the back of business cards (that’s what they’re for, right?) and more recently, wikis.

The ideal PIM would be available from anywhere, whether I’m online or not, I oould easily build lists, add text and drop images. It should be secure and it should run quickly (the Eclipse based solution for example, isn’t a good one in part because of this). I should also be able to hyperlink notes.

The closest I got to what I want was with MediaWiki, the wiki behind Wikipedia.

Mediawiki

It starts quickly, I can build lists, add text and images, has hyperlinks, has a nice markup language, and looks good too.

But it’s not available everywhere I go. It could be, but then I would have to poke a hole in my firewall at home just for that, and I’m not too excited about it. Even if I managed to guarantee a secure solution, I still wouldn’t be able to access it from everywhere. There are times, when I’m at a conference or at one of our geek gettogethers where there is no wireless around, and then what am I supposed to do? Use pen and paper? Hell no.

Coincidentally I have a couple of them nifty USB drives and no use for them. So I thought that USB drive + MediaWiki would do the trick. It has enough storage, I can carry it with me at all times, it’s fast enough, I don’t even have to have laptop with me (just need to be near someone who has theirs).

I almost got it to work too, and now I hit a wall. So I’m venting here, before I go again.

I’m using WAMP for this stuff, and as it turns out, WAMP stores the driver where it was installed in *a lot* of places! So if I install it on, say M:\ which is where my USB drive is on this machine, it won’t work on a different machine where the drive would be, J:\ for example.

It also keeps the MySQL and Apache Windows services loaded, holding references to where the services were loaded from. And since these aren’t fixed drives, their drive letters aren’t either. It’s easy enough to unload the services before connecting the usb key, but that’s one more thing to do.

So, what do people use for managing their content? Anything better than this:

Palm

or even this:

PDA

but not as cumbersome as this?

Treo

Anything that is either software based or small enough I won’t be embarrassed to be seen with?

Comments (5)

Google Calendar

Yeah, I know, two google related posts in a row. I’m shameless.

Google Calendar is finally out!

Google Calendar

So far it’s all I expected a good calendar to be: easy, straight to the point, available everywhere. Oh, and yes, Bay Area Python Group meeting is tonight, in San Bruno.

Comments

Google Analytics - Performancing

I’m often surprised to find out that I’m not the only one who reads my blog. I really like to get those comments, makes me believe I’m not talking alone after all. Short of comments, I use tools to reassure myself that this site exists at all, it’s not just in my head.

I haven’t decided yet between Google Analytics and Performancing, so I use both.

Who knew that someone in Ho Chi Minh City read my site? According to Google Analytics, this blog is very hot there. And by very hot I mean that at least one person read it, at least once. No one from Mexico, Spain, or Portugal. That’s surprising, given my name and all.

That’s cool. What’s less cool, is that apparently some people get to the blog after googling for “python+challenge+solutions”. I mean, I do have my solutions online, but I’m only level 7. I can only imagine their disappointment when they open the solutions page, looking for say, solution to puzzle 23, only to see that I’m such a newbie. Sorry folks!

Performancing also gives good information, though with less eye candy. The following is from Performancing.com.

Like I said, I do enjoy seeing where people come from when they visit the blog, but I’m not really a heavy user of either of these tools. For now I’m sticking with both, if nothing else to compare their results. I should shop for a third one, to see who’s more right.

Comments

Useless solution video

I was having difficulties connecting to a network, and when reading the FAQ I came across this:

Error

So the error message doesn’t say much, but it mentions a solution movie, so my hopes are high.

The movie is fairly high-tech. A flash animation, with voice-over and images showing frustrated users (I’m sparing you those).

Here are the 3 slides of the animation. How does this movie help me more than the original text, which already didn’t help me at all?

Step 1
Slide 1

Step 2
Slide 2

Step 3
Slide 3

It seems that someone was having a lot of fun editing “solution” videos. I only filed this under “Tech” because “Bad Tech” has the word “Tech” in it.

Comments

Lovely nerds

Glee* magazine says nerds have the special touch.

Nerds not only have the brains, but they also have the most powerful possession of all, the love touch.

Oh I’m sure Glee* knows. Coincidentally, I was looking for an excuse to sport my nerd score, and here it is:

Nerd index

Comments

BayXP to meet again and other name identity crises

The local XP group hasn’t met in a while and some folks are starting to get agile withdrawals. The problem now is to find the right time and location. William Pietri put together an online survey for people to vote on their favorite options (very cool).

The observation was made that it shouldn’t be just about Extreme Programming anymore, and that we should extend our conversation topics to the bigger Agile. This means the name BayXP is obsolete, and William’s poll has a box for new names.

If you live in the SF Bay Area, care about Agile and think you will be meeting with the other “agilists”, make sure you subscribe to the mailing list if you haven’t already, then vote.

PIG

Interestingly enough, another local group, the Bay Area Python Interest Group, or BayPIG is also having an identity crisis (though to be fair, in a smaller scale). Some people are uncomfortable with the PIG part and would like a “more professional” name. I like BayPIG and find the whole controversy kind of silly. Hopefully the name will stay. If it doesn’t, that’s okay too, the important thing is to meet and talk about Python related stuff.

Here too, if you’re in the Bay Area, care about Python and think you will be meeting with the other…er…Piggies, make sure to at least visit the site, then go from there.

Comments (1)

Python Challenge - Level 7

Solution to level 6 here.

Comments (1)

« Previous entries