Hello, I studied Computer Science, and now I live in Bath. I write code, design games, and occasionally tweet. RSS Feed
Hello, I studied Computer Science, and now I live in Bath. I write code, design games, and occasionally tweet. RSS Feed

Posts from 2018

25 Days, 25 Languages

Dec. 1, 2018 in Programming, Text

This year I am going to take part in the 2018 Advent of Code, where each day, two new programming challenges are uploaded to the site. But as I live in the UK and I don’t want to ruin my sleeping schedule for a month, competing for the leaderboard is out of the question. Instead, I am going to challenge myself to use 25 different programming languages.

For this I will treat different versions of the same language as the same language, so no Python 2 and Python 3 solutions. However, I can use C, C++, and C# as they are all different languages, even if they are rather similar syntactically. As for what language I pick on the day, it really depends how I am feeling. If the problem is simple, I am more likely to choose a more complex or unfamiliar language. I’ll be saving some language for when I am really struggling.

My solutions will be posted on GitHub.

Edit: Oops, so that didn’t happen. Not long after starting this challenge I broke my dominant wrist roller-skating, and just in time for Christmas! But anyway, this means that it is unlikely that I will finish this. While incomplete, I am glad I attempted it and will definitely consider using Rust in future projects - it is a nice language.

Reddit You're Terrible, Please Be Worse

Nov. 15, 2018 in Rant, Text

Reddit, the 18th largest site worldwide is a fantastic site full of fun user-created content, amazing photos from around the world, and crazy far-right conspiracy theories. The web experience is great too. On desktop you can see several posts at a time amidst a sea of extraneous white-space. On mobile the site fills your browser until it is time to nag you, at least twice, to install their app. And then touch-events are registered 1​cm up the page for no good reason. Or images refuse to load no matter what you do. You get the picture.

And I find myself going back.

Other social-networks simply don’t grab me the same way that Reddit does. Reddit is a never-ending fire-hose of content, you can keep scrolling, and keep scrolling, and keep scrolling, and keep scrolling, and I do. Facebook is a useful tool, but I never find myself scrolling through the news feed. Twitter is an endless feed of announcements, politics, and small things taken out of context. LinkedIn is a professional waste of time. Twitch is background noise, I listen to it, I don’t watch it, and I don’t feel that I waste the little time I spend there. YouTube, well I spend a fair amount of time on YouTube. There are great videos published near daily, but my subscription-feed is curated, and the front-page is limited.

Reddit just keeps going.

I only have finite time in a day, in a year, in a life, and I don’t think Reddit is a good way to spend any of it. I set perpetual Cold Turkey blocks on Reddit and other distractions on my computers. I do not have a Reddit app installed on my phone, but I do have a web-browser. I try to not use Reddit on my phone, I do it anyway. I clear my history from time to time to clear Reddit from my suggestions, it comes back. I definitely need to try harder.

I think I would block Reddit entirely if I could.

As far as I know, there is no perfect method to block Reddit on a non-rooted Android phone (I like Google Pay and similar applications) like there is on a regular computer. Cold Turkey has an Android app, but it blocks the phone instead of Reddit. It is still a useful app but it’s not what I am looking for. You can use an app to setup an Accessibility, VPN, or DNS blocker but doing so is finicky. Either it needs a persistent notification, drains what little battery life my old phone has left, or needs to be configured for every single WiFi network you connect to. I recently found BlockSite which seems promising, but I am a little concerned about how easy it would be to uninstall.

This isn’t great, but there is a solution.

Reddit, you keep making your site worse on a near weekly basis. Mobile used to be fantastic, fast, and worked well. First adverts and sponsored content were added which is fair, a site needs to earn money to survive. Cookie banners came next, but they are commonly thought to be required by law (I am not a lawyer). Then the site started to nag you to install the app, which is annoying but only seemed to appear once per tab. The touch-events bug came after, stopping browsing sessions in their tracks. Next Reddit added the blue pill at the bottom of every page, it’s really annoying to close. And now, Reddit has added yet another prompt to install their app. On every page you now need to confirm that yes, you want to continue using Google Chrome. If you make a mistake, or the touch-events bug strikes you will be whisked away from your dark Reddit experience into the stark white Play store.

