This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defrecord Value [name value]) | |
(defrecord Card [value suit]) | |
(def values | |
(map #(Value. %1 %2) [:two :three :four :five :six :seven :eight :nine :ten :jack :queen :king :ace] (range 1 14))) | |
(def suits #{:clubs :diamonds :hearts :spades}) | |
(def deck (mapcat (fn [value] | |
(map (fn [suit] (Card. value suit)) suits)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(cua-mode t nil (cua-base)) | |
'(tool-bar-mode nil nil (tool-bar))) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7[color] | |
8 branch = auto | |
9 diff = auto | |
10 status = auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; .emacs | |
;;; uncomment this line to disable loading of "default.el" at startup | |
;; (setq inhibit-default-init t) | |
;; turn on font-lock mode | |
(when (fboundp 'global-font-lock-mode) | |
(global-font-lock-mode t)) | |
;; enable visual feedback on selections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# =Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
# =Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Ripping the Heart out of Complexity | |
- Here to talk about 2 things: | |
- Simple architectures | |
- Multidimensional testing | |
- What's a simple architecture? | |
- Not a measure of LOC | |
- Not a measure of time spent producing it | |
- Not about least amount of work done | |
- Measure of understandablility, clarity, independence | |
- What's multidimensional testing? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defprotocol Differentiate | |
(birth-a-different [this])) | |
(extend java.lang.Long | |
Differentiate | |
{:birth-a-different | |
(fn [this] | |
5)}) | |
(defn has-a-different [description attribute] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(generate-seeds | |
{:database :simulation :table :jobs} | |
(make-seed (has-a-random :priority) | |
(has-a-random :status) | |
(has-a-random :name) | |
(n-instances 500)) | |
(make-seed (randomized :priority :status :name) ;;; Short-hand for the former form | |
(n-instances 500)) | |
(make-seed (has-a-random :priority) | |
(has-a :status :error) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysql> desc persons; | |
+--------+-------------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+--------+-------------+------+-----+---------+-------+ | |
| name | varchar(32) | YES | | NULL | | | |
| number | int(11) | YES | | NULL | | | |
+--------+-------------+------+-----+---------+-------+ | |
2 rows in set (0.00 sec) | |
mysql> desc pets; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deftable pets | |
{:database db :table :pets :policy :clean-slate} | |
(seed (inherit :id) | |
(randomized :nickname))) | |
(deftable people | |
{:database db :table :people :fk [pets] :policy :clean-slate :n 50} | |
(seed (randomized :name {:fk {:pets :id}}) | |
(randomized :number))) |