Archive for the ‘Software’ Category

Exchange Love

Friday, February 23rd, 2007

This is funny if you understand Swedish:

Funny Exchange Mail

Mercurial Is My New Favorite VCS

Friday, February 23rd, 2007

I am starting a new development project where I will do a lot of coding myself, at least initially. There will most probably be times when I have to work offline - perhaps a litte evening coding while at vacation with my family, definitely the days when I am home because the kids cannot be at kindergarten.

So I had this initial thought - can I make a offline copy of the Subversion repository, make changes to it and merge it back when I come online again?

It turns out that there are solutions for doing that - namely SVK and svn-mirror. However, while searching I around I also realized that there had been a revolution in the VCS world, and no one told me.

In the wake of the BitKeeper mishap, it appears that several groups of people found it their mission to create the next great distributed versioning system. These days we have:

These seem to the more prominent ones, but I am sure you can dig up a few that I have missed.

To make a long story short, I have decided to use Mercurial for my next development effort. In fact I am using Mercurial for versioning all my files. It is ridiculously simple to set up versioning for an existing folder (hg init; hg add) so there is simply no reason not to.

To learn more, I recommend reading this, this and this.

When It Just Doesn’t Work

Thursday, February 22nd, 2007

When everyone else is writing songs about their love for GMail, I am reverting to old school mutt. It is simply the fastest way to read and manage large amounts of mail (The Rails mailing list comes to mind).

However, the default install did not work out for me, it mishandled international characters and formatting which made it unusable. After trying a bunch of options it finally came down to this:

port install mutt-devel -ncurses -pop -imap

Now, of course pop and imap had nothing to do with it, but I am using the most excellent offlineimap so I do not need them.

A Fresh View On Printing

Monday, February 19th, 2007

My three year old son just managed to print something of the Backyardigans web site and yelled out “Dad! We got mail!”

Parallels - Crap International Version and Customer Support

Thursday, December 14th, 2006

Once I got my hands on my new MacBook Pro, I did what mostly everybody else does - I bought a copy of Parallels Workstation for Mac. I need it mainly for running local servers so I can do demos of server environments etc.

For various reasons, we (Valtech) bought the license from the local retailer at the same time as the laptop. Big mistake. You see, if you buy Parallels from a local retailer in a non-english speaking country, you get a special, international, version. This version is not downloadable from the site, and has it’s own line of activation keys, so you cannot use the regular downloads from the site.

Now, that should not be a problem, should it? Well, it is. To make a long story short, I could not get the fine feature of NAT networking going. I did all the huffs and puffs of uninstalling, restarting etc, but to no avail. At the same time, the regular version worked swimmingly, apart from the fact that it would not accept my activation key.

So, I figured it was time to contact Parallels support. My idea was that due to the reasons above I could trade my malfunctioning international activation key for a working regular one. I mean, I had paid for their product and could prove it by sending the key I had.

Enter the Kafka world of Parallels customer support. I have to date sent them eight emails with an ever increasing level of anger. The first replies misunderstood my request, thought that I had lost my key and offered me tips on how to get that back. When I finally got my point across Parallels stopped replying. I had to send two more emails to get an answer. They now understood the nature of my request but there was nothing they could do about it. Instead I should take my product back to the local retailer for a refund, and then buy a new license from Parallels directly.

The local retailer Macoteket referred to the swedish importer who will not return calls or emails. And Parallels still won’t give me a new key.

The moral of the story is: if you are about to buy Parallels Workstation for Mac, make damn sure that you buy the standard version. The international one is crap, much like their customer support.

There should still be hope for VMWare on the Mac.

Update: Macoteket eventually refunded our purchase and I rebought the standard version. Too bad it took so much effort.

Web vs. Client

Friday, December 1st, 2006

For a long time, I’ve wanted to make the switch and start using online apps, but there has always been reasons that have kept me back. It seems that Dion and I share the same opinion on this one, and he sums up the problem very well.

Mail.app and Exchange

Monday, November 27th, 2006

If I could ask for one thing in Leopard, it would be the ability to answer Exchange invitations directly from Mail.app. As it is now, I either have to use the heavily dysfunctional non-IE Outlook web interface or fire up Entourage for the sole purpose of clicking ‘Accept’.

Enterprisey technology stacks

Thursday, November 16th, 2006

Almost all large companies I have come across have some standards regarding the technology stack that they are using.

