Author Archives: taskinoor

The relation between Integer Partition and Pentagonal Numbers

A partition of an integer n is defined as a way of representing n as a sum of positive integers where the order of the summands does not matter ([1]). The partition function p(n) denotes the number of possible partitions … Continue reading

Posted in Algorithm | Tagged | 2 Comments

The Abuse of Design Patterns in writing a Hello World Program

“One comment I saw in a news group just after patterns started to become more popular was someone claiming that in a particular program they tried to use all 23 GoF patterns. They said they had failed, because they were … Continue reading

Posted in Design Pattern | Tagged | 16 Comments

Singleton in multi-threaded environment

The code posted here should be considered as pseudo-code, no particular language is assumed. And also it is assumed that the reader is already familiar with the Singleton pattern, i.e. I am not going to discuss what is a Singleton, … Continue reading

Posted in Design Pattern | Tagged | 5 Comments

Encapsulate a family of algorithms using Strategy Pattern

The scenario Suppose we are writing a game where the world (or at least some part of it) is full of evil (sounds familiar?) and the goal of the player is to free the world from the grasp of evil. … Continue reading

Posted in Design Pattern | Tagged | Leave a comment

AS3: Inline graphics using Text Layout Framework

A little bit of history Few days ago I was working on something which required graphics and text in same line. The text and graphics were fully dynamic. At first I thought it’s a 15 minutes work, as TextField supports … Continue reading

Posted in AS3 | Tagged | 9 Comments

Compiling the Linux kernel

This is actually a very old writing. I wrote this back on 2007 in my old blog (which is now deleted). I was building my own Linux From Scratch and needed to compile the kernel as part of that. Later … Continue reading

Posted in Linux | Tagged | 1 Comment

AS3: Load assets dynamically for better performance

Asset management is a crucial point of every game. These assets may include bitmap images, audio and video files, animations, 3D models etc. etc. Depending on the size of the game there might be hundreds of such assets. How these … Continue reading

Posted in AS3 | Tagged | 5 Comments