Skip to content

Instantly share code, notes, and snippets.

View mowat27's full-sized avatar

Adrian Mowat mowat27

  • Fort William, Scotland
View GitHub Profile
@mowat27
mowat27 / playing_lean.md
Last active September 16, 2016 06:33
Playing Lean

Notes on Playing Lean

Home - http://www.playinglean.com/

Buy - http://www.playinglean.com/products/playing-lean-the-game

Salient Facts

You have to build a company using your limited resources. You start out with a team of 3 represented by the blue cylinders and on each turn you have to choose how best to apply them to creating your product and/or selling to customers. As your company grows, you can employ more people but your choices are still limited by its size and capability.

@mowat27
mowat27 / index.html
Last active August 29, 2015 14:13 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
font: 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.link {
stroke: steelblue;
@mowat27
mowat27 / 01_game_of_life.clj
Last active August 29, 2015 14:00
Glasgow Clojurians - 1 May 2014
(ns game-of-life.core)
(def world [[2 1] [2 2] [1 1]])
(defn neighbours [[x y]]
[[(dec x) (dec y)] [x (dec y)] [(inc x) (dec y)]
[(dec x) y] [(inc x) y]
[(dec x) (inc y)] [x (inc y)] [(inc x) (inc y)]])
(neighbours [2 2])
@mowat27
mowat27 / lifecycle.md
Last active August 29, 2015 14:00
Modular Notes

component/Lifecycle

  • System construction and desctruction only
  • Once your compnents have been created, they are on their own
    • i.e. it does not automatically add anything to a request/opartaion

Add something to every request

  • Create a RingHandlerProvider designed to run just after the web server
@mowat27
mowat27 / notes.md
Last active August 29, 2015 13:58
Clojure Dojo - 2/4/2014

Glasgow Clojure Dojo - 2 April 2014

Candidate Topics

  • A unit test generator for Clojure - aimed at legacy code
  • Conway's game of life
  • Ray casting - does a ray intersect with a polygon?

The unit test generator was almost unanimously chosen.

@mowat27
mowat27 / 02_functions.coffee
Last active August 29, 2015 13:58
CoffeeScript book examples
refine = (x, y...) ->
console.log "required: #{x}"
console.log "optional: #{y.join(', ')}" if y.length > 0
walk = (head, tail...) ->
console.log head
walk.apply(@, tail) if tail.length
# Exercises
start = (num) ->
@mowat27
mowat27 / collections_as_functions.clj
Last active August 29, 2015 13:57
Glasgow Clojurians - 6 March 2014
; We had an interesting chat about using collections
; as functions. In summary...
; get returns an item from a collection
(get [:a :b :c] 1)
:b
(get {:a 1, :b 2} :b)
2
(get #{:a :b :c} :c)
:c
@mowat27
mowat27 / hammock.md
Last active July 26, 2020 10:35
Outline of Hammock Driven Development

Hammock Driven Development

Taken from Rich Hickey's day 2 keynote at Clojure Conj 2010.

Hammock Driven Development Presentation

Notes

@mowat27
mowat27 / problem_analysis.md
Last active October 25, 2018 07:35
Problem Analysis Checklist for developers

What is the problem?

  • What issue(s) have been reported?
  • What sort of abnormal behaviour have you noticed?
  • What error(s) are you seeing?

How does this problem affect your customers?

Many problems a team encounters will have a direct impact on how people use your sites. It is very important to understand how your work will affect your customers before you decide on a solution to the problem. If you don't, it will be tempting to write code that "fixes" the immediate issue but does not really improve the system as a whole. Instead of making the system better, you will have introduced technical debt that will be paid back in the form of unexpected problems or reduced flexibility later.

@mowat27
mowat27 / init.el
Created December 30, 2013 20:06
Emacs config for clojure + cider + paredit + auto-complete
(require 'package)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/"))
(package-initialize)
(defvar my-packages '(clojure-mode
cider
paredit
auto-complete
highlight-parentheses