Archive for the ‘Programming’ Category

1996 revisited

Wednesday, April 15th, 2009

After receiveing what I believe was the third promotional email from my beloved mobile phone operator, showing this not-so-useful information

Screenshot of empty email

I was curious to see what sort of HTML did not even render images in Safari.

Behold:

<title>Sista chansen: Specialpris på Telia Mobilt bredband</title>
<base target="_blank">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.5730.13" name=GENERATOR></HEAD>
<BODY bgColor=#818177 leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" bgColor=#818177 border=0>
<TR>
<TD vAlign=top align=middle>
<DIV style="FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #505050; FONT-FAMILY: Verdana, Arial, Helvetica, Sans-Serif">Ser mailet konstigt ut? <A style="FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #cf0566; FONT-FAMILY: Verdana, Arial, Helvetica, Sans-Serif" href="#" target=_blank>Klicka här »</A></DIV><BR>
<TABLE cellSpacing=0 cellPadding=0 width=590 align=center bgColor=#aaaaa4 border=0>
<TR>
<TD vAlign=top align=middle><A href="http://tr.anp.se/track?t=c&mid=250386&uid=124849854&&&http://track.adform.net/C/?bn=212313" target=_blank><IMG alt="Nu höjer vi hastigheten och sänker priset." src="http://adata.attraction.se/Telia/buss14/09-Utskick_v15/images/erbj1.jpg" border=0></A></TD></TR>
<TR>
<TD vAlign=top align=middle><A href="http://tr.anp.se/track?t=c&mid=250386&uid=124849854&&&http://track.adform.net/C/?bn=212313" target=_blank><IMG alt="Nu höjer vi hastigheten och sänker priset." src="http://adata.attraction.se/Telia/buss14/09-Utskick_v15/images/erbj2.jpg" border=0></A></TD></TR>
<TR>
<TD vAlign=top align=middle><A href="http://tr.anp.se/track?t=c&mid=250386&uid=124849854&&&http://track.adform.net/C/?bn=212313" target=_blank><IMG alt="Nu höjer vi hastigheten och sänker priset." src="http://adata.attraction.se/Telia/buss14/09-Utskick_v15/images/erbj3.jpg" border=0></A></TD></TR>
<TR>
<TD vAlign=top align=middle><A href="http://tr.anp.se/track?t=c&mid=250386&uid=124849854&&&http://track.adform.net/C/?bn=212313" target=_blank><IMG alt="Nu höjer vi hastigheten och sänker priset." src="http://adata.attraction.se/Telia/buss14/09-Utskick_v15/images/erbj4.jpg" border=0></A></TD></TR></TABLE><BR>
<DIV style="FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #505050; FONT-FAMILY: Verdana, Arial, Helvetica, Sans-Serif">Vill du inte få fler erbjudanden från Telia till denna epostadress, <A style="FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #cf0566; FONT-FAMILY: Verdana, Arial, Helvetica, Sans-Serif" href="http://www.anp.se/oa/250386/4342584B72474751437243465143" target=_blank>klicka här »</A></DIV></TD></TR></TABLE></BODY></HTML>
<img border=0 width=1 height=1 src="http://www.anp.se/Clicks.asp?sqid=250386&sid=124849854&pf_action=View&pf_Link=">

Wow – it is like a time machine to 1996. MSHTML did supposedly generate it.

ThoughWorks Free Seminars in Stockholm

Tuesday, April 7th, 2009

ThoughtWorks will give two free seminars at Berns Tuesday April 21 2009.

The morning one is given by me and will be on the business value of agile and lean, and how it can be the competitive advantage in difficult times.

In the afternoon my colleague Zack Exley will give a behind-the-scenes look at the technological side of the Barack Obama campaign.

Both of the talks will be kicked off by our chairman Roy Singham who will give his view on why he believes Scandinavia has a great future in the software development world.

You are welcome to attend either one of these – or both of course.

For registration and more info please visit: http://connect.thoughtworks.com/stockholmEvent/

Simple beats complicated

Sunday, April 5th, 2009

Peter Krantz sent this clip from a Capoeira fight (rating: violent) which I see as a really good analogy for XP’s YAGNI and the simplest thing that could possibly work.

Smidig Videos Are Up

Tuesday, December 2nd, 2008

The videos from Smidig 2008 are up. This is mine (in Swedish):

Words don’t come easy: MoSCoW and BDD

Wednesday, November 26th, 2008

I had a interesting conversation with Kevlin Henney at Øredev regarding the word ’should’ and its usage in Behaviour Driven Development. Kevlin does not like ’should’ as he feels it is too vague in many circumstances. And I have to agree with Kevlin.

Sometime you are speccing something like “the title of the index page should be ‘blabbr.com – the worlds largest social network’”, which might be something that we will change in the future. ‘Should’ is a good choice of words here.

