Thoughts on CoffeeScript

Tags:

I initially dismissed CoffeeScript as just another silly attempt at making JavaScript not be JavaScript. It probably also compiled the code into some sort of totally wonky JavaScript, too.

However, after thinking about it for a while, I decided to actually try CoffeeScript and see for myself. Now, after using it quite extensively on some projects, I feel I’m qualified to give my completely unbiased, 100% accurate and correct opinion on it.

Read More

My latest project: Battlefield 3 Web Commander

Tags:

Some of you have been wondering why I haven’t been updating.

Well, it’s because I’m lazy I’ve been working on something else:

Behold, Battlefield 3 Web Commander!

It’s essentially a Battlefield 3 server live tracking / admin tool service. It’s powered by nodejs and MongoDB, using libraries Express, Socket.io, Mongoose, Knockout, and a few others.

Do check it out, let me know what you think, and if you own a Battlefield 3 server, be sure to sign up for the beta :)

The dreaded circle of blame

Tags:

One time I was having some issues with my shell of choice, zsh, while using it with tmux.

Now, I decided to pop in on zsh’s IRC channel to maybe get some help.

Then I ran into the circle of blame.

Read More

Get 20% off for tickets to Velocityconf Europe 2011

Tags:

Codeutopia.net readers can now get 20% off tickets to Velocityconf Europe 2011, in Berlin on 8 and 9 November.

Here’s what you can expect:

Velocity, O’Reilly Media’s successful Web Performance and Operations conference is coming to Europe for the first time! On 8 and 9 November, an international crowd of site reliability experts will converge at the Maritim proArte hotel in Berlin to share their knowledge about making websites scalable, reliable and fast.

Attendees can look forward to two exciting conference days packed with excellent keynote speakers and intensive tutorials. Program chairs Steve Souders (Google) and John Allspaw (etsy.com) have invited experts like Theo Schlossnagle (OmniTI), Jon Jankins (Amazon.com) and Jeff Veen (Typekit) to present their success stories and answer your toughest questions on Ajax, CSS, JavaScript, mobile performance and more.

Code after the jump.

Read More

Adventures in Haskell: Dynamic loading and compiling of modules

Tags:

In my latest attempt at using Haskell, I was working on creating a kind of a plugin architecture for my application. I wanted to be able to load haskell code dynamically, without having to restart the main application.

This is doable using the GHC compiler API’s. However, the documentation for it is quite lacking in examples, and while I was able to find an article talking about it to get started, it wasn’t entirely smooth sailing even after that…

Read More

Doctrine 2 and the law of demeter

Tags:

Doctrine 2 makes it very convenient to access related objects in your code: Just do a $entity->getRelatedSomething()->getThingValue();

However, this kind of pattern makes for easy errors when getRelatedSomething returns null – and as a side effect of this, you can end up with a lot of code which checks if the value exists before accessing it.

This in turn can make your code more convoluted because of all the conditionals used. The thing is, this is easy to avoid if you stop violating the law of demeter!

Read More

Why did nobody ever tell me about ssh_config?

Tags:

As someone who uses SSH a lot, I need to remember a bunch of different usernames, identity files and even one non-standard SSH port.

It can sometimes be a bit of a hassle, especially if I need to use a specific identity file or other such, and then need to subsequently remember the pathname to it and all that.

But lo and behold, there’s actually something that can do all of this for you!

Why didn’t anyone ever tell me about ssh’s config file?

Read More