So thank you Reddit, and please keep up the good work.

Continue Reading...

The Consto Family of Fonts

Oct. 24, 2018 in Fonts, Text

Something I have been wanting to do for a while, is to make a handwriting font. Doing seemed like a fun thing to do, and useful for me to use.

The four fonts

  • Consto Ballpoint - The first of four fonts. A sharp font that is too the point.
  • Consto Marker - A softer font, made using your favourite brand of permanent markers.
  • Consto Pencil - A sketchy font made using a pencil. A rough and jagged font with lots of bumps.
  • Consto Pixel - A three by three pixel font, it is surprisingly legible, it could not be any smaller.

Now while this is something I want to share, I would rather not share to liberally. So, I have chosen to license these fonts under the Creative Commons Attribution-NonCommercial-NoDerivatives license.

BBC Radio Playlists

Oct. 18, 2018 in Music, Playlists, Text

Sticking with music, here are three playlists each containing every BBC Radio station in 320kbps, 128kbps, and 94kbps.

Composing Folk Music with Markov Chains

Oct. 14, 2018 in Music, Text

This week I used Markov Chains to create folk music. It is output in ABC and rendered using ABCjs.

The music it makes is a little bit strange and it doesn’t really understand how many beats should be in a bar, but if that is a problem up the iterations. Keep raising the iterations and eventually you might even hear a tune that you know!

Under the hood, it is relatively simple. I started by downloaded about 300 folk tunes from sourceforge. After making an Ajax request to load them, it “parses” each tune into a data structure that is easy to work with. Then two Markov Chains are generated for the title and for the music, the other attributes are just chosen randomly. Tunes can be played back with or without chords, and on any instrument. Click here to start.

Bring the Light

Oct. 7, 2018 in Games, Text

I teased with an idea, and here is a very basic demo of it complete and released. Just a warning, it runs poorly, looks bad, and isn’t fun to play. Enjoy!

Bring the Light

On a more serious note, while this is not the result I wanted I have definitely learned, or at least re-learned a few things. Looking over it, a project like this is likely too big for me, at my current skill level, with the short amount of time I gave myself.

Continue Reading...

How to Play: Box, Reverse, and Stratego Chess

Sep. 28, 2018 in Games, Rules, Text

Box Chess!

Not to be confused with chess boxing, although feel free to play box chess boxing. Box chess is a new, dumb, derivative, variant of chess that we almost certainly reinvented down at the pub on a Friday night. To play take a standard chessboard. No piece is allowed to enter or pass through c3-c6, d3, d6, e3, e6, or f3-f6. The knight however can jump over the spaces and land in the center two by two square.

It was fun, and strange to play. If bishops feel to week swap the blocked spaces for c4-c5, d3, d6, e3, e6, and f4-f5 to form a ring instead.

Reverse Chess!

Reverse chess is quick, simple, and deadly. Start the game with the row of pawns swapped with the back row. That is it. Unlike a regular game of chess which starts with a slow (relatively) ramp up reverse chess is action packed from the beginning. Every piece is at risk and you are one move away from being checked.

I also suspect that this dumb perversion of chess could be solvable, or the start at least be optimised. What is the best first move, take a peice or check? I do not know!

Stratego Chess!

Statego Chess is chess, played on a Stratego-like grid. The squares d2-d3, d6-d7, e2-e3, and e6-e7 are blocked out and no piece, no even the knight can enter. Unlike Stratego the peices are not hidden, it is a mix between the two.

I have been Slacking

Sep. 17, 2018 in Text

This summer I finished my exams, developed this blog, travelled across north-western Europe, graduated from university, relaxed in Center Parcs, moved to Bath, started learning new instruments, and started working for Netcraft. It has been a busy time where I have travelled far and done many things. But when I think about it, I do not feel I have done enough. I feel that I have failed to create. I need to change this.