Another time the spec says ‘when the nuclear reactor overheats it should shut down.’. ‘Should’ is not a good choice of word here. I’d much rather say that the nuclear reactor must shutdown, as to really say that we have no other option.

So, let’s use both. Use ’should’ when describing a something might change, and ‘must’ when describing something carved in rock.

This might also help using the specs as an executable requirement. At the moment all specs are valued the same, every fail breaks the build. Perhaps there is a value in saying that certain specs are really important and should never fail. We could have different colors for different types of failure.

Perhaps there is a use for the rest of MoSCoW?

Thoughts?

Speaking at Smidig 2008

Monday, September 8th, 2008

I am happy to say that I will give one of the lightning talks at Smidig 2008. My presentation is about optimizing the whole product chain, from concept to cash, and stop focusing on projects as they fragment the organization and cause local optimization.

Last years conference was great and inspired us here in Stockholm to do our own version in the form of Agila Sverige. I am really looking forward to going back to Oslo.

Presentation About Test Driven Development

Tuesday, September 2nd, 2008

I will do a presentation on ‘Successfully Using Test Driven Development’ at .NetAkademin Tuesday September 16th. This talk will cover stuff like BDD, outside-in but also how the test-driven approach is used on the project as a whole.

To match my .Net experience, we will touch on frameworks and tools for .Net, but focus on the ideas and philosophies behind them, making it a very platform independent presentation.

The event is first and foremost for clients and members of .NetAkademin, but any seat not taken by them is available to the public.

Separating the View And the API

Thursday, August 14th, 2008

Assaf writes about using Hahlo and Fluid, and I find this paragraph especially interesting:

A great Web app uses persistent, readable URLs for every interesting resource. Twitter does that, so it’s pretty easy to share links to people, statuses and other points of interest. Hahlo hides the entire user interface behind a single URL, but it works extremely well because Hahlo is just a front end, Twitter is the system of record. If I need to link, I wouldn’t be using Hahlo links anyway (although link discovery is missing in the current version).

Perhaps this is a good way to both have the cake and eat it? Have a restful, share nothing API, which is accessed by a separate GUI app built in say Seaside that can use state as much as it wants.

Tools, again

Wednesday, May 21st, 2008

Computer Swedens developer columnist Tobias Fjälling the other day answered the question “What should a good development environment include?”. (MÃ¥sten i en bra utvecklingsmiljö – Computer Sweden).

Tobias list:

  1. Auto-complete
  2. Refactoring
  3. Navigationsupport
  4. Extendability
  5. Speed
  6. Debugger
  7. Code templates

I find this to be spot on what Ola wrote about the other day which I already quoted:

It’s interesting, many Java programmers talk so much about tools, but they never seem to think about their language as a tool.

Tobias seems to be a good guy, I am giving him the benefit of the doubt and assume that he forgot.

Three Tickets To Agila Sverige 2008 Available

Friday, May 16th, 2008

Another thing: ThoughtWorks is sponsoring Agila Sverige 2008, and we have three tickets to give away. Send me an email or add a comment to this post if you want one.

The Programming Language Is Your Most Powerful Tool

Thursday, May 15th, 2008

Ola is so spot on with this one:

A New Hope: Polyglotism: “The one thing that I am totally sure if is that we need better tools. And the most important tool in my book is the language. It’s interesting, many Java programmers talk so much about tools, but they never seem to think about their language as a tool. For me, the language is what shapes my thinking, and thus it’s definitely much more important than which editor I’m using.”

I do not know how many discussions I have had with Java developers who questions Ruby et al. because there are no IDE’s with the same feature sets as those found in Java.

(Via Ola Bini on Java, Lisp, Ruby and AI)

The Good Pragmatic Developers

Tuesday, May 13th, 2008

Java in 2008: “These are people who aren’t religious and aren’t close-minded and just want to Get Shit Done. Oh, and they’ve already got a lot of it done and they aren’t interested in discarding that investment.”

(Via ongoing)

What He Said

Tuesday, April 8th, 2008

I have used Mercurial for over a year, and started using Git on Agila Sverige. I really like Git and I have therefore kept a draft blog post trying to capture why I like better than Mercurial.

That draft was just deleted since I essentially share Dustin Sallings thoughts on the differences between Mercurial and Git. Apart from the Gnu Arch and Darcs parts – what he said.

OpenUP

Thursday, April 3rd, 2008

Proponents of RUP, the golden methodology of 1998, is trying revamp it as OpenUP.

My first reaction is positive – browsing the Work Products I cannot find any required UML diagram. But after a while I get the feeling that they have fixed the implementation without getting the big picture.

It is still has four phases, delivering a feature complete project after the transition phase. No lean, incremental deliveries to production, but how could they? It explicitly defers deployment and operation leaving it to other parts of the organization.

