Catching Unhandled Exceptions in .NET

At Resolver, we've been looking at better ways of dealing with unhandled exceptions that occur during test runs. Apart from the need to log that a problem occurred it is important that the dialog boxes that Windows generates don't block the test run (ideally they wouldn't appear at all). We had a hack in place to deal with these dialogs that I won't go into here. Let's just say we've been finding our hack inadequate.

In the .NET world there's 2 APIs that your program can use to be notified about unhandled exceptions. Each covers exceptions that happen in different parts of your code. In order to be comprehensive about catching unhandled exceptions you really need to use both APIs.

Read more…

PyCon Italia Due

I'm enjoying the wonderful weather in Florence this weekend while attending PyCon Italy 2. Yesterday's highlight was Richard Stallman's thought-provoking keynote titled Free Software in ethics and in practice held in the jaw-dropping Palazzo Vecchio. Stallman's alter-ego Saint IGNUcious (of the church of Emacs) even made an appearance.

My presentation on Sunday covers Application Development in IronPython. It's mainly an introduction to IronPython for Python programmers. Being very much an an Italian language conference, there's real-time translation of English presentations to Italian (mine included). Conversely there's translation from Italian to English in one stream.

The conferences organisers and attendees are being patient with my lack of Italian language skills. I feel very lucky that many Italians can speak English. It's easy to be complacent about learning other languages when you already know English.

I've been fortunate to have met some great people including Raymond Hettinger (core Python team), Arkadiusz Wahlig (Skype4Py) and some of the organisers Simone, Giovanni and Lawrence. It's always great to be able talk shop, exchange perspectives and be inspired. (Resolver One has been getting plugged too!) I'm looking forward to more conversations as the conference continues. The best stuff at conferences always happens outside of the lecture theatres.

ps. The food rocks! The conference lunch today was amazing and last night's Florentine style steak was super-tasty.

Photos, photos, photos

Colossus

I've posted heaps of photos over the last week. Here's the summary.

  • Our camping road trip from London to Ukraine and back last summer.
  • Bestival 2007
  • New York last Christmas and NYE.
  • Our visit to Bletchley Park yesterday. As well as having lots of facinating exhibits about code breaking and the infamous Enigma, the site is also the home of the National Museum of Computing. It's filled with historic computer hardware from the first programmable digital computer onwards. Highly recommennded to anyone with an interest in computing.
  • Today's Olympic Torch run through London. We watch it near City Hall. It was freezing cold and still snowing slightly but plenty of people still turned out. There were a large number of Chinese supporters as well as many pro-Tibet protestors. Police ran with the torch bearer, completely surrounding the runner. Pro-Tibet chanting and booing was drowned out most of the cheering. The pro-Tibet message was pretty clear.

Resolver One 1.0 Released

As mentioned by several others, Resolver One 1.0 was released on Wednesday!

For those of you who don't know, Resolver One is a unique spreadsheet application written in IronPython, that allows you to easily add functionality using the Python language. The entire spreadsheet is represented as a IronPython program which can be eyeballed and extended. Changes to the spreadsheet grid are reflected in the Python code and changes to the code are reflected on the spreadsheet grid. It's really neat. Resolver is great for people who want to develop complex spreadsheets in a clean, powerful and testable way. It's also useful (and fun!) for programmers when prototyping.

One of the Resolver developers Andrzej, has written a nice article describing 5 Reasons To Try Resolver One. Of course there are more than just 5 reasons :) If you do try out Resolver One, make sure to check out the Resolver Hacks site too.

The 1.0 release of Resolver One is the result of over 2 years of work. Having joined the team very recently I've only been part of the very last bit of that. One thing I've found really interesting is the time leading up to the release date. Compared to other commercial software projects I've worked on the atmosphere felt under-control and (almost) relaxed. It seems that the XP development practices used by the development team are really paying off. No horrible integration issues right before the release, no unexpected bugs on release day, no huge schedule blow-outs. Such a nice difference.

NYC Encounters

Susanna and I spent the Christmas and New Year period in New York City staying with the the wonderful Libby and Phillip. Libby is a long time friend of Susanna's from New Zealand who's been studying in NYC for many years now.

On one of our first mornings in NYC we were walking out the door of Good Enough to Eat after a delicious brunch when I hear "Menno?". By freak coincidence Seth Vidal and his partner in crime Eunice were walking in the door at the same time as we were leaving. Seth and I used to work together a lot on the Yum project. I don't live in NYC and neither does he, but some how we end up at the same place in a huge city at the same time. A super weird but pleasant surprise. Seth describes the incident on his blog.

The remainer of our visit didn't offer any more strange co-incidences but we had excellent fun. I caught up with Rohan, Susan and Jon one afternoon which was awesome. Thanks Rohan for showing us some sights (McSorely's is a must-do experience).

As always, photos to come...

Announcing IMAPClient 0.4

I've just released IMAPClient 0.4. Changes are:

  • Support for folder subscribing and unsubscribing.
  • Support for server capabilities checks.
  • Support for folder status checks.
  • Tests for the above.
  • More robust date handling.

Many thanks to Helder Guerreiro for contributing patches for some of the features in this release.

IMAPClient can be installed from PyPI using easy_install IMAPClient or downloaded from my Code page. As always, feedback and patches are most welcome

Internet Explorer Ampersand Bug with prompt()

I just discovered an inconsistency in how Internet Explorer (6 and 7) handles ampersands with the prompt() built-in function.

Try the following in Firefox and then again in IE6 or IE7.

<html>
  <script>
    alert('-&-');
    alert('-\&-');
    alert('-&&-');
    prompt('-&-');
    prompt('-\&-');
    prompt('-&&-');
 </script>
</html>

FF and IE behave identically for alert() but for prompt() both IE6 and IE7 fail to show an ampersand unless "&&" is supplied. Very strange.

In case you're wondering, &amp; doesn't help either; it isn't translated for popups in any of the browsers.

Is this a known problem? I haven't been able to track down other reports of the issue.

Short of doing browser specific hacks, or just not using prompt(), I can't see a way of getting consistent behaviour across browsers. How craptastic. The joys of web development...