So, what will I make? I’m honestly not entirely sure. I am planing to start with a couple of Unity games and I am considering resuming work on some previous ideas. From there, I want to work on a lower level, and I have ideas. But, I do not only want to make games and demos. I want to experiment and make new, different things. Maybe I’ll write fiction, compose music, make art. Who knows? I don’t!

Lazy Loading Images, the Jekyll Way

Sep. 10, 2018 in Jekyll, Text

Intersection Observer is a relatively new API with decent support that can have a huge impact on performance. It has many uses and can trigger all sorts of code but this article is simply looking into performance. With it, image lazy loading can be quickly and easily added to any site including static Jekyll sites.

To start, define a variable to store the Interaction Observer. For simpler deployment, the code below avoids using modern JavaScript features such as let and arrow functions.

var observer

Secondly, a function to load a given image. Here, a temporary image is created to load the image and if successful the source of the actual image is replaced.

function loadImage(image) {
	var i = new Image();
	i.onload = function() {
		image.classList.add('lazy-loaded')
		image.src = image.dataset.lazySrc
	}
	i.onerror = function() {image.classList.add('lazy-error')}
	i.src = image.dataset.lazySrc
}

Thirdly, a function to process intersections. It checks which images are currently intersecting.

function onIntersection(entries) {
	for (var e in entries) {
		if(entries[e].intersectionRatio <= 0) continue
		observer.unobserve(entries[e].target) // Stop watching
		loadImage(entries[e].target)
	}
}

Fourthly, lazyily loaded images are located and the code is run.

var images = document.querySelectorAll('img[data-lazy-src]')
if ('IntersectionObserver' in window) {
	observer = new IntersectionObserver(onIntersection, {rootMargin: '250px'})
	for(var i in images) {
		if(typeof images[i] === 'object' && 'classList' in images[i] &&
			 !images[i].classList.contains('lazy-loaded') &&
			 !images[i].classList.contains('lazy-error')) {
			observer.observe(images[i])
		}
	}
} else {
	for(var image in images) loadImage(image)
}

But, the code above can only lazy-load images with very specific markup. This is where this nasty piece of Liquid code comes in. Liquid is fundamentally a very limited language with no direct way to initialise arrays, weird syntax, and no regular expressions. So, instead of using regular expressions, we can instead create a nasty piece of splitting code which works just well enough for the job.

The HTML Jekyll generates from Markdown is simple and regular enough for the following code to work. I would not expect it to work for more complicated HTML. But it’s worth a shot!

{%- assign excerpt = content | split: '<img src="' -%}
{%- for e in excerpt -%}
	{%- if forloop.first == true -%}
		{{ e }}
	{%- else -%}
		{%- if e contains '" alt="' -%}
			{%- assign f = e | split: '" alt="' -%}
			{%- assign url = f | first -%}
			{%- assign g = f | shift | join: '" alt="' | split: '"' -%}
			{%- assign alt = g | first -%}
			{%- assign rest = g | shift | join: '"' -%}
			<noscript><img src="{{ url }}" alt="{{ alt }}" /></noscript><img class="script-required" src="#" data-lazy-src="{{ url }}" alt="{{ alt }}"{{ rest }}
		{%- else -%}
			{%- assign f = e | split: '"' -%}
			{%- assign url = f | first -%}
			{%- assign rest = f | shift | join: '"' -%}
			<noscript><img src="{{ url }}" /></noscript><img class="script-required" src="#" data-lazy-src="{{ url }}"{{ rest }}
		{%- endif -%}
	{%- endif -%}
{%- endfor -%}

Now I recommend styling the unloaded images with width and height. If known ahead of time it can be set explicitly. Failing that, I recommend setting a generic default using CSS.

img {
	min-width: 100px;
	min-height: 100px;
}

And finally with this in place, my site often enjoys a perfect score in Google Chrome Inspector Audit. It cleanly beats google.com which has a top score of 91 and even beats motherfuckingwebsite.com in every category but performance where it draws at 100.

(100) Performance, (100) Progressive Web App, (100) Accessibility, (100) Best Practices, (100) SEO

Goodbye Southampton, I'm Moving to Bath