But this is my favorite one:

OpenUP is minimal, complete, and extensible. It’s the minimum amount of process for a small team.

No, it is not minimal and it is not complete. It is less lipstick on the pig.

Rails is moving from SVN to Git

Thursday, April 3rd, 2008

A year ago I was frustrated over Rails’ close ties to Subversion. But as Rails is moving from SVN to Git, the future is looking bright. The only bastion left I can think of is RubyForge.

Things I Have Actually Used

Monday, March 31st, 2008

Robby Russell is a constant source of information on Ruby and Rails, I have used his instruction on how to set up Rails and PostgreSQL on Mac a number of times. It is therefore fun to see that I have actually used 3 out of the 5 things he wants to know more about::

RSpec User Stories

We were very early adopters of this one, we started using it the same day it hit trunk in a useable form. Everyone should start using it today – I cannot speak highly enough of it. The only thing I miss is a Fit-style table approach to rules, but I have my own thoughts about that one.

Using Selenium with RSpec

We have used the now outdated spec/ui library at WeMind. Today we use RSpec Stories almost exclusively for acceptance testing. My position is to use Selenium only where you really need it, for example to test Javascript functionality.

JQuery

I have used it for the dynamic hiding of speaker info for Agila Sverige. Not at all enough to judge a library by, but it feels a lot sweeter than Prototype/RJS.

JSSpec (BDD for Javascript)

Yeah, I wanna know more about this as well.

Using the Google Charts API with Rails

Same here.

Other than that I would love to try out:

  • Seaside – I have dabbled with it but nothing worth mentioning.
  • CouchDB

The closing of script tags

Tuesday, March 11th, 2008

I found a bug in my HTML code today running Firefox 3. <script> tags must supposedly be closed by a </script> and not by the less verbose but obviously wrong <script/>, as explained in this dismissed bug report.

If you insist on using <script/> FF3 will punish you with a blank page caused by the body tag being self closed, <body/>. Sort of: “You close your script tags like that – I’ll close your damn body tag like that. Now, how do you like that???”

I had no clue. Sorry.

How To Automigrate the Test Database Using Merb, Datamapper and RSpec

Saturday, February 16th, 2008

I am creating a small site using Merb, DataMapper and RSpec, all in all a very enjoyable experience. I did however have problem getting the test database to be automigrated when running the specs, as I am used to in Rails.

As Google did not help, I turned to #merb on IRC, and got immediate help.

Two alternatives:

  1. Run rake MERB_ENV=test dm:db:automigrate before running rake specs
  2. Insert DataMapper::Base.auto_migrate! into your spec/spec_helper.rb

Big thanks to topfunky, afrench and jdempsey for the help.

git Is Winning The DVCS Battle With git-svn

Saturday, February 9th, 2008

I’ve been using distributed version control for over a year now, and if it is up to me, I will never use a centralized VCS again.

When I evaluated the alternatives last year, I choose Mercurial as the DVCS we are using at WeMind. The reasons were:

  1. Usability – git was quite obscure back then
  2. Speed – bazaar and monotone was quite slow
  3. Large enough uptake – OpenSolaris and Mozilla started using Mercurial at the same time.
  4. Runs on all platforms, if we ever employed someone who wants to use Windows
  5. Built in Python which could be a good think if I ever wanted to extend it

A year later we are happy with Mercurial, but the landscape has changed. In particular I am seeing a huge growth of people using git, especially within the Ruby community. Which in itself is something I am happy about.

The biggest reason I see for git’s resurgence is git-svn. It allows people to start using git locally while still having Subversion as the backend, and when everyones ready the switch is easy.

There is a hgsvn in the Mercurial world, but it is read only, so you cannot push your changes back to Subversion. I strongly believe that the Mercurial community should focus on this if it wants to regain its momentum.

Git still has weak support for Windows, but that seems to be a non-issue in the Ruby world.

I am pretty agnostic about which DVCS will be the dominant one. The most important thing is that people are moving away from the centralized VCS’s.

For a great post on the subject, read what Dave Dribin has to say about it

Java vs the JVM

Friday, February 1st, 2008

Tim Bray on the JVM being the good part of Java:

“But the Java language just doesn’t seem like the interesting thing about Java, these days.”

I wish more Java programmers would agree to this. One of my observations at JFokus the other day was that a lot of people really like Java the language, and are going through hoops to implement their ideas in it.

Stephan Janssen has created a kick ass new version of parleys.com in Flex/Air, but he wants to redo it all in JavaFX script, just so that it is Java. Rickard Öbergs new framework for composite oriented programming could be useful, but in my opinion it introduces enough new concepts to qualify for a whole new language. Lipsticking on top of Java makes it feel verbose and clumsy. After a year of Ruby I have very little patience for Java interfaces.

(Via ongoing)