The main reason behind this is economy, that developers should be able to rotate between projects and that operations should only have to worry about a limited number of software products. Something like that anyway

However nice this seems, it never delivers on its promise. It is much like the Gantt charts - looks nice, promises a lot, delivers zilch. Not counting the enormous upgrade cost when the whole stack is upgraded after 20 years - COBOL anyone?

It is like a bakery standardizing on a given type of flour, salt and sugar and keeping all ovens at the same temperature, so that the bakers are familiar with the environment should they start working in another part of the bakery.

So you have your chocolate cakes baked using the same ingredients as your sour dough bread, and of course the whole thing is a mess. After a while the bakers start changing oven temperatures without telling anyone - not out of rebellion but because they have to. Different cakes are baked in different ways, and software is just the same.

There is hope though; I was delighted to read this interview with Werner Vogels, CTO of Amazon:

Developers of our services can use any tools they see fit to build their services. Developers themselves know best which tools make them most productive and which tools are right for the job. If that means using C++, then so be it. Whatever tools are necessary, we provide them, and then get the hell out of the way of the developers so that they can do their jobs.

That is one man that understands development.

While writing this, Matt wonders how to get stuff past the acceptance red tape. I have no good answer. Guerilla coding is the insubordinate way. Nagging for a very long time has worked a few times. But I probably lean towards Alistair Cockburns analogy with the old joke:

Paddy stopped cutting the hedge as the big car drew up beside him and an English visitor enquired,

“Could you tell me the way to Balbriggan, Please?”
Paddy wiped his brow.

“Certainly, sor. If you take the first road to the left… no still that wouldn’t do… drive on for about four miles then turn left at the crossroads… no that wouldn’t do either.”
Paddy scratched his head thoughtfully.

“You know, sor, if I was going to Balbriggan I wouldn’t start from here at all.”

Meaning, Matt might be in the wrong place to do what he wants to do.

Finally - if an organization should standardize on something it should be protocols. HTTP for example. Build it, make it accessible with external API’s, and implement it the way you see fit. Just like Amazon does it. Loosely coupled large grained components the way EJB’s never were.

RE: The war is over and Linux won

Tuesday, November 14th, 2006

At least in the server world, Linux has won.

Here in Sweden, Microsoft has an inexplicable stronghold, even in the server room. The last time Craig Larman, Valtechs Chief Scientist, was here he noted that nowhere did he see as large proportion of server side windows as in Sweden - and Denmark.

I don’t know what makes swedes pay for stuff others get for free. Perhaps the high taxes have made us used to money disappearing?

IBM vs. Amazon

Tuesday, October 24th, 2006

For the love of software development - what the hell is this about? IBM, anyone?

IBM vs. Amazon: “

The Internet has been amazingly quiet about
IBM’s
litigation against Amazon
. It feels to me like maybe the biggest Internet
story of, well, maybe, ever.
I haven’t gone and read the IBM patents yet, because reading patents always
depresses me. If the titles mean anything (not always a sure bet), this might mean that IBM has finally managed to figure out how to
set up that Internet Tollbooth that we’ve always been afraid of. If you’re
interested in ‘Presenting Applications in an Interactive Service’, ‘Storing
Data in an Interactive Network’, ‘Presenting Advertising in an Interactive
Service’, ‘Adjusting Hypertext Links with Weighted User Goals and Activities’,
or ‘Ordering Items Using an Electronic Catalogue’, apparently IBM thinks you
need to pay them for the right to do any of those things.
If the courts agree with them, it’s time for me to find a new line of work.

(Via ongoing.)

Word. Why?

Monday, July 3rd, 2006

Why in the name of one trillion unused functions of which the one you actually use doesn’t work can something so completely dysfunctional as Word ever become so successful?

Update: Yes, a lot of aggravation was the cause of the rant above, and yes, I actually have to use it as Pages can’t handle .dot files or quite complex table based company headers and footers.

Markdown based S5 in TextMate

Monday, June 12th, 2006

Happy happy joy joy

(Via TextMate Bundles (svn).)

Cedric Still Doesn’t Get Agile

Friday, June 9th, 2006

Update: Martin Fowler pointed to . It seems Cedric did not give us the full picture. I have edited my post accordingly

After attending a less than stellar presentation on TDD, Cedric Beust confuses TDD with “Agile” and goes on to tell the world that agile is not good. Let’s have a look, shall we?

