- Identify the use cases that are in scope
- Determine constraints based on scoped use cases
use case : the things your system needs to be do.
constraints : the things your system will have to consider to be able to do stuff
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| // Example 1 | |
| mediator.name = 'Doug'; | |
| mediator.subscribe('nameChange', function(arg){ | |
| console.log(this.name); | |
| this.name = arg; | |
| console.log(this.name); | |
| }); | |
| mediator.publish('nameChange', 'Jorn'); |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| =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') |
| // Import node modules | |
| var Q = require('q'); | |
| var Promise = require('bluebird'); | |
| var GitHubApi = require('github'); | |
| // Instantiate github API. | |
| // NOTE: This is just used for async demonstration purposes, you can imagine any other async functions through this example | |
| var github = new GitHubApi({ | |
| version: '3.0.0' | |
| }); |