Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
113 lines (86 sloc) 5.1 KB

Development Log

  • Found out about Node.gitignore. Also, Mark Wolfe talked about a systematic way to start new projects. But, I can't find the equivalent of lein new [project-name]... which sets up whole directories and a testing apparatus.

  • I'm just gonna note down what I did (in the order I wish I had done it):

    $ mkdir new tongue-in-cheek
    $ git init
    $ mkdir src spec
    $ touch .gitignore src/main.js spec/main_spec.js
    $ wget -O .gitignore
    $ npm init
    $ npm i mocha --save
    $ npm test # should be green
    $ git add . && git commit -a
  • There are a number of functional programming libraries in Javascript. There's fn.js, functional.js, mori, and Oliver Steele's functional (details). I picked Oliver Steele's because it looked like it would lead to compact, easy to read and write code. Used a node port for that lib.

  • Picking up my Ruby habit of having a config/boot module. Hmm, functional- node has a weird looking shim... I've seen something similar before, but this is the clearest example.

    //node.js shim
    exports.load = function (parent) { return (function (window) {
    // random javascript
    })(parent || global); };
  • Oh, the project tooling rabbit hole... I want to use Paper.js again (past experience in my socketyballs experiment was nice). But it's a big honking component so I should use Bower... and now the installation is a bit more complicated, but maintenance a bit easier.

  • Moved files around so that doc/ contains all documentation and is thinned out.

  • Adopted the "architecture design record" practice; saw a post earlier by Michael Nygard. But I don't really need this right now. This log is enough.

  • I'm going to focus on the non-visulization bits and stick with defining the interfaces first. Perhaps try it out with the "smile"/"lips" component? Splines?

  • Changing the test folder and updating scripts. Just sticking with defaults.

  • Packaged up Oliver Steele's library into a Bower component!

  • I've now switched to a client-side-first approach. So, now I use Jasmine and test in test.html.

  • Found a D3 Chernoff faces module, but it's very dense. Here's the Google Groups discussion about it. Here's a nice, complex example using this library.

  • Found a better commented face generation library.

    I made a fiddle to explore this library. Nicely written. Here's an example JSON datum that fully describes a face in this library:


    You just do faces.display(container, face)!

    Hard part: controlling various features with a particular number, and keeping the range of values for that number the same across all features.

    Seems like the approach is to append functions to various features which determine appearance of those features. See multiple hair.push(function(...) {...}) calls. Then, in the face object, the "id" corresponds to the index of the function in the array correponding to that feature.

    My approach: work on a single feature and solve this interpolation problem. It doesn't exist on bower so I'll add it to bower first.

  • Packaged up faces.js

  • Switched to the d3 plugin and used React in tandom with some of my own code to make some stateless components and to provide a nice way to make and interact with Chernoff faces.

  • Implemented everything needed for an interactive demo where you can twiddle values and see the Chernoff face update live!

  • Re-architected things so I can test things more easily and move away from a single file world.

You can’t perform that action at this time.