View ONE.ts
import { TWO } from './constants'
export const ONE = TWO - 1 // i.e. this evaluates undefined - 1
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
.country {
fill: #C0D9AF;
stroke: #fff;
stroke-width: 1px;
stroke-linejoin: round;
View generators.js
Array.prototype.toIterator = function*() {
for (var i = 0, l = this.length; i < l; i++) {
yield this[i]
} = function*(lambda) {
for (var value of this) {
yield lambda(value)

Constraining is more important than dreaming big

I have a tendency to generalize and widen the scope of whatever I'm thinking and writing about.

Earlier today, I was thinking about writing research articles. I was considering the process and thinking about each section (executive summary, introduction, background, experiment, results, conclusion...).

I was so inspired I proceeded to write a draft, and after 5 minutes or so, I realized that it would take days to do this properly.

Hence I thought, constraining is more important than dreaming big.


Writing good study questions: focus on intent rather than correctness

When I write a study question, I think everyone usually starts with pretty good intent first.

For example, this is a question on the command pub upgrade for the Dart language.

To [upgrade dependencies to the latest version] in Dart, [pub upgrade]

The way of the substack

With over 200 modules in npm, and many such as browserify, dnode, optimist, etc. relied upon day-to-day by developers all around the world, substack is a pretty damn productive guy.

Plus, he's got an awesome philosophy on programming to boot (yes, there is a programming philosophy! ... no comprende? Let me explain later).

BTW, how do I know this? I got to talk to him at campjs as he wrote & published a module (lexical-scope to be exact). He was super friendly and shared alot of his thoughts on many topics.

All in all, it was really cool to meet someone that's completely congruent with what he says & lives out as a programmer. It almost felt Bret Victor-like.


Oz Big Data (Feb 2013) Meetup

Hadoop is based on MapReduce algorithm.


  • MapReduce is a method of parallelising data processing on several machines.
  • Map = take input and produce key value pairs
  • Reduce = aggregate values with the same key
  • Example is counting words across many documents.

Making Javascript faster

This is a list of guidelines to make your Javascript faster, often associated with jsPerf benchmarks.

Profile before optimizing

If you have an existing codebase, don't get carried away with premature optimizations. Profile to find the slow bits and pick the low hanging fruit.

Some of the latter lessons in Code School's Chrome DevTools course will teach you how to profile your code.



A flex container expands items to fill available free space, or shrinks them to prevent overflow. It only works well in Chrome at the moment.


<!DOCTYPE html>

Why or why not Dart?

This is my analysis of the Dart language. Overall, some parts I like, some parts I don't like and my overall view of it all.

My background

Depending on what my employers have required on the backend, I've used C#, node.js, PHP, Python & dashes of Ruby. I personally enjoy Javascript, and I'm especially a fan of node.js. I also really like CoffeeScript, and now that it has source maps, it could very well become something I use daily.

Below are my thoughts on Dart: