I’ve Turned into a Hipster

Posted: February 2nd, 2012 | Author: Rob Searles | Filed under: General, JavaScript | Tags: , , , | Comments

Hipster Dog

I’ve seen a day I never thought would come:  the day I turned into a hipster!

If you’ve been following this blog, you’ll have noticed that throughout 2011 I’ve been working more and more in Javascript, more specifically with Node.JS.

The last few months have been especially Node.JS-centric. During the day, I’ve been building architectural improvements into Jabbakam. Evenings and weekends, I’ve been  hacking about on the Live Unsigned mobile site. All of my recent projects revolve around Node.JS, and I’ve been loving it. Node is incredibly interesting and powerful, and it is giving my brain a workout.

However, Javascript itself has a few niggly bits that become more problematic the larger the project gets. Issues with structure and maintainability of code motivate projects such as Joose and Backbone.js. One of the things that has been bugging me is having to hack in class-based inheritance. After a lot of experimentation, I settled on Prototypal Inheritance, which does the job to an extent, but left me dissatisfied .

So, the other day I finally broke down and tried CoffeeScript.

When CoffeeScript first came out I resolved never to bother with it. It is clearly for Ruby people who don’t quite understand Javascript. Since then it’s been getting a lot of press, and it now even has its own book!

Anyway, I was up the other night, waiting for my daughter to wake up in screaming pain as razor-sharp pieces of enamel slowly bored through her gums. With nothing better to do, I decided to play around with CoffeeScript.

I was up and running in no time, installing the Node.JS Module and browsing the Little Book of CoffeeScript. After about an hour I had effortlessly written some additions to Live Unsigned which integrated seamlessly. To be honest, I feel like a bit of a muppet for not trying it sooner.

After just a couple of days playing around with it, CoffeeScript has now become a major part of my toolkit. The syntax is elegant, nicely lending itself to clean coding, and code can be reused easily, improving project structure. CoffeeScript compiles to pretty clean Javascript, and from what I can make out, the better you understand Javascript, the better CoffeeScript you can write.

So yes, I am now coding in CoffeeScript.

I am now a hipster.

There is nothing left for me but to rush out, buy some skinny jeans and a Macbook Air and learn Vim.

Oh, God.


Note to self: Node Deployment

Posted: October 7th, 2011 | Author: Rob Searles | Filed under: General, JavaScript | Tags: | Comments

This is really a note to me as since Delicious has “jumped the shark” I don’t really know where else to put it.

I’ve been researching automated deployment of NodeJS applications, and found this excellent blog post to help me out:

Deploying Node.JS Apps, by Ben Gourley.

Plus this question on stack overflow on nginx proxying should help me out.

That’s it. now I just need some time to play around with this stuff!

Also, if anyone knows of a really simple, easy to organize bookmarking site please let me know!


JSConf EU – Day 1

Posted: October 1st, 2011 | Author: Rob Searles | Filed under: General | Tags: | Comments

Back home now after a busy day at JSConf EU, brain is pretty melted due to a lot of good talks, so will make this a quick one.

Three things really stood out for me today.

Firstly, Cloud9 IDE. This is a browser based JavaScript IDE, and it looks fantastic. With no setup or configuration needed it lets you just start writing NodeJS directly from your browser. The lovely guys even gave me a premium account free for 1 year! I am going to sign up and start hacking away as soon as I get a chance.

Secondly, even though the Arduino talk was a bit, er, ramshackled, they did talk about the Raspberry Pi. This is a tiny (and I mean tiny) ARM box running Linux. It should be available in November some time, which will be perfect timing for a birthday present to myself!

Finally, Emscripten is very exciting. Emscripten is a compiler that takes bitcode and turns it into JavaScript. From what I understood, this is what made repl.it possible, which I saw yesterday in Hacker News and thought was so cool I bookmarked it!

As there were two tracks I did miss a bunch of talks, but I’m sure they will be availble on the website soon.

All in all, good stuff, tiring (especially as some little madam decided to wake up at 5am) but brain is now firing off with a bunch of possibilities!


JSConf.eu Tomorrow = Huzzah!

Posted: September 30th, 2011 | Author: Rob Searles | Filed under: General, JavaScript | Tags: | Comments

This is just a quick post as I’m off to bed for an early night’s sleep. JSConf EU is tomorrow and am one of the lucky few who have in their posession a “golden ticket” to attend. It’s  a jam-packed event starting at an unaturally early 8am! Do they know this is Berlin?! You can’t even buy breakfast at 8am on a Saturday here!

I have high hopes for the conference. Last year I didn’t even attend the main event, just the pre-party on the Friday night and still came away with a load of ideas! One conversation lead me to completely rewrite major parts of the Jabbakam system. Who knows what new thoughts will spark in my head when I actually go to the real thing?

For updates, follow me on Twitter.


PHP: It’s not you, it’s me

Posted: July 28th, 2011 | Author: Rob Searles | Filed under: General, PHP | Comments

This is a minor whinge, and I apologise for that. I don’t post for weeks, and when I do: whinge; moan; complain (not that I’d particularly happy about conforming with the whinging pom sterotype).

Anyway. this is about PHP.

Frankly PHP, you’ve served me well. I remember being pried away from Perl when you were only 3. With 4 you had me, and 5 I thought it couldn’t get better. But after 13 years of you being my primary language, I’m sorry to say that I’m going to have to move on.

