Junda Ong

aka @samwize ¯\_(ツ)_/¯

  • About
  • Quotes
  • Archives
Google+ Twitter GitHub RSS
Feb 12th, 2014
Mac
Comments

Know the Actual Exact Commands for an Alias

Since I use Dotfiles, which comes bundled with many alias, it is easy to lose track of the exact commands an alias refers to..

This morning, I typed gl on my zsh bash, thinking it is git log, but turned out it is git pull..

Continue reading →
Feb 11th, 2014
iOS
Comments

Camera Programming for iOS 7

Apple’s Camera Programming Guide for taking pictures and movies is outdated.

It was last updated on 2012-07-17 (as of writing), and this doesn’t take into account of new stuff eg. iOS 7 changes and ARC

Continue reading →
Feb 9th, 2014
Node
Comments

Guide to Creating a Command Line Tool With node.js

Ever wonder how after npm install, you could use the installed tool on the command line, as if they were added to your bin?

For example, after installing mocha, you could run mocha on your command line directly.

This is a guide on how to do that.

Continue reading →
Feb 8th, 2014
Node
Comments

A Guide to Mocha’s Describe(), It() and Setup Hooks

Mocha is a wonderful testing framework for node.js, however the documentation seems to be lacking.

When I first begin to write in Mocha, I had many questions:

  • what exactly does describe() do?
  • what is the effect of nesting describe() multiple levels?
  • is describe() a test suite, and it() a test case?
  • where should I place before() and after() hooks?
Continue reading →
Feb 7th, 2014
Git
Comments

Add Git Submodule to a Local Repos Url

I was adding a submodule which is local.

I didn’t push to a remote because it is not necessary for my project. It is just some data files that I wanted to track the changes locally. Yet, I require it in the main project repository.

A supposedly simple operation, but I met with some problem.

Continue reading →
Feb 6th, 2014
iOS
Comments

Mobile Developer Economics 2014

The 6th edition of Developer Economics series for Q1 2014 is released today.

There are always great insights to the trend of mobile development as they surveyed with 7,000+ developers.

I am highlighting some salient points for 2014.

Continue reading →
Feb 5th, 2014
Node
Comments

Relative Path When Using Require and Fs for node.js

When using require, the path is relative to that source file (NOT root directory).

When using fs, the path is relative to process.cwd() (NOT that source file).

The relativity is different, yet should be a good design from the node developers. If you always require a certain file, perhaps put it in node_modules.

Jan 31st, 2014
Node
Comments

The Best Documentation Generator for Node

After researching on the various modules available, I find the best documentation generator is JSDoc, and also Docco.

Yea, you can use both simultaneously.

Continue reading →
Jan 29th, 2014
Node
Comments

Mocha - the Most Popular Testing Framework for Node

Mocha is a simple yet wonderfully designed testing framework for Node.js.

In agile development, developers write tests before implementing a feature. When you are discussing a story for a feature, you should already be writing the test cases.

Continue reading →
Jan 27th, 2014
Node
Comments

Use Async Library to Improve Your Spaghetti-nested-asynchronous-functions

One of the most terrible thing about Node.js is that almost every function is asynchronous.

Unlike synchronous programming where you have results returned right from a function call, in asynchronous programming, you need to deal with a lot of callbacks.

Fortunately, async library comes to the rescue.

Continue reading →
Prev Next
Blog Archives

Copyright © 2015 - Junda - Powered by Octopress

Design credit: Shashank Mehta