Optimising JUnit performance in Ant

Ever been in the situation where your unit tests are running really slowly with Ant from the command line but run like lightening in your IDE? Usually tests which are persisting to a database?

I’ve recently had this problem and I managed to solve it by not forking the batchtest task, and instead forking the junit target and setting the forkmode attribute to once, like so:

<junit printsummary="true" fork="yes" forkmode="once">
<batchtest todir="${tmp}">
</batchtest>
</junit>

Posted by Olly on June 20, 2006 Comments Off | Permalink

@media 2006 – Day Two

Parliament from Lambeth BridgeA perfect London summer morning for the second day of @media 2006 meant I could stroll to the venue and I arrived just in time for Dan Cederholm‘s insightful presentation, Bulletproof Web Design. Not only does Dan have heaps of experience and a stunning portfolio of work, he has a seemingly endless attention to detail. Inspiring stuff which I’ve definitely taken to heart. I’m still not sure what DigDug is though :-)

Next up was Javascript Libraries: Friend or Foe? with Cameron Adams, Peter-Paul Koch, Stuart Langridge, Dan Webb, and Simon Willison. As primarily a software developer, I found this rather frustrating. The entire session was a discussion of whether Javascript libraries were useful or not, but I found the arguments on both side lacking in rationale: “I don’t like libraries, I like to cut & paste the code I need”, for example. There was a lot of focus on the Dojo Toolkit but I didn’t really take much away from this.

Enter Cameron Moll presenting Mobile Web Design.Cameron Moll

This was of an excellent presentation (and Cameron wins the ‘Slide Design’ award hands down), introducing the issues surrounding designing for mobile devices, discussing how such designs should be approached (think: “What is contextually relevant?”) and introduced me to a worrying number of new acronyms and buzzwords (Flash Lite, LBS, RFID, XHTML-MP, .mobi). There’s no escaping the fact that mobiles are going to be an increasingly large target market for web designers and this was a perfect introduction.

Lack of time management skills (and talking to Cameron) meant I missed the first part of CSS Project Management with Rachel Andrew, Roger Johansson and Dave Shea, but I took a lot out of what I saw. It was a panel discussion of different techniques and tools for managing CSS projects and it was interesting to hear people’s differing approaches. When the topic of development environments was raised, I didn’t get a chance to plug Karlis Blumental’s astonishingly good WeBuilder product, so there’s a quick plug. If only it were available on the Mac. Gah!

The last presentation was the Modfather himself, Andy Clarke, who was looking seriously sharp:

The Modfather

Transcending CSS: The Fine Art of Web Design was great, taking Andy’s scrapbook inspirations and applying them to the web, questioning and challenging designers to take the initiative and push CSS to the limit. In essence, forgot trying to make sites look identical in IE 4, IE5 and Safari 1 and instead, make them look awesome in Firefox and Safari 2 and leave them to just work in older browsers. This is just so right that I’m sure this will be the next web design movement. Look out for the book (“Transcending CSS”) in the autumn.

To wrap up, Molly Holzschlag, Jon Hicks, Jeremy Keith, Eric Meyer and Tantek Çelik held a “hot topics” panel discussion about AJAX, the World Cup, cheese and the Next Big Thing (Microformats – you heard it here last). Here’s the panel, minus Tantek (sorry dude):

The Hot Topics Panel: Molly, Jon, Jeremy and Eric

You can probably tell I had a great time. I’ve been to a lot of conferences over the years and this was, without question, the best I’ve been to. Not only were the presentations superb, but the atmosphere was friendly and the speakers wanted to talk to people over coffee. If they weren’t speaking, they would have been there anyway! And that pretty much says it all.

Big Ben

Posted by Olly on June 16, 2006 Comments (2) | Permalink

@media 2006 – Day One

Some very good presentations today, kicking of with Eric Meyer‘s trip down CSS memory lane, Ten Years of Style. Following that was an interesting panel discussion, Good Design vs. Great Design with Jon Hicks, Veerle Peiters and Cameron Moll. Focusing on grids, typography and colour, the panel provided some thought-provoking insights and Jon declared his love for Comic Sans. Here they are:

Jon Hicks, Veerle Peiters and Cameron Moll

Following that, I listened to Chris Wilson talk about what to expect in IE 7. Although this product is always going to be seen as Microsoft catching up with the rest of the browser pack, it does look like it has some rather cool features, namely Open Search. I expect this will be one feature Firefox, Opera et al will all be looking at with interest.

After lunch (nice cakes) was The New Accessibility Guidelines: WCAG 2.0 with Andy Clarke, Patrick H. Lauke, Gez Lemon, and Ian Lloyd. To be honest, this was the one presentation which didn’t work for me and I got the impression that WCAG 2.0 was rather unpopular with the presenters. The gist I got was that the guidelines are complex, hard to understand and, unfortunately, inaccessible. Shame, but perhaps they’ll improve before they’re finalised. Here’s three of the panel:

The panel for The New Accessibility Guidelines: WCAG 2.0

The final presentation of the day was Designing the Next Generation of Web Apps by the thoroughly energetic and inspiring Jeff Veen. It was an excellent explanation and demonstration of the latest Web 2.0 (i.e. AJAX) applications, providing real insight into the techniques used by the leading companies, using Jeff’s own experience working at the forefront of the web. Go Jeff!

Jeff Veen

Shamefully I didn’t go to the after party and instead skipped out immediately after Jeff left the stage to watch the match which, for the last 10 minutes at least, was a perfect end to the day. Super Stevie!

Posted by Olly on June 15, 2006 Comments Off | Permalink

The CSS drop-down hackers challenge

So I pay due time and attention to creating a (frankly, basic) cross-browser CSS navigation menu for a web application (thanks Patrick Griffiths and Dan Webb) only to succumb at the final hurdle to a peculiar “feature” (i.e. bug) which appears on certain browsers. So far I have identified the following culprits:

  • IE 6 (Win)
  • Firefox 1.5 (Mac)
  • Camino 1.0 (Mac)

It’s a simple problem. In the above named (shamed) browsers, a <SELECT> element is treated completely differently to all other basic HTML elements, so when you try and float another element above it, you can’t*. Hurray!

Here’s the dropdown in action – does it work for you?

Now, I’ve spent at least 10 minutes browsing the web for a lovely solution but, alas, there isn’t a neat one. It seems the most popular solution for IE Win is to add an <IFRAME> object to your HTML markup and then cunningly position it in exactly the same place as the floating menu. Urgh! No thanks.

Anyway, that might work for IE, but what about the other browsers? Therein lies the challenge! I personally don’t have the time so it’s all yours. Do your worst!

  • * It could well be, of course, that I have simply cocked-up the CSS so please do correct me if I’m wrong!

Posted by Olly on June 1, 2006 Comments (1) | Permalink