First of all, tests are not specs.  Not even close.  Somebody in the audience was quick to give a counter-example to this absurd claim by using a numeric example (’how do you specify an exponentiation function with a test?’)

I would not use unit tests for specs. Automatic acceptance tests on the other hand is really nice if you have a customer/product owner that will work with you. Now Cedric has previously stated that he does not really care for the labelling of tests (“However, when I write a test, I don’t really care if it’s a unit test or a functional test”) so that of course makes it harder for him.

And hey, testing an exponentiation function? How about providing test data with given parameters and answers? It would be a prime candidate for a FIT-test by the way.

Relying on tests as a design specification is lazy and unprofessional because you are only testing a very small portion of the solution space of your application (and of course, your tests can have bugs). 

Why would you only test “a very small portion of the solution space of your application”?

Tests also fall extremely short of having the expressiveness needed to articulate the subtle shades that a real specification need to cover to be effective.

This is my main gripe with Cedrics rant. He seems to be completely oblivious to the great emphasis on customer interaction that agile methods make, which promotes a two way dialogue.

A specification written in a document is a one way communication. Even in high school psychology I learned how much more information was conveyed in a spoken dialogue than in writing.

This claim is part of a broader and more disturbing general Agilist attitude that is usually articulated like ‘Your code is your spec’, along with some of its ridiculous corollaries such as ‘Documentation gets out of date, code never does’.

What is so ridiculous with the last statement? I have never been involved in a large scale project where the documentation did not get out date.

As for the code being your spec: when you have code and documentation, and the latter does not correctly describe the former, it is out of date, which will you trust? And what do you read to know what the real world looks like? Map, meet terrain.

I am currently getting acquainted with a brand new project that is not even very big, and while I understand Java fairly well, there is no doubt in my mind that for ten minutes I spend trying to understand how a certain part of the application works, a five-line comment would have given me this knowledge in ten seconds.

Sure, if it is up to date, which you will have to read the code to find out. My general rule: if you feel the need, comment on why the code does what it does if it is not obvious. If you feel the need to comment on what the code does, the code is not clear enough. Refactor until done.

Very often, Agilists simply forget that their job is to produce software that satisfies customers, not software that meets some golden software engineering scale.

Again, this is simply ridiculous - all agile methods try to get customers as close as possible to produce just what they want. Anyone even remotely knowledgeable with agile methods knows that.

Frankly, it takes all of ten minutes to explain Test-Driven Development to a developer who’s never heard of it:  ‘Write a test that fails and doesn’t compile.  Make it compile.  Then make it pass.  Repeat’.

I actually find it quite hard to get developers to grasp TDD; people find testing something that does not exist confusing. This is of course the basis for behavior driven development, but let’s just be happy for Cedric now.

Some might find it picky, but leaving out ‘refactor’ in the TDD loop tells me that you somehow has not grasped the concept completely. But then Cedric might throw in a comment instead :).

‘What should we test now?’

‘How about:  if we pop an empty stack, we get an exception’

‘Mmh, no, let’s not do that’

This is quite easy to test, so I do not see why he could not add it. Read Jeffs answer

 
Stack s = new Stack();
try {
  s.pop();
  fail("Should not get here");
}
catch (Exception e){
  //Ignore
}
 

But I am dead sure Cedric knows this , too bad the presenter did not.

To be honest, I am becoming quite suspicious of Agile practices for that reason:  all the presentations I have attended and books that I have read are always using toy implementations as examples.  Stack, List, Money, Bowling…  enough already!

Ignoring the fact that Cedric again confuses TDD and agile, he does have a point. Too many TDD presentations uses examples that are way too simplistic. They should point out the need of a modular architecture, and the fact that using TDD actually helps you get a clean, high cohesion - low coupling architecture.

And please, avoid smug and useless answers such as:

‘A lot of the classes I have to test are hard to isolate, do you have any advice regarding mocks?’

‘Well, if you had started with TDD in the first place, you wouldn’t be having this problem today’.

It is certainly not a helpful answer, but it is true nonetheless.

Fundamentally, I am disturbed by the Agilists’ dishonesty when it comes to presenting their arguments.  They offer you all these nice ideas such as Test-Driven Development and Pair Programming but they never — ever — disclose the risks and the downsides.  To them, Agility is a silver bullet that is applicable in all cases with no compromises.

Just to give one example, “Practices of an Agile Programmer” clearly states that agile is not for everyone.

