Coder's Block

Will Boyd's Portfolio

Jan 26

JavaScript Function Methods: apply()

This is the second part of my three-parter on JavaScript function methods. Last time I talked about call(). This time I’ll talk about apply(). Invoking Functions with apply() apply(), like call(), is used to invoke a function. The difference is that call() takes a list of arguments, while apply() takes a single array (or array-like...
Jan 23

Via Twitter for iPhone

RT @wiseacre: Pro tip: Mathematically balanced (e.g. aligning an object to another in code) is not the same as visually balanced. http://t.…
Jan 21

Via Twitter Web Client

Someone on LinkedIn asked me if Coder's Block was hiring. Sorry guy, Coder's Block is just my personal site...
Jan 19

JavaScript Function Methods: call()

In JavaScript, all functions are objects, which means they can have their own methods. In other words, your functions can have functions. JavaScript has 3 built-in function methods of particular interest: call(), apply(), and bind(). This article is the first of a three-parter covering them, starting with call(). Invoking Functions with call() The call() function...
Dec 31

Looking Back at 2014

Yep, this is my retrospective post for 2014. But first, let’s revisit my thoughts on 2013: Fuck 2013. — Will Boyd (@lonekorean) January 1, 2014 Yeah, 2013 was a rough year. 2014 was better. Career Stuff I left Amazon to work for POP. Very different atmosphere. I went from working on a single project at...
Dec 30

Via Instagram

Spotted a rabbit outside. Stay warm, little guy.
Dec 13

Align 4 Game

The classic game, played against an AI opponent. Applies the minimax algorithm to pick its moves. Coded as a multi-threaded app using a web worker. Web workers require code to be executed from separate JavaScript files. The code here is the UI thread. If you want to see the web worker code, check out Align 4 Game (Web Worker). Higher difficulty levels are computationally expensive, so the computer's turn may take a while, especially on mobile devices. Blog post: Align 4 Retrospective: Writing a Multi-Threaded Game in JavaScript