i m steve

Unbiased Shuffle - Fisher-Yates Shuffle Algorithms

Sun 08 Sep 2017
The Game In a lucky draw game, say there are 3 prizes and 5 candidates. We put each of their name on a small piece of paper and drop them into a container. The game host will draw 3 papers from the container one by one randomly, and on each successive draw, the drawn paper will be PUT BACK into the container for the next draw. Name written on the drawn paper will be given the prize.
Read more

Callback, Promise, Generator in Nodejs

Sun 06 Dec 2015
Nodejs is a javascript runtime built upon Google’s V8 engine which features event-driven & non-blocking IO model, making it a good option for writing scalable & efficient web applications. Callback If you have ever written Nodejs code, you will be so familiar with callbacks. It’s a functional parameter passed to a method call, where it will be called only when the operation is done or failed. e.g. var fs = require('fs'); // fs.
Read more

Getting Your Feet Wet With Go

Sun 30 Aug 2015
GO is an open source programming language created at Google which has been getting alot of traction recent years. It aims at becoming a language that’s easy to write, efficient, built-in concurrency support, and garbage-free, yet also able to cross-compile for different platforms. Why the HYPE I guess… It’s developed at Google, so golang is already blessed. With Google’s experience in building things at scale, the language design should have already considered the scalability & concurrency perspective.
Read more

On Choosing Django Packages

Sun 19 Apr 2015
Lately, been developing on django alot and this is to document my thought process when choosing django packages. In fact this is also how I determine what open source projects to adopt and not just limited to django. Figure Out Available Choices To determine what packages are available for a particular feature/function, Django Packages is a really great site for that purpose. Pick the category you are after, and it will show you comparison table of all the available packages.
Read more

Putting on Headphone

Sun 02 Nov 2014
I like putting on my headphone whenever I want to stay focus. It happens a lot when I m coding. For most of the time, I don’t play any music like the others do. The headphone is just there to help shielding out some outside noise especially those that can get me distracted, and it also makes people less likely to interrupt when they see me with the headphone on unless it’s something urgent or important.
Read more