When working on a project we normally decide on a Javascript library and stick to it. Sometimes for one reason or another there just isn’t anything we can do and a second library needs to be introduced. If you’ve ever tried this, you know that if you’re not careful you will have a hot mess on your hands.

Recently I was working on a project where all the Javascript worked fine in the static templates, but had issues when integrated with the CMS. The templates were using jQuery and the CMS was automatically adding Prototype to the page output. First thing I say is, “No problem, I’ll just use jQuery’s noConflict mode.” After making the change I was still seeing errors. After digging around I saw that our site’s main Javascript file was using the $ variable… hmmm…

To make your life easier wrap your code in an anonymous function and pass the jQuery variable in. This is probably more obvious if you’re writing some code others will use like a jQuery plugin, but could help save your ass down the line.

This is what your site’s main.js probably looks like

$(document).ready(function() {
    // Do awesome stuff...

Adding the anonymous function and passing the jQuery variable in will prevent problems later with the $ variable.

    $(document).ready(function() {
        // Do awesome stuff...

Actually I picked this game up on Ken‘s suggestion and am really glad I did. This game is more than good, you need to play this game.

The easiest way to describe this game to other gamers is to say it’s very reminiscent of Super Metroid. Current generation gaming (or laming if you read the last post) means this isn’t a 2D sprite based adventure though. This game uses the Unreal Engine and it looks very good for a $15 downloadable title or, for that matter, a full $60 adventure game. While the environments are all rendered in 3D, the playable character moves more or less in 2D within a room.

So what makes this game work? I would say it’s all the same things that made its predecessors so much fun. To me the exploration was a big part of it. Your character is essentially a regular guy who finds himself in an underground military complex. As he finds equipment like bombs, missiles, and other tools this allows him to explore areas previously unavailable to him. The other part I liked was the solid control scheme.

Anyways, I played the game from start to finish twice already for a total of 15 hours of gameplay and will probably play it through once more to see if I can get that minimalist achievement. Check out some gameplay videos or download the demo and give this thing a try.

I recently needed to work with Unicode and multi-byte characters in my code.  The following configuration worked great for me.  Most of it appears in the VIM wiki, and then I set the guifont properties.

if has("multi_byte")
  if &termencoding == ""
    let &termencoding = &encoding
  set encoding=utf-8
  setglobal fileencoding=utf-8 bomb
  set fileencodings=ucs-bom,utf-8,latin1
  set guifont=Lucida\ Console:h11
  set guifontwide=NSimSun:h14

You may want to play around with the fonts and sizes to suit your needs.  Remember to escape the spaces in font names.

Read also: http://vim.wikia.com/wiki/Working_with_Unicode

Ken and I have been talking a good deal about Super Street Fighter 4 these days and I admit, I’m excited. We’ve been playing the original SF4 Friday nights and Ken has been capturing them as part of a Street Fighter 4 Casual Fridays initiative. We’re not always on top of our game, well they are only casual matches.

We’ve fought each other a few hundred times I would say so there’s more going on that you can see… anyone that has fought a particular opponent many many times knows exactly what I mean. Below is a sample of a few of our fights, he’s got more on his channel as well. My gamertag is Gutzman and I’m the character on the right.

Anyways, anyone else getting excited about SSF4?