Browserify Unit Testing

Time for the second part of the small unit testing guide that started with this post. In the first part, we’ve introduced a very basic function that calculated the age of a person based on a parameter that represented the year of birth. Before making the calculation, the parameter was checked to make sure it’s a number and if it wasn’t the function threw an error. Both use cases are small and perfect to have some test written for them so let’s begin.

Continue reading

Browserify Unit Testing

Returning to Javascript is always fun and scary at the same time. Lately I’m working on a web application and I wanted to make the experience less scary so I’ve invested some time to the tools that all the cool kids use, Grunt, NPM etc. Through this process I’ve discovered Browserify and I was so, so, so happy with the way it handles dependencies. At last I was able to divide my code in countless little js files. I had some fun with it until I’ve decided to add unit tests. I’ve already had some minor experience with Jasmine so I started messing around with Grunt to make it run my browserify-based tests. That’s when the hair pulling started.

Continue reading

Multi-Screen CSS

It’s been some time now that I’m working on a simple game for mobile devices and I’ve chosen Phonegap to build it. Usually when you dive into a new technology and start learning it you discover a lot of problems and you become extremely happy when you solve them. So in this post I will try to describe how I’ve managed to organize my CSS code to make the application adjust to different devices and at the same time minimize the changes I have to make to other parts of the application (like HTML and Javascript). It’s a fairly new problem I’ve encountered so a lot might change to my solution but if that happens I can always post a second article.

Continue reading

Calling GWT from Flash

In a world where HTML5 is advertised as the solution to every problem, someone would think that you will need nothing more to create a web app based on data and media. Unfortunately the reality is somewhat different. Stream Pod is a fine example of such an application, it’s an audio player which is based on your search terms to find what it will play. The audio player in Stream Pod is using Flash as the core technology and the reason for this decision was the need for fast development without a lot of browser headaches. There is some great work being done with media in the HTML5 world but personally I would use it as a fallback to Flash for these use cases at the moment.

Continue reading