The truth is that these practices come at a price, and for a lot of organizations, the price gets high very quickly.  Agile development will never go far if its proponents keep ignoring these organizations and make condescending comments to its members.

Here Cedric is spot on. Yay!

I like Test-Driven Development.  I really do, and I’m fortunate enough to work on a project that lets me use TDD most of the time.  But the truth is:  at times, I don’t do TDD because implementing a feature quickly is more important than a fuzzy feeling.  And I’m also aware that TestNG is an open source project with less than five developers, all of them on the bleeding edge and aware of the latest advances in software engineering.

And this is my main beef with Agilists:  I strongly suspect that most of them are spending their time on open source projects with like-minded fellows, but none of them have any experience what companies whose survival depends on shipping software have to go through to organize huge code bases growing thousands of lines of code every day under the combined push of hundreds of a developers, all with their personal background, education and bias.

My main beef with people opposing agility is that they basically say that too many of the developers out there are morons who cannot perform unless closely supervised and given clear instructions, and that there is no hope that that will ever change. It is a weird combination of pessimism and elitism

Now Cedric has a history of not liking agile methods, and that is fine with me. Whatever makes him happy. But his retoric in this case is like watching somebody who does not know karate perform a round house kick - lots of power and effort but misses the target completely.

Least wanted feature of IntelliJ 6.0 announced

Wednesday, May 31st, 2006

IntelliJ IDEA 6.0: Built-in Struts Support: “Starting from release 6.0, IntelliJ IDEA will provide Struts support out-of-the-box. The functionality is added by Struts Assistant plugin that is now bundled to IntelliJ IDEA. So you’ll get it without any additional download and installation”

Why?

(Via IntelliJ IDEA Blog.)

Dan North: How simple is too simple?

Monday, May 29th, 2006

Dan North: How simple is too simple?: “Kent Beck advises us to do ‘the simplest thing that could possibly work’, but this is often mistaken for ‘the first thing I could possibly think of’ or even ‘the only thing I know’”

Well put.

(Via Planet TW.)

Don’t trust the non-programmers to design systems

Monday, May 22nd, 2006

I read an article the other day about a surgeon who said that in order to stay a good surgeon, he had to perform operations on a regular basis. Which sounds quite reasonable right?

Ponder that the normal thing for experienced surgeons was to not take part in the actual operation. Instead, they analyze the patient and decide what should be done in great detail, creating diagrams explaining the situation.

The actual surgery is then performed by somebody else, while the surgeon architect at best is standing by in the vicinity, but is probably somewhere else planning the next operation.

It does not work that way. Why do we in the software industry let people who do not program design systems?

English version of my article on REST vs SOAP

Thursday, May 18th, 2006

As I’ve received a few requests for it, I’ve been given permission by my employer Valtech to republish an english version of my article on REST vs. SOAP here at my blog.

Is Sun making a comeback?

Wednesday, May 10th, 2006

I am seeing signs in the sky that Sun is making a comeback.

  • Textdrive is switching from FreeBSD to Solaris
  • Rumors that ZFS might be ported to Mac OS X
  • Tim Brays presence and statements on the RoR podcast from Canada on Rails
  • Sun makes smart moves like supporting PostgreSQL

And not one of them is related to Java.

before_filter and with_scope

Tuesday, May 9th, 2006

I will be speaking on the Rails Recipes Meetup here in Stockholm tomorrow. My topic will be on recipe 28 in Chads excellent book, how you can use with_scope to DRY your code.

Whilst I have looked quite deeply into the subject - it is quite small actually - there is one thing I have yet to find out. Chad mentions that you can use wrap your actions with scoping using a before_filter.

The thing is that the author of the patch for nested scopes provides a plugin to enable just that, but he uses an around filter which utilizes funky metaprogramming to do just that. He has a whole blog entry about it.

I’ve asked twice in the IRC channel without any answer, and I’ve posted a question on the books forum.

Does anybody know if a before_filter can be used?

Thomas Looy: How Long is a Piece of String?

Monday, May 8th, 2006

Thomas Looy: How Long is a Piece of String?: “- Use working software as the only measure of the progress on a project (no more 90% completed tasks);

- Measure using smaller sized tasks. Smaller tasks give you better measures than larger ones and will also give you a larger sampling of measures that can be used for meaningful statistical evaluations. Smaller tasks are also completed sooner and therefore give you measurements sooner that you can begin to use to extrapolate to a meaningful project complete date.”

(Via Planet TW.)

Hear, hear.