Author Archives: taskinoor

WebGL: More Drawing Tools

For the last few days I am learning WebGL (and OpenGL too) as a hobby. As part of the learning process I have decided to convert some examples of OpenGL programs to WebGL programs. The book that I am reading … Continue reading

Posted in Graphics, WebGL | Tagged , | Leave a comment

WebGL: Getting Started: Drawing Figures

For the last few days I am learning WebGL (and OpenGL too) as a hobby. As part of the learning process I have decided to convert some examples of OpenGL programs to WebGL programs. The book that I am reading … Continue reading

Posted in Graphics, WebGL | Tagged , | 3 Comments

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 | 8 Comments