Aug. 13, 2018 in Bath, Photos

Goodbye Southampton.

University is over and it’s time to start the next chapter of my life.

After what was approaching nearly two decades in education, it’s finally time to enter the real world.

I’m moving to Bath where I’ll be working for Netcraft, a company which specialises in internet research, anti-phishing and security services.

I’m looking forward to it!

My Southampton Graduation Ceremony

Jul. 19, 2018 in Photos, University

My Graduation Ceremony

Four years later, and my time at university has come to a close. I have earned my Masters. My time here is at a close. It is a bitter-sweet day.

After The Ceremony A Group Of My Friends The Reception

After The Ceremony everyone went outside for a year photo. We took photos of Jet, LLoyd, Daniel, Me, Andy, and Edmund. And finally enjoyed the reception.

Interrailing into London

Jul. 17, 2018 in Interrailing, London, Photos, Travel

The last day of our trip. In the evening we fly back. Our flight is delayed so I spend the night with a friend. Tomorrow I will take the trains back home and prepare for Graduation.


Were Off To Rent A Boat A Paddleboat Along The River We Go

We’re Off To Rent A Boat. A Paddleboat. Along The River We Go

Continue Reading...

Interrailing into Stockholm: Day 5

Jul. 16, 2018 in Interrailing, Photos, Stockholm, Travel

The penultimate day. We see the metro system, a museum, and escape from an escape room.


We Explore The Subway This Is T Centralen We Get Off After One Stop

We Explore The Subway. This Is T Centralen. We Get Off After One Stop.

Continue Reading...

Interrailing into Stockholm: Day 4

Jul. 15, 2018 in Interrailing, Photos, Stockholm, Travel

Theme park number two. We board the ferry and spend the day in Tivoli.


Walking Along The South Bank Looking On The Water We Wait At A Dock

Walking Along The South Bank. Looking On The Water. We Wait At A Dock.

Continue Reading...

Interrailing into Stockholm: Day 3

Jul. 14, 2018 in Interrailing, Photos, Stockholm, Travel

A history lesson.


We Start The Day Heading To The Old Town Where We Join A Walking Tour

We Start The Day Heading To The Old Town Where We Join A Walking Tour.

Continue Reading...

Interrailing into Stockholm: Day 2

Jul. 13, 2018 in Interrailing, Photos, Stockholm, Travel

A fairly relaxing day. We watch the changing of the guard, explore the city, and have a good time.


Stockholm Is Under Construction Walking Through The Bustling Streets Towards The Palace

Stockholm Is Under Construction. Walking Through The Bustling Streets Towards The Palace.

Continue Reading...

Interrailing into Stockholm: Day 1

Jul. 12, 2018 in Interrailing, Photos, Stockholm, Travel

We leave Copenhagen and set off for Stockholm by train. The journey is long and the day is short. We explore.


Checking Out And Leaving For Stockholm Six Hour Later We Emerge From The Station And Find Two Statues

Checking Out And Leaving For Stockholm. Six Hour Later We Emerge From The Station. And Find Two Statues.

Continue Reading...

Interrailing into Copenhagen: Day 4

Jul. 11, 2018 in Copenhagen, Interrailing, Photos, Travel

To the zoo! We see so many animals, and so many young animals. The view from the tower is pretty nice as well.


Its Me

Its Me

Continue Reading...

Interrailing into Copenhagen: Day 3

Jul. 10, 2018 in Copenhagen, Interrailing, Photos, Travel

Today we tour the city, we see a marching band.


An Early Start And A Walking Tour Black Towers The Oldest Street In Copenhagen

An Early Start And A Walking Tour. Black Towers and The Oldest Street In Copenhagen

Continue Reading...

Interrailing into Copenhagen: Day 2

Jul. 9, 2018 in Copenhagen, Interrailing, Photos, Travel

After an early start and quick breakfast, we went to spend the day in Tivoli Gardens. The day started overcast and cloudy but quickly picked up. This may have put people off as for the first few hours the queues were tiny. In a little under 7 hours we went on nearly every ride (some multiple times), talked, ate, and rested. It was a great day out.

