Post-mortem: Battlefield 3 Web Commander

November 17, 2012 – 7:43 pm

I thought I’d write a sort of “lessons learned” thing about my Battlefield 3 related NodeJS application.

As of writing this, the service has been down for several months. The very first idea with it was simply to see if it could be done. Then, the next idea was to see if I could make a few bucks with it. Overall, I’m in the negatives with it, but I had one paying customer so that’s something right there spacer

Continue reading for some more insights…

Read the rest of this entry »

Posted in general | 1 Comment »

How I rickrolled 15 000 people with one email

September 3, 2012 – 5:24 pm

I thought I’d share a funny story from some years ago.

This was when I was subcontracting at a Certain Large Finnish Mobile Phone Maker.

It involved email and rickrolling.

Rickrolling a lot of people.

Read the rest of this entry »

Posted in general | No comments yet, share your thoughts »

Could you use Minecraft to teach programming?

July 22, 2012 – 4:11 pm Tags: Games, Lua, Minecraft, Programming

There are two mods (that I’m aware of) for Minecraft which let you build computers inside the game.

ComputerCraft allows you to have Lua-programmable computers and robots, with basic wired and wireless networking capabilities. RedPower 2 on the other hand has a 6502-like CPU based computers, which are programmable either using 6502 Assembly or FORTH.

What if you used Minecraft and one of these mods as an environment to teach programming?

Read the rest of this entry »

Posted in Programming | No comments yet, share your thoughts »

I made a thing: Planetside 2 minigame

July 8, 2012 – 10:51 am Tags: Games, JavaScript, NodeJS, Planetside2, Raphael

Random ideas and idle hands lead from one thing to another. While waiting for the Planetside 2 (a large scale MMOFPS) beta to land, I decided to make a hex-grid of the game’s map.

Once the map is complete, someone suggests it should be colored in one of the three in-game faction’s colors… then I realize, why not just let the user click the map to change the color of a hex to his favorite faction’s?

End result: In the span of 12 or so hours, thousands of people come to play a game where the sole purpose is to franctically click hexes in competition with everyone else playing it.

Read on to find out what on earth am I talking about, how it worked (hint: node.js) and some thoughts on why it became so popular for a while.

Read the rest of this entry »

Posted in Programming | No comments yet, share your thoughts »

Best practices for building embeddable widgets

May 26, 2012 – 2:55 pm Tags: Ajax, JavaScript, Software design/architecture, Web Applications

With all the embeddable buttons, such as Facebook like buttons, and widgets like Disqus comments and whatnot these days, you’d think there was some nice info on how they are actually built.

But it turns out no, not really. I found this first hand when we had to build some FB like button style things at work, and had to basically invent the whole process myself.

Here’s some ideas and best practices for implementing embeddable widgets in the style of FB like buttons or anything else. Some of this is based on an answer I gave on Stack Overflow on a similar topic.

Read the rest of this entry »

Posted in Programming | 2 Comments »

Is Haskell good for web development?

May 12, 2012 – 2:49 pm Tags: Haskell, Yesod

I’ve been trying out Haskell for developing a web application, using the Yesod framework.

I always found Haskell quite nice, but never tried developing web apps with it. After using Yesod, I’m slowly starting to think that Haskell might be much better for it than many of the commonly used languages like PHP, Python, Ruby or JavaScript.

Here’s why:

Read the rest of this entry »

Posted in Programming | 2 Comments »

5 ways how PHP is better than Node.js

April 24, 2012 – 5:32 pm Tags: NodeJS, PHP

All hail Node.js! Boo PHP!

Except there are various things where PHP is better than Node…

Read the rest of this entry »

Posted in Programming | 22 Comments »

How to run Apache and NodeJS based sites on the same server with Varnish

April 15, 2012 – 7:11 pm Tags: Apache, NodeJS, Tools, Varnish, Web Applications

While developing Battlefield 3 Web Commander, I wanted to keep it on my VPS where I was already running Apache.

Of course I had the option of putting it in a non-standard port like 8080, but it wouldn’t be nice if the URL would be somedomain.com:8080. The second option was ordering an extra IP address from Linode. That would’ve cost me a bit each month, so I didn’t really want to do that either.

The third option turned out to be pretty easy: Use Varnish.

Here’s how I did it…

Read the rest of this entry »

Posted in Programming | 4 Comments »

Nodejs application architecture: Battlefield 3 Web Commander

March 10, 2012 – 8:11 pm

In this post I’ll talk a bit about the architecture of my first nodejs application, Battlefield 3 Web Commander.

In addition to your usual web app stuff, Web Commander talks to Battlefield 3 game servers in real time and has many features related to that. It also displays data from the servers in real time. Because of these, there is a fair bit of complexity to it.

Read the rest of this entry »

Posted in Programming | 4 Comments »

Creating custom dojox.dtl filters

February 15, 2012 – 7:46 pm Tags: Dojo, JavaScript

Dojo’s implementation of the Django Template Language (DTL) is pretty convenient for client-side templating in Dojo applications.

However, sometimes you need to customize formatting of values, or add other custom logic to it. Using a filter for this purpose is quite convenient, but Dojo’s implementation is completely undocumented as to how you would add your own.

Turns out it’s actually quite easy.

Read the rest of this entry »

Posted in Programming | 1 Comment »

Previous Entries
Powered by WordPress Entries (RSS) and Comments (RSS). Theme by Bob, modified by Jani
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.