Sunday, March 29, 2009

Gold Code

I'd previously written that working code is worth it's weight it gold. That is true, but it's only partially true.

Excellent code doesn't just work - proven through unit tests and structured manual testing - it is also written in an obvious way. Any old code monkey can take ownership of the code and quickly understand what it's meant to do and how it's meant to do it.

If they can't just pick it up and run with it then it's not gold standard software, It's probably tin, maybe bronze. Silver at a push. But certainly not gold.

Gold standard code uses no magic numbers, instead named constants are used. If magic number just have to be used, comments are mandatory.

Gold code is consistantly formatted throughout, commented where appropriate and has variable names that follow the 5 golden rules.

Golden code works and can easily be changed by anyone.

Wednesday, March 18, 2009

Gedanken Experiment - Removing Debt

This is the first post in a series of off-topic thought experiments inspired by the credit crunch.

Imagine a world with no debt.

I'm not talking about elimination of third world debt and Make Poverty History that Bono and his pals quite rightly support. I'm talking about the removal of debt as a concept. That is, no person or company ever owing any other any money.

But would it work?

How could it work?

The banks


Would banks be able pay interest on your deposits if they couldn't invest them?
Would banks even be allowed to take deposits off you, as one man's deposit is another man's debt - the banks will be in debt to you after taking your money!

So if banks can't take or lend any money, why would they even exist?

Bricks and Mortar


How would people buy houses if mortgages don't exist? Would people have to save until they can afford that first home? And how long would that take - 10 years? 20? It will certainly be less than the normal 25 years because no interest will be paid.

So where do they live for those 10 years? In rented accommodation, government provided accommodation, or in the family home. And, if they do rent, how does their landlord go about buying the property to then let it out again?

And where are all these savings kept until the house is bought? Without banks the only option would be to buy real objects: gold, oil, commodities that appreciate in price and can be sold on.

Shares


Company shares aren't really real are they? They're just a way of a company borrowing money off a bunch of investors. And by borrowing off a number of different investors they mitigate against the risk of one investor suddenly wanting all their money back. But there's that word again, "borrowing", so shares are out and so is the FTSE.

So what do you think? Here are just a couple of the problems with this radical idea, but could it really work?