iPod Shuffle

My wife won a silver iPod shuffle last week and since I’d recently washed my old-school shuffle, she kindly donated it to my personal charity.

So what’s good about the 2G shuffle (can’t really call it new when it’s over two years old)? Well, to me the clip looked a little crap (over compensating macho side – thinking men don’t wear brooches) and it seems to make it about twice as thick… Where were we, ah yes, what’s good?

Today I actually got around to using this thing, specifically walking to and from work listening to some of the stackoverflow podcasts which I find quite witty (there’s a word you don’t hear enough these days). Back to the point, I picked up the shuffle and without further thought, started looking for something to clip it to.

After clipping on the shuffle, the best part was realising how short the included headphone cabling is. This makes a huge difference – instead of being the length of my 1.9 metre arm span, it’s closer to half that. Way less irritating time spent coiling and uncoiling.

Django desktop app

Q. Why build a desktop application as a prototype if ultimately you’re aiming for a web service?

A. If you need to get a couple of people in a corporate environment using your prototype ASAP. Thus you’ve got no time to play corporate politics, get a server from somewhere, get software licences, further budget to get IT support for the application…. all this just to try out a concept? Nightmare.

So we’re back to building a desktop application. Right…?

But I couldn’t face building a nice layout, program flow and functionality into a desktop application and then throwing it all away – or worse having to maintain two unrelated versions down the track. Instead I wanted to try out django, so I’d need a database, web server, python and the django libraries all rolled up into a single executable. Make it runnable on a locked-down corporate windows xp piece of shit and for extra difficulty without admin rights or other software dependencies.

Searching for solutions (continued)…

Fun of the build ~ part one

As mentioned previously I was planning to put together a powerful new PC. Here’s the review of the process and the components used.

Part two for bizarre customer service and product reviews. ~ coming soon

Supplier selection

Since my decision to use Overclockers UK was based almost solely on the wide range they provide with regard to high performance (‘enthusiast’) parts ~ that is suckers like me. The hours I spent doing a rough price comparison of the various online suppliers was wasted.

There were some dramas with this supplier but I’ll get to that next time.

Putting the pieces together

I suggest, especially if you haven’t done this before, or don’t frequently build computers to a) RTFM, b) step through a system building guide (I’ve not tried Cosair’s system build guide one but apparently it’s good too).

If you can I’d highly recommend building in at least two stages. First build the motherboard, power supply, CPU, RAM and graphics card ~ attach a keyboard and screen and start. This will give you a chance to check (the basic function of) those 5 parts before you’ve screwed everything in the case, routed your power supply cables only to find that you have a faulty motherboard (stage two).

Trouble and images (continued)…

VBA parameterised string formatting

As far as I’m aware VBA doesn’t provide a decent way to create and use strings with parameters. So I rolled my own using (only the most basic part of) the c# syntax.

Take a error message like: "You encountered error #2457897 in version 2.6.387 of the Sunshine CRM software. The application and your data must now die a horrible death."

In this application we’ve got a lot of error messages, around 2.5 million, I’d rather not have 2.5 million strings, or hard-code "You encountered error " & errorNum & " in version " ... etcetera. Or even just store the different parts of the message in separate strings.

It makes sense to have an error message template, a basic one in this case. Each variable part of the message / template is replaced with a squiggly brackets and a number {0}.

Our message from before, now: "You encountered error {0} in version {1} of the {2}. The application and your data must now die a horrible death."

Usage and Code…

Hash and Stack in VBA for centralised configuration and error handling

Previously I wrote about an implementation for stacks and hashes** in VBA ~ these were used in an old Access project to give centralised error handling and access to variables (such as parameter based error strings) from a table.

** – As pointed out by Anon there isn’t really any significant benefit to rolling your own Hash – use the Scripting.Dictionary instead. Unless you need to avoid including extra libraries (Microsoft Scripting Runtime) or are working with something less than Office 2000 (apparently the runtime is also within windows 2000) in which case my sincere sympathy is with you.

Overview

It works a little (a lot?) like this, put a stack and hash in a VBA module.

Then the stack can assist the error handling. At the start of each function push the function name onto the stack and just before leaving pop itself back off.

When an error is encountered the centralised error handling routine is called ~ this reports the error message and steps through the preceding function calls to show the chain of events leading up to the problem. This makes tracing back through relevant code to find the underlying cause much easier.

The hash (or hash table) provides lazy access to configuration variables and various strings including error messages.

The details and code…

Limited company flat rate VAT scheme concession

Flat Rate VAT Scheme Concession

~ This does not constitute advice of any kind.

When buying a computer for a limited company ~ treating it as a business expense means that no company tax is paid (since that’s for profits only) and shareholders don’t end up indirectly paying income tax on that expense either (when dividend time comes around).

My limited company is using the Flat Rate VAT scheme. This means a flat 12-13% (for IT consulting ~ varies by industry) of all revenue is paid to HM Revenue & Customs.

The point of this scheme is to simplify things for small businesses.

Example and calculations…

Buying computer components online in the UK

The Point

So what’s the point of putting together a machine yourself?

Well it can be very difficult to get precisely the set of components you want in a pre-built machine. But most small shops have the facility to put together any selection of your parts ~ eliminating that feeble justification.

Pre-built
Put together by someone with the right experience, right equipment etcetera. They’ll usually do some basic testing to check that all the components work.

That leaves you with minimal chance of wasting hours tracking down that malfunction in part X. Or that sinking feeling when you hit the power switch and nothing happens. So you try a different power supply and blow up my aunt’s motherboard ~ a sad but true story of how I screwed a motherboard directly to a metal case (without spacing screws) and got that smelly spark of short-circuited electronics.

Build it yourself
We’ve got the costs to:

  • Your time (face it you’re going to be slower and more error-prone than Mr. Simmons at the computer store whose life consists of the monotony of plugging together motherboards and power supplies).
  • Risk of dodgy parts (the many sad days looking at your heap of incompleteness ~ to send back and have replaced).
  • Risk of screwing things up yourself.

In that case what’s the point of putting this together myself?

Well in the case of the short-circuited motherboard I now know that some cases come with mounting screws pre-installed and others don’t. Sure a minor detail but it gives others a good laugh. Seriously though, it ends up making me think more about underlying machine, the electronics (which are abstracted away by the time you’re writing a blog post), the physics that are obvious ~ metal on metal equals electric current flow.

Also there’s the pride of completing something ~ even something that others might find simple. Seems a lot like scale model building (and similar hobbies) ~ the parts are designed to be put together. Yet, there’s still something in taking those bits and making a whole.

Overclock / Watercool
Since I’ve put together around 5 machines it might be time to try something harder and hopefully learn more. Also I can possibly get a slightly quieter machine – but realistically it’ll just be more challenging / complex (problematic) to play with.

Supplier options and parts…