Below you will find pages that utilize the taxonomy term “Programming”
June 1, 2022
The paths in the wood
I began writing this post after realising that it is the first of June and I might as well attempt once more to write a post every day. The speed with which the first of the month comes around, inviting another such promise, always amuses me. But at the moment I am not sure whether this blog will still exist come the end of the month. I think I want to start again in pastures new.
February 3, 2022
What is FFI anyway?
At the moment I can’t compile this blog locally because my ruby-ffi install is somehow wrong and is preventing Jekyll from running on my recently upgraded Mac system. Fortunately the site still compiles on Netlify, or else you wouldn’t be reading this!
It’s always annoying when you rely on a complex multi-part system and some obscure part fails. It leaves you groping for answers and inventing unnecessary hack solutions. The dreaded old Stack Overflow rabbit hole.
November 4, 2017
A Little Lesson in R
I had to compute an indicator this week. It had confidence intervals that relied on taking 100,000 samples from the indicator’s approximate distribution. I had to repeat this over multiple GP practices and for twelve different demographic groups.
I decided to use dplyr1 because I thought it would help me organise all subgroups involved. I used mutate_at() heavily and thought that dplyr was keeping everything organised. However, when I moved from the 10 samples I’d used for testing to the 100,000 samples required by the specification of the indicator, my code moved to a crawl.
October 5, 2017
Personal ggplot tips and tweaks
I love making plots in R with ggplot. However, there are always a few niggles that I forget about between plots. I wrote this post so that I have somewhere to look the next time I need to tweak a few things in my plots. I intend to come back and add updates in the future as I learn more things. If I keep coming back, I might also remember a few of these too.
July 1, 2016
Swaptastic Part 3: The Shiny App
The shiny app embedded below allows you to explore the number of packets you need to complete the Panini sticker album for this summer’s Euro tournament. This builds on the results I presented in an [earlier post](link to earlier post) and allows you to explore how many fewer packets you need to buy when you have more friends to swap with. You can also vary the number of runs performed because the model runs considerably slower with more swappers involved.
June 29, 2016
Swaptastic Part 2
As a follow-up to my post about the Euro 2016 Panini Stickers, I’ve now completed the collection with the help of an online swapping site and by buying the last 39 stickers directly from Panini. I also managed to write a new simulator, this time with additional collectors involved.
I assume that each of N collectors will buy a packet of stickers and add any new stickers to their album. Then they attempt to swap any leftovers with the rest of their friends.
June 3, 2015
Learn X in Y Minutes
I found “Learn X in Y minutes” (www.learnxinyminutes.com) while researching the programming languages needed for a new project. The site aims to help people who know at least one programming language to learn others by proving a quick run through of the main language features. It’s not quite enough to get you up and running. After all, having sample code doesn’t get you the compiler. However, it’s a nice start that shows you how similar (and different) language X is compared to the one(s) you already know.
October 24, 2014
Building Brains
This is a longer form post about artificial intelligence inspired by reading a little bit of “The Pale King” by David Foster Wallace and putting a picture of a “ghost” up on Instagram. This might be the last of these that I’m able to write for a while.
On Not Reading “The Pale King” “The Pale King” is the third and final novel by American author David Foster Wallace. He was working on it when he committed suicide in 2008.
September 21, 2012
Programming a Carcassonne Game
Although I have put off finishing my UNO game for over eighteen months, I thought I would get started with another pet project of mine: making a Carcassonne game. This is not a serious affair, there is an excellent app of Carcassonne available for those of you who have iOS devices (it works particularly well on the iPad). The game just strikes me as having the right level of complexity to be a taxing yet attainable project.
February 2, 2011
Programming an UNO game, part 2
It turns out that programming the UNO game is not that complicated once you start designing the thing. This post will get the rules and game elements clear.
The deck An UNO deck consists of four sets of coloured cards (red, yellow, green and blue) together with eight wild cards. The non-wild cards are marked with either numbers or special symbols. The numbers range from zero to nine with two of each number except for the zero, which is unique.
December 28, 2010
Programming an UNO game
A new year, a new hobby I don’t write about programming enough. This is a shame because it is a very interesting subject and I find that the problem solving aspects of programming are very satisfying. Keenly aware of the need to do more hobby programming and to get up to speed on areas of software development that I’ve been neglecting, I have decided to give myself the project of creating a computerised version of the UNO card game.