Afterwards we wandered the city and had burgers for dinner while listening to live jazz - formulating plans for tomorrow.


A Statue Of Hans Christian Anderson On The Way To Tivoli Gardens A Grip Man In Case Of Emergency As Tivoli Is A Really Old Theme Park Queuing For The Daemon We See A Pagoda

A Statue Of Hans Christian Anderson On The Way To Tivoli Gardens. A Grip Man In Case Of Emergency As Tivoli Is A Really Old Theme Park. Queuing For The Daemon We See A Pagoda.

Continue Reading...

Interrailing into Copenhagen: Day 1

Jul. 8, 2018 in Copenhagen, Interrailing, Photos, Travel

After a night in Plön we depart, we say goodbye to one of our companions. Then, it is on to the train for five hours as we travel to Copenhagen. It is a long journey and after watching the scenery dart past for a while we watch some TV. Halfway through the trip our train boards a car ferry. We disembark and explore the ship. Near land we re-embark and watch The Grand Budapest Hotel for the remainder of the Journey.

In Copenhagen we walk to the hostel, check in and set out to explore. A jazz festival is in town for our stay. We watch. The day finishes with pizza.


One Last Look From The Hostel Window Hidden In The Woods Looking Out Onto The Lakes

One Last Look From The Hostel Window. Hidden In The Woods. Looking Out Onto The Lakes.

Its Been Fun But Now We Split Good Luck

Its Been Fun But Now We Split Good Luck

Continue Reading...

Interrailing into Plön

Jul. 7, 2018 in Brussels, Interrailing, Photos, Travel

Taking a break from city visits we spend a day in Plön. After a short train ride we check in, and walk around the many lakes. Plön is a beautiful town in the middle of the German countryside. It is quite, and normally rather serene if not for the Harley Davidson festival. So many bikes.

After a good walk we head down to a local Indian restaurant and have our last meal as the three of us.

Ending the day we return to the hostel. Football is on and it’s coming home.


Leaving Generator Hamburg Onwards To Pl%C3%B6n Inside Hamburg Hbf

Leaving Generator Hamburg Onwards To Plön. Inside Hamburg Hbf.

Continue Reading...

Interrailing into Hamburg: Day 4

Jul. 6, 2018 in Hamburg, Interrailing, Photos, Travel

Using a special day pass, we spend the day visiting four different museums dotted across the city. Then, we enter a submarine. While it seems rather large, it is designed to fit eighty four people inside. That would be rather cramped.


Museum Number One A Musical Display

Museum Number One. A Musical Display.

Continue Reading...

Interrailing into Hamburg: Day 3

Jul. 5, 2018 in Hamburg, Interrailing, Photos, Travel

Visiting the botanical gardens. Seeing the sights. Wandering the Waterfront. A good day.


Visiting The Botanical Gardens Venturing Inside The Greenhouses Purple Flowers Everywhere

Visiting The Botanical Gardens and Purple Flowers Everywhere. Venturing Inside The Greenhouses.

Continue Reading...

Interrailing into Hamburg: Day 2

Jul. 4, 2018 in Hamburg, Interrailing, Photos, Travel

We spend the day inside Miniature Wonderland! It’s amazing.


Sitting On University Grounds Eating Break Unzipped

Sitting On University Grounds Eating Break. Unzipped.

Continue Reading...

Interrailing into Hamburg: Day 1

Jul. 3, 2018 in Hamburg, Interrailing, Photos, Travel

A day of travelling spend mostly on a train. Not much happens today. When we arrive in Hamburg we check into our hostel, and wander the streets. We see a dragon.


I'm On A Train A Deserted Platform That Time Forgot Entering Hamburg Looking Back At Hamburg Central Station

I’m On A Train. A Deserted Platform That Time Forgot. Entering Hamburg. Looking Back At Hamburg Central Station.

Continue Reading...

Interrailing into Amsterdam: Day 4

Jul. 2, 2018 in Amsterdam, Interrailing, Photos, Travel

Sorry about the delay, I had some really bad news recently and lost the desire to update this blog for a little while.

