Slide Deck Link: The Architecture of the Morrison’s OrderPad

Screenshot of slide from slide deck

http://martinfowler.com/articles/orderPad/


This is a slide deck (itself a neat little web application) detailing the architecture of a large scale web application and the design decisions made along the way.

From the slide deck

Morrisons OrderPad is a tablet web-application that helps staff in supermarkets place orders for new stock as they walk around the store. The resulting application makes a good expositional architecture for a tablet web application backed by a lightweight java server application. We highlight the separation of application control and DOM interaction on the client, using small, focused frameworks on the server, the broad-stack testing environment, and the use of a pilot project to understand what features were needed.

Jinja: Python template engine

Jinja logo

http://jinja.pocoo.org/


{% extends "layout.html" %}
{% block body %}
  <ul>
  {% for user in users %}
    <li><a href="{{ user.url }}">{{ user.username }}</a></li>
  {% endfor %}
  </ul>
{% endblock %}

Features (from Jinja website)

  • Sandboxed execution mode. Every aspect of the template execution is monitored and explicitly whitelisted or blacklisted, whatever is preferred. This makes it possible to execute untrusted templates.
  • powerful automatic HTML escaping system for cross site scripting prevention.
  • Template inheritance makes it possible to use the same or a similar layout for all templates.
  • High performance with just in time compilation to Python bytecode. Jinja2 will translate your template sources on first load into Python bytecode for best runtime performance.
  • Optional ahead-of-time compilation
  • Easy to debug with a debug system that integrates template compile and runtime errors into the standard Python traceback system.
  • Configurable syntax. For instance you can reconfigure Jinja2 to better fit output formats such as LaTeX or JavaScript.
  • Template designer helpers. Jinja2 ships with a wide range of useful little helpers that help solving common tasks in templates such as breaking up sequences of items into multiple columns and more.

Link: Command-line tools can be 235x faster than your Hadoop cluster

Bash symbol

http://aadrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html


What I find funny is how he goes from this intermediate step:

cat *.pgn | grep "Result" | sort | uniq -c

To this intermediate step in one shot.

cat *.pgn | grep "Result" | awk '{ split($0, a, "-"); res = substr(a[1], length(a[1]), 1); \
if (res == 1) white++; if (res == 0) black++; if (res == 2) draw++;} \
END { print white+black+draw, white, black, draw }'

This is what I refer to as “knowing your business”.

Node Version Manager: Manage multiple active node.js versions

Node.js logo

https://github.com/creationix/nvm


Commands

$ nvm [tab][tab]
alias        deactivate  install      ls                  run        unload
clear-cache  exec        list         ls-remote           unalias    use
current      help        list-remote  reinstall-packages  uninstall  version

Two Microsoft Windows alternatives:

  • nvmw – Requires Python and Git
  • nvm-windows – Written in Go. Installer available.