Thursday, June 14, 2007

Summer Weather

We were in a meeting room with no exterior windows when the thunder started. Half an hour later, I emerged to see the rain absolutely hammering down outside, and it kept doing so for the next half hour.

There were a few inches of water on the road in Bourn, but not enough to be a problem, with an engine nice and high -- and the brook hadn't flooded in the valley. But getting through the village, there was a car stuck in deeper water. Turn around, try the other way out, onto the B1042. No problems there; a bit of standing water to cross turning onto the road into Kingston -- but over the first hill, and more trapped vehicles. Turn around, carry on to Toft. And immediately after the Comberton turn, see another blocking flood, and a driver phoning for rescue.

Amazingly, the brook was not flooded at Comberton -- so back to the old main road, and finally get to cross at Coton.

The journey in tomorrow is not going to be fun.

Links for 14-Jun

Outlook clone in WPF

Unicode for CSS class names -- a neat use of the fact that they aren't restricted to ASCII.

How to design software from bad requirements

DuplexBook -- Martin Fowler on his new book xUnit Test Patterns, and textbooks in general

Font Rendering -- respecting the pixel grid

Pro JavaScript techniques (book review)

Tuesday, June 12, 2007

The problem with C++

Really, there are two big problems with this language

  1. How it is taught -- or more often, self-taught, as universities these days seem to teach Java (and that not very well, in my experience supervising undergraduates).  Too often it is introduced as 'C'; then the syntax of classes and templates introduced.  The most important parts of the language -- the Standard Library, and the expected idioms -- get short shrift, most time and energy spent on the (admittedly complicated) grammar.  One of the few books that makes a good stab at the topic is Koenig and Moo's Accelerated C++.
  2. The compiler support -- while gcc and Borland compilers have kept abreast of the language, Visual C++ 2005 is the first Microsoft compiler that has enough template support to compile things like Andrei Alexandrescu's Loki library that Borland handled around the turn of the century -- and the vendor compilers on some of the Unix platforms I have had to use were seriously stuck in the early 1990s (the developer tools suite on AIX, c2001).

Between these two, we accumulate a lot of 'C'-with-classes -- which gives the language an undeservedly bad reputation in many circles.

Links for 12-Jun

volatile -- The Multi-threaded Programmer's best friend (or, how to get the C++ compiler to detect race conditions for you)

Safari on Windows -- and this is the nearest thing there is to an iPhone SDK, too.

Who killed the desktop application?

ASP.Net + Dynamic Client Script -- Silverlight set-up from a single control

IronPython, Unicode and ByteArrays -- strings are not byte arrays

Top 10 tips not to follow

Tuesday, June 05, 2007

Python Binding: a SharpDevelop (IDE) Addin

Following up from the IronPython URL's post…

Alas, as noted on the #develop wiki, the current 0.5 beta of PythonBinding doesn't play with the 2.1 release of #develop; and there is no archive release link on the obvious #develop download page.

Alas, the refactoring that seems to have taken place between 2.0 and 2.1 has made major, non-trivial and non-backwards compatible API changes to a number of crucial classes used in the Python Binding build. It's not just a matter of classes having moved assemblies (needing more references), or namespaces; and having to guess which IDocument interface is meant.

I think MSBuildProject has become MSBuildBasedProject — but what has become of ParseProjectContent CreateProjectContent() I cannot tell; nor of the MSBuildEngineCallback type in the argument list of PyCompilerService.Compile(), itself an abandoned seeming method signature.

This is a level of backwards-incompatibility I personally would reserve for a major release increment. And there isn't even a porting guide obvious on the site or in the #develop code download. And the above is not an exhaustive list of things needing fixing to make the old code play with the new IDE APIs, or even of the first wave of compiler errors.

[Now playing - Planet Rock]

Links for 5-Jun

Microsoft Surface -- touch-screen desktop

Reasons for code bloat -- "More is Less"

Removing the Login Barrier -- another aspect of security vs usability & why SSO is so important.

Monday, June 04, 2007

The FePy blog -- The Iron Python community blog. (Also, interestingly, it seems that the MSFT DLR team are contributing to improvements in Mono for cross platform support of the language).

Review Board -- Google's web-based code review tool

Analysis of Palm's new Foleo --; thin-terminal device

Sunday, June 03, 2007

Summer

Following a wet long weekend, mainly spent moving the main bedroom into the spare room; and a wet week that washed out the chance of a photocall for the local paper about cycling to work, it was suddenly sunny and hot at the weekend.

And, taking me by surprise, Strawberry Fair.

Not as good as it used to be. The T-shirts tend to be faux-countercultural; and the counter-culture is just demented (No2ID being the only island of sanity). But I did manage to pick up a new Panama hat, since I was wanting a spare for the office — and at the point I did, was in need of some portable shade..

Today did gardening to a logical stopping point (refilled the newly empty green bin); and repainted the metal flap on the drive that looked like this

Multi-purpose access

but had become chipped and rusty. I also glued on a couple of pads made from offcuts of heavy-duty flooring vinyl to cushion the front (under-) side when I drive — the chipping coming from crushing stones from the driveway under the metal.

[Now playing - Planet Rock]

Friday, June 01, 2007

The best code of all

I had been planning to write a short essay today on how I felt that I have just completed a few very productive days, where my net code output has been negative to the tune of a few hundred lines.  After all, this is something I have touched on previously, albeit in passing, but I felt needed a bit more emphasis.

And then, in a fit of synchronicity, Jeff Atwood blogs on essentially the same topic, albeit from a different direction -- The Best Code is No Code At All.

It may be something of an acquired taste, but one of the best experiences I find in software development is the point where you are able to delete code.  In project terms, being able to do so marks the point at which the metaphorical rough-cut timber is finally getting sanded down and polished.  Source control systems are there to remember how things were, for good or for ill; so code that is obsolete, or that there is a just plain simpler and plainer way to do, can get the chop with a clean conscience.

While exploratory phases of development may involve a measure of throwing code at a problem until enough of it sticks, and on the first time, cut-and-paste may seem the more attractive code-reuse strategy, coding smaller will pay dividends in the long run.

Just don't leave the flabby code there expressly to get the deleting-it-all kick later.

Links for 1-Jun

I HAS 1337 CODE, LOL -- LOLCODE, a scripting language infused with the Zeitgeist (YARLY, KTHXBYE)

AD FS SDK documentation due in July 

In Defence of Checked Exceptions (Not Really) 

Zen of the DLR and DLR Experiences -- Two presentations on DLR design philosophy and architecture

Simple ASP.NET 2.0 Tips and Tricks --  that you may not have heard about

Secure Python Interpreter -- Sandboxed to restrict socket and file access.

IronPython Cookbook Wiki -- Using .Net from Python/DLR