Sunday, 26 September 2010

Digitial photography is not rocket science. It just seems that way.

Here's a TV advert for a camera touting the benefits of film cameras over digital cameras. I'm almost inclined to wonder if this advert is a parody, but even so, it has a point.

Let's watch...

Tuesday, 14 September 2010

reddit'd (Followup to 'Construct Something Else')

Fame at last! Fame at last!

My last piece, "Construct something else!" got a bit of attention when someone posted it on reddit.That was unexpected.

Remember the rule; If you publish something that's a bad idea in hindsight, post a "clarification" article claiming you've been misunderstood and that you never thought it was a good idea in the first place. Then hide in the shower.

Sunday, 12 September 2010

Construct something else! (C#)

Please read my follow-up post after reading this one.

Quoth rjw on stackoverflow...
Given the following client code:
    var obj = new Class1();
Is there any way to modify the constructor of Class1 so that it will actually return a subclass (or some other alternate implementation) instead?

C# compiler guru, Eric Lippert commented...
We are considering adding a feature "extension new" which would essentially allow you to make a static factory method that would be called when the "new" operator is used, much as extension methods are called when the "." operator is used. It would be a nice syntactic sugar for the factory. If you have a really awesome scenario where this sort of pattern would be useful, I'd love to see an example.
I have one!

Saturday, 22 May 2010

Google snooping WiFi? Don't panic! Don't panic!

Google have got into a bit of hot water when it emerged that while their cars drove around taking pictures for their Street View service, they collected and stored people’s private WiFi traffic. People have understandably got angry with Google for doing this, but I think some demystification is in order.

Sunday, 28 March 2010

Wishing for a destructor (C#)

 
I like the C# programming language. It feels like C++ done right, divesting itself of much of the C legacy that complicates matters so much. When I do programming, I prefer to use this language. Having to go back and deal with C++ just doesn't give me that warm feeling like it used to.

But, I have a pet peeve that I miss from C++.

Sunday, 28 February 2010

Paying for Power

Being an evil genius, I'm obsessed with getting as much power as possible. If only I could get power for nothing, but alas, I have to pay for it.

In England, and most of the western world, we have a well established system of sending electricity from the power stations to me and sending money in the opposite direction. It works, but I think we can improve on it.

Saturday, 23 January 2010

The Making of an Evil Genius


When I was around 9 or 10 years old, my school, as they would every year, put on a Christmas show. The younger children would re-enact the birth of Jesus of Nazareth and then the older children would perform a play. That year, we were performing Grimm's Snow White.

I wasn't performing on stage though. Instead, I was in charge of the music. We had a cassette of all the music and the children on stage would sing along. I would press play when its time to sing and after, position the cassette for the next song.

I wouldn't know it at the time, but it would be this rather mundane task that taught me one of the most important lessons of my life.