# The Silent Llama of Doom

Thoughts from a quiet Llama.

## The Monty Hall Problem

Mon 11 December 2017

Here’s a fun little logic problem:

You’re on a game show and the host (Monty Hall) tells you that there’s a prize behind one of three doors with the other two doors being empty. You need to choose a door to win the prize. After choosing a door the host will reveal which of the two remaining doors is empty and then he’ll offer you a choice: do you want to switch doors or stick with your original choice?

Should you switch?

The normal line of logic goes something like this: you have a 1 in 3 chance of getting the prize before the empty door is revealed and revealing that door doesn’t materially change anything which means the chances should still be 1 in 3. Therefore switching should make no difference.

This is wrong. You should switch.

What makes this such a great problem is that it sounds like magic. How on earth does switching make you more likely to win? It really is counter intuitive and the first time the question was answered thousands of people wrote in to say they didn’t agree. In fact some psychologists theorise that we’re psychologically predisposed not to agree. You can read about it here. There are a quite a few mathematical ways of proving it (that wikipedia link lists a few of them) but I’d like to suggest a line of thought that doesn’t require any math (ahem that is to say …

## Choosing Clojurescript

Mon 06 March 2017

I have, quite unintentionally, become a web programmer. I never wanted to be. I’ve always preferred doing systems programming - especially system stuff that does not involve GUIs. However there are some distinct advantages to building systems available via a browser - things like deployment, upgrades and availability - and since I work in a small development team I guess it was inevitable.

So I learnt javascript. Not particularly well, mind you. I’m one of those hapless souls who knows jquery more than he knows javascript. The thing with javascript is that, for the most part, it’s perfectly fine. Need to show or hide a part of your webpage? No problem. Click handler on a button? Javascript is easy and jquery is easier. Full complex component with state, validation, ajax, timeouts, access control and who knows what: not so easy anymore.

Javascript, as a language, doesn’t cater for ‘big’ projects. Well - that’s not entirely true - a lot of work has been done to modernize javascript and frameworks like Angular and Ember have come along to fill in the gaps. Things like commonjs help for structuring things. All in all Javascript isn’t nearly as bad as it was. The thing is I, personally, don’t like the language enough to want to become an expert in it. It’s really just a personal preference. I don’t mind it. I just want something else.

So - why Clojurescript in particular? Why not Scala.js? Or Elm? Or even Coffeescript …

## Introduction

Mon 27 February 2017

The question I find myself struggling to answer is this: why another blog? If I look in the mirror I don’t see someone that has something tangible to offer, just this guy y’know?

I want to write about programming. It’s what I do day to day. Something that takes up such a part of my life is a rich source of material for something like a blog. The thing is I don’t know if I have anything to offer. I’ve been working in this field for years and the more I learn the less confident I am that I know anything at all.

The thing is my daily experiences have led me to the conclusion that programming is simultaneously easy and practically impossible. I’m at the point in my career where I can write a program that can access a database, store information and pull it out again without any problems. In that respect it’s easy. What to put in a database, how you store that information - those are much more difficult questions with answers that aren’t always obvious.

So the thing is - what do I, as someone who can’t claim to really have any deep insights about his job other than to say he doesn’t understand enough of it, have to offer? I guess, if nothing else, at least I can be an example. If anyone else out there struggles with this stuff then it could be heartening to …