Simia Code
How to JSDoc?

How do you document your JavaScript? I use JSDoc. It's a tool which goes through your source code, looks at comments, and generates a set of HTML files. It's human readable even without generating the documentation. And because the documentation is in comments, it is less likely to become outdated as your code evolves.

SPS Final (For Now) Update

This is the third update for the simian photo server project. I finally got the server to generate thumbnails and preview images without crashing my laptop, and now sps displays the actual thumbnails, and the selected picture in the details view. Also visible is the exif data for each picture. Plus, sps now manages camera raw images as well. Most of this is thanks to the wonderful imagemagick library, which will need to be installed on the target machine.

SPS Update 2

When I started this project I intended to publish an update every day as I made progress. But neck troubles and an apartment hunt kept me too busy to publish updates, or for that matter, make as much progress as I would have liked. Still, just a few hours short of 2 weeks, here is the status.

SPS Update 1

Here's the first project update for Simian Photo Server. It has been a little over 24 hours since I started the project and at the moment the status is thus

Simian Photo Server

Yesterday was my last day at the office, and I have two weeks free before I start the next job. So of course I decided to start a new node project. I am going to try to build a bare bones photo server for use on my media server, and I have given myself two weeks to do it :)

Goal Function

Here's a puzzle I recently came across. We need to implement a function g as follows

Currying in JavaScript

Currying is the process of converting a multi-argument function to a series of single-argument ones. For example:

JavaScript Promise Cheat-Sheet

Promise is a new JavaScript feature standardized in ES6, although it has been implemented by various libraries for a while now. It is a way to manage asynchronous code, letting you easily translate nested callbacks into a 'do foo. Then do bar, followed by baz and then boobliboo'. You can achieve the same effect with or without Promises, but Promises make it much simpler.

Goodbye Wordpress

I have been using Wordpress to drive my website ever since I got the domain name in 2006. Wordpress has only become richer and more feature-rich during this time. But owing to this popularity and perhaps its design, Wordpress has also become a prime target for hackers. Or so has been my experience at least. The attacks are not sophisticated at all, just brute forcing of the login page. But they are incessant; My webhost even had to make my login page non-executable to stop the barrage of login attempts.

Introducing Compute

Compute provides an implementation of observable, and observable-array. Compute also lets you define relationships among these observables. Compute is compatible with knockoutjs, to the extent that it will use knockout's observables. Here's some sample code:

A HAML, SASS, CoffeeScript boilerplate

Here's the repo To use it, clone the repo to your disk, then delete the .git folder by running $rm -rf .git

Powered by Metalsmith and swearing.