Something New Every Day

A record of doing a new thing every day in 2011

Checked out App Harbour for low cost web hosting (66/365) Monday March 7, 2011

I’ve been running a few of my small websites/apps on Google App Engine recently, mainly because the price point is really good (i.e. free). It’s not been a bad thing as it means I’ve been learning more about Python, but it’s really a shame WIndows Azure doesn’t have a free entry point.

Thanks to my friend @saqibs yesterday I checked out App Harbour, a web site that almost solves the problem. It runs on top of Amazon Web Services, and allows single instances of Visual Studio web solutions to be hosted for free - with a scaleable solution for when you need more.

This looks really promising, but the coolest thing is the release process. You can just do a push to their server via Git (or even better Mercurial coming soon) and it will automatically build and deploy your code. What a great idea.

Even better, if you add unit tests it will also automatically run them before deployment, and only go ahead if the all pass. Genius. I don’t have anything to deploy there right now, but it’s definitely an option for future projects where ASP.Net and C# are the preferred options.

Update: Mercurial is now available according to http://support.appharbor.com/kb/getting-started/using-mercurial-on-appharbor


It must be Spring... (65/365) Sunday March 6, 2011

… because I’ve started watching the baseball on MLBTV.

Actually it’s really stretching the something new concept a little as I’ve been watching the New York Mets via t’Internet for several seasons now, but yesterday was the first time I watched a game this year so I’m allowing it ;-)

If you’re not a baseball aficionado, it’s really something you have to invest a lot of time in to get the most out of it. The season is 162 games long, and if your team wins just 90 of those that’s a pretty good season and you’ll probably make the playoffs. That means even in a good season you’ll lose 72 games, so each individual game isn’t so important, but the season ebbs and flows, player’s form comes and goes, so you have to watch the drama unfolding over 6 month season to really appreciate what’s going on. Honest.

I started watching when I spent two summers in New Jersey in the late 80s, and thankfully chose the Mets rather than the damn Yankees as my team. For UK readers, the only vaguely equivalent team I can think of is really Man. City BEFORE the big money takeover - a team and club where anything can happen and usually does.

In the last few seasons we’ve been one pitch away from the World Series, had two unbelievably bad and heartbreaking end of season collapses and the worst run of injuries ever seen. The owners are now embroiled in the Madoff scandal so things aren’t looking good.

However. This is still the pre-season, hope springs eternal, we have a new manager and coach, everybody’s just about recovered from injury so despite all evidence to the contrary I have a good feeling about this season. And if you can’t be confident before the season starts, why bother?


I am not a designer (64/365) Saturday March 5, 2011

I wanted to tart up the http://www.somethingnew365.com/ website a bit but am reasonably happy with the Posterous theme I’m using right now (and can’t be bothered to invest the time tweaking the CSS). So what to do?

One thing that was slightly irritating me was the way the Facebook link to the post had a double picture of me, one for my Facebook account picture and one for the blog post which happens to be the same one, so I decided to make a new logo for the site profile.

However my design skills are weak, so I did my usual thing of finding a font I like, picking a color and I’m done. I do quite like the results though, and hope you do to - although the Facebook fix didn’t work :-(

I was now on a roll and also made a stunning new icon for Bedside Clock v2, but you’ll have to wait to see that one in all it’s glory until the release


Behind the times (63/365) Friday March 4, 2011

It appears I now have an affliction where if I’m writing any code I have to be listening to music. Not sure when I first noticed it, but I find it very hard now to do anything without putting my headphones on.

In the office that means listening to my Zune. I have an old-school first generation brown one which is still going strong and is great. When working at home I usually listen to my Internet radio, but yesterday I thought I’d get down with the kids and give Spotify a try.

Now clearly for most people in Europe this is not new, as they’ve been wildly successful for a while now, but despite their London office being a couple of floors below ours, I’ve never really used their service. Anyway, it was a reasonable experience, the streaming was good quality and the music catalog was extensive. But you knew all that already :-)


Putting the location in Brave Location (62/365) Thursday March 3, 2011

Despite really just making it for myself, my Bedside Clock Windows Phone 7 app has now passed 1000 downloads and rising steadily about 50 a day. Very surprising. The relative success means I’m thinking about doing a version 2, and one of the feature requests was to add in location awareness so it will tell you where you currently are. Obviously if you don’t know where you’re sleeping you’ve probably got bigger problems than a clock can solve, but I do love location aware features so why not?

On the train home on Thursday I managed to get an initial version working, and being in transit was quite useful for testing if it actually worked! I won’t share the actual code here as it’s not production quality yet - and is a bit dull to be honest - but in outline I did the following:

It worked reasonably well, although some of the names returned while on the train were a little weird (not really a good use case for a bedside clock though!). The man thing I learnt was the slightly restricted way you make web service calls in Silverlight/WP7

Now I’ve thought about it more, for the next version I’ll probably go with SimpleGeo for the location services, as they offer much richer functionality although it will take a little more programming.


Playing in F# (61/365) Wednesday March 2, 2011

Been a very busy week, with the Bing launch in France, so I’ve had to grab my opportunities for new things when I can.