It’s not you, it’s me.

Yes I know you have some spangly new namespaces and finally ridding yourself of your childish toys, but that’s not enough for me anymore. I’ve been dabbling with other languages. Node, Python, Lisp, Haskell and indeed Lua* and, well, frankly they are more fun. Sure, I’ll visit, especially as Jabbakam, Live Unsigned and Doolali are all mainly written in PHP, but I’m sorry to say, and how do I put this delicately… you’re just not exciting any more.

So, whilst this is not goodbye, it is an auf wiedersehen.

To paraphrase: so long PHP, and thanks for all the fish.

* Footnote: my brand spanking new daughter is called Lua!


Testing Charm, a console based blogging application

Posted: July 7th, 2011 | Author: Rob Searles | Filed under: General | Tags: , , | Comments

One of my favourite blog is Motho ke motho ka botho. It’s all about Linux and getting the most out of old and low powered machines. As you probably expect, it heavily promotes console based applications – which is great for me and my continual search for lightweight efficiency (read as happily playing about with new things and possibly not getting too much done).

In the list of software is a little application called Charm. This is a console based publishing tool for (amongst others) Wordpress. Well, I had to give it a go – which is exactly what I am doing right now. It is pretty simple to set up, and fortunately allowed me to switch my editor from Vim to Emacs (and start flamewares…now).

I still have to have a good poke around, I don’t know if it can schedule posts, or save as drafts etc etc, but so far it looks pretty good. I also want to test out Emacs’s Weblogger Mode, the quest for my console based utopia continues.


Live Unsigned Sponsored by 6Sync

Posted: May 13th, 2011 | Author: Rob Searles | Filed under: General | Tags: , , | Comments

A number of weeks ago, the lovely people at 6sync were nice enough to host Live Unsigned*, in exchange for a plug or two on this blog.  To me, this seemed like a very fair exchange, also it meant that I had a nice clean server which I could set up just as I wanted so as to handle the increasing traffic Live Unsigned is getting.

Over the next few posts I’ll be outlining how I set up the server, along with any issues and gotchas, plus I’ll most probably be talking about Biscuit – 6sync’s control panel.

For all you cynics out there, don’t worry, I’ll be maintaining my editorial integrity. This blog is not going to turn into one big advert! But, I do want to say a big thanks to Mario and the 6Sync team.

* For those of you that don’t know, Live Unsigned is a weekend project that my girlfriend Elizabeth and I are running in order to keep ourselves sane!


Amazon S3: easily bulk delete buckets

Posted: May 11th, 2011 | Author: Rob Searles | Filed under: General, Linux, Tutorials | Tags: , | Comments

With Jabbakam we save a lot of images. All these images are stored in Amazon’s S3. Recently I thought I’d delete some of the test buckets.

Not as easy as I first thought. It turns out that you have to empty buckets before you can delete them. Fair enough, but there didn’t seem to be a way to easily bulk delete hundreds of images.

After some Googling I found Robert LaThanh’s S3Nukem which looked like it would do the job. All I needed to do now was fire up an EC2 instance, install and run. The steps were as follows:

  1. Create an EC2 instance on AWS (I used Ubuntu on a medium instance)
  2. make sure it is all up-to-date
    apt-get update
    apt-get upgrade
  3. install ruby (if not already installed)
    apt-get install ruby1.8 ruby1.8-dev

    (not sure about ruby1.8-dev, but added just in case)

  4. install Ruby Gems
    apt-get install rubygems
  5. install right_aws and s3nukem
    gem install right_aws
    cd /tmp
    wget http://github.com/lathanh/s3nukem/raw/master/s3nukem --no-check-certificate
    chmod +x s3nukem
  6. run
    ./s3nukem -t 20 -a  -s

Several hours and over 15 million deleted images later it was all done and I shut down the instance.


Testing Tumblr with Berlin Birdbox

Posted: March 3rd, 2011 | Author: Rob Searles | Filed under: General | Tags: , | Comments

I’ve head a lot of stuff about Tumblr recently and how easy it is to update. As you can see from the blog you’re reading right now, I need all the help with keeping things up-to-date so I thought I’d give it a try, so I did.

Obviously, being the lead tech geek at Jabbakam I had to do something involving IP cameras, so I found an old Axis camera we had lying around the office, pointed it at the birdbox we have at home and started recording. BerlinBirdbox was born.

If any of our feathered friends decide to make our little birdbox their home, hopefully the camera will record it, upload it to Jabbakam and then I can post it onto Tumblr. I might even mash up the APIs to get it to auto post…. but possibly another day!

Until then, stay tuned to the BerlinBirdbox.


Fix: Cannot load from mysql.proc. The table is probably corrupted

Posted: February 17th, 2011 | Author: Rob Searles | Filed under: General, Linux | Tags: , | Comments

Following from my dependency hell problems the other day my new version of MySQL seems to have all its stored procedures corrupted, displaying the following message when any of them are executed:

Cannot load from mysql.proc. The table is probably corrupted

After a bit of research, I found the simple fix is to run

mysql_upgrade

Problem solved.

Posting it to my blog as a reminder to me to RTFM, and just in case it is useful to some other poor soul out there.