On our last day in Amsterdam we split and rent two bikes, cycling all of the way into Amsterdam. It takes us two hours, and afterwards we relax and cycle around the city. In the evening we meet up again for an evening meal. We take the train back.


Ultrecht Station Train Tracks

Ultrecht Station. Train Tracks.

Continue Reading...

Interrailing into Amsterdam: Day 3

Jul. 1, 2018 in Amsterdam, Interrailing, Photos, Travel

I’m on a boat. We visit the Maritime museum and see the sights.


A Tree From The Water

A Tree. From The Water.

Continue Reading...

Interrailing into Amsterdam: Day 2

Jun. 30, 2018 in Amsterdam, Interrailing, Photos, Travel

For our second day we catch the train into Amsterdam, have breakfast by the canals, and explore the city. We wander. Our party takes a trip to Body World. Finally, we take the free ferry to the north and have some ice cream. The weather is perfect.


Inside Ultrecht Station Looking At Amsterdam Central Station

Inside Ultrecht Station. Looking At Amsterdam Central Station.

Continue Reading...

Interrailing into Amsterdam: Day 1

Jun. 29, 2018 in Amsterdam, Interrailing, Photos, Travel

We travelled from Brussels to near Amsterdam, staying in Ultrecht for the night. The day is mostly uneventful, with most of it spent on the train. However, we walk along a few Dutch canals, explore the suburbs, and have dinner in IKEA.


Leaving The Hostel Brussels Central Station Walking Along The Avenue

Leaving The Hostel and Brussels Central Station. Walking Along The Avenue.

Continue Reading...

Interrailing into Brussels: Day 4

Jun. 28, 2018 in Brussels, Interrailing, Photos, Travel

The last day, lets make it count. We walk to the Botanical gardens and split. Me and Andy decide to visit Autoworld.


Swag A Statue An Interesting Facade On An Empty Building

Swag. A Statue. An Interesting Facade On An Empty Building.

Continue Reading...

Interrailing into Brussels: Day 3

Jun. 27, 2018 in Brussels, Interrailing, Photos, Travel

After visiting the Atomium yesterday, we journeyed south-east towards the European Parliament. There, we saw the fantastic House of European History, the disappointing Parliamentarium, and the interesting Hemicycle.

We walked back to the hostel, cooked, and rested for the dinner.


A Wall Mosaic Suspended Street Lighting

A Wall Mosaic. Suspended Street Lighting.

Continue Reading...

Interrailing into Brussels: Day 2

Jun. 26, 2018 in Brussels, Interrailing, Photos, Travel

Day two and we were off to an early start. We ate a buffet breakfast, talked to our hostel-mates, and ventured north.

We visited the Basilica and peeked inside. Finished in 1911, this modern cathedral is a marvel. Then we caught a train.

Then, off to the Atomium we went. It is huge and has fantastic views of the surrounding city. Then, we visited the ADAM museum and wandered around the Expo grounds. Most of the buildings have been long since destroyed or replaced, but the Chinese and Japanese pavilions are still intact. Or so we thought. Upon arriving in the gardens we find the Chinese pavilion boarded up and the Japanese pavilion inaccessible. Light research reveals that they were both closed five years ago as they were starting to fall apart. A shame.

In the evening we cook a fry up, and play a few games of pool.


Zeppelin The Streets Lamp and Trees

Zeppelin. The Streets and a Lamp and Trees.

Continue Reading...

Interrailing into Brussels: Day 1

Jun. 25, 2018 in Brussels, Interrailing, Photos, Travel

Today is the first day of our adventure. After an early breakfast I set out and caught the express train to Waterloo. Then I walked across central London to St. Pancras International taking in the view on the way. At the station I meet up with my friends, chat, and catch the Eurostar headed for Brussels. We are on out our way.

We arrived mid afternoon, so after we checked into our hostel we ventured into the city, exploring the Grand Place. As places go it is pretty grand with many old and fancy guild halls from when this square was more than just a tourist attraction. Nearby is the infamous and underwhelming Manneken Pis along with several large murals.

