Updates n' Stuff

So it's been a while since I've posted here.  I've never been the most prolific blogger; I tend to lean more to micro-update services such as Twitter to output stuff but I thought it was about time I up my output.

The first bit of news since last time I properly wrote anything is I turned 30 and I am now full-time at Blonde Digital in Edinburgh.  I'm on board as a Senior Developer, mainly working on PHP projects with Drupal - both websites and more interesting applications - and I've made sure there is lots of JavaScript involved.  I've already got one nodejs-based project out there and I'm hoping for a few more after the new year.

After the horrible death of my cat, and with the job I've moved back to Edinburgh now as well so now that I'm settled in I'm hoping to get out to things like TechMeetup more often, and even look to do some talks there on some topics that have been interesting me recently.

Outside of that I have a few interesting freelance jobs in the pipeline, having just come off one working with a small startup.  I managed to take their non-functioning jQuery mobile application and re-write it, and get it more functional, in 9 days which isn't bad.

I've got one big side project on just now, SublimeText-Nodejs, a package for Sublime Text 2 to make it integrate better with nodejs.  It's still early days with it as I'm learning Sublime's API but I'm hoping to have something reasonably functional before the end of the year.

A few other things that are peaking my interest are WebGL, working with Web Intents and digging into the nodejs source code and getting more of an understaning of it, and stack programming in general.  Hopfully I'll be able to share this all with you soon.

My saddest day

Probably the most shocking, disgusting event of my life happened today.

Earlier today one of my cats died - she came home, in a lot of pain and I had to watch her die in front of me. One of our other cats is still missing.

At first, we thought she maybe had been run over and the other one was scared and hiding.

But a few hours after the vet had taken her away, we got a call with the most shocking news - someone shot her.

Some sick fuck took a pellet gun, and in a close proximity to our house shot one (presumably two) innocent creature who have been part of our family for seven years.

Tassy (the small tortoiseshell) still hasn't returned home. I only hope she is still ok and just scared at what happened and will return home soon.

The anger that is boiling inside me right now is strong. If the person who did this was in front of me right now, I don't know what I'd do. I'll calm down, but I want to make sure justice is done to the sick fuck who did this.

(download)

Hire Me - A story of developer burnout and how I want to turn it around.

On Wednesday I'm going on a long planned holiday, my first in three years.  For the last four years my girlfriend has been doing her law degree I have been working working flat out in that time, which meant we never found the time to go away.

But when I return in two weeks I have to face the cold reality that I am an unemployed developer.

The story below I had intended to blog before now, but it never really seemed like the right time.  With the reality looming that soon I will need a job, now seems like the right time and getting some of this off my chest has been a cathartic experience.  Developer burn out hits us all who work with technology and the last year has been an experience that has taught me a lot - both in learning new technology, and about myself.

Developer burnout and how I got to be in this position.

About this time last year I had just begun work on a start-up business. I was introduced to the two partners on the project - both non-technical, but experts in their field.  We discussed salary and agreed an equity deal that would see me get 5% of the company + another 5% once the product started selling (in hindsight, this wasn't actually the best deal for me considering the amount of work that I ended up putting in, but that's for another time.)

We were going to build a new product together, something never seen on the market for business continuity and I was given a chance to work with the technologies on my choice.  The project was bold; the application hooked together a lot of elements of managing an Organisation, the people, it's assets and linking them to business processes (lot of tree structures and database relationships across multiple types of data) and had to be in real time.

As the only technical person on the project I chose nodejs to write the application back end with CouchDB and ExtJS driving the database and client side. For the first four or five months things actually went really well.  I was pretty much left on my own, given a document around 50 pages or so and told to go build it.

A lot of the really technical back end aspects were done quite quickly, and it turned out the technology (at least on the backend) was a perfect fit, but as the only developer I had to drive everything from project management to database design, all the client side stuff and everything in between.  This went on for about five-six months, pretty much 18 hours a day.

During this time I never really met with the other founders that often, maybe once a month at the most in the beginning, but in that time I still managed to build a good 60-70% of the core product on my own.

I have a little knowledge of how startup run and aimed to get an MVP done in the initial development period.  However I came to realise quickly that the other partners came from public sector backgrounds - there was no Agile "release early - release often" here, they wanted the full product done.

