Log in

No account? Create an account

Move To DreamWidth

Just to say that I will no longer be updating this journal. Any new content will be posted at:


Nothing will be mirrored here.



In January 2010, four reporters from America's National Public Radio bought a share in one of the mortgage backed securities that came to be known as a toxic asset. They did this to give their listeners a greater understanding of the causes of the credit crunch.


The headline video gives a potted history of the housing crisis and the decline that ultimately lead to the death of their purchased asset.

The following link lets you see on a month by month basis, beginning December 2006 up to the collapse of the asset in September 2010, how the failure of people's mortgages ultimately led to the failure of the financial instruments that banks had over invested in in the years leading up to the credit crunch.


Over the course of the asset's decline, the reporters spoke to various people who had contributed to the asset's initial value and ultimate collapse. The story encompasses tales of optimism, sorrow, greed and fraud; illustrating the real complexity of the whole appalling affair.

This entry was originally posted at http://leynos.dreamwidth.org/89090.html. Please comment there using OpenID.


CouchDB For Weekend Coders

Today I've been trying to get my head around CouchDB. And yes, when you finally understand it, it is alarmingly simple.

CouchDB is one of those newfangled NoSQL databases. Specifically, it's a document store. This initially left me scratching my head, since it has no tables and no schemas. Records in CouchDB are a collection of arbitrary key value pairs.

The key to understanding how to make use of this all would appear to be views. Views are analogous to indices in an RDBMS. They are composed of two JavaScript functions—map and reduce. This is already getting into scary functional programming territory and you can see me glancing around for the exit at this point.

It's actually not that bad. Map takes a document as its parameter and emits a key value pair. This pair is then inserted as a leaf in a search tree. (Specifically a B-Tree). Every time you create or update a document it is passed to the various view functions to update these views.

The important thing here (the bit that I took my time getting my head around) is that the key in this pair need not be unique within the view. You can also then query these views by key. This gives you your entity relationships.

The reduce part of the view gives you the aggregate functionality of an RDBMS. The number of employees grouped by city, to use the archetypical example. Reduce takes a collection of values and returns a single value. These values are then stored in the branches of the search tree to accelerate future aggregate queries on slices of the keyspace.

There are also validation and transformational functions, but those are a bit more straight forward. What I hope I've noted down here is the answer to the question I was asking myself this morning, "How are you supposed to use a NoSQL database?"

This entry was originally posted at http://leynos.dreamwidth.org/88931.html. Please comment there using OpenID.


Disaster Report 4 (PS3)

Seven years ago, Irem released a 3D platform adventure on the PS2 named Disaster Report (I'll call it Disaster Report, its US name, since that's the version I played but you may know it as Zettai Zetsumei Toshi or the name under which it was released in the UK, SOS: The Final Escape). What made Disaster Report special was that it was a survival horror game without monsters or guns. You see, Disaster Report is set on an artificial island which has been struck by an earthquake and is now sinking. Playing the role of a young reporter newly arrived on the island, your objective is to reach safe ground, navigating collapsing buildings and avoiding flooding, whilst avoiding death by dehydration. Along the way you partake in a little investigative journalism, exposing politically motivated cost-cutting which has resulted in sub-standard building practices on the island.

As a game in and of itself, it's difficult to fault Disaster Report. However, it was sadly let down somewhat by the limitations of the PS2's 3D hardware. Not overly so, but frequently enough that you felt that the developers had been straining to deliver their original intentions.

Two sequels later, and Irem are delivering a new iteration for the PS3:

(Best viewed at 720p). Hopefully, the above demonstrates why I might be interested in this follow-up.

This entry was originally posted at http://leynos.dreamwidth.org/88291.html. Please comment there using OpenID.


Khan Academy

If you're still not clear on what credit default swaps or collateralized debt obligations are, or why these are bad things, now's your chance to find out:


You've probably heard of the Khan Academy by now, but I'll just chip in and give it my recommendation. It's a set of accessible lectures on maths, science and economics delivered via YouTube. They cover roughly from early high school through to early University (there's a primary school level maths course too though).

I've been working through the biology course, as having studied physics and chemistry at school, that's an area where my knowledge is sadly lacking.


French Onion Soup

Recipé time again. This is a synthesis of a number of different recipés for this dish I found dotted around the web. I've tried it several times and it works really well (as I'm sure Ruth will happilly testify). Especially if one is feeling under the weather.

Soupe à L'oignon

