May 2013
1 post
3 tags
I am now a softie.
Yesterday was my first day at the London office for Yammer. And frankly I was (and still am) excited. For those of you who don’t know Yammer here is the elevator pitch: It’s the social network for your enterprise. It provides the visibility and openness that is killed by the email swarm.
Some backstory.
Back in February I had a Skype interview for Yammer. It was a brief-ish...
November 2012
1 post
3 tags
Super simple retweet bot in node.js
Just last month there was inktober which is this awesome idea that artists sketch something in ink every day for the month of October. Everyone was tweeting their sketches, but I didn’t really want to have to search every day to see what was new. So I went looking for a service or code that would just auto retweet everything for me. I tried to follow the Yahoo pipes method and then found...
October 2012
6 posts
6 tags
You can't improve what you haven't measured!
For the last year I have been writing Node.js predominately on a project called Graphdat. It’s been a year of learning and pushing my skills further than ever before. The premise behind Graphdat is pretty straight forward, see how your application and servers are performing as a whole in realtime.
Yes, we invented perfmon, but here’s why. With cheaper virtual machines it’s...
1 tag
1 tag
1 tag
1 tag
August 2012
9 posts
1 tag
iOS Tip: TableView ARC Snippet
https://gist.github.com/3291911
iOS Tip: Create a UUID in ARC
To create a UUID in ARC without leaking you need to do the following
NSString* createUUID() { CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault); CFStringRef uuidStr = CFUUIDCreateString(kCFAllocatorDefault, uuid); NSString *result = [NSStringstringWithString:(__bridgeNSString*)uuidStr]; CFRelease(uuid); CFRelease(uuidStr); return result; }
then you can just go:
NSString...
July 2012
2 posts
6 tags
A quick game in CreateJS
Prelude: What’s this all about?
There has been a lot of online propaganda about making games using HTML5 and then deploying them to EVERY DEVICE ON THE PLANET… And why not, it make sense in theory… just create a game in the browser, wrap it in some sort of container and sell it for lots of monies in every store. How hard could it be? I’ve decided to give it a shot and find...
Don’t get caught out with 64bit doubles in Javascript:
var...
June 2012
2 posts
visualise msgpack objects online
I’ve just stuck up a new tool for visualising msgpack objects online. It’s not very pretty but it certainly gets the job done. Just paste your base64 encoded object in and it will show you a hex dump and also debug statements as it decodes the object. Hovering over the debug statements will highlight the bytes in question.
You can find it over...
4 tags
Overcoming open source with NPM
Don’t get me wrong, I love open source libraries and tools. Without them the internet would not be what it is today. But here is the problem: ownership. Outside of the big commonly used libraries that have many maintainers are a set of libraries created out of need and published for the common good. Created as needed by people like you and me who are every day developers looking for a...
March 2012
3 posts
5 tags
Using EC2? You could be saving money.
A lot of small companies have switched from a co-located or VPS service over to cloud environments such as Amazon’s EC2. It’s easy to bring up extra servers when you experience load, and generally cheaper for most small companies that can’t afford to invest in a rack based solution. But here is a tip that a lot of people don’t think about: Turn your staging environment off...
The move to tumblr
I just moved my blog over to tumblr. Why? Simply put I was tired of Google’s single sign-on not working. I have multiple app accounts and a legacy personal gmail account. Using all them is proving to be impossible since not all of google’s apps use the single sign on system.
November 2011
3 posts
I’m using supervisord to run my nodejs services on some Amazon EC2 instances and something I wanted to do was be notified when a service stops/starts/crashes. Supervisord has a feature where you can add event listeners for specific events. Awesome right!? Turns out that there wasn’t any nodejs listeners around so I wrote one. The supervisord eventlistener just emits an...
4 tags
Bypassing the bodyParser in expressjs
I’ve recently been using nodejs quite heavily at work and one of the pieces I’m working on is replacing the .NET web site with nodejs. The setup is pretty simple, nodejs + express + jade, and it works well - except for one place. On there .NET side there is a HttpHandler that accepts POST data as a string. Just getting the response from express/connect is simple, but we’re also...
6 tags
The importance of testing
From where I sit there are two types of software companies, those who test and those who don’t. But I’m not talking about testing code, because let’s be honest if a software company does not test their product in some form they’re not going to be around for long. What I am talking about are companies that test their interviewees. I have now worked for both types of...
October 2011
1 post
Truely Random Numbers
There was an interesting discussion during the coffee break at work. How do you unit test a random number generating function? Of course we got distracted and started talking about ways of generating natural entropy. Sure you can use lava lamps and measuring the varying temperature of things, but that’s slow and requires quite a lot of setup. Someone at the table then suggested twitter as a...
June 2011
1 post
5 tags
Continuous Integration with XCode
Coming from the world of .NET with it’s large crowd of over educated anal programmers I’ve been quite used to having continuous integration in all my programming work. It seems that the Objective-C camp lacks these unit testing evangelists - if it builds ship it right!? And for the most part this is cool because the Objective-C ideology seems to be about the user experience, so most...
February 2011
2 posts
3 tags
Subdomain routing with parameter support
For my Brunch Club project I wanted to use the subdomain value as a parameter for my ASP.NET MVC controller actions. After quite a bit of searching the internet I could not find anything to do what I wanted. The closest I could find was this blog post by Tony Williams, where he uses fixed subdomains to map to Areas. I’ve modified his code somewhat to suit my needs. To be honest it would be much...
2 tags
2011 the of the programmer
After reading this post by Jeff Atwood I have decided that I shall blog more this year than I have ever done before. This year that I am dubbing the year of the programmer. I’m starting as a Tech Lead at an IPTV provider in three weeks which should be interesting. I think it’s going to be one of those roles that require me to try things that people say can’t be done and should...
June 2009
1 post
5 tags
Konami Code
After reading an interesting article on jQuery special events by Brandon Aaron I decided I’d like to make my own for nefarious purposes. The idea is very simple: a small plugin that enables a cheat code on a website - so that you can have easter eggs. I picked the Konami Code though you can easily modify the code to make it respond to something else. I had initially written it as a special...
March 2009
1 post
1 tag
Google Analytics
Google analytics was adding an extra 3 seconds to my page load. The browser had to render the script tag, get the script then execute the next script tag that did the tracking. Now I don’t know about you, but I’ve got better things to do on the page than care about when the tracking happens. So my Google Analytics code now looks like: (tracker id has been replaced with hashes)...
February 2009
1 post
4 tags
Confirmation Dialogs
Let’s assume we have the following button that deletes something: <asp:Button runat=”server” ID=”btnDelete” Text=”Delete” OnClick=”btnDelete_Click” />But before we delete it we should really confirm that the user wants to do it. The standard way to do this is to add an “onclick” attribute that makes a call to the javascript...
July 2008
1 post
1 tag
Text -> Morse Code in SQL
Just something stupid I did yesterday - following an even stupider conversation about servers sending out an SOS. DECLARE @txt varchar(max) SET @txt = ‘You cannot call server functions from javascript, That is what the AJAX handler is for.’ SET @txt = REPLACE(@txt,’.’,’^|^’) SET @txt = REPLACE(@txt,’_’,’^_^’) SET @txt =...
June 2008
1 post
1 tag
I just built Microsoft Singularity - this is quite exciting!
May 2008
1 post
1 tag
Pong
So I went on a holiday over the last week. And since I didn’t have anything exciting to do at the airport/on the plane I ended up programming pong. I decided to do it in javascript as a prototype for an objective-c version. It’s not perfect, but it’s a nice proof of concept - and it’s only 140ish lines!I used jquery as the library to make things happen. There are...
April 2008
1 post
Cocoa here I come!
Right now I’m trying to learn Objective-C - it’s proving to be the craziest language I’ve ever tried to learn!