Pong: Built with Sencha Touch

How many of you played Pong when you were little? I’m old enough to remember playing it in the arcade and on my Atari 2600. I’m such a nerd that I decided to recreate Pong using Sencha Touch!

I did some searching on the interwebs to find the original Pong AI algorithm… but it seems like everyone and their mother has a different take on it. I’d love to hear your thoughts. How can I improve this game? Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Algorithms, Sencha Touch | Leave a comment

Book Review: Learning HTML5 Game Programming

I was nine years old when I got my first game console for Christmas: the Sega Genesis.

It was the start of many years of my life that revolved around video games. And while I never became you’re typical gamer (and my game-playing has dropped to virtually zero these days), I have a high appreciation for the game development process.

As someone who works almost exclusively in the HTML5 web application world I saw Learning HTML5 Game Programming and thought “This is going to be a really cool book!”
Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Book/Product Reviews | Leave a comment

Automating JavaScript Unit Tests with Git

How many of you JavaScript developers out there write unit tests?

The key to unit tests is that they’re run EVERY TIME you touch your code… otherwise your tests aren’t going to do anything (obviously). If your tests don’t do anything, there’s no point in having them.

I’d like to share an example app in which I create a bash script that runs my unit tests via PhantomJS. By utilizing a Git pre-commit hook, I ensure my unit tests are run EVERY TIME I touch my code, and (best of all) it won’t allow me to commit code that doesn’t pass my tests! Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Sencha Touch, Web Development | Leave a comment

Book Review: Algorithms, 4th Edition

When I was in college I had the (dis)pleasure of taking a graduate-level class on algorithms. Although I loved the content, I did not have enough practical experience to make the most of the material.

That’s why I was really excited when Pearson Education offered me the chance to review Algorithms, 4th Edition. In the eight years since I took that class I’ve learned a lot about software engineering… this would be a great opportunity to see if I had learned as much as I thought! Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Algorithms, Book/Product Reviews | Leave a comment

4 Lessons from GoDaddy / #SOPA

If you are in any way involved in web development (or follow internet-related news), you have probably heard about the GoDaddy/SOPA saga. As a longtime (now former) GoDaddy customer, I have some thoughts I’d like to share. I will try … Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Random | Leave a comment

2012: New Year’s Resolutions

It’s that time of year again… and although I probably need to lose a few pounds, I have a few other goals in mind for 2012.

Reflecting on how my professional goals have matured over the past few years, I can definitely see progress. Here’s hoping that 2012 brings more success! Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Random | 1 Comment

JavaScript: Selection vs. Insertion Sort

“Selection Sort” and “Insertion Sort” are two popular sorting algorithms. If they have the same Big-O notation, which is better?

The point here is that Big-O notation, although certainly helpful, doesn’t always tell us the full story. It’s great to know what the worst possible performance is for our code… but we need to know how often to expect that situation. Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Algorithms, JavaScript | Leave a comment

Product Review: Eye Strain Reducing Computer Glasses

Over the past year, I have had the pleasure of flying all over the United States for business. Unfortunately I never get to fly First Class… which means I am rarely comfortable enough to sleep. The result is that I get lots of work and reading done during my flights.

Like most travelers, I usually glance at the SkyMall magazine and wonder who (if anyone) actually buys that stuff. But on a recent flight one product did catch my eye: the Eye Strain Reducing Computer Glasses.

You may be asking yourself, “Why, of all things in SkyMall, did these glasses speak to me?”. The answer is that I have been wearing similar products for a few years now. Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Book/Product Reviews | Leave a comment

JavaScript: Binary Search vs Linear Search

The linear search algorithm is often “good enough” for most applications. Although optimization would improve performance, the benefit might only be minimal if our data set (stored in an array) is relatively small.

But what happens to our algorithm as the data set increases in size?

I put together a short example comparing the expected (worst-case) and actual performance of these two search algorithms. Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in Algorithms, JavaScript, Web Development | 1 Comment

JavaScript Encapsulation

I recently had a discussion with a colleague about encapsulation. We lamented the fact that many developers cannot adequately define, describe or otherwise communicate the concept during the interview process – even at the “senior developer” level.

After our conversation, I went home and Googled “JavaScript encapsulation” just to see what came up. After seeing the search results I am not at all surprised that few JavaScript programmers really understand the concept. I didn’t feel satisfied by any of the examples or definitions I found, so here’s my crack at explaining things. Continue reading

Share and Enjoy:
  • RSS
  • Facebook
  • StumbleUpon
  • Digg
  • Sphinn
  • Technorati
  • Reddit
  • LinkedIn
  • Twitter
  • Tumblr
Posted in JavaScript, Web Development | 10 Comments