At around the 5 month mark or so, things started to go a little downhill and quickly slid from there.  For them is was all about the 'shiney shiney', the product had to have lots of all-singing, all-dancing features (think a database driven Visio) for launch and it was all or nothing for them, an MVP was unacceptable - and there was no courting angel investors - they wanted to retain as much control as possible.

At this point I have to admit I maybe made the wrong choice.

Sencha, the makers of ExtJS had promised delivery of an all-new ExtJS4.  From the videos from SenchaCon they demonstrated that it had lots of great new feature for doing charts and drawing, exactly what we needed.  They seemed confident the final release would be out in February 2011 so we made a decision - based on my recommendation - to slow things down a bit and wait for it to come out.

So we waited; and we waited.

To cut a long story short, the release never happened as expected - and even to this day, the features we wanted to focus on using never really materialised as we expected it and when their developer released did finally start landing, I began the effort of porting the application over.  There was no other developer to work on the many interconnected parts of the application, and it was up to me to keep the momentum going and quickly I started to get overwhelmed.

This is where they money ran out.

Unlike your typical startup, there was no push for funding - there was basically what was in the pot, and nothing else - I was now expected to work for equity. My girlfriend was still only working part time, coming up to the final few months of her degree and we still had bills and rent to pay.

From February onwards I had to start looking for extra work and I managed to land a few contract jobs, some at fixed rate and some at a decent day rate - but because the situation I was put in I had to bust my balls to make sure money came in on time, while still expected to work on the other product in my own time for the equity.

Then my girlfriend fell ill.  Two years earlier she had been diagnosed with Crohns disease, and had major surgery to correct the damage. We had been told to expect that at some time in the future she would fall ill again, and she did - but it ended up being her gall bladder. However, combined the two were causing her a lot of pain and with me working flat out the burn-out quickly settled in.

This all happened around May when I had an excellent opportunity to get a job working on one of the new exciting IDE products on the market.  I had just started working on some feature integration when it happened and I was not able to dedicate the time to it that they were expecting and after a month we agreed to part ways.

It was around this time as well I finally decided to end the relationship with the first two partners on the startup. With a contract, we had only agreed to work 6 months and I thought that would be plenty time for an MVP, and it nearly was - but they wanted more, and without being able to actually pay me it was time to end the project here. I felt sad, but at the same time a huge weight was lifted off my shoulders - it was time to pick myself up and start looking for work again.

The timing sucked but a small but of luck did come my way in the form of a local agency I had done some freelance work for before.  They managed to send some work my way for June and July but this is where that story ends.  Jobs that were supposed to have happened have fallen through, and desperate times call for desperate measures.  Quite frankly my luck has been down recently and this is why I have decided to write this blog.  Once, when I was 20 I went on the dole (social security for our friends across the pond) for a week and the experience was enough to make me swear I'd never do it again. I'd rather work cleaning toilets than ever take another unemployment benefit.

I'm a pretty open and honest guy and I don't think there is much point in shying away from the truth - the last year for me has sucked; but I'm an optimist and I want to turn my luck around fast.

My girlfriend recovered fast and later this year will be doing her Diploma in legal practice after completing her LLB with first class honours. But where this leaves me is looking for a job.

I'm nearly 30 and have been a developer professionally for over 10 years now. Not counting the earlier days of BASIC (since I was 5) and the time I did attempt university straight out of school (and did a bit of C/C++) I've been working with various languages such as PHP, Python, Java (on Android) and most recently lots and lots of JavaScript on both the client and server side.

I've used frameworks and CMSs from Zope, through Wordpress, Drupal and CakePHP to Django and most recently ExpressJS and Dnode on nodejs. I was one of the earliest users of jQuery and have even managed to write code that has been featured in a book (jMaps featured in JavaScript: the missing manual from O'Reilly) and influence others to launch their own products (Bitbucket was launched after I and Miran Lipovača, the author of Learn You A Haskell, worked on hgfront – a mercurial fronted system written in Django).

So if you are a company - start up or established - who is looking to hire a developer who enjoys a challenge and working with the best technologies and people then what have you got to lose in emailing me?  My resume is attached to this post as a PDF so please feel free to download.

(Wee update: Here is my github account)

Click here to download:
Tane_Piper_-_Web_Resume.pdf (78 KB)
(download)

