Stand up for your digital liberty

May 24th, 2010 § 0

In weeks following the UK elections, we now have a new coalition government. I thought it might be worth reflecting back on some of the freedoms that we have enjoyed in the past, but seem to have lost in recent years.  Have you ever joked about doing something that is illegal and didn’t really mean it? Are you sure? You’ve never jokingly said something like “I could just strangle Paul right now”?  Don’t worry, we know you didn’t really mean it – or do we?

Big brother by (Constantin Jurcut) - http://www.sxc.hu/photo/1089417 In recent news, a 26 year old man now has a criminal record, lost his job, and was fined after tweeting a joke about blowing up an airport because he was frustrated that it was snowed under.  And in other news, a photographer was recently stopped & searched under Section 44(2) of the Terrorism Act for taking pictures in a public place.  Something that many of us have done, or will do at some stage I imagine?

One could take the view of being offended that our integrity is being questioned, based on the premise that we might commit an offence in the future. If you’ve ever seen the movie Minority Report, you could be forgiven for worrying that we are taking a step nearer to the concept of a “pre-crime”.  Ok, maybe that’s a bit extreme, but it does help highlight the real question: how much are we willing to give up in return for our common safety?  It would help to at least know where the line is so that we don’t accidentally cross it when taking pictures of our family at a shopping centre.

Over the last decade, I wonder if we have paid for some of our safety and security by trading our liberty?  Generally speaking, wide-ranging powers are more likely to accidentally catch “innocents” than legislation that is specifically targeted at unwanted behaviour – see the Terrorism Act for an example.  One could also argue that the Digital Economy Act was going the same way before it was revised and passed into law.

They who can give up essential liberty to obtain a little temporary safety, deserve neither liberty nor safety – Benjamin Franklin

Many of us enjoy taking pictures with digital cameras and the ease of sharing information over the internet.  If we want to continue to enjoy that openness, we have to ensure that our voices are heard just as loudly as those who are shouting for more safety.  There are several really easy ways to raise concerns with local and national government, and they don’t even involve you leaving your seat:

  1. Contact your MP – you can easily do this online at http://www.writetothem.com/ and it is just as good as writing a letter. From personal experience, a good MP will respond within 1 to 2 weeks.
  2. Start or sign a petition on the Number 10 website at http://petitions.number10.gov.uk.  Usually if a petition has 500 signatures or more, it will be passed to officials who work for the Prime Minister at Downing Street.  Search for "photography” or “digital”.

Both parties in the UK’s new coalition government have sympathies towards greater civil liberties and are even starting to repeal legislation.  Now is the time to lobby them with your wants & concerns.  The next decade will hopefully see us all keep the liberties that we currently enjoy and hopefully even get some of them back.

Solid State Drives – Lean & Mean

February 20th, 2010 § 0

Crucial 256GB SSD For a while I have been harping on about how much difference a speedy hard drive can make to a developer’s PC.  So, I took my own advice, and recently coughed up the cash for a new Crucial 2.5 inch 256GB solid state drive.  You could argue that doing this was even going two / three times better than my previously recommended solution of a Western Digital Velociraptor (10,000rpm).  The performance difference is astounding!

Here’s the obligatory Windows Experience Index (WEI): 7.3 for the drive (the highest rated item on my Laptop). Crucial WEIPreviously, the one of the fastest available magnetic drives for laptops (2.5 inch form factor) was the Western Digital Scorpio Black, 7200rpm drive, which previously scored 5.7 in the Windows Experience Index on my laptop.  Admittedly the WEI isn’t a very scientific benchmark, but it is based on an all-round measurement (both sequential & random read/write). The Crucial SSD is, in theory, around 3-times faster at average sequential reads than the Scorpio Black (the Crucial reads at between 230 MB/sec and 250 MB/sec, whereas the Scorpio Black reads at between 63 MB/sec and 76 MB/sec).  Most people’s typical usage is not based on one extreme or the other between sequential or random IO though.  Between the operating system and our applications, we do a little of everything.

Subjective review

While having specific performance measurements might help prove one drive is better than another, most of us will probably judge how much faster one drive “feels” in our system.  For example, I’ve noticed that my laptop tends not to wait on disk IO anymore and if my processor was faster, I might be feeling the benefit of my new Crucial SSD even more than I am now, and its already made a big difference to me.  I don’t play games on this laptop, so if anything feels like a bottleneck, its the Core 2 Duo 2.5Ghz processor.  Now that data comes off the disk so fast, single threaded applications seem to end up waiting for the CPU.

Disklight.NET screenshotI’ve also always used my Disklight.NET system-tray application on all my PC’s, to keep an eye on when my hard drive is holding up my PC.  At work, my PC is under my desk, so when its being slow or unresponsive, it’s nice to have something to tell me when it’s waiting on disk IO.  Most of the time, I hardly ever saw this application show more than 25 MB/sec on any of my machines with magnetic-platter hard disks.  On the right is a screenshot of the readings when starting up a Windows XP virtual machine on my laptop (by the way, the XP virtual machine boots in about 9 seconds).  I’ve even seen “Read:” values as high as 168 MB/sec when running backup software that scans my music library.

Power consumption & other benefits

The other main plus sides for solid state drives:

  • typically consume about 0.5W of power, whereas most magnetic drives will consume anywhere from 2W to 15W.  Therefore, they will help extend battery life in laptops.
  • do not get hot
  • no noise
  • no moving parts, therefore failure rates are lower
  • less risk from physical impact & movement because there are no moving parts
  • lighter (reduces weight in laptops)

Book review: C# in Depth

December 29th, 2009 § 0

image Its been a while since I’ve read a book that’s almost purely about a programming language and C# in Depth does not disappoint.  Even though I’ve recently done a couple of Microsoft certification exams and read the relevant preparation materials, those were more about the .NET framework and the .NET libraries more than any particular programming language.  This book is all C# though, cover to cover, and Jon Skeet lives up to the hype…

Fear not! There is none of the boring “Chapter 1: What is a class” type of material here.  It is assumed that you are already familiar with programming in C# and the material serves more to highlight how the language has evolved from C# 1.1, through C# 2.0 to C# 3.0 and explains how the language version numbers are not the same as the framework version numbers.  The book dives right into a preview of the most modern C# trends, before going back to explain how it all got to be that way.  Some of it was really mind-blowing stuff to me, and it really shouldn’t have been because that was only the C# 2.0 parts. There is so much potential in the C# 2.0 language and .NET 2.0 framework and they are really under-utilised, possibly due to being overshadowed by the emergence of .NET 3.0 and quickly followed by .NET 3.5 with LINQ.

For those LINQ enthusiasts out there, you really should read this book if you want to understand the fundamentals of LINQ and where it evolved from (a LOT of it is based in C# 2.0 generics and anonymous methods/delegates).  If you’re like most of us developers, you’re probably only just moving on to using .NET 3.5 at work and possibly don’t even realise some of the power you’ve been missing out on.  Having worked on several corporate projects in 2009, it appears that many larger organisations are still sticking using .NET Framework 2.0. By the way, you can get away with using a lot of the C# 3.0 features on the .NET framework 2.0, since many of the additions are language based or are based on compiler “tricks”. If ever there was a code magician / illusionist – Jon Skeet could be him!

Manning (publishers) are releasing an Early Access Preview of the second edition of this book in electronic form now (the soft-cover is due Summer 2010, according to the Manning C# in Depth website).  I’d still recommend the first edition, having most of the same material except for the last few chapters, and its in paperback form so you can read on the run