Getting started with .NET Core

It’s been a few years since I last used .net so I thought I’d give it a go. It was slightly more eventful 30 minutes than I’d have liked, so I thought I’d write it up.

I started by trying to install Visual Studio, but half an hour later it was still under 50% done, and since I only wanted to be writing scripts rather than applications, I started looking for some smaller getting started guides and came across Microsoft’s guide to getting started with .NET Core. So I took a brief look at the new shape of the .NET stack, liked what I saw, and went back to the guide.

After installing the .NET Version Manager (dnvm) I had to restart PowerShell to get the changes to my PATH to take effect, and also I had to open an Administrator PowerShell window and run set-executionpolicy remotesigned because I hit the Running scripts is disabled on this system error message.

The code samples from the guide can’t simply be copy and pasted into an editor – each is actually a single line of code and then JavaScript is applied to make it appear as though it is spread across multiple lines. This is pretty disappointing, I thought something was wrong with my local editor configuration until I hit view source on the page.

I was using Visual Studio Code, and at this point was also disappointed that SHIFT+ALT+F didn’t format the CSharp code for me, although it did format the JSON.

I’d closed my PowerShell window by this point, and when I opened a new one and ran dnu restore I got an error message about it not being on my path (The term ‘dnu’ is not recognized as the name of a cmdlet, function, script file, or operable program.). Running dnvm upgrade seems to have fixed this and I can now run the commands from both PowerShell and Command Prompt!

My “Hello World” did at least run first time. Phew!

I should now have the infrastructure to get properly going, but this was a much rougher intro than I was hoping for.

Why contracting developers are a giant pain in the ass

I have just read Why contracting developers refuse to go permanent. It says:

Working with legacy technology is something the developers I spoke to were not particularly fond of. They explained that these pieces of software are often built using outdated methodologies and poorly documented, if at all.

This is true, but my experience of dealing with several legacy projects which were written by contracting developers is like this:

This one is in Rails from three years ago and is full of CSRFs! This one is in Ember! This one is hard-wired to a five-year-old version of WordPress!

Yeah, it’s definitely the organisations which are the problem.

Bristol Mini Maker Faire

Today I took my 6 and 2 year olds into town to look around the Bristol Mini Maker Faire. It was really good and highly recommended.

We saw the Nao and Baxter robots from Active8 Robotics, a laser cutter from Just Add Sharks in action making press-out catapults, Raspberry Pi-powered wheel and track robots from Dawn Robotics and plenty of other things.

The kids were particularly taken by a couple who reverse-engineered childrens’ electronic toys like the Furby or basic motor-controlled toys and had them rigged up to simple push buttons to make them work.

We also liked seeing how Is Martin Running? works, and playing on the Makey Make.

They were sadly a bit too young to make their own shonkbot or get a Petduino (needs soldering) but watching the RepRapPro in action was a novelty, and we came away with some printed robot figurines which they treasured!

Many thanks to the chap from Ragworm who valiantly tried to explain how circuit boards are printed to my 6 year old 🙂 it will no doubt be easier to comprehend when our Flotilla kit arrives!

There was lots of other homebrew displays from people who used the Bristol Hackspace and I’m only sorry I can’t remember the names of their projects, but we all enjoyed it thoroughly!

Here’s looking forward to the next one!

Verically aligning code

I remember being a new developer and thinking that vertical alignment of code, whilst having some minor upsides, was just too damn ugly to do.

Now I’m much older and the less time I have to spend parsing someone else’s code before I can see if it’s correct or not, the better.

Vertical alignment, the vast majority of the time, does make code vastly easier to read, and although it may have some diff-based downsides, they tend to be one-off rather than perpetual. I know which cost I’d rather bear.

Just hanging out

I have started working from home one day a week to help make up the hours I lose by taking my son to school in the mornings.

This week, on my day at home, I wanted to have a remote talk with some people in the office. “Easy”, we all thought, “we’ll just use Google Hangouts”. Wrong.