I do have one caveat in that with my girlfriend doing her diploma at Edinburgh University I am tied to where I am living for the next year so if you are based in Edinburgh, Scotland then great! But if not and you are willing to work with a remote developer who has already pretty much worked solo for the last year and who can drive and manage himself then get in touch too!

I'm free from the 1st August onwards, just after I return from my long planned holiday and I'm happy to chat over email and Skype with anyone who is at least willing to come and find out what I am about and what I can bring to you and your company.

Also to anyone reading this who themselves may be feeling developer burnout - take a step back and realise that it can get better!

A little #nodejs Twitter OAuth script

The other day I was working on my new twitter bot - @nodemodules - which is a notifier for new and updated NPM modules (NPM is the node package manager, similar to pip or rubygems).

The main problems I had in developing it was getting Twitter OAuth to work.  As the bot does not sit in a public URL or port, I wasn't able to add a callback URL to it so I had to manually get the OAuth credentials.

After some tooing and froing, I eventually got it to work and decided to throw together a little command line script to help others in a similar situation.

To use the script, you first of all need to register a Twitter application for yourself (for example, I created one called Node Modules) which will give you a OAuth consumer key and secret.  To use these, you then do the following:

node twitter_auth.js --key=OAUTH_KEY --secret=OAUTH_SECRET

The script connects to the Twitter OAuth service and gets the initial keys required to do a OAuth request.  Then it presents a URL to point your browser to.  At this stage you need to log into Twitter using the account you want to post with and go to the URL.  After clicking 'Allow' on this page you will be presented with a PIN number which you need to type in as prompted on the command line.  After doing this the script does the final stage OAuth and gets you an Access token and Access secret.

Now you are ready to roll with your own app.  You need to save these two values within your application any time you do an OAuth-based request, such as posting to your Twitter timeline.  This is outside the scope of my small tutorial here, but you can checkout out the Twitter developer docs and the nodejs OAuth library examples.

To use this library you also need to ensure you have the node-optimist library installed for the command line arguments, and you can install both of these via npm.

Anatomy of my #js1k Submission - Raindrop ripple on a Gradient (#1kjs)

Yesterday I saw that the JS1K competition was running and since I've been doing a bunch of JavaScript stuff recently I thought it would be a good time to have a go and create a submission.

I'm not a hugely creative person so I decided to do something that I thought would be reasonably simple and after looking for some inspiration I came across a canvas implementation of the Raindrop ripple effect that I decided I could probably implement in less than 1Kb.

As of now I'm on the third forth version of my submission which you can see at: http://js1k.com/demo/145

As the rules state that you cannot use external media such as an image so I had to generate a gradient background to have the effect work. You cannot see the effect on a solid colour - and you can also see this - or not see this - on a gradient that has too may similar colours.  In the current version you can also click on the canvas to change the gradient.

After running the code through the Closure compiler the current code is reduced to 1021b 996b, within the limit - and I'm sure there is more I can do to optimise the size and speed.  I have until the 10th of September to try do this.  You can checkout the unminified here.

Along with optimisation, there are a few bugs I could fix.

I have found is that it actually takes a lot to compute the visualisation - running the code takes up between 25-50% of CPU on my dual-core 64b PC, depending on the browser. There is a very heavy for loop that I have optimised as much as I can for now by doing a reverse-forloop (-- instead of ++).  I also have to limit the canvas to 200x200, any larger and it runs a hell of a lot slower.

In running this, Chrome and Opera definitely lead the browser pack, followed by Firefox.  Safari also seems to be the slowest but I'm going to assume that on Mac hardware it isn't as bad as on Windows 7.  But if anyone with a Mac can confirm this I'd be happy to hear

Another issue that has cropped up is Firefox's implementation of the Canvas tag.  Due to an issue with the bounding area of a canvas tag in Firefox, I get the following error using the canvas context method putImageData.

  • An invalid or illegal string was specified" code: "12

From searches on Google it seems I'm not the only person with this issue. As of now I have not found a proper fix for this except to wrap the line in a try/catch and drop frames for now. (Update: Seems this is a know issue.  There is a test suite in that bug report that works fine on Chrome/Safari/Opera but breaks on Firefox.  This is currently being fixed)

One final issue is there are orphan pixels left if you keep the canvas running for a while - I need a way to garbage collect these.

While I'm happy with my submission, I'll admit it certainly not the prettiest.  Check out some other submissions I've seen that I really like:

LimePickleMango theme based on Thunder by Cory Watilo