Rails + Webpacker Deployments on Heroku

A few weeks ago I decided to take the leap and implement Webpacker into an existing Rails project. Initially this seemed like a great idea and almost too easy thanks to the rails/webpacker project. After a couple of hours I had everything working and some existing React components migrated from a custom compile system to the asset pipeline. Deploying to staging had a few minor hiccups, but nothing major and the project was ready for sign-off and production release.

Model Errors in EmberJS

Today, I spent longer than I feel comfortable admitting solving a supposedly simple problem in my EmberJS application. Since this particular issue was so frustrating and undocumented I'm going to share my experiences in case someone else comes across the same hair-pulling nightmare in the future.

Free Hosting with Github Pages

I've been meaning to try out Github Pages for quite a while, but never had a project that was suitable as nearly all of my work is built on a custom back end server. I also wanted to get a few old projects online to share the code so people can maybe do something cool with it.

It's September already?

Where has the time gone! I've been working at my new job for almost a whole month now and it still feels like I've just started! For those of you that don't know I'm now a programmer at Performance Horizon which is pretty awesome; quite the change from flash gaming! It's also the main reason I've been neglecting my personal projects and blog updates to concentrate all the cool things I've been working on.

How to Rename a Field in MongoDB

Since MongoDB is technically a schema-less database, there aren't fields or columns that you are used to in things such as MySQL, and certainly no decent applications for managing data easily. Luckily, MongoDB has a lovely command shell which can be queried using simple JavaScript. The below command will rename a field, if you named it wrong in an initial stage of your app, like I've done a few times while learning.

JavaScript Racing Game Prototype

I've just finished working on the first prototype for my up and coming racing engine written in JavaScript. It's nowhere near finished, but it gets the simple concept across of where this could be taken. Right now it's not a game at all, it's simply an engine which can be used to make a game. I wrote a basic one track map, with dumb AI cars and a player controlled car to show some of the functionality. Please excuse the bad graphics, I will be improving them later as the project develops.

Introduction to Node.js: Building a Web Server

Lately I've been looking into different technologies for making real time communication better for my sites, games and apps. Node.js has been around for a while now, but it still doesn't seem to be picking up any traction in terms of it becoming widely adopted or used in big applications as far as I can tell. I've wanted to use it for quite a long time now, but never had the time. Lucky for me, I will be working on a project at work which requires real time communication so this is the perfect time to learn node and share my experience!

Pixel Perfect Collision Detection in JavaScript

I'm working on a simple game to refresh my canvas knowledge. I decided to built the game entirly in JavaScript, which isn't easy to do due to the fact it isn't designed for that purpose. There are no nice little helpers like drawing, object rendering, and most importantly collision detection. I've decided it would probably be easier to use an engine, but since you all know I hate using libraries or engines unless really necessary, I've decided to go about doing all of the code entirely myself from scratch. After a bit of playing around, and some memories from maths lessons in school I figured out how to do collision detection in raw JavaScript code, which I'm going to share with you

Advanced Object Binding in JavaScript

For way too long now I've taken advantage of the amazing bind method build into the Mootools core framework, so when I started using jQuery for a client, I was shocked at how basic the code was in comparison. I'm going to write a whole new article on that topic tomorrow, but for now my focus is object binding. I'm going to explain what it is, where to use it, and how to get it to work in jQuery without breaking anything!

Detect Selected Radio Input in JavaScript [Mootools]

A collegue brought up an interesting subject today at work; how do you detect which radio button out of set has been selected in JavaScript? This is the first time in a few years I've been stumped on a JavaScript question, so I was quite annoyed! The last time I used a radio button must have been on a MySpace voting pole widget back in the day. So I had my challenge, and I was determined to find out.