Serves 2, Preparation time: 60 mins (approx)


  • Two saucepans (one with a lid)
  • Knives
  • Measuring jug


  • 1 kg of medium sized onions
  • 2 OXO cubes disolved in 1/2 litre of hot water
  • 1/4 litre of white wine
  • 3 cloves of garlic, finely chopped
  • 1 bay leaf
  • 15g butter (approx)
  • 2 tbl spoons olive oil
  • salt
  • pepper
  • brandy/cognac
  • Accompanyment:

    • Two part-bake rolls
    • Grated emental cheese
    • Worcestershire sauce


  1. Peel and cut the onions in half, then cut the halves into strips roughly 8mm wide
  2. In one of the sauce pans, heat the olive oil and butter until melted
  3. Add the onions to the oil, season with salt & pepper and cover.
  4. In the other saucepan, bring the stock and white wine to the boil along with the garlic and bay leaf
  5. Add around 35 ml of brandy to each pan
  6. Turn the hob under the stock down to low, but keep the other one on medium/high.
  7. Stir the onions thoroughly every 5 mins, re-covering afterwords. Add a little water if they start to stick, but not too much. The aim here is to part fry, part steam the onions.
  8. When the onions have clarifed and browned slightly, add the contents of the other saucepan.
  9. Turn off the heat, re-cover and let the flavours combine for a few minutes.
  10. Heat the part-bake rolls according to instructions.
  11. When they are ready, split them in half and cover the open halves with emental, seasoned with a few drops of Worcestershire sauce.
  12. Return these to the oven until the cheese has melted.
  13. Serve.


App Looking for Direction

I've been in the process over the past few months (very sporadically, I might add) of writing a project planning tool. It still doesn't do much yet, but it's at the stage now where it will produce a simple functional Gantt chart (with an NSDate based model and view). (There are also some ugly drawing glitches).

I'm initially targeting Linux (using GNUstep), but ultimately, I aim to maintain versions for Windows and Mac as well.

You can download the source from http://bitbucket.org/leynos/gantt.app

Anyway, I'm kind of looking for some input as to where I should take this application. I have some ideas, but I'm not really sure which to give priority.

Firstly, I guess, would such a tool be of use to anyone?

I want to create something that makes time allocation easy and something people can do without thinking about too much.

If you don't use a project management tool for planning your projects at present, what is it about current PM tools that you find gets in the way or makes them unsuitable?

Stuff I hope to include would be resources (with address book integration), deadlines, dependencies, estimates and actuals, burndowns, kanban, sprints (however those might be represented),
weighting and chronological notes.

I'd also like to eventually include client/server based collaboration and plugin based integration with various issue tracking systems. This all sounds a bit ambitious just now, but you've got to start somewhere.

Anyway, looking forward to hearing your thoughts on this.



Spent 20 mins in the O2 shop trying out a Samsung Wave. I know it's not an iPhone, but it's a good £300 cheaper, and it does most of the iPhone type things that I need. The screen is also quite beautiful and very readable - I downloaded an eBook of Dracula to test that out.

I'll wait and see if a Bada SDK for Linux makes an appearance. Ideally, Samsung should make a phone with the same form factor running Android, but Bada does seem to hold its own as a phone OS.


A Nice Tidy Makefile for C++

Right, I've seen too many Makefile tutorials that were clearly written by people who have been smoking copious amounts of skunk, so I'm going to post this in the hope that it will make life easier for anyone else writing a small C or C++ project.

It works with GNU make, but I'm sure most BSD people will already have their shit together anyway. Strangely, most of this came from the pmake FAQ, specifically, this chapter.

Here goes:

CFLAGS          = -Wall -I/usr/local/include
CPPFLAGS        =
LIBS            = -lfoo -L/usr/local/lib

PROGRAM         = myapp
OBJS            = main.o bar.o baz.o qux.o etc.o

$(PROGRAM)      : $(OBJS) 
    $(CXX) $(OBJS) $(CXXFLAGS) $(LIBS) -o $(PROGRAM)

include Dependencies.mk

Dependencies.mk :
        $(CXX) -MM *.cpp > Dependencies.mk

.PHONY          : clean
clean           :
    rm -f $(PROGRAM) *.o

Anything in bold and italic means "your stuff goes here", so your executable name goes under "PROGRAM" and the names of your object files go under "OBJ", corresponding to the names of your object source files.

Stuff in "CFLAGS" applies to C source only, "CXXFLAGS" applies to C++ only and "CPPFLAGS" is for preprocessor flags.

For C source only, of course, you would use "$(CC)" instead of "$(CXX)"

I anticipate that, for the C/C++ stuff at any rate, I won't have to make any real changes to this Makefile. At least until I start having multiple source directories.

Cheers to brucec for corrections and spacelem for the suggestion of using gcc -MM.



Apparently, Raquel Welch recently wrote a rather negative opinion piece in the Telegraph about the oral contraceptive, which is 50 years old this week. I'll leave it to a a couple of readers of the Guardian to explain what the pill actually meant (and means) for women:

"It was worth it! Reproductive choice, the power to say no in a relationship, the right to choose. An end to the shame and lifelong burden of an unwanted pregnancy, including poverty, secret adoptions, abortions, unnecessary early deaths. I will never forget my mother, born in 1925, tell of her anguish every month of her married life waiting to find out it she had made it through another 28 days unscathed. She had four children that she did not want. For those who want children, the possibility of timing them. The family of choice, not necessity."

The fantasy of moral decline is just that. One cannot deny human nature. What the pill brought about was a measure of equality that has been missing for the duration of history.

"There was always promiscuity - but it was the men who had all the fun. Now women, for the first time in human history, get to call the shots."