On Wednesday, I followed the advice of @phammond to try out some new programming languages when I’m stuck for ideas, and had a play with F#. F# is a functional programming language, which makes it very interesting to play about with as it forces you to think about problems in a slightly different way. After installing the software and figuring out how to get the console running, I managed to write some “Hello World” code:

module BraveLocation.FSharpDemo
open System
let output = “Hello World!”
System.Console.WriteLine output

The line that took a little time was when loading the above code from a file in the F# console, you need your code to be part of a module.

Pressing on, next step was to write a very simple function that takes 2 integers and adds them:

let sum2 a b = a + b
let testSum2Values = sum2 3 4
System.Console.Write “3+4=”
System.Console.WriteLine testSum2Values

All pretty straightforward, but the rather sparse syntax takes a little time to get used to.

Finally something a little more interesting, with a recursive function that adds all numbers in a list of integers:

let rec sumList c = match c with
                    | h::tail -> (sumList tail) + h   // A list has a value (h) and a tail
                    | [] -> 0                         // If the list is empty, return 0 to end the recursion
let testSumList = sumList [1;2;3;4;5]      // Define a list, and sum the values
System.Console.Write “1+2+3+4+5=”
System.Console.WriteLine testSumList

A few newbie things of note here:

  • The “rec” in the function declaration denotes this function can be called recursively
  • The built-in list type is really a linked list, with a value, and a ::tail denoting the list part
  • The match clause is a sort of dynamic type matching switch statement

It’s all very interesting, and compiling to .Net makes it possible to easily mix and match languages as appropriate. Will definitely investigate more if I ever get time


Pic and Vic (60/365) Tuesday March 1, 2011

Non-London readers may want to look away now as they’ll think this trivial…

I think everyone who lives in SE England obsesses over their commuting arrangements; which tube line to get, where to change etc. I think for the most part it’s because most options are painful with everywhere being so busy, so any knowledge you can get to make it slightly more bearable is very useful.

Now I’m staying in South Tottenham during the week I’m mostly limited to getting the tube but I still have many choices on my journey back home, and it isn’t clear what is best. For example I can try:

  • Piccadilly Line from Piccadilly Circus to Finsbury Park, change to Victoria Line to Seven Sisters, walk to flat
  • Piccadilly Line from Piccadilly Circus direct to Manor House, longer walk to flat
  • Victoria Line from Oxford Circus direct to Seven Sisters, walk to flat
  • Piccadilly Line to Kings Cross, change to Victoria Line to Seven Sisters, walk to flat …

Then there are lots of other factors to include, like Oxford Circus is a nightmare at rush hour but Victoria line is quicker than the Piccadilly line, can you get a seat, what if Arsenal are playing at home,…

It’s a complicated and dynamic problem :-)

My new thing was to try changing at Kings Cross (the 4th option above). It was about 9:30pm as I’d been to the pub so wasn’t a typical commute, but the upside was it optimised time on the Victoria line while avoiding Oxford Circus. However the interchange involves a much longer walk than the very easy Finsbury Park interchange.Was it better? Probably not, but hard to say definitively…

Thanks for listening.


Removed an insidious computer virus (59/365) Monday February 28, 2011

Flatmate Ben asked me to take a look at his computer as it had a virus. I’m not really a PC expert despite spending most of my life on them, and when I started it up it turned out he’d got a really horrible on called System Tool.

It’s a fake virus checking program which hooks itself into system and continuously nags you to pay money to sort your system. It disables most of the obvious ways of tracking down what it’s actually doing, so at first I was bit stumped.

However searching on my own untainted PC I found a really excellent video at http://www.removevirus.org/system-tool-2011 explaining exactly how to get rid it, which is actually pretty easy if you know how. It all looks a lot more healthy now, so hopefully it’s back to being usable again.


A set of unnotable but new things (58/365) Sunday February 27, 2011

Been a funny sort of day, and I have done many “new” things but none of them really worthy of post on their won. So rather than pick the least dull one, I thought I’d list them all. Stand by to be underwhelmed…

  • Saw Birmingham win a trophy for the first time in my lifetime
  • Finally put the picture up seen behind the chair in the post of day 21
  • Added Facebook “Like” buttons and Open Graph information to the Brave Location website
  • Had my patented “Spicy Quorn Fillets” with noodles instead of the usual baked potatoes

Phew.

It was actually a fantastic day of sport, with England drawing with India in a fluctuating and high scoring group game in the Cricket World Cup, and then Blues beating Arsenal 2-1 in the Carling Cup final with a late winner after a defensive cock up of hilarious proportions. Brilliant!


I am the muffin man (57/365) Saturday February 26, 2011

My recent baking experiments have been a bit disappointing, so I’m glad to say I’m back on form with some excellent home-made banana nut muffins made yesterday.

After checking out a few online recipes, I ended up adapting one found in a book by Mary Berry we have at home, adding mashed up bananas and some finely chopped flax and nuts. Very easy to make, and despite a couple of them expanding well out of their cases in the oven, I managed to get 10 really good ones out. Would definitely add in more than one banana to the mix next time, but overall deemed a success.

You can also see I decided to play them in a 4-3-2-1 Christmas tree formation.

Muffins