Laggy, constant dropouts, confusing UI. In the end I hung up in frustration and we IMd to exchange Skype details and used that, which was near-perfect.

It turns out that having more than 10 years experience of running a product does actually make a difference. Who knew?


Warnings and apologies: 6am introspection ahead!

In Dan Hon’s latest newsletter he briefly mentions the academic theory of some of the work at ETech in the past (compared to some of the advertorial at O’Reilly Solid).

I have a grudging acceptance that being older, and having two kids, but still being interested in Things as well as games, and, y’know occassionally going outside means I have to pick and choose what I spend my time on. I used to spend a lot of time, pre-kid, on taking some new or interesting piece of technology and making a thing. There used to be an XUL interface to this blog, for example.

But the edges are less clear to me now. Or at least the bits-only edges are unclear. There’s obviously a load of really interesting stuff going on with sensors and arduinos and the Raspberry Pi, and, one small step up from that, plenty of programmable toy robots.

I suppose that areas like Web Components are where the current excitement is – an area with a dense spec and, when I last looked, a dearth of examples.

Because I sit in a world which straddles Java and PHP and has a toe in Ruby I see things like Grunt and Gulp, and think “hurray, a replacement for those Ant scripts!” but it turns out they’re barely that. Vagrant appears, and is great for packaging and distributing customised images of virtual machines, but again the bits I care about are just a wrapper around other tools. Where’s the meat? There’s a lot of work going on in front-end JavaScript application development, but, like Joe Gregorio, I have a whole other rant about that.

Precinct 13

I realised some while ago that I have the theme from Precinct 13 living deep in my subconscious, but it was only today, when Hip Hop On Precinct 13 came on the radio that I realised it was because the previous owner of the Commodore 64 I had as a kid was big into the demoscene and this was the theme track to one of them.

Not only did I have disk after disk full of demos but, amongst all the other disks for my 1541 drive, a copy of Elite and multiple save games which had either been hacked or which the previous owner had spent hundreds of hours building up. Docking was never so much fun as when it was a mere keypress away.

This was the computer, followed by the 286 which I wrote text adventure games on and modified Gorillas on, which got me into programming. I was never a hotshot PEEKer or POKEer, but even the basics, tediously copied in from a printed listing in a magazine, made me feel like a genius.

This August my son will turn five. He loves playing computer games, and with any luck, he’ll love the Kano he’ll be getting. Hopefully in thirty years he’ll be having flashbacks to images and sounds he spent hours exploring on the first computer he could call his own.

Management material

So, despite my sterling attempt to delude myself last year it’s been years since I’ve been a developer rather than a manager, and it was about the time of this change in my role that this blog started to die out.

All I have now are opinions and guidance, which the internet is far too full of for me to want to add to (plus I am still very management-naive in a number of ways), but there’s always been room to contribute something new in the form of code.


Off the back of that 57 day coding streak I decided to set myself a few other goals.

I keep a private blog where I write about my kids. Until the beginning of the year I’d posted about once a month and they mostly started with “its been far too long since I last posted, but…” and then detailed just the last few days, because when you’re the dad of a one year old, that’s all you can remember.

So far I’ve made twenty posts this year, including every day in March so far. I’m using an android app for this called goal tracker, although once installed it annoyingly just calls itself “calendar”. It has nice big ticks for each day, and this seems to be working.

This year and the end of last year ha vee also seen big streaks in “one second everyday” and “calorie counter fitness tracker”, the latter of which I use to feed extra data into my fitbit profile.

All of which is to say that I’ve been focusing in rather than out, and making sure I can make a daily commitment to something.

Being able to maintain even this somewhat small but continuous level of creativity (taking a video, writing a blog post, thinking about what I’m eating and where I’m going and how far it is), plus a couple of catalysts at work have helped me to think about the problems (and some more fun non-problems) I could get my teeth into both in and out of work.

Hopefully this will lead to a few more things being shipped to the outside as well as the inside, and can stop being worried that I simply don’t have anything to say anymore.