Phillip Trelford's Array

POKE 36879,255

GameCraft NYC

gamecraftSkills Matter are excited to host the first ever New York GameCraft event on Friday 20th September at the DUMBO Loft! Following the phenomenal success and excitement around Dublin GameCraft, the event is now going global with a event also planned in London! GameCraft is a games jam event designed around building the gaming community. We aim to create events which allow game-makers to meet, share ideas, have fun, compete for prizes and most importantly make games. The events will be facilitated by Games experts (and enthusiasts!) Andrea Magnorsky and Phil Trelford.

 

This is a free event on the same week at the same venue as the Progressive F# Tutorials NYC, so why not come and join us for both. F# + MonoGame makes a pretty awesome combination, as does Lua + Love or Python + PyGame. Take a peek at the excellent GameCraft resources page for some great links to game engines and tools.

Check out the recent article on GameCraft in the Irish Times. I popped over to Dublin for the first event back in February 2012 and it was really well organized and great fun. I managed to knock up a simple game in under 6 hours. The London event on Saturday August 10th will be 12 hours which may be enough to create a releasable game. Currently my hope is to take a simple game concept to completion and release it on an app store on the same day!

Hope to see you there.

Tools

Last weekend I set about mining all the links from Alvin Ashcraft's Morning Dew excellent link blog site which has been documenting .Net goings on since 2007.

In the back of my mind was the idea of applying some machine learning techniques to automatically generate blog article recommendations using the labelled links as training data. Each link in Alvin's site has a date, category, title and author.

I took 2 passes:

  • programmatically find all the post urls
  • parse the HTML posts using the HTML Agility pack to extract labelled links

I now have a CSV file with over 80K links – that’s a lot of reading from Alvin.

This week I've been manually running queries over the dataset like top N authors in a category by volume of posts. One of the most historically prolific bloggers I found was Davy Brion who has some really interesting material. One article I particularly enjoyed was the Advantages Of Being A Polyglot Programmer from 2011 which describes part of his journey from a C# developer focused on one platform/language and dependent on Visual Studio and Resharper, to learning new languages like Ruby, JavaScript and Haskell and using strong text-editors like TextMate and Sublime Text 2.

It struck accord with me and quite a lot of the people I shared it with on Twitter:

I also posted some quotes from the article including:

This is one of the responses:

It reminded me of a recent vociferous exchange I'd seen on Twitter:

Judging by those comments as I’m not using Resharper when writing C# I must be "silly", "stupid" and "retarded".

Seriously though, this is not the first heated discussion around Resharper, and name calling doesn't feel like a grown up way to have a discussion, wouldn't it be better if we could just agree to disagree and live and let live.

So why am I not using Resharper?

The short answer is that I want to like Resharper and I've tried it a number of times, but each time I've found it overly intrusive in my workflows and ended up uninstalling it after a few days. If Resharper works for you though, honestly I'm happy for you. Even though I don't use Resharper, it doesn't mean I don't use or like tools, I use TestDriven.Net to run my unit tests, REPLs for getting quick feedback and I've been happily using the built-in basic refactoring tools in Visual Studio since they were introduced way back in 2005.

Longer answer

C# is not the only language I program in, you can also find me happily coding in C++, JavaScript, Python, Erlang and F#. Because of this I tend to favour simple workflows that work across languages, for example as Davy Brion describes I find "Find in Files" searches work pretty well, along with Visual Studio 2012's new search in solution explorer.

Home

Code smells

Back in 1999 Martin Fowler wrote about the idea of code smells in his Refactoring book. I consider finding myself typing the same thing over and over or jumping back and forth through the source code frequently, both as good forms of discovery of code smell. The former of code duplication, the later of high coupling. From bitter experience, instead of making code duplication easier through code generation, and code coupling easier through navigation tools, I want to get strong early signals of the problem and tackle it head-on before it gets out-of-control. That said there are times when both code generation and navigation tools can be handy too, and yet others when they feel more like I'm taping over gaping wounds with temporary bandages.

Step away from the tools

Sometimes when I’m stuck in the debugger for a while, I begin to feel like a gambler who’s trying to gamble his way out by doubling down instead of cutting their losses and walking away. Sometimes the best way to solve a problem is to step back from it and take some time to think about it (picture via Edwin Brady):

planning

And sometimes the solution isn't easily found in the code or the tool, but rather from stepping back and taking time to discuss it with your co-workers.

Turing drawings

A little while back I stumbled upon a fun generative art project by Maxime Chevalier called Turing drawings that produces 2D procedural art based on randomly generated Turing machines. The project’s code is in JavaScript using a HTML canvas which you can try online, just hit the random button to generate all sorts of weird and wonderful pieces. The project has inspired amongst other things a port to asm.js and a version with genetic recombination of URLs.

For fun I’ve created an F# script that generates Turing drawings that can be run online below via the embedded Cloud Tsunami IDE:


The Tsunami IDE also runs on the desktop and can be embedded into applications like Excel.

If you’re interested in learning more about generative art and trying similar ideas then why not pop down to Skills Matter on Thursday August 15th for a hands on coding session.