It’s summer vacation and as always, it’s good time to look into something new and interesting in the web! Past few months I have been looking for some hosting provider for my node.js projects. It’s actually not so trivial as most of the sites are in closed beta (I know, they claim they are in public beta but it does not help if the access is given only for handful of people). Also, I did not want to start setting up Amazon AWS environment or anything similar since it’s too time consuming and I don’t want to manage the whole server setup myself.

So, finally I found Cloud Foundry; it’s REALLY in public beta, it’s a great place to host any node.js projects and it’s free (at least for the time being)! After some tinkering, I got it up and running and decided to post a little tutorial how to get it up and running on my Windows development environment.

Read the rest of this entry

, , , , , , ,

Today, I struggled to find the piece of code I have been using to trigger DOM Ready event. I don’t want to load any big chunky libraries just for this purpose so over the years I have developed a robust, yet simple cross-browser compatible method for this purpose. It is based on many tips & tricks found all over Internet. I can not take the full credit of this piece of code, but I’ll post it here anyway so I can find it more easy in the future! Hope you’ll find this useful as well!

Read the rest of this entry

,

I have been programming past few days an isometric game engine for JS utilizing HTML5 canvas. During this project, I had to take look into timers of JavaScript. So, as you know, there are two timers available: setInterval and setTimeout. After playing around a bit with these two methods, I decided to write little helper class (TTimer) for playing around with those timers. My aim was to:

  • Make single unified interface for working with JS timers of any type
  • Define dead simple interface for attaching event listeners for most crucial timer events such as start, stop and “tick”
  • Make this class simple to use, but also flexible enough to be used in bigger projects where timer queues and “easing” options are needed (I will not cover those subjects in this article)

Read the rest of this entry

, , ,

During past few months I have been looking financing for one of my ventures and have been suggested to look at crowdfunding as an option. My initial though was bit skeptical as my knowledge regarding crowdfunding was clearly outdated; in my world, crowdfunding was associated with microfinancing communities in developing countries through organizations such as Kiva, collecting money for charities or any other similar projects.

Now, I had some time to really investigate what crowdfunding has to offer and I must say I am pretty amazed how much the scene has been developing during the past few years! Apparently all my previous dubious thougths related to crowdfunding was wrong. After careful study on the subject, I firmly believe crowdfunding is going to revolutionize the financing for:

  • Communities – Community driven development projects, charities, or any other money collecting for good causes
  • Creative Projects – Independent artists, groups or individuals creative projects; Innovative products and inventions
  • Crowded Markets – Projects in crowded market segments where project financing, publishing and marketing has been traditionally dominated by established industry players
  • SMBs – Small and medium sized businesses

Read the rest of this entry

, ,

In my previous post I was explaining how to load binary file cross-browser way in Javascript. I was about to write about the actual binary data handling methods and new innovations in that area, but I though it might be useful for me to discuss first about Internet Explorer problems related to binary data handling.

IE XMLHttpRequest.responseBody Investigated

First of all, IE will get the binary file perfectly using the methods I described before. However, this data is very hard to access since IE treats this binary data in very difficult way. If you debug the DOM of IE you can see that XMLHttpRequest.responseBody is an array of unsigned bytes, but there is no way you can access this data directly from JavaScript! In other browsers, the data is available as string (of bytes) and is very easy to play around with.

Read the rest of this entry

, , , , , , , , , ,

Recently, I have been working on a project that involves manipulation of binary data. And I wanted to do all this data manipulation in the browser so I had to do some deep study about current status of binary files loading in Javascript. Like always, there are golden bits of information scattered all around the Internet, but for some reason I couldn’t find single source of information where this binary data reading is explained in full detail. So, here it comes!

GetBinaryFile Function

I developed single function “GetBinaryFile” that does just what you can expect: It will fetch the binary file from given url! This script features:

  • Use of XMLHttpRequest for the requests. It is therefore limited by browser to work with files within the same domain (same origin) as the web document.
  • Works with all common browsers (I have tested the code with IE6, IE7, IE8, Chrome and FF).
  • Asynchronous file loading mode.
  • Possibility to bypass browser cache for the binary file retrievals.

Read the rest of this entry

, , ,

Hi! I’m Miska Kaipiainen aka Miskun. This blog will be dedicated for programming, tips & tricks, games etc. I started this blog to talk about the various projects I am working on and I hope you will find some of my stuff interesting; maybe even useful for your own projects. You can read all the introduction information from my About page of this blog.

I wish you enjoy this blog, come visit often and be active in commenting the stuff!