For dinner we buy ingredients and retire to the hostel. We cook a simple pasta dish. As we now have a rough idea of the cities layout we discus plans for the next few days. Tomorrow we decide to head north towards the Atomium and see the remnants of Expo 58.


Catching the Train Entering Waterloo

Catching the Train. Entering Waterloo.

Continue Reading...

Interrailing into Europe

Jun. 24, 2018 in Interrailing, Travel

Me and a few of my friends just finished university and so we have decided to go interrailing around Europe.

On this blog I am chronically our journey. We are planning to depart from London and take the Eurostar to Brussels. There we will catch trains to Amsterdam, Hamburg, Plön, Copenhagen, and Stockholm. Finally we will be flying back to London on Ryanair.

Untitled Unity Shader Experiments

Jun. 2, 2018 in Games

Untitled Game

Tracing Transactions in the Bitcoin Blockchain

May. 18, 2018 in Pretty

Blockchain Tracer

This project demonstrates the ability to visualize, and trace transactions through the Bitcoin network, evaluating three different methods. Namely poison, haircut and First-In-First-Out (FIFO).

To achieve this, a web application was created to first build up a network graph representing Bitcoin addresses as nodes, and transactions as directional edges. This allows the user to easily grasp the history of any given Bitcoin address, and then trace any transaction either up or down the graph.

By clicking on a node in the graph, the application will automatically load that address and it’s associated transactions, adding it to the graph. By hovering over a node in the graph, the tool-tip on the right will appear. It displays a number of useful statistics about the address, and gives the user the option to trace transactions by clicking on any of the colourful buttons.

Hello, Parkrun!

May. 12, 2018 in Fitness

Parkrun Route Parkrun Times

I’ve started running the Southampton Parkrun, a 5K run every Saturday morning on the common. It’s great fun, and my times are slowly but surely improving.

oneM2M Federation: Multi-Vendor Internet-of-Things

Mar. 16, 2018 in Text

This year in a team of five, we set out to investigate and experiment with the oneM2M standard, for our client InterDigital. Overall we were successful, here are our findings:

For the mass deployment of the Internet of Things to be a success, a global standard for machine to machine communication needs to become established. This report explores the oneM2M standard for Machine to Machine communication, researching its capabilities, how to make use of it, and ultimately builds systems upon it. Using them, data streaming, live video, and federation are put to the test.

This project is a oneM2M research project, with InterDigital as the client. They have created the oneTRANSPORT data marketplace, and this report with federate with their system, to demonstrate the power of oneM2M.

One Weekend, Two Hackathons

Jan. 28, 2018 in Competitions, Games, Photos

This weekend, I participated in two hackathons. On Friday afternoon I took part in the Bloomberg CodeCon Grand Finals (again). Then in the evening everyone everyone went to Swingers Golf Bar. On Saturday morning I explored the city, swinging by the Tate Modern just before I left. Image courtesy Bloomberg.

Bloomberg London HQ SnowDrift

Then on Saturday evening and Sunday morning I created a game for the Southampton Game Jam, the theme was transmission. Normally you have 48 hours, but I was lucky to even have 20. So I got to work, and created SnowDrift, a classic 2D platformer, using raw JavaScript no frameworks. Click on the image below to play in your browser. Overall, the weekend was busy, but fascinating. I really enjoyed it.

The Unofficial Stack Exchange Puzzle Book

Jan. 20, 2018 in Text

After recent browsing, I had the idea to convert the Puzzling Stack Exchange into a book. Overall, the project was a success, however maths is currently not rendered as such. The book contains the top 100 questions and answers ever submitted to the site, formatted nicely to fit into a small A5 book(let).

I would like to thank the Puzzling Stack Exchange community for writing the puzzles, Stack Exchange for providing the data, and creativecommons.org for making this possible. Like the puzzles within, the book is licensed under the CC BY-SA 3.0 license. The book was created using the Stack Exchange Data Explorer to gather data, Python to parse and structure the data, and Pandoc to typeset as PDF. And thank you, the reader for reading this “book”. I hope you enjoy the puzzles. If you wish to contribute to this book, it can be found on my github.

Download and happy puzzling!

How to play Cheat, Sh*thead, and Cheathead

Jan. 9, 2018 in Games, Rules

Today I was playing a rather interesting variation of Cheat and Sh*thead with a group of friends, and thought it be worth sharing. But before doing so, I will fill you in on the rules of both games, for context.

Cheat

Setup

Shuffling a deck of cards and deal three to each player, leaving the pile in the centre of the table.

Gameplay

Players take it in turns to announce and play face down one or more cards of higher, lower, or equal value. If at any time a player suspects that the previous player cheated, they can loudly call CHEAT. All cards the player placed by that player are flipped. If the player has cheated, they pick up all of the cards, otherwise the accuser picks up all of the cards. The next player is whoever does not pick up cards. A player cannot call cheat on another if any cards have been placed atop of theirs.

Scoring

Once one player has placed all of their cards, a victor is crowned, and the game is over. If desired, count the number in each players hands to determine who came second, third, and so on.

Notes
  • The speed of the game depends on the group, but the faster they play, the easier it is to cheat.
  • Unless the group is a hundred percent certain that a player is not cheating, it is worth accusing them after they place their final card.
  • If desired, the game can continue after a player wins. However as players gather more and more cards, the game slows and lies become harder.

Sh*thead

Setup

The deck with Jokers is shuffled, and each player is given three face down cards. Then, each player is given an additional six cards, three of which much be placed face up atop their face down cards. Then the pile is placed in the centre of the table. The player with the greatest number of lowest value cards (excluding magic cards) in their hand starts. If multiple players draw, then the player who is first clockwise of the dealer starts.

Gameplay

Each player takes turns playing cards from their hands, face ups, or face downs - in that order. Cards must be of higher (Ace high), or equal value, but they must all be of the same value. After playing, a player draws back up to three cards if possible. Some cards are Magic and have special actions as denoted in the table below.

  • If four of the same value are played, then the pile is burnt and the current player get another turn. Jokers cannot be burnt in this manner.
  • If a player cannot legally place down cards, then they forfeit their turn and pick up the centre pile. Unless specified otherwise, magic cards can always be placed atop any other card, regardless of value.

The winner of the game is the first player to play all of their cards. However, the game can continue until all players bar one have played all of their cards.

Magic Cards
CardRole
2Reset the current value.
7Invisible, the next player must play equal or higher than the previous card.
8Play Low, the next player must play lower than the previous card.
10Burn, the pile is discarded and the player gets another turn.
KingChange the direction of play.
JokerThe next player cannot play a magic card.
Notes
  • Sh*thead can be played with any number of face down cards, as long as there are enough cards. Just ensure that each player is dealt that number plus three before choosing face up cards.
  • If desired, players can choose different magic cards or different magic actions.

Cheathead

An amalgamation of both games. It is played like Sh*thead but instead of playing cards face up, they are placed face down so players must announce their actions. Players can call CHEAT at any time to force a check. As an optional rule, Jokers can be used as wild cards instead of magic cards for added confusion.

Roulette, An Intelligent Negotiating Agent

Jan. 9, 2018 in Algorithms, Java

When making decisions, people negotiate to maximise utility and social welfare - agents are no different. Utilizing the GENIUS framework, this report tests time dependant concessions, and fitness proportionate selection putting them to test in a negotiation competition. The results are analysed and discussed.

  • CSS Concept: Computing methodologies → Intelligent Agents
  • Keywords: Agents, Negotiation, Competition, Selection, Roulette

Continue Reading...

Re-learning the Flute

Jan. 4, 2018 in Flute, Music, Photos

Recently I decided to get back into playing the flute. Years ago I learnt the flute in school, but dropped it after a year or two, so I’m (fortunately) not a complete novice.

Freshers C%C3%A8ilidh

As practising on your own can get a bit boring I have joined the Southampton Folk Society. Here we play folk tunes, sing folk songs, and put on Cèilidhs for students. I’m not very good, but I have fun.

Download the Folksoc Tunebook.