├── README.markdown ├── advanced-dom-scripting.markdown ├── adversaries-into-allies.markdown ├── an-elegant-puzzle.markdown ├── ape-author-publisher-entrepreneur.markdown ├── art-of-the-start.markdown ├── authority.markdown ├── auto-layout-guide.markdown ├── barking-up-the-wrong-tree.markdown ├── beginning-iphone-3-development.markdown ├── being-mortal.markdown ├── bulletproof-ajax.markdown ├── chatter.markdown ├── choose-yourself.markdown ├── code-complete.markdown ├── core-data-programming-guide.markdown ├── crucial-conversations.md ├── css-the-missing-manual.markdown ├── deep-work.markdown ├── design-patterns.markdown ├── designing-data-intensive-applications.markdown ├── different.markdown ├── difficult-conversations.markdown ├── do-more-faster.markdown ├── dom-scripting.markdown ├── dont-make-me-think.markdown ├── drive.markdown ├── effective-c++-3rd-edition.markdown ├── effective-java-2nd-edition.markdown ├── effective-tech-lead-notes.markdown ├── elements-of-style.markdown ├── eric-barker-newsletter.markdown ├── first-round-capital-the-review.markdown ├── founders-at-work.markdown ├── frameworks.markdown ├── functional-javascript.markdown ├── getting-to-yes-negotiating-agreement-without-giving-in.markdown ├── high-scalability-notes.markdown ├── hooked-how-to-build-habit-forming-products.markdown ├── how-children-learn.markdown ├── how-children-succeed.markdown ├── how-to-read-a-book.markdown ├── how-to-solve-it.markdown ├── how-to-win-friends-and-influence-people.markdown ├── html-5th-edition.markdown ├── influence.markdown ├── information-architecture.markdown ├── introducing-neuro-linguistic-programming.markdown ├── ios-programming-the-big-nerd-ranch-guide-4th-edition.markdown ├── iphone-user-interface-design-projects.markdown ├── java-concurrency-in-practice.markdown ├── javascript-patterns.markdown ├── jquery-in-action.markdown ├── khan-academy-finance-and-capital-markets.markdown ├── leadership-strategy-and-tactics.markdown ├── leanpub-manual.markdown ├── learn-objective-c-on-the-mac.markdown ├── learning-android.markdown ├── learning-python-4th-edition.markdown ├── managing-humans.markdown ├── mongodb-the-definitive-guide.markdown ├── more-iphone-3-development.markdown ├── multipliers.markdown ├── neat-words.markdown ├── never-split-the-difference.markdown ├── ppk-on-javascript.markdown ├── pragmatic-learning-and-thinking.markdown ├── pro-git.markdown ├── remote.markdown ├── rework.markdown ├── rocket-surgery-made-easy.markdown ├── ruby-on-rails-tutorial.markdown ├── sqlalchemy.markdown ├── staff-engineer.markdown ├── summary-the-seven-habits-of-highly-effective-people.markdown ├── switch-how-to-change-things-when-change-is-hard.markdown ├── talk-like-ted.markdown ├── the-book-on-writing.markdown ├── the-charisma-myth.markdown ├── the-coaching-habit.markdown ├── the-knack.markdown ├── the-managers-path.markdown ├── the-meditations.markdown ├── the-mythical-man-month.markdown ├── the-non-designers-design-book.markdown ├── the-passionate-programmer.markdown ├── the-power-of-habit.markdown ├── the-ruby-programming-language.markdown ├── the-seven-habits-of-highly-effective-people.markdown ├── the-subtle-art-of-not-giving-a-fuck.markdown ├── the-swift-programming-language.markdown ├── the-war-of-art.markdown ├── thinking-fast-and-slow.markdown ├── thinking-in-systems-a-primer.markdown ├── to-sell-is-human.markdown ├── vimtutor.markdown ├── when.markdown ├── why-dont-they-teach-me-this-in-school.markdown └── writing-tools.markdown /README.markdown: -------------------------------------------------------------------------------- 1 | Notes from books and other interesting things that I've read. Enjoy! 2 | 3 | ## Table of Contents 4 | 5 | ### Completed Notes 6 | 7 | Completed notes from books that I've finished reading. In rare cases, notes for chapters are missing if I didn't find the material relevant. 8 | 9 | * [Advanced DOM Scripting](advanced-dom-scripting.markdown) by Jeffrey Sambells and Aaron Gustafson 10 | * [Adversaries into Allies](adversaries-into-allies.markdown) by Bob Burg 11 | * [An Elegant Puzzle](an-elegant-puzzle.markdown) by Will Larson 12 | * [APE: Author, Publisher, Entrepreneur](ape-author-publisher-entrepreneur.markdown) by Guy Kawasaki 13 | * [Authority](authority.markdown) by Nathan Barry 14 | * [Beginning iPhone 3 Development](beginning-iphone-3-development.markdown) by David Mark and Jeff LaMarche 15 | * [Being Mortal](being-mortal.markdown) by Atul Gawande 16 | * [Bulletproof Ajax](bulletproof-ajax.markdown) by Jeremy Keith 17 | * [Chatter](chatter.markdown) by Patrick King 18 | * [Choose Yourself](choose-yourself.markdown) by James Altucher 19 | * [Code Complete](code-complete.markdown) by Steve McConnell 20 | * [Crucial Conversations](crucial-conversations.md) by Kerry Patterson, Joseph Grenny, Ron McMillan, and Al Switzler 21 | * [CSS: The Missing Manual](css-the-missing-manual.markdown) by David Sawyer McFarland 22 | * [Different](different.markdown) by Youngme Moon 23 | * [Do More Faster](do-more-faster.markdown) by David Cohen and Brad Feld 24 | * [DOM Scripting](dom-scripting.markdown) by Jeremy Keith 25 | * [Don't Make Me Think](dont-make-me-think.markdown) by Steven Krug 26 | * [Drive](drive.markdown) by Daniel Pink 27 | * [Effective C++, 3rd Edition](effective-c%2B%2B-3rd-edition.markdown) by Scott Meyers 28 | * [Effective Java, 2nd Edition](effective-java-2nd-edition.markdown) by Joshua Bloch 29 | * [The Elements of Style](elements-of-style.markdown) by William Strunk Jr. and E.B. White 30 | * [Founders at Work](founders-at-work.markdown) by Jessica Livingston 31 | * [Functional JavaScript](functional-javascript.markdown) by Michael Fogus 32 | * [Getting to Yes](getting-to-yes-negotiating-agreement-without-giving-in.markdown) by Roger Fisher and William Ury 33 | * [Hooked](hooked-how-to-build-habit-forming-products.markdown) by Nir Eyal and Ryan Hoover 34 | * [How Children Succeed](how-children-succeed.markdown) by Paul Tough 35 | * [How to Win Friends & Influence People](how-to-win-friends-and-influence-people.markdown) by Dale Carnegie 36 | * [HTML 5th Edition](html-5th-edition.markdown) by Elizabeth Castro 37 | * [Influence](influence.markdown) by Robert B. Cialdini, Ph.D. 38 | * [Information Architecture for the World Wide Web](information-architecture.markdown) by Peter Morville, Louis Rosenfeld 39 | * [iOS Programming: The Big Nerd Ranch Guide, 4th Edition](ios-programming-the-big-nerd-ranch-guide-4th-edition.markdown) by Christian Keur, Aaron Hillegass, and Joe Conway 40 | * [iPhone User Interface Design Projects](iphone-user-interface-design-projects.markdown) 41 | * [Java Concurrency in Practice](java-concurrency-in-practice.markdown) by Brian Goetz 42 | * [JavaScript Patterns](javascript-patterns.markdown) by Stoyan Stefanov 43 | * [jQuery in Action](jquery-in-action.markdown) by Bear Bibeault and Yehuda Katz 44 | * [Learn Objective-C on the Mac](learn-objective-c-on-the-mac.markdown) by Mark Dalrymple and Scott Knaster 45 | * [Learning Android](learning-android.markdown) by Marko Gargenta 46 | * [Learning Python, 4th Edition](learning-python-4th-edition.markdown) by Mark Lutz 47 | * [Managing Humans](managing-humans.markdown) by Michael Lopp 48 | * [MongoDB: The Definitive Guide](mongodb-the-definitive-guide.markdown) by Kristina Chodorow and Michael Dirolf 49 | * [More iPhone 3 Development](more-iphone-3-development.markdown) by David Mark and Jeff LaMarche 50 | * [Multipliers](multipliers.markdown) by Liz Wiseman 51 | * [Never Split The Difference](never-split-the-difference.markdown) by Chris Voss 52 | * [ppk on JavaScript, 1st Edition](ppk-on-javascript.markdown) by Peter-Paul Koch 53 | * [Pragmatic Learning & Thinking](pragmatic-learning-and-thinking.markdown) by Andy Hunt 54 | * [Pro Git](pro-git.markdown) by Scott Chacon 55 | * [Rework](rework.markdown) by Jason Fried and David Heinemeier Hansson 56 | * [Rocket Surgery Made Easy](rocket-surgery-made-easy.markdown) by Steve Krug 57 | * [Switch](switch-how-to-change-things-when-change-is-hard.markdown) by Chip Heath and Dan Heath 58 | * [Talk Like TED](talk-like-ted.markdown) by Carmine Gallo 59 | * [The Art of the Start](art-of-the-start.markdown) by Guy Kawasaki 60 | * [The Book on Writing](the-book-on-writing.markdown) by Paula LaRocque 61 | * [The Charisma Myth](the-charisma-myth.markdown) by Olivia Fox Cabane 62 | * [The Coaching Habit](the-coaching-habit.markdown) by Michael Bungay Stanier 63 | * [The Knack](the-knack.markdown) by Norm Brodsky and Bo Burlingham 64 | * [The Meditations](the-meditations.markdown) by Marcus Aurelius 65 | * [The Mythical Man-Month](the-mythical-man-month.markdown) by Frederick P. Brooks, Jr. 66 | * [The Non-Designer's Design Book, 3rd Edition](the-non-designers-design-book.markdown) by Robin Williams 67 | * [The Passionate Programmer](the-passionate-programmer.markdown) by Chad Fowler 68 | * [The Power of Habit](the-power-of-habit.markdown) by Charles Duhigg 69 | * [The Ruby Programming Language](the-ruby-programming-language.markdown) by David Flanagan and Yukihiro Matsumoto 70 | * [The Subtle Art of Not Giving a Fuck](the-subtle-art-of-not-giving-a-fuck.markdown) by Mark Manson 71 | * [The War of Art](the-war-of-art.markdown) by Steven Pressfield 72 | * [Thinking Fast and Slow](thinking-fast-and-slow.markdown) by Daniel Kahneman 73 | * [Thinking in Systems: A Primer](thinking-in-systems-a-primer.markdown) by Donella H. Meadows 74 | * [To Sell Is Human](to-sell-is-human.markdown) by Daniel Pink 75 | * [When](when.markdown) by Daniel Pink 76 | * [Writing Tools](writing-tools.markdown) by Roy Peter Clark 77 | 78 | ### Incomplete Notes 79 | 80 | Incomplete notes from books that I haven't yet finished reading. 81 | 82 | * [Barking Up the Wrong Tree](barking-up-the-wrong-tree.markdown) by Eric Barker 83 | * [Deep Work](deep-work.markdown) by Cal Newport 84 | * [Design Patterns](design-patterns.markdown) by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides 85 | * [Difficult Conversations](difficult-conversations.markdown) by Douglas Stone, Bruce Patton, Sheila Heen and Roger Fisher 86 | * [How Children Learn](how-children-learn.markdown) by John Holt 87 | * [How to Solve It](how-to-solve-it.markdown) by George Pólya 88 | * [Introducing Neuro-linguistic Programming](introducing-neuro-linguistic-programming.markdown) by Joseph O'Connor and John Seymour 89 | * [Ruby on Rails Tutorial](ruby-on-rails-tutorial.markdown) by Michael Hartl 90 | * [The Manager's Path](the-managers-path.markdown) by Camille Fournier 91 | * [The 7 Habits of Highly Effective People](the-seven-habits-of-highly-effective-people.markdown) by Stephen R. Covey 92 | * [Why Didn't They Teach Me This in School?](why-dont-they-teach-me-this-in-school.markdown) by Cary Siegel 93 | 94 | ### Other Notes 95 | 96 | Notes from things that I've read or watched on the web: 97 | 98 | * [Auto Layout Guide](auto-layout-guide.markdown) 99 | * [Core Data Programming Guide](core-data-programming-guide.markdown) 100 | * [Eric Barker newsletter](eric-barker-newsletter.markdown) 101 | * [First Round Capital: The Review](first-round-capital-the-review.markdown) 102 | * [High Scalability](high-scalability-notes.markdown) 103 | * [Khan Academy finance and capital markets](khan-academy-finance-and-capital-markets.markdown) 104 | * [Leanpub Manual](leanpub-manual.markdown) 105 | * [On being an effective tech lead](effective-tech-lead-notes.markdown) 106 | * [SQLAlchemy 0.7.8 Documentation](https://github.com/mgp/book-notes/blob/master/sqlalchemy.markdown) 107 | * [The Swift Programming Language: Language Guide](the-swift-programming-language.markdown) 108 | * [vimtutor](vimtutor.markdown) 109 | 110 | ### Other 111 | 112 | * [Neat words](neat-words.markdown): Words I've read and had to look up definitions for. 113 | * [Frameworks](frameworks.markdown): Useful frameworks for my thinking and my work. 114 | 115 | ## How I Take Notes 116 | 117 | On my Macbook, I have the Kindle app open with the book, as well as the markdown file open in a text editor (usually Sublime Text or MacVim, but it doesn't matter). When I read something that I want to summarize, I mentally commit it to memory and Command-Tab over to the text editor and type it out in Markdown. I don't copy-and-paste, because I find this solution allows me to retain the information better, and also it allows me to restructure the sentence if needed (usually editing for length). Usually my memory is not good enough and I Command-Tab back and forth, re-reading it in the Kindle app, and then re-reading what I typed out. 118 | 119 | For some of the older notes, I had the text editor open on my laptop, and then the physical book between me and my Macbook. But the algorithm was very similar 😛 120 | -------------------------------------------------------------------------------- /advanced-dom-scripting.markdown: -------------------------------------------------------------------------------- 1 | ## Advanced DOM Scripting 2 | 3 | by Jeffrey Sambells and Aaron Gustafson 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/AdvancED-DOM-Scripting-Dynamic-Techniques/dp/1590598563)!* 6 | 7 | ### Chapter 1: Do It Right with Best Practices 8 | * pg 11: Instead of using inline event attributes, use unobtrusive techniques to add the event handlers when the window loads. 9 | * pg 14: Instead of browser sniffing to find what features you can use, use capability detection and check for the existence of methods directly. 10 | * pg 16: Don't require Javascript for content, as search engine crawlers will miss it. 11 | * pg 21: When creating your namespace with its methods, check that it doesn't already exist if your library is already included from another file. 12 | * pg 28: The display property can be toggled between `none` and empty (the string `''`), which is the default. 13 | * pg 31: Prefer single quotes in Javascript, and leave the double quotes for XHTML attributes as its specification requires. 14 | * pg 39: The `hasOwnProperty` method returns `true` if the object has the property or method specified, ignoring any inherited properties or methods. 15 | 16 | ### Chapter 2: Creating Your Own Reusable Objects 17 | * pg 63: Static members exist only on a specific instance of an object, by manual assignment and not through any prototype property. 18 | * pg 67: Private methods are defined within a constructor or another method, but not available externally through any instance. 19 | * pg 68: Privileged methods are defined within the constructor using the `this` keyword, and can access private methods while being publicly accessible. 20 | * pg 70: When you declare function `foo() { ... }`, you can call the function before its definition. If you use var `foo = function() { ... }`, you can't. 21 | * pg 74: When a method of an object is used as an event handler, you can bind `this` to the object again using `call` or `apply`. 22 | 23 | ### Chapter 3: Understanding the DOM2 Core and DOM2 HTML 24 | * pg 91: DOM Level 2 builds on Level 1 by specifying mouse-related events and the ability to access and manipulate CSS styles. 25 | * pg 94: Internet Explorer 7 only supports some of DOM Level 1, but supports some features of Level 2 (like events) in its own way. 26 | * pg 101: IE will only create a text node in the DOM if it contains something other than whitespace. 27 | * pg 105: The `nodeValue` property of a `Node` returns the value of an attribute node or the content of a text node, and `null` in most other cases. 28 | * pg 111: Attributes are implementations of the Core `Attr` interface and are contained in a `NamedNodeMap` in a node's `attribute` property. 29 | * pg 113: The `attributes.getNamedItem` method will work on any node, while the `getAttribute` method only works on instances of `Element`. 30 | * pg 117: Don't modify the prototype of any DOM classes like `Node`; it's flaky across browsers, and may override any future additions to the DOM specification. 31 | * pg 122: The `Document` class has a `getElementsByTagName` like `Element` does, but technically it's different; it also adds `getElementById`. 32 | * pg 126: The `HTMLDocument` class inherits from `Document`, and adds properties like `title`, `referrer`, `body`, `images`, `forms`, and `anchors`. 33 | * pg 127: The `HTMLElement` class inherits from `Element`, and adds properties like `id`, `title` (for tooltip rollovers), and `className`. 34 | * pg 133: The DOM names CSS properties like `font-size` as `fontSize`, and `class` as `className`. 35 | 36 | ### Chapter 4: Responding to User Actions and Events 37 | * pg 154: The `mousemove` event has no specified period or distance in which it fires. 38 | * pg 156: A `click` and `dblclick` event will only happen if the mouse remains stationary; regardless of the mouse motion, a `mousedown` and `mouseup` event occurs. 39 | * pg 159: Key-related events apply only to the `document` object. 40 | * pg 161: The `focus` and `blur` evens only apply to `label`, `input`, `select`, `textarea`, and `button` form elements. 41 | * pg 182: Event listeners registered using the W3C event model do not necessarily execute in the order in which they're added. 42 | * pg 183: Beware that the `load` event is only executed after all the images have been loaded as well. 43 | * pg 196: A simple drag-and-drop effect can be created with a `mousemove` event listener that moves an element to the cursor's location. 44 | * pg 197: Keyboard commands are not in the DOM2 Events specification, but all browsers supply the Unicode value of a key press in the `keyCode` property. 45 | 46 | ### Chapter 5: Dynamically Modifying Style and Cascading Style Sheets 47 | * pg 205: `CSSStyleSheet` represents a stylesheet with `CSSStyleRules`, while the `CSSStyleDeclaration` class represents an object's style property. 48 | * pg 214: A `CSSStyleDeclaration` instance of an element only contains the inline style properties, and hence does not contain the overall computed style. 49 | * pg 216: The only time mixing style and scripting is acceptable practice is in the case of positioning, e.g. drag-and-drop. 50 | * pg 220: Use the `className` property to assign classes, as `setAttribute` requires an attribute name of `'class'` in W3C and `'className'` in IE. 51 | * pg 222: Setting the `rel` attribute of a stylesheet link to `"alternate stylesheet"` will load the stylesheet but disable it; Javascript can enable it later. 52 | * pg 228: A new stylesheet can be used by dynamically creating a new link element referencing the stylesheet and adding it to the `head` tag. 53 | * pg 232: The W3C browsers contain the rules in a stylesheet in the variable `cssRules`, while IE contains them in `rules`. 54 | * pg 233: The W3C `insertRule` method combines the selector name and its definition in a single argument, while the `addRule` method of IE combines them. 55 | * pg 238: The computed style of an element is accessible through `document.defaultView.getComputedStyle` in W3C, and `element.currentStyle` in IE. 56 | 57 | ### Chapter 7: Adding Ajax to the Mix 58 | * pg 286: IE 7 and later support the `XMLHttpRequest` object, while earlier versions must use the `Microsoft.XMLHTTP` ActiveX component. 59 | * pg 289: The `onreadystatechange` listener doesn't receive any arguments, so the `XMLHttpRequest` object must be defined in the same scope for it to be available. 60 | * pg 289: If the response has MIME type `application/xml`, the response will be interpreted as XML and not HTML, so the DOM2 HTML methods won't work. 61 | * pg 291: Within the `onreadystatechange` property, the `this` keyword refers to the method itself and not the `XMLHttpRequest` object. 62 | * pg 298: To parse JSON from an Ajax response, prefer a JSON parser over `eval` unless the information in the response is entirely controlled by you. 63 | * pg 307: To bypass cross-site restrictions, dynamically generated `script` elements can run with a source from any domain and their Javascript will run normally. 64 | * pg 328: Replies to concurrent requests may come back out of order; guard against this causing inconsistent application behavior. 65 | 66 | -------------------------------------------------------------------------------- /auto-layout-guide.markdown: -------------------------------------------------------------------------------- 1 | ## Auto Layout Guide 2 | 3 | from https://developer.apple.com/library/ios/documentation/userexperience/conceptual/AutolayoutPG/AutoLayoutConcepts/AutoLayoutConcepts.html 4 | 5 | ### Auto Layout Concepts 6 | 7 | * Solve a system of constraints to determine your layout. 8 | * Every constraint is of the form `y = m*x + b`, where y and x are attributes of views, and m and b are floating point values. 9 | * Use attributes `leading` and `trailing` instead of `left` and `right` to deal with RTL languages. 10 | * Constraints are cumulative, and do not override each other. You must remove the first constraint manually. 11 | * Intrinsic content size is when a leaf-level view, such as a button, knows more about its size than the code that positions it. The element will grow and shrink appropriately with different content. 12 | 13 | ### Working with Auto Layout Programmatically 14 | 15 | * In the visual format string, `-` denotes a standard Aqua space, which is 8.0 between sibling views and 20.0 between a view and its superview. 16 | * The `NSDictionaryOfVariableBindings` method creates a dictionary where the keys are the same as the corresponding value’s variable name. 17 | * If the bounds transform of a container changes, then a space like `-80-` scales too. 18 | 19 | ### Resolving Auto Layout Issues 20 | 21 | * Auto Layout issues occur when there are too few constraints, or the system contains conflicting or ambiguous constraints. 22 | 23 | #### Content Size Is Undefined 24 | 25 | * Container views may use their content to determine their own size at runtime. 26 | * Placeholder constraints address this, such as a minimum width for a view. This placeholder is removed at build time, when your view defines its size. 27 | 28 | #### The Size of Custom View Content Is Unknown 29 | 30 | * Unlike standard views, custom views have no defined intrinsic content size. 31 | * Use a placeholder intrinsic content size to indicate the custom view’s content size. Again, this is removed at runtime. 32 | 33 | #### Debugging in Code 34 | 35 | * Method `_subtreeDescription` of `NSView` creates a textual description of the view hierarchy. 36 | * Call method `constraintsAffectingLayoutForAxis:` to get constraints affecting a particular orientation. The debugger can print their details. 37 | * On OS X, you can visualize the constraints by calling `visualizeConstraints:`. 38 | 39 | ### Auto Layout by Example 40 | 41 | #### Using Scroll Views with Auto Layout 42 | 43 | * The size of the content inside of a scroll view is determined by the constraints of its descendants. 44 | * You must make sure you create constraints for all the subviews inside a scroll view. 45 | * There cannot be any missing constraints, starting from one edge of the scroll view to the other. 46 | 47 | #### Spacing and Wrapping 48 | 49 | * The height of the spacer views can be any value, including 0. However, you must create constraints for the height of the views. 50 | 51 | ### Implementing a Custom View to Work with Auto Layout 52 | 53 | * A custom view class must provide enough information so that the Auto Layout system can make the correct calculations and satisfy the constraints. 54 | 55 | #### A View Specifies Its Intrinsic Content Size 56 | 57 | * The `intrinsicContentSize` method of a view tells the layout system that it contains content that the layout system doesn't understand, and provides to the layout system the intrinsic size of that content. 58 | * Method `intrinsicContentSize` can return absolute values for its width and height, or return `NSViewNoInstrinsicMetric` for either value to indicate no intrinsic metric for a dimension. 59 | * For example, a button returns an intrinsic size with a width and height large enough not to clip the text or image. A horizontal slider has an intrinsic height, but no intrinsic width. 60 | 61 | #### Views Must Notify Auto Layout If Their Intrinsic Size Changes 62 | 63 | * If the content of a view changes, which in turn changes its intrinsic size, then it must call `invalidateIntrinsicContentSize`. 64 | 65 | ### Appendix A: Visual Format Language 66 | 67 | * You cannot express a fixed aspect ratio using the visual format language; you must instead create a `NSLayoutConstraint` using `constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant:`. 68 | -------------------------------------------------------------------------------- /barking-up-the-wrong-tree.markdown: -------------------------------------------------------------------------------- 1 | ## Barking Up the Wrong Tree 2 | 3 | by Eric Barker 4 | 5 | ### Chapter 1: Should We Play It Safe and Do What We're Told If We Want to Succeed? 6 | 7 | * Schools reward students who consistently do what they're told. Grades correlate loosely with intelligence, but strongly with self-discipline and compliance. 8 | * Schools reward being a generalist. Unlike the real world, there is little recognition of student passion or expertise. 9 | * Following the rules doesn't create success; it just eliminates extremes, both good and bad. 10 | * There are two types of leaders: "Filtered" ones who rise up through formal channels, and "unfiltered" ones who come in through the window. 11 | * A minority of unfiltered candidates are transformative, turning away organizations from misguided beliefs and foolish inconsistencies. 12 | * Unfiltered leaders have "intensifiers," or qualities that are often negative in the mean, but become positives in a specific context. 13 | * The "differential susceptibility hypothesis" says that the same genes that lead to bad stuff can actually lead to good stuff in a different situation. 14 | * A "hopeful monster" is an individual that deviates radically from the norm because of a mutation that confers a potentially adaptive advantage. 15 | * Too often we label things "good" or "bad," when the right designation might merely be "different." 16 | * To be great we must be different. And that doesn't come from trying to follow society's vision of what's best, because society doesn't always know what it needs. More often being the best means being the best version of you. 17 | * Anything better aligned to fit a unique scenario is going to be problematic on average. And qualities that are "generally good" can be bad at the extremes. 18 | * We try to filter out the worst to increase the average, but by doing this we also decrease variance. 19 | * Often intensifiers masquerade as positives because we give successful people the benefit of the doubt, or label them as "eccentric." 20 | * To apply "Leadership Filtration Theory," first, *know thyself*. Know whether you are filtered or unfiltered, and know your strengths, or what you are good at that produces desired results. 21 | * Second, *pick the right pond*. Choose companies and situations so that you can leverage your type, your signature strengths, and your context to create value. 22 | 23 | ### Chapter 2: Do Nice Guys Finish Last? 24 | 25 | * In a study, those who make a good impression got better performance reviews than those who worked harder but didn't manage impressions well. 26 | * Flattery is so powerful that it works even when the boss knows it's insincere. 27 | * Our evaluations of other people come down to warmth and competence, and we assume the two are inversely related. 28 | * Feeling powerless in an executive function actually makes you feel dumber. 29 | * Jerks succeed because they're assertive about what they want, and they're not afraid to let others know about their achievements. 30 | * There are three categories: "right," "wrong," and "everyone does it." Once we see others getting away with something, we assume it's okay. 31 | * Teams with just one bad apple experience performance deficits by 30 to 40 percent. 32 | * To truly scale an effort and succeed means going beyond selfishness to create trust and achieve cooperation. 33 | * On the spectrum of success, "Matchers" and "Takers" end up in the middle, while Givers are found at the very top and the very bottom. 34 | * While Givers receive help from other Givers and protection from Matchers, Takers end up being disliked by everyone, including other Takers. 35 | * Even Matchers, who benefit from trust and reciprocity, are limited because they often wait for someone else to initiate a good act. 36 | * Matchers want to see good rewarded and evil punished, and so they go out of their way to punish Takers and protect Givers from harm. 37 | * A Tit-for-tat approach with forgiveness succeeds because it is nice, it is forgiving, it was easy for other players to understand, and it would retaliate when necessary. 38 | * An early edge achieved with betrayal isn't worth much since it poisons what could have been a fruitful and long-term relationship. 39 | * Givers lose in the short-term, but over the long term they meet other Givers and receive protection from Matchers, and consequently thrive. 40 | * Not only is reciprocity one of the key factors of influence and winning favor, but it is essential that you go first. 41 | * Studies show that your boss has a much larger effect on your happiness and success than the company at large. 42 | * In the workplace, warning others about Takers will make you feel better and help police bad behavior. 43 | * Your hard work doesn't pay off if your boss doesn't know whom to reward for it. So make sure it gets noticed. 44 | * Build more steps into the contract, and entice others with ways to help them down the line. By framing the relationship as long-term, the better the other party will treat you. 45 | -------------------------------------------------------------------------------- /bulletproof-ajax.markdown: -------------------------------------------------------------------------------- 1 | ## Bulletproof Ajax 2 | 3 | by Jeremy Keith 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Bulletproof-Ajax-Jeremy-Keith/dp/0321472667)!* 6 | 7 | ### Chapter 1: What is Ajax? 8 | * pg 8: A tiny, practically invisible inline frame, or hidden `iframe`, can get data from the server; Javascript can use that data to update the main page. 9 | * pg 9: Ajax isn't tied to XML -- you can use any structured format that carries data. 10 | 11 | ### Chapter 2: JavaScript and the Document Object Model 12 | * pg 19: Variables assigned `null` and `0` are treated as `false` in boolean expressions. 13 | * pg 24: Use `===` to check if two values are not just equal but identical; use `!==` to check if they are not identical. 14 | * pg 29: Functions can be assigned to variables; to store a reference to a function with arguments defined, use an anonymous function. 15 | * pg 31: Functions and methods belonging to a class are called methods and properties. 16 | * pg 32: Native objects are part of the core Javascript language; host objects are provided by the environment in which JavaScript is running. 17 | * pg 39: Calling `getElementsByTagName("*")` returns only element nodes, while the `childNodes` property contains text nodes and attributes. 18 | 19 | ### Chapter 3: XMLHttpRequest 20 | * pg 52: For `XMLHttpRequest`, the `onreadystatechange` event handler is triggered everytime the `readyState` property changes. 21 | * pg 55: The `open` method will not initiate a request; the `send` method must be invoked. 22 | * pg 56: If POSTing data, use the `setRequestHeader` method to set the `Content-type` header to `application/x-www-form-urlencoded`. 23 | * pg 57: Every browser finishes with a `readyState` value of `4` when the request is completed. 24 | * pg 59: If the server responds with MIME type `text/xml` or `application/xml` the response is in the `responseXML` property instead of `responseText`. 25 | 26 | ### Chapter 4: Data Formats 27 | * pg 73: Returned XML data can be traversed using the DOM methods you would use to traverse an HTML document. 28 | * pg 77: JSON, pronounced like the name Jason, does not need to be interpreted by JavaScript because it is JavaScript. 29 | * pg 80: The JSON stored in `responseText` is interpreted as an object literal and converted using the `eval` function. 30 | * pg 82: The `send` method of `XMLHttpRequest` can only access the domain serving up the Javascript file being executed. 31 | * pg 83: Using DOM scripting, you can dynamically create a `script` element with a Javascript URL from another domain; that script can modify your DOM. 32 | * pg 89: HTML fragments returned via Ajax can be inserted wholesale into your document by assigning the `innerHTML` property of an element. 33 | 34 | ### Chapter 5: Hijax 35 | * pg 98: Use the `onload` event handler to invoke the DOM methods in your JavaScript only once the page has finished loading. 36 | * pg 103: After building a web page without Ajax, apply Ajax to scenarios where a page is reloaded but only partially modified. 37 | * pg 112: Given a `form` element, its `elements` property contains all its inputs. 38 | * pg 115: Do not rely on Javascript for form validation, but use it to get and display a validation response from the server. 39 | 40 | ### Chapter 6: Ajax Challenges 41 | * pg 124: If you're not going to try for graceful degradation, consider technologies beyond Ajax like Flash. 42 | * pg 126: Applications using Ajax should provide feedback to the user that some action is under way. 43 | * pg 130: It's also good to show that something just happened, using something like the yellow fade technique. 44 | * pg 136: If the user would want to bookmark the changed state of a page, don't replace full page refreshes with Ajax. 45 | * pg 137: With Ajax, wireframes representing web page must be ditched for prototypes that add dynamic elements through simple DOM scripting. 46 | 47 | ### Chapter 7: Ajax and Accessibility 48 | * pg 141: Most screen readers don't interact with the DOM, but take a snapshot of the document and put it in a "virtual buffer" for manipulation. 49 | * pg 143: Screen readers show a bias toward the creating or updating of tables, and focusable elements like form fields and links. 50 | * pg 143: Assign an element a tabindex of `-1` to make it focusable and attract the screen reader without upsetting the default tab order. 51 | * pg 144: Put an opt-in checkbox off-screen that only screen-readers can find and toggle, which generates alert messages for Ajax updates. 52 | * pg 149: Web browsers can't detect screen-readers, but Flash can, and can notify JavaScript of this. 53 | 54 | ### Chapter 8: Putting It All Together 55 | * pg 171: Functions within an object can access variables declared within the same object using closures. 56 | * pg 182: In the `onreadystatechange` method, display an error message with DOM scripting if the status code is not `200` or `304`. 57 | * pg 184: Use `setTimeout` to call abort on the `XMLHttpRequest` object if the request is taking too long, and `clearTimeout` if the request completes. 58 | 59 | ### Chapter 9: The Future of Ajax 60 | * pg 193: If you use a JavaScript library, consider its file size, as the client will need to download whatever you choose. 61 | 62 | -------------------------------------------------------------------------------- /core-data-programming-guide.markdown: -------------------------------------------------------------------------------- 1 | ## Core Data Programming Guide 2 | 3 | from https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreData/cdProgrammingGuide.html 4 | 5 | ### Technology Overview 6 | 7 | * Beyond simple persistence and querying, core data offers change tracking and undo support, futures, value validation, UI synchronization, and automatic multi-writer conflict resolution. 8 | * Use it because it's mature, proven, robust, efficient, and integrates well with the development toolchain. 9 | 10 | ### Core Data Basics 11 | 12 | #### Basic Core Data Architecture 13 | 14 | * The managed object context, or *context*, provides access to a collection of framework objects, or the *persistence stack*, that mediate between the objects in your application and external data stores. 15 | * Model objects that tie into in the Core Data framework are known as managed objects, and are registered with the context. 16 | * The context tracks changes to these objects, thereby providing undo and redo support. If you save the changes you've made, the context ensures that your objects are in a valid state. 17 | * A fetch request specifies an entity name to retrieve; optionally it can specify a predicate and an array of sort orderings. 18 | * If a context already contains a managed object for an object returned from a fetch, then the fetch results contain that existing managed object. 19 | * A persistent store coordinator presents a façade to the managed object contexts so that a group of persistent stores appears as a single aggregate store. This allows partitioning data between these persistent stores. 20 | * In order to use a SQLite database, Core Data must create and manage the database itself. 21 | 22 | #### Managed Objects and the Managed Object Model 23 | 24 | * A managed object model is a schema that provides a description of the managed objects. 25 | * A model consists of a collection of entity description objects that serve as metadata, such as its name, as well as its attributes and relationships. 26 | 27 | ### Managed Object Models 28 | 29 | * A managed object mdoel, or `NSManagedObjectModel` instance, describes the schema. 30 | * A model contains `NSEntityDescription` objects that represent its entities. Each may have `NSAttributeDescription` and `NSRelationshipDescription` instances, and the entity may also have fetched properties, represented by `NSFetchedPropertyDescription` instances. 31 | * Transient properties are properties that you define as part of the model, but which are not saved with the entity to the persistent store. 32 | * Optional attributes are discouraged, becuase SQL has special comparison behavior for `NULL` that is unlike Objective-C's `nil`. `NULL` in a database is not the same as `0` or an empty string. 33 | * You can predefine fetch requests and store them in a managed object model as named templates. This is like compiling SQLite statements. 34 | 35 | ### Using a Managed Object Model 36 | 37 | #### Creating and Loading a Managed Object Model 38 | 39 | * An `xcdatamodeld` "source" directory is compiled into a `momd` deployment directory, and an `xcdatamodel` "source" file is compiled into a `mom` deployment file. 40 | * If you use Xcode to create a non-document application that uses Core Data, the application delegate includes code to retrieve a data model. 41 | 42 | #### Accessing and Using a Managed Object Model at Runtime 43 | 44 | * To get the model at runtime, call `persistentStoreCoordinator` on the context and `managedObjectModel` on that, or call `managedObjectModel` on any entity. 45 | * Through the model you can create and access fetch request templates. 46 | 47 | ### Managed Objects 48 | 49 | #### Basics 50 | 51 | * You can subclass `NSManagedObject` to provide custom accessor or validation methods, to use non-standard attributes, to specify dependent keys, to calculate derived values, or to implement any other custom logic. 52 | * A managed object is associated with an entity description that provides metadata, and with a managed object context. 53 | 54 | #### Properties and Data Storage 55 | 56 | * A `NSManagedObject` is a generic container object that efficiently provides storage for the properties defined by its associated `NSEntityDescription` object. 57 | * `NSManagedObject` represents date attributes using `NSDate` objects, and stores times internally as an `NSTimeInterval` value since the reference date. 58 | 59 | #### Custom Managed Object Classes 60 | 61 | * Core Data dynamically generates efficient attribute accessor methods and relationship accessor methods for properties that are defined in the entity of a managed object's corresponding managed object model. 62 | * For performance reasons, Core Data typically does not copy object values, even if the value class adopts the `NSCopying` protocol. 63 | 64 | #### Object Life-Cycle—Initialization and Deallocation 65 | 66 | * Core Data "owns" the life-cycle of managed objects. The framework can instantiate, destroy, and resurrect these objects as required. 67 | * To perform additional initialization of a managed object, don't override `init`. Instead, override `awakeFromInsert` or `awakeFromFetch`. 68 | * `awakeFromInsert` is invoked only once, when an object is first created. `awakeFromFetch` is invoked when an object is re-initialized from a persistent store, during a fetch. 69 | 70 | #### Validation 71 | 72 | * To validate property values, implement methods of the form `validate:error:`, as defined by the `NSKeyValueCoding` protocol. 73 | * To validate inter-property values, override `validateForUpdate:` and/or related validation methods. 74 | 75 | #### Faulting 76 | 77 | * A managed object may be a "fault" if its property values have not yet been loaded from the external data stores. Accessing these values "fires" the fault, and thereby loads them. 78 | 79 | -------------------------------------------------------------------------------- /deep-work.markdown: -------------------------------------------------------------------------------- 1 | ## Deep Work: Rules for Success in a Distracted World 2 | 3 | by Cal Newport 4 | 5 | ### Introduction 6 | 7 | * Deep work is professional activities performed in a state of distraction-free concentration that push your cognitive capabilities to their limit. 8 | * Deep work creates new value, improves your skill, and is hard to replicate. 9 | * Knowledge workers are losing familiarity with deep work because of network tools, which fragment their attention into slivers. 10 | * Shallow work is non-cognitively demanding, logistical-style tasks, often performed while distracted. They don't create new value and are easy to replicate. 11 | * Our work culture's shift toward the shallow exposes a massive economic and personal opportunity for the few who resist and prioritize depth. 12 | * Deep work has value because it is required to quickly learn complicated things, and is required to produce the best and most useful things. 13 | * The deep work hypothesis says deep work is becoming both increasingly rare and increasingly valuable, and so those who make it the core of their working life will thrive. 14 | -------------------------------------------------------------------------------- /design-patterns.markdown: -------------------------------------------------------------------------------- 1 | ## Design Patterns: Elements of Reusable Object-Oriented Software 2 | 3 | by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612)!* 6 | 7 | ### Chapter 1: Introduction 8 | 9 | * Expert designers know not to solve every problem from first principles, but reuse good solutions. This experience makes them experts. 10 | * A design pattern names, abstracts, and identifies the key aspects of a common design structure that make it useful for creating a reusable object-oriented design. 11 | * The hard part of object-oriented design is decomposing a system into objects, which is difficult because encapsulation, granularity, dependency, flexibility, performance, evolution, reusability, and more come into play. 12 | * When designing, strict modeling of the real world leads to a system that reflects today's realities not but not necessarily tomorrow's. Abstractions are key to making a design flexible. 13 | * Dynamic binding means that invoking a method doesn't commit to a particular implementation until runtime. 14 | * An object's class refers to how it's implemented, while an object's type refers to only its interface. 15 | * Class inheritance is a mechanism for code reuse and representation sharing, while interface inheritance describes when an object can be used in place of another. 16 | * Inheritance's ability to define families of objects with identical interfaces is important because polymorphism depends on it. 17 | * By manipulating objects through the interface of their abstract class, clients remain unaware of the specific types of objects they use, and the classes that implement them. This reduces implementation dependencies. 18 | * Class inheritance is white-box reuse, because parent class internals are visible, while object composition is black-box reuse, because no internal details are visible. 19 | * Class inheritance is directly supported by the programming language, and makes it easy to modify the implementation being reused. 20 | * But class inheritance is fixed at compile-time, and breaks encapsulation, where the subclass becomes strongly coupled to the parent class. The parent class can change and become unsuitable for extension. 21 | * Composition, unlike inheritance, doesn't break encapsulation, and there are fewer implementation dependencies. Also, it helps you keep each class encapsulated and focused on one task. 22 | * Advantage of delegation is that you can compose behaviors at runtime, and change the way they're composed. It's an extreme example of object composition. 23 | * Disadvantages of delegation are that dynamic nature can be hard to understand, and there can be runtime inefficiencies. Only use it when it simplifies, not complicates. 24 | * A design that doesn't take change into account risks major redesign in the future. Unanticipated changes are invariably expensive. 25 | 26 | -------------------------------------------------------------------------------- /different.markdown: -------------------------------------------------------------------------------- 1 | ## Different: Escaping the Competitive Herd 2 | 3 | by Youngme Moon 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Different-Escaping-Competitive-Youngme-Moon/dp/030746086X)!* 6 | 7 | ### introduction 8 | * pg 2: When overcome with choices, a connoisseur sees differences, while a novice sees similarities. 9 | * pg 8: If comparative diligence proves too taxing, the ability to differentiate dies, as does your ability to compete. 10 | * pg 11: The cadence of competition distracts companies from creating meaningful separation. 11 | 12 | ### instinct 13 | * pg 27: Comparative metrics capture a brand's personality as seen by customers and relative to competition. 14 | * pg 31: A competitive metric brings out the herd in us; when we measure something, we immediately aspire to it. 15 | * pg 34: Ask customers what they want, and their requests will be driven by what the competition offers. 16 | * pg 37: True or sustainable differentiation is a function of lopsidedness in qualities, not well-roundedness. 17 | * pg 41: Conformity manifests among groups of competitors that are already the most similar to begin with. 18 | 19 | ### the paradox of progress 20 | * pg 53: Augmentation-by-addition strengthens an existing benefit or adds a new benefit to a product. 21 | * pg 55: Augmentation-by-multiplication yields specialized versions of a product for specific customer segments. 22 | * pg 60: When an ABA becomes standard, customers feel entitled to what they were grateful for yesterday. 23 | * pg 63: When an ABM becomes standard, alternatives grow while the meaningful proportion of them shrinks. 24 | * pg 66: Business has been reduced to the artful packaging of meaningless distinctions as true differentiation. 25 | * pg 70: A hyper-mature category has trickling growth while ABA and ABM is more frenzied than ever. 26 | 27 | ### the category blur (how we cope) 28 | * pg 75: Online, people reveal who they are by revealing what they consume; it's shorthand for identity. 29 | * pg 79: Passion and comparative expertise in a brand, even if not objective or rational, is ultimate brand loyalty. 30 | * pg 83: In a hyper-mature category, activity is a blur, so we associate with the category, not the brands within. 31 | 32 | ### escaping the herd 33 | * pg 97: Strong brands change a person's consumption patterns; they create enthusiasts and loyalists. 34 | * pg 99: Differentiated brands render expectations irrelevant in the context of what they are offering. 35 | * pg 102: An "idea brand" offers a jaded, cynical, and bored group something they regard as special. 36 | 37 | ### reversal 38 | * pg 110: A "reverse-positioned brand" takes away what we expect, but then gives us what we don't. 39 | * pg 114: Reverse brands assume people are "over-satisfied" from the hyper-maturity of the category. 40 | * pg 116: The self-defeating anti-logic of augmentation is that it can actually diminish satisfaction. 41 | * pg 119: If elimination of benefits is thoughtfully executed, the brand's negatives can become personal positives. 42 | * pg 123: Removing the extraneous to shed new light on the fundamental crystalizes the value proposition. 43 | * pg 126: Reverse brands are lopsided; they are under pressure to be well-rounded without diluting their purity. 44 | 45 | ### breakaway 46 | * pg 135: A breakaway brand offers an alternative category rubric to replace the (sometimes arbitrary) default. 47 | * pg 139: We only buy into the re-categorization if we're ready to move from our current patterns of consumption. 48 | * pg 143: Breakaway brands deviate so much from our stereotypes that they cast doubt on those generalizations. 49 | * pg 145: Alternative category rubrics can invoke alternative but familiar behavioral scripts, so we "get it." 50 | * pg 151: A breakaway brand creates a new subcategory with tremendous first-mover advantage. 51 | 52 | ### hostility 53 | * pg 163: Traction requires friction, so hostile brands give us chafe; likable products slide off smooth as silk. 54 | * pg 167: Hostile brands are statement brands; they become infused with identity and a host of meanings. 55 | * pg 170: To be a fan of a hostile brand means you are always a customer, never a king; ownership is effortful. 56 | * pg 174: Hostile brands create solidarity, not just divisions; commonalities are magnified among the minority. 57 | 58 | ### difference 59 | * pg 184: Competition and conformity are linked; a race can only be run if everyone faces the same direction. 60 | * pg 194: Difference can't be concocted using a framework, without context; it depends on what is the norm. 61 | 62 | ### marketing myopia, revisited 63 | * pg 211: Spending too much time focused on your competitors leads you to copy them as a reflex. 64 | * pg 218: Eliminating skepticism as an option for a few minutes allows improbable ideas to turn into possibilities. 65 | * pg 220: Customers will demand better, but can't tell you how to make products different or that surprise them. 66 | 67 | -------------------------------------------------------------------------------- /difficult-conversations.markdown: -------------------------------------------------------------------------------- 1 | ## Difficult Conversations: How to Discuss What Matters Most 2 | 3 | by Douglas Stone, Bruce Patton, Sheila Heen and Roger Fisher 4 | 5 | ### Introduction 6 | 7 | * A difficult situation is any situation of which we fear the consequences. 8 | * Avoiding a problem will make you feel taken advantage of, your feelings will fester, you'll wonder why you didn't stick up for yourself, and you'll rob the other person of an opportunity to improve. 9 | * Do not set unrealisitic expectaitons. The best we can do is reduce fear and anxiety, and get better results in the face of tolerable odds. 10 | 11 | ### The Problem 12 | 13 | #### Chapter 1: Sort Out the Three Conversations 14 | 15 | * The gap between what you're saying and what you're thinking is part of what makes a conversation difficult. 16 | * The *what happened?* conversation is where we struggle with different stories about who's right, who meant what, and who's to blame. 17 | * Difficult conversations is almost never about getting the facts right, it's about conflicting perceptions, interpretations, and values. Not about what is true, but about what is important. 18 | * Moving away from the *truth assumption*, or assuming that you're right, lets us understand the perceptions, interpretations, and values of both sides. 19 | * We assume intentions from other people's behavior, but such intentions are complex, and so our invented stories are typically very inaccurate. 20 | * Talking about blame distracts us from exploring why things went wrong and how we might correct them going forward. 21 | * The *feelings* conversation is how to handle the feelings that will inevitably arise. 22 | * Difficult conversations do not just involve feelings, but they are at their very core about feelings, and so you cannot avoid talking about them. 23 | * The *identity* conversation looks inward, and looks at the effects on your self-esteem, your self-image, and your sense of place in the world. 24 | * Anytime a conversation feels difficult, something beyond the apparent substance of the conversation is at stake for you. 25 | * By moving toward a *learning conversation*, you increase your chances of persuading the other person, and that you will learn something that changes your understanding of the problem. 26 | 27 | ### Shift to a Learning Stance - The "What Happened?" Conversation 28 | 29 | #### Chapter 2: Stop Arguing About Who's Right -- Explore Each Other's Stories 30 | 31 | * One of the hallmarks of the *what happened?* conversation is that people disagree. 32 | * We think the other party is selfish, naive, controlling, or irrational, and our persistence leads to arguments, which in turn lead nowhere. 33 | * We don't see ourselves as the problem because what we are making sense. But what the other person is saying also makes sense. 34 | * Arguing inhibits our ability to learn. When we argue, we tend to trade conclusions, neither of which makes sense in the other person's story. 35 | * Telling someone to change makes it less likely that they will, because people almost never change without first feeling understood. 36 | * From the available information, our stories are built from our observations, our interpretations, and eventually our conclusions. 37 | * Our observations differ because we notice different things, and each person has access to information that the other person doesn't. 38 | * Our interpretations differ because we have differing past experiences that influence us, and we apply different implicit rules by which we live our lives. 39 | * Our conclusions differ because we are partisan, and they often reflect our own self-interest. 40 | * To move from certainty to curiosity, ask what information they have that you don't, and how might they see the world such that their view makes sense. 41 | * When trying to understand, embrace both stories. This allows you to assert your views and feelings without diminishing those of someone else, and vice versa. 42 | * When delivering bad news, understanding their view doesn't diminish the power to implement your own decision, and to be clear that your decision is final. 43 | 44 | #### Chapter 3: Don't Assume They Meant It: Disentangle Intent from Impact 45 | 46 | * One key mistake is that other people's intentions exist only in their hearts and minds. Consequently our assumptions about them are often incomplete or wrong. 47 | * We make an attribution obout another person's intentions based on the impact of their actions on us. 48 | * When we assume intentions, we are never charitable and always assume the worst, and we treat ourselves more charitably. 49 | * The biggest danger of assuming that the other person had bad intentions is that we easily generalize this to "they are a bad person." 50 | * An accusatory question meant to share our hurt, frustration, anger, or confusion makes the other person feel falsely accused, and hence that person becomes defensive. 51 | * Thinking that someone has bad intentions affects our behavior, which affects how that person treats us, which in turn fulfills our assumption of their bad intentions. 52 | * Another key mistake is thinking that upon clarifying that we had good intentions, the other person should not feel hurt. 53 | * The problem with focusing only on clarifying our intentions is that we end up missing significant pieces of what the other person is trying to say. 54 | * If you clarify your intentions at the beginning of the conversation, you are likely doing it without fully understanding what the other person really means to express. 55 | * To avoid the first mistake, disentangle impact and intent. You must be aware of the automatic leap from "I was hurt" to "You intended to hurt me." 56 | * Create an assumption about what the other person intended. Share it with them, and take care to label it as a hypothesis that you are checking rather than asserting as true. 57 | * To avoid the second mistake, acknowledge their feelings before your own intentions, and be open to reflecting on the complexity of your intentions. 58 | 59 | #### Chapter 4: Abandon Blame: Map the Contribution System 60 | 61 | * Focusing on blame is a bad idea because it inhibits our ability to learn what's really causing the problem and to do anything meaningful to correct it. 62 | * The urge to blame is based on a misunderstanding of what has given rise to the issues between you and the other person, and on the fear of being blamed. 63 | * Blame is about judging; we offer them the role of "the accused," and so they defend themselves any way they can. 64 | * Instead of blame, ask how each person contributed to the current situation, and what everyone can do about it as we go forward. 65 | * Even if punishment is appropriate, using it as a substitute for really figuring out what went wrong and why is a disaster. 66 | * In the blame frame, you have to believe others are at fault and you aren't to feel justified raising an issue; but this is rare, so you fail to raise important issues. 67 | * Find your contribution, but don't negate the other person's contribution. Both of you got into this mess, and it will probably take both of you to get out of it. 68 | * When focusing on contribution, don't put aside your feelings. Speaking more directly about them actually reduces the impulse to blame. 69 | * Exploring contribution does not mean blaming the victim; you can find contribution even in situations where you carry no blame. 70 | * When searching for your contribution, check whether you have avoided the problem until now, or whether you have an interpersonal style that keeps people at bay. 71 | * An intersection of conflicting assumptions about communication and relationships create problems. It is not a quesiton of right versus wrong. 72 | * To change how people interact, they need both an alternate model everyone thinks is better and the skills to make that model work better. This is difficult. 73 | 74 | -------------------------------------------------------------------------------- /do-more-faster.markdown: -------------------------------------------------------------------------------- 1 | ## Do More Faster 2 | 3 | by David Cohen and Brad Feld 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Do-More-Faster-TechStars-Accelerate/dp/0470929839)!* 6 | 7 | ### Theme 1: Idea and Vision 8 | * pg 12: If you can raise your prices and customers still buy your product, you've found a pain point to exploit. 9 | * pg 20: If you're not embarrassed when you ship your first version, you've waited too long. 10 | * pg 21: Shipping early and often gives you the unique competitive advantage of getting useful feedback on your product. 11 | * pg 24: By focusing on a niche, you can be the best at what you do with less work, and position and market yourself easier. 12 | * pg 28: Find what your users love, and then obsessively make it easier for them to do it. 13 | * pg 38: Bad experiences with half-baked products doesn't travel quickly; people don't talk about services they don't get value out of. 14 | * pg 50: If you feel like you're treading water, remember you're actually learning things to help you down the road. 15 | * pg 58: You must be proud of your product every minute of every day, and not only if it becomes a tremendous success. 16 | 17 | ### Theme 2: People 18 | * pg 68: A cofounder hanging out out of guilt or ambiguity is bad, especially if they claim equity you don't believe is due. 19 | * pg 72: Always strive to hire people better than you; better people are easier to manage and are more self-directed. 20 | * pg 74: The time and effort to "fix" a new employee is likely greater than hiring a better person, so fire early if needed. 21 | * pg 83: In the early stages you should have at most one non-technical cofounder; any more and they might get bored. 22 | * pg 88: Startups screw up a lot; build relationships with your customers and audience, and they'll forgive you. 23 | * pg 92: When mentors give advice, always close the loop; they may learn something, and you'll keep them coming back. 24 | * pg 97: Communication to all stakeholders should increase in bad times; fight the tendency to keep it inside. 25 | 26 | ### Theme 3: Execution 27 | * pg 115: Don't be afraid to throw things away; you can't protect a brand that doesn't exist, so no one cares anyway. 28 | * pg 119: It's important to create an environment where everyone can admit mistakes; this has to be driven from the top. 29 | * pg 130: Gather as much data as you can and measure every aspect of your business, and constantly revisit the data. 30 | * pg 134: Sales that require handholding by the founders is not scalable; only a self-serve process is. 31 | * pg 142: Send and receive e-mail from your company domain so that it is treated as a branding opportunity. 32 | * pg 143: If contacting someone you don't know, limit your e-mail to three sentences; put any question as the last one. 33 | * pg 148: Stay small and take incrementally harder technology steps; don't shoot for the moon at the start. 34 | * pg 152: Celebrating without continued meaningful progress creates a debt of energy, momentum, and credibility. 35 | * pg 162: The new big feature you're working on may not be so big; measure the impact of each feature you release. 36 | 37 | ### Theme 4: Product 38 | * pg 179: Don't be afraid of competitors; learn from them, but even reach out to them and get to know them. 39 | * pg 182: Always ask what is the thing that matters most to making progress right now, and let the other bright ideas wait. 40 | * pg 184: Key metrics to measuring behavior and happiness are acquisition, activation, retention, referral, and revenue. 41 | * pg 187: Set an achievable and worthwhile goal; staying with it will keep you focused through any rough spots. 42 | * pg 194: Beware of big companies; the risk is completely imbalanced, and they are a time sink so fail fast with them. 43 | 44 | ### Theme 5: Fundraising 45 | * pg 203: The dynamics with your investors peak the day after you close the investment; your job is to sustain it. 46 | * pg 206: Early hires may seek the peace of mind offered by backing of a VC despite growing revenues and profitability. 47 | * pg 210: If you work with an established company as a partner, don't be bashful in asking for funding. 48 | * pg 214: Take the time to fine-tune and get your idea right, and you'll find that competitors aren't as close as you think. 49 | * pg 217: Beware angel group members; ask how long they've been in it, recent investments, amounts, and references. 50 | * pg 223: When pitching, present a compelling product and have the right answers to any conceivable question. 51 | * pg 228: Engaging mentors and investors before fundraising mitigates their aversion to risk and builds their excitement. 52 | * pg 223: When pitching, describe the problem, and make sure they really feel the pain before presenting your solution. 53 | * pg 236: Good early investors take 20 to 33 percent; any more creates dilution later and leaves too little for the founders. 54 | * pg 241: Lead angel investors will say no quickly; don't waste time trying to hesitant ones into leads. 55 | 56 | ### Theme 6: Legal and Structure 57 | * pg 250: Conversion from an LLC to a C-corp requires going through a complete merger; an S-Corp to C-Corp is easy. 58 | * pg 254: Delaware law provides stakeholders with certainty and uniformity regarding their relationship to the company. 59 | * pg 258: Find a lawyer who has worked with companies you want to emulate, and develop a collaborative relationship. 60 | * pg 259: You lose quickly by iterating on drafts because the terms weren't clear; clarify with cofounders up front. 61 | * pg 262: Through vesting, you don't tie up equity with someone who leaves, which isn't fair and scares investors. 62 | * pg 263: Owning lots of stock outright may save you from investors, but vesting saves you from cofounders. 63 | * pg 270: The 83(b) election trades income tax for lower capital gains tax upon vesting; the option expires after 30 days. 64 | 65 | ### Theme 7: Work-Life Balance 66 | * pg 292: Going for walks, hikes, or rides with coworkers allow for talk without interruption and feeling confined. 67 | * pg 296: Exercise five to six days a week for 20 minutes, eat right 80 percent of the time, and sleep at least 7 hours. 68 | * pg 301: Taking a break sets the good example that no one is indispensable, and builds trust throughout your team. 69 | 70 | -------------------------------------------------------------------------------- /dom-scripting.markdown: -------------------------------------------------------------------------------- 1 | ## DOM Scripting 2 | 3 | by Jeremy Keith 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/DOM-Scripting-Design-JavaScript-Document/dp/1430233893)!* 6 | 7 | ### Chapter 1 8 | * ECMAScript is the proper name of Javascript, which is not related to Java. 9 | * DHTML was a shorthand term for describing the combination of HTML, CSS, and Javascript. 10 | * DOM is generic: a model that can be used by any programming language to manipulate any document in any markup language. 11 | 12 | ### Chapter 2 13 | * Semicolons aren't required in Javascript unless multiple statements appear on one line, but are good practice. 14 | * Use C or C++ commenting styles, which are `//comment` and `/*comment*/`, respectively. 15 | * Declare numeric or associative arrays by using the same `Array` class. 16 | * Prepending a variable declaration with `var` will treat the variable as a local variable. 17 | * Objects have properties (variables) and methods (actions as functions). 18 | * Native objects are those part of the Javascript library, such as `Array`, `Date`, and `Math`. 19 | * Host objects are those supplied by the web browser, such as `Form`, `Image`, and `Element`. 20 | 21 | ### Chapter 3 22 | * The properties and methods of the window object are often referred to as the Browser Object Model. 23 | * Element attributes are represented by attribute nodes, or children of the element, in the DOM. 24 | * Method `getElementsByTagName` accepts the wildcard value `*`. 25 | * Method `getAttribute` will return `null` if an attribute does not exist. 26 | 27 | ### Chapter 4 28 | * In an `onclick` handler, you can use the `this` keyword to refer to the element node. 29 | * Returning `false` from the `onclick` handler of an `img` element will disable the default behavior of following the `src` URL. 30 | * The `body` element of the document can be retrieved using `document.body`. 31 | * Whitespace and line breaks between elements in the HTML source are interpreted in nodes in the `childNodes` array. 32 | * The `nodeType` attribute has 12 values, where `1` is an element node, `2` is an attribute node, and `3` is a text node. 33 | * The `nodeValue` attribute contains the text value of a text node. 34 | 35 | ### Chapter 5 36 | * Making your web site navigable by users without Javascript is called graceful degradation. 37 | * The JavaScript pseudo-protocol allows invoking JavaScript from within a link, but does not allow graceful degradation. 38 | * Likewise, defining a link as `#` and using an inline event handler does not allow graceful degradation. 39 | * Progressive enhancement is using JavaScript and the DOM to enhance sites that are already functional without them. 40 | * When `window.onload` is invoked, the document (and hence DOM) within it is guaranteed to exist. 41 | * Testing whether the browser supports some DOM property or method in a conditional is called object detection. 42 | 43 | ### Chapter 6 44 | * When applying an anonymous function, the `this` keyword will refer to the element it is bound to. 45 | * To invoke multiple functions on loading, you must bind a single function to `window.onload` that invokes each. 46 | * To be cautious, test not only whether DOM methods exist, but expected DOM nodes and their attributes exist. 47 | * Don't use the `onkeypress` event handler -- it can be invoked even if the user presses the Tab key. 48 | * The `onclick` event handler is also invoked if you press Return while tabbing from link to link. 49 | * HTML-DOM extends the DOM Core with properties like `document.forms` and `document.images`. 50 | 51 | ### Chapter 7 52 | * You must invoke the `document.write` method from a `script` element in the body, which is obtrusive, so avoid it. 53 | * The `innerHTML` element isn't a web standard, and referencing the inserted elements still requires the DOM, so avoid it. 54 | * Both `document.write` and `innerHTML` won't work with XHTML served with MIME type `application/xhtml+xml`. 55 | * The `createElement` method creates an element not attached to the DOM tree, called a `DocumentFragment`. 56 | * Text elements are created with method `createTextMode`, not `createElement`. 57 | * There is an `insertBefore` method for inserting elements, but you have write your own `insertAfter` method. 58 | 59 | ### Chapter 8 60 | * An abbreviation is any shortened version of a word, while an acronym is an abbreviation pronounced as a word. 61 | * You can iterate through the keys of an `Array` object using the construct `for (variable in array)`. 62 | * Sniffing for a specific browser name and version number is bound to cause problems and convoluted code. 63 | * Using DOM you can add meaningful content from attributes that browsers typically ignore, like `cite` for `blockquote`. 64 | * Convention for the `accesskey` attribute is `1` for home, `4` for search, and `9` for contact. 65 | * The accessibility statement lists which access keys have been assigned on a page. 66 | 67 | ### Chapter 9 68 | * Every element has a `style` property -- it is an object, and not a simple string. 69 | * CSS properties are converted to camel case, so the `font-family` property becomes `element.style.fontFamily`. 70 | * Usually style properties are returned in the same units in which they are set, for example `em` vs `px`. 71 | * The DOM can only return inline style information, not style applied through external CSS files or `style` tags. 72 | * But the DOM can retrieve styles that the DOM itself assigns through the `style` property. 73 | * CSS pseudo-classes and DOM scripting can overlap when styling elements based on state, like `:hover` versus `:onmouseover`. 74 | * The DOM can apply styles defined in CSS files by setting the element's `class` attribute, or its `className` style property. 75 | 76 | ### Chapter 10 77 | * Elements have a position of `static` by default, but by using `relative` we can use the `float` property on them. 78 | * The `setTimeout` method returns a handle to the function that can be cancelled using `clearTimeout`. 79 | * Methods `parseInt` and `parseFloat` extract the number starting any string, e.g. `39 steps` converts to `39`. 80 | * The `overflow` property specifies how to handle content that is larger than the containing element. 81 | * To persist variables between method calls, set them as element properties instead of making them global. 82 | 83 | ### Chapter 11 84 | * You can split your CSS into multiple files: one for layout, one for color, and one for typography. 85 | * The address of the current window can be retrieved through property `window.location.href`. 86 | * To frame a slideshow element, make the frame image an absolutely positioned child with a high z-index. 87 | * Invoking the `focus` method on a form text element will place the cursor inside it. 88 | * The `form.elements` array contains only descendant form elements, which differs from `form.childNodes`. 89 | 90 | ### Reference 91 | * If the boolean argument to `cloneNode` is `true`, all children nodes are copied; if `false`, only its attributes are. 92 | * The newly created node returned by `cloneNode` is not automatically added to the document. 93 | * Methods `appendChild`, `insertBefore`, and `replaceChild` will move elements that already exist in the DOM. 94 | * If the `hasChildNodes` property is `false`, `childNodes` is an empty array, and `firstChild` and `lastChild` are `null`. 95 | * The `nodeName` property for a element node is its tag type, and for an attribute node is the attribute name. 96 | * The `nodeValue` property for an attribute node is its value, and for a text node is its text, but is `null` for element nodes. 97 | * You can't set `nodeValue` if it is already `null`, i.e. you can't assign a value to element nodes. 98 | * The nodes adjacent to an element node can be retrieved with `nextSibling` and `previousSibling`. 99 | 100 | -------------------------------------------------------------------------------- /dont-make-me-think.markdown: -------------------------------------------------------------------------------- 1 | ## Don't Make Me Think 2 | 3 | by Steven Krug 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Dont-Make-Me-Think-Usability/dp/0321344758)!* 6 | 7 | ### Chapter 1: Don't make me think! 8 | * pg 11: Krug's first law of usability is don't make the user think -- what it is and how to use it should be self-evident. 9 | * pg 15: Every question raised adds to our cognitive workload, distracting attention from the task at hand. 10 | * pg 18: If you can't make a page self-evident, make it self-explanatory, meaning it requires a little thought to comprehend. 11 | * pg 19: The most important reason to make things self-evident is that users don't spend much time on a page anyway. 12 | 13 | ### Chapter 2: How we really use the web 14 | * pg 23: We scan pages instead of reading them for things that match the task at hand, personal interests, or hardwired trigger words. 15 | * pg 24: We don't choose the best option, we choose the first reasonable option, called satisficing. 16 | * pg 26: We don't figure out how things work, we forge ahead and muddle through without reading instructions. 17 | * pg 28: While muddling through may work sometimes, is efficient and error-prone; users will leave for a better designed site. 18 | 19 | ### Chapter 3: Billboard Design 101 20 | * pg 31: Create a clear visual hierarchy, relying on prominence, grouping, and nesting of elements to provide cues. 21 | * pg 36: Stick to conventions unless you know you have a better idea and everyone you show it to agrees. 22 | * pg 36: Break up pages into clearly defined areas, and make obvious what is clickable on a page. 23 | * pg 38: Keep visual busy-ness, or elements clamoring for attention, and background noise to a minimum. 24 | 25 | ### Chapter 4: Animal, vegetable, or mineral? 26 | * pg 41: Krug's second law of usability is it doesn't matter how many times we have to click, as long as each is an easy choice. 27 | 28 | ### Chapter 5: Omit needless words 29 | * pg 45: Krug's third law of usability is to get rid of half the words on each page, then get rid of half of what's left. 30 | * pg 46: Remove happy talk, which is introductory text that is sociable but content-free. 31 | * pg 47: Eliminate the need for instructions by making everything self-explanatory, since users muddle through anyway. 32 | 33 | ### Chapter 6: Street signs and Breadcrumbs 34 | * pg 51: People won't use your web site if they can't find their way around it. 35 | * pg 54: Search-dominant users will look for the search box first, while link-dominant users will browse the site first. 36 | * pg 57: Unlike browsing physical spaces, sites offer no sense of scale, no sense of direction, and no sense of location. 37 | * pg 58: The home page is important because it is a fixed place, always able to give the user a fresh start. 38 | * pg 63: Persistent navigation is the set of navigation elements that appear on every page, except the home page and forms. 39 | * pg 66: Don't put more than five utilities -- links to important elements not part of the content hierarchy -- in the persistent navigation. 40 | * pg 68: Make the search box a simple box with no options, but allow limiting the scope of the search on the page of results. 41 | * pg 73: Every web page needs a name that matches the words clicked to get there. 42 | * pg 75: Subtlety is one of the traits of sophisticated design, but users are in such a hurry they miss subtle cues. 43 | * pg 78: Make breadcrumbs small and at the very top of a page, where they don't interfere with the primary navigation. 44 | * pg 79: Don't substitute the last, boldfaced item in the breadcrumbs list for a page name that frames the content. 45 | * pg 82: An active tab should be a different color and physically connect with the space below it so it "pops" to the front. 46 | * pg 84: Have a tab selected when the user enters the web site. 47 | * pg 85: Every site should have a clearly identifiable site ID, page name, sections, local navigation, "you are here" indicator, and search box. 48 | * pg 91: Always avoid stacking underlined text links, as they are hard to read. 49 | * pg 93: If scoping a search, add the word "for" so it reads like a sentence: "Search ___ for ___." 50 | 51 | ### Chapter 7: The first step to recovery is admitting that the Home page is beyond your control 52 | * pg 99: A home page should answer: what is this, what do they have here, what can I do here, why should I be/stay here? 53 | * pg 101: Use a tagline next to the site ID and a welcome blurb to introduce your site. 54 | * pg 103: A welcome blurb is a terse description; don't use a corporate mission statement. 55 | * pg 105: A tagline conveys a value proposition; don't use a motto, which is a lofty and reassuring principle, goal, or ideal. 56 | * pg 107: A home page should answer where to start, clearly allowing for searching or browsing. 57 | * pg 108: Home page navigation and persistent navigation, two versions of the same thing, must have the same section names. 58 | * pg 110: Consider static lists over pulldown menus, which don't allow formatting for readability and require scrolling. 59 | 60 | ### Chapter 8: "The Farmer and the Cowman Should Be Friends" 61 | * pg 127: The culture of hype (e.g. marketing) creates promises that must be delivered by the culture of craft (e.g. programmers). 62 | * pg 128: The "average user" is a myth, so don't design for him; what works is good, integrated design that fills a need. 63 | * pg 129: Usability testing moves the discussion of what's right or what wrong to what works or what doesn't work. 64 | 65 | ### Chapter 9: Usability testing on 10 cents a day 66 | * pg 135: Any testing with anyone is better than no testing, and a bit of testing earlier is better than a lot of testing later. 67 | * pg 138: Test with three or four users each round, and test for more than one round to catch new problems. 68 | * pg 139: It doesn't much matter whom you test with -- take anyone you can get, and grade on a curve. 69 | * pg 143: In lieu of a camcorder, use a screen recorder during user tests to easily share and review them later. 70 | * pg 144: Before designing your own site, test a live, comparable site to see what works and what doesn't. 71 | * pg 150: "Get it" testing checks if the user understands the site's value proposition from the home page without further navigation. 72 | * pg 154: "Key task" testing assigns the user a task, and observing the steps taken. Allow the user some choice in the task. 73 | * pg 156: Don't agonize over finding the perfect solutions to found problems -- just try something else and iterate. 74 | * pg 157: When triaging, ignore "kayak problems," where the user goes astray but gets back on track immediately without any help. 75 | * pg 158: Good design is a delicate balance, so when fixing a problem, ensure that you aren't introduce new ones. 76 | 77 | ### Chapter 10: Usability as a common courtesy 78 | * pg 163: Think of users as having a reservoir of goodwill; if you deplete it, they might leave, and perhaps never return. 79 | * pg 164: Don't punish the user for not doing things your way, e.g. entering a phone number in a particular format. 80 | * pg 167: Provide a graceful and obvious way for the user to recover from errors. 81 | 82 | ### Chapter 11: Accessibility, Cascading Style Sheets, and You 83 | * pg 175: If something confuses most people who use your site, it's almost certain to confuse users with accessibility issues. 84 | * pg 178: Put your web site content in the order that a screen reader should read it, and use CSS to adjust its position. 85 | * pg 179: Put a "Skip to Main Content" link at the beginning of each page. 86 | 87 | ### Chapter 12: Help! My boss wants me to ___. 88 | * pg 182: Asking for too much personal data can attract false data, or drive people away from submitting anything. 89 | * pg 183: "Sizzle" on a web site can get in the way, cause long load times, or just look tacky. 90 | 91 | -------------------------------------------------------------------------------- /effective-tech-lead-notes.markdown: -------------------------------------------------------------------------------- 1 | These are some notes from insightful blog posts on what it takes to be an effective tech lead. 2 | 3 | ### [Effective Technical Leadership](https://medium.com/@davidbyttow/effective-technical-leadership-b193a544e771) 4 | 5 | What makes a badass TL is broken down into three A's: attributes, activities and actions. 6 | 7 | #### Attributes 8 | 9 | Over time, you should always be increasing three attributes: Knowledge, Speed, and Awareness. 10 | 11 | * Knowledge: If work is completed, but waiting to be reviewed, then you should almost always drop your own work and help move it forward. 12 | * Speed: You should strive to be ultra-responsive and capable of making instant decisions, always kicking the ball forward. 13 | * Awareness: You should be able to keep the current state of the entire project in your head at all times. Otherwise, you cannot be aware of potentially imminent blockers. 14 | 15 | #### Activities 16 | 17 | The two most important things that a tech lead can do also happen to be exact polar opposites: block and unblock. 18 | 19 | * Block: The tech lead needs to be alert and aware to what is going on in the project, always ready to jump in and block bad decisions before they are made, typically armed with a better solution. Blocking should not stop progress, it course corrects so things can keep moving. Think harness, not safety net. 20 | * Unblock: If someone has a question, you should be able to either give an answer or bring in the right person to field it. 21 | * Redirect: Mentally build an expert index so you always know where to find an answer. Proactively adding the right individuals to any thread or code review can help increase the overall quality of the work. 22 | * Decide: The faster you can reach a decision, the quicker others can act on it. When you do listen to your instincts, make sure that you're making a robust decision that can stand the test of time. When given a set of options, reduce the number to 2, see if there is a best choice based on experience or data. If not, redirect to someone better suited, or block the decision from being made or unblock it by going with your instinct. 23 | * Show: Have the respect and trust of your team, which is best accomplished by demonstrating that you know your stuff. 24 | 25 | #### Actions 26 | 27 | There is a long assorted list. Here is an attempt to put its items into buckets: 28 | 29 | * Management responsibilities "outward": Say "no" often to new or unnecessary features, vet the product's privacy and security concerns, work with other engineering teams especially on dependencies, etc. 30 | * Management responsibilities "inward": Create and maintain launch and testing and release plans, shield engineers from management, setup team fix-its and hackathons and bug scrubs, escalate blocking issues as necessary, and load-balance work among the team, etc. 31 | * Other management responsibilities: Help create and stack rank project priorities, create target milestone dates and correct and refine them as needed, etc. 32 | * Best technical practices: Define best practices for issue tracking, maintain on-call and onduty processes, and ensure tests are being written for core functionality, etc. 33 | * Team growth: Recruit engineers, review code in detail and give useful feedback, read and write and give feedback on design documents, help onboard, etc. 34 | * Technical action: Identify technical debt, generate new ideas and elegant solutions, debug difficult production issues, write the right code at the right times, etc. 35 | 36 | 37 | ### [5 Tips for Being an Effective Tech Lead](https://www.thoughtworks.com/insights/blog/5-tips-being-effective-tech-lead) 38 | 39 | #### Learn to Delegate 40 | 41 | * When you take on the harder problems, it also misses an opportunities for other developers to grow and problem solve. 42 | * For problems when your experience and knowledge are important, find a way to delegate but still be involved. Kicking off a design session to discuss general approaches, or reviewing progress a regular basis. 43 | 44 | #### Find Time to Code 45 | 46 | * Being involved in the code helps you build respect with the rest of the team, and keeps your knowledge up to date and current with constraints, problems, and the "shape" of the codebase. 47 | 48 | #### Visualise Your Architecture 49 | 50 | * Have a visual representation of their system architecture on-hand and uses it to have discussions with developers. 51 | * Host a whole-team whiteboard session. Focus on attributes that drive your architectural vision (scalability, performance, usability concerns, etc) and how they have shaped your architecture. Call out assumptions and the historical context. 52 | 53 | #### Spend Time 1-on-1 With Team Members 54 | 55 | * Anything that you can do to make each person on your team better makes the overall team better. 56 | * Understand the backgrounds, strengths, interests and goals of the team members. Align their tasks with their responses. 57 | * Connect developers with opportunities for them to grow. 58 | 59 | #### Learn to Speak the Language of the Business 60 | 61 | * To communicate technical concepts to non-technical people, find the terms that business people use and find ways to explain tasks in those terms. 62 | 63 | 64 | ### [What It Takes to Be a Great Technical Lead](http://elegantcode.com/2008/12/03/what-it-takes-to-be-a-great-technical-lead/) 65 | 66 | * Possess strong technical skills. You’re also responsible for fixing technical issues that your teammates can't solve. If you can't fix something yourself, find an acceptable workaround. 67 | * Teach your teammates. If there are some core principles or practices that you want them to apply to their work, you must invest time to promote that understanding. 68 | * Trust your teammates. If you trust a teammate, that developer will respond with improved output. The quality may not be ideal, but the developer will show more effort. 69 | * Stimulate self-organization. Do not simply assign tasks to your teammates, but organize planning meetings where members can choose their tasks. But promote a balance in the assigned tasks. 70 | * Don't keep the coolest technical tasks for yourself. Give your teammates the opportunities to work on such tasks. This raises morale, trust, and skill. 71 | * Try to prevent overtime as much as possible. If in a situation where the team must put in some overtime, don't tell your teammates they have to do it; instead ask them if they want to do it. Also do not go home early while your teammates are still working. 72 | * Remember that you are responsible for the final result. Never put the blame of something wrong on one of your teammates. 73 | * Give credit where credit is due. Give credit where it is due, and make sure everyone else knows about it too, especially management. Never take credit for the work of a teammate. 74 | * Realize that your teammates are not your developers. Having a leadership role does not mean that you can boss around your teammates. This destroys morale. 75 | 76 | -------------------------------------------------------------------------------- /eric-barker-newsletter.markdown: -------------------------------------------------------------------------------- 1 | ## Eric Barker 2 | 3 | ### [New Neuroscience Reveals 5 Rituals That Will Make You Happy](https://www.bakadesuyo.com/2019/05/neuroscience/) 4 | 5 | #### Challenge Unhelpful Thoughts 6 | 7 | These include: 8 | 9 | 1. Black and white thinking 10 | 2. Unrealistic expectations 11 | 3. Selective attention, i.e. always looking for the negative 12 | 4. Disqualifying the positive, i.e. life could always be worse, but it's not 13 | 5. "Should thoughts," i.e. insisting the world bend to your will 14 | 15 | #### Do More Stuff 16 | 17 | If you're active and doing things, you're less likely to dwell on the negative. Being idle makes it easy to dwell on the negative. 18 | 19 | Lots of little positives is better for happiness than occasionally accomplishing some big, long-term audacious goal. 20 | 21 | Do more of: 22 | 23 | 1. Enjoyable stuff 24 | 2. Achievement stuff, i.e. go defeat your goals 25 | 3. Meaningful stuff 26 | 4. Physical stuff, i.e. exercise 27 | 5. Social stuff 28 | 29 | #### Get Social 30 | 31 | The happiest people have strong relationships, so be clear on who your support network is: 32 | 33 | 1. Who appreciates you or thinks highly of you? 34 | 2. Who is there to help you out if needed? 35 | 3. Who can you call, text, or visit for emotional support? 36 | 4. Who is good at giving you advice or helping you make decisions? 37 | 5. Who do you like spending time with? 38 | 6. Who can you do activities with? 39 | 40 | To make this logistically easier and even more powerful, be part of a group that meets regularly. Also cut ties with toxic people. (Think of your life as a bonsai tree – you need to water it and fertilize it, but you need to trim it to keep it healthy.) 41 | 42 | #### Slay Unhelpful Habits – Gently 43 | 44 | Instead of self-criticism, try self-reassurance. Think less about your mistakes and more about the qualities of yourself you like best. 45 | 46 | Feeling good about yourself gives you the energy and confidence to keep improving. 47 | 48 | #### More Gratty-tood 49 | 50 | Expressing gratitude only changes your perspective. Gratitude is even nicer if you express it to other people. 51 | 52 | #### Sum Up 53 | 54 | Don't think of this as a lot to do. Instead, look at it as having so many ways there are to be happier! 55 | 56 | As Arthur Ashe said, "To achieve greatness, start where you are, use what you have, do what you can." 57 | -------------------------------------------------------------------------------- /first-round-capital-the-review.markdown: -------------------------------------------------------------------------------- 1 | ### Three Powerful Conversations Managers Must Have To Develop Their People 2 | 3 | http://firstround.com/review/three-powerful-conversations-managers-must-have-to-develop-their-people/ 4 | 5 | by Russ Laraway 6 | 7 | * Have career conversations, or deep, meaningful dialogue coupled with action plans around measurable goals, to keep your employees around for longer. 8 | * You shouldn't avoid career conversations, because those people will grow with or without you. 9 | * Ways to screw up career conversations include not having them at all, limiting them to the near future, just checking the box, or improvising in a half-baked way. 10 | * Each step below requires an hour of investment approximately two weeks apart form one another, and explores the employee's past, present, and future. 11 | * First, ask "Starting with kindergarten, tell me about your life." 12 | * Probe with more questions when they talk about pivots. Look for the patterns that give you a strong signal and write them down. 13 | * Second, ask the employee what he or she would be doing at the pinnacle of his or her career, when feeling challenged, engaged, and not wanting anything else. 14 | * Ask what size company they want to work for, what industry they want to work in, and whether they want to be a in a senior IC role or a senior management role? 15 | * Ideally you can place the employee in a position that will deliver experiences that will compound and prepare him or her for where he or she is headed. 16 | * Third, create a detailed action plan, which shows how your employee is going to reach that vision for themselves. It is a roadmap to self-actualization. 17 | * To develop a career action plan, first develop their role, or make adjustments to take them toward the end goal in their career. 18 | * Second, enhance their network, helping them identify the people who can inform and influence where they're trying to go. 19 | * Third, define their immediate next step, which can involve advocating for them to make a lateral or vertical move, or giving them goalposts to hit on a quarterly basis. 20 | * Finally, enlist others to help hone their skills, such as sending your employees to training like conferences or workshops. 21 | * You must intently invest in each employee, and make sure they're getting the tools and experiences they need to advance in the way they aspire to advance. 22 | 23 | ### Power Up Your Team with Nonviolent Communication Principles 24 | 25 | http://firstround.com/review/power-up-your-team-with-nonviolent-communication-principles/ 26 | 27 | by Ann Mehl and Jerry Colonna 28 | 29 | * A closed question is a yes/no question, to which there is a wrong and right answer, and it makes you tense, agitated, and defensive. 30 | * An open question acknowledge the level of effort you’re already putting in and offers to help. It asks for more than a one-word reply, and seeks valuable input. 31 | * When someone leads from a place of fear, they will ask closed questions and get closed answers. 32 | * There are four ingredients of nonviolent communication, or sometimes called compassionate communication. 33 | * First, observe. Record these observations in your mind without assigning value to them, and hold back from judgment or evaluation. For example, "What I'm hearing you ask me is..." 34 | * Second, perform an emotional audit. Choose words that are specific to your experience — not words that insinuate what another is doing. For example, "I am feeling tired because..." 35 | * Third, list the needs that are connected to the feelings you've identified. What is lacking? For example, "Because I value my happiness, I need..." 36 | * Fourth, define the requests, which you use to get your needs. You want to take the other person's feelings and needs into account, so build flexibility and freedom into your ask. For example, "I am wondering if..." 37 | * Watch out for the first step, because the jump from observation to judgment happens almost immediately. 38 | * Nonviolent communication strips away the narrative people automatically build in their heads, which disables you from working effectively. 39 | * When conflict arises in the workplace, people either address it head on without any filter (fight), or hide and hope it dissipates (flight). 40 | * The A-E-I-O-U method assumes that both sides of any argument mean well. It stands for Acknowledge, Express, Identify, Outcome, and Understanding. 41 | * Acknowledge: Announce that you know the person is trying to do good, and that you do have a grasp on why they are doing what they're doing. 42 | * Express: Affirm the positive intention and express your own specific concern. Start statements with "I think..." or "I feel..." to make clear that the words are your own. 43 | * Identify: Clearly define your objectives and recommendations. Use "I would like..." instead of "I want..." Try to build consensus by demonstrating how your solution will resolve everyone's concerns. 44 | * Outcome: Outline the benefits of what's in it for your opposition if they accommodate you. Include simple recognition such as "Thanks, I appreciate your flexibility on this issue." 45 | * Understanding: Ask for feedback, and solidify a next action or step, or work together to develop alternatives. 46 | * During this process keep calm, and apply active listening skills by continuing to rephrase things to ensure crystal clear understanding. 47 | * One way to signal a shift is to ask colleagues to repeat back what you just said to ensure you were fully understood. Emphasize it's so that you can improve the way you relay information, and not because you're afraid they won't understand. 48 | * Another is to say early and often that all staff members are welcome to speak up in any situation. 49 | * Finally, pay attention to all non-verbal communication when talking with someone, and remember how critical it is to observe without judgment. 50 | * The earlier you start using these techniques the better, because each new employee you onboard will be initiated to your improved, clear style of communication. 51 | 52 | ### Radical Candor: The Surprising Secret to Being a Good Boss 53 | 54 | http://firstround.com/review/radical-candor-the-surprising-secret-to-being-a-good-boss/ 55 | 56 | by Kim Scott 57 | 58 | * The single most important thing a boss can do if focus on guidance: Giving it, receiving it, and encouraging it. 59 | * If you imagine a graph with the vertical axis as caring personally and the horizontal axis as challenging directly, radical candor is in the top right. 60 | * By caring personally, or "giving a damn," you build up the capital to challenge directly, or "be willing to piss people off." 61 | * HHIPP: Radical candor is humble, helpful, immediate, in person (in private if it's criticism and in public if it's praise) and it doesn't personalize. 62 | * Challenging directly without caring personally is the quadrant of obnoxious aggression. Caring personally without challenging directly is the quadrant of ruinous empathy. 63 | * The final quadrant, of neither caring personally nor challenging directly, is manipulative insincerity. 64 | * There are four things a manager can do to create an environment of meaningful guidance. 65 | * First, find opportunities for impromptu feedback. The goal with day-to-day guidance is to push toward radical candor. 66 | * Second, make backstabbing impossible. Squelch political or passive behavior, and stop acting as well-meaning but ultimately harmful go-betweens. 67 | * Have the employees try to resole things between themselves, and then if that fails, become involved with both parties present. 68 | * At that point, make a strong effort to find a solution, or else conflicts will become too difficult to resolve, people will avoid them, and you'll create a passive-aggressive culture. 69 | * Third, make it easier to speak truth to power. If you are managing managers, institute skip-level meetings with their direct reports. 70 | * Ask the direct reports for one or two things they'd like their boss to do differently, and then have the boss institute an action plan, and over-communicate it with his or her team. 71 | * Fourth, put your own oxygen mask on first. You can't give a damn about other people if you don't give a damn about yourself. 72 | 73 | ### This is How Effective Leaders Move Beyond Blame 74 | 75 | http://firstround.com/review/this-is-how-effective-leaders-move-beyond-blame/ 76 | 77 | by Dave Zwieback 78 | 79 | * Blame and biasses, such as hindsight bias, gives us a convenient story about what happened in any negative situation. To the extent that a story is comfortable, we believe that it's true. 80 | * Blame and bias can short-circuit any real learning. Those with information that could materially improve future outcomes now have more reasons to withhold it because they don't want to be punished. 81 | * It's impossible to learn without all the data, without the full account of what happened. This is why information is more important than punishment. 82 | * By shifting the role of the individual in an incident from suspect to witness, the process of learning becomes inclusive and far richer. 83 | * To banish blame, convert your traditional postmortem into a learning review by following three steps. 84 | * First, set the context: Figure out what contributed to a successful iteration so that we can feed this learning back into our organization and systems, and make subsequent iterations even better. 85 | * Remind your team that they're all operating within complex systems, and that the way they function and fail is often unpredictable. 86 | * Human error is a symptom, and never the cause, of trouble deeper within the system. We accept that no person wants to do a bad job. 87 | * Second, build a timeline: It should capture what people were thinking at the time it was happening, namely what each person knew, when they knew it, and how they knew it. 88 | * During the learning review, listen for and help participants avoid blaming, cognitive biases, and counter-factuals such as "we could have," "we should have," "if only," and "we didn't." 89 | * Third, close the loop: Determine and prioritize the remediation items, and then publish the learning review as widely as possible. 90 | * If the incident impacted customers, use the 3 Rs to structure the writeup, namely Regret, Reason, and Remedy from Drop the Pink Elephant by Bill McFarlan. 91 | * If the magnitude of a mishap or success is great, then you can be sure that the opportunity to learn will be, too. 92 | -------------------------------------------------------------------------------- /how-children-learn.markdown: -------------------------------------------------------------------------------- 1 | ## How Children Learn 2 | 3 | by John Holt 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Children-Learn-Classics-Child-Development/dp/0201484048)!* 6 | 7 | ### Learning About Children 8 | 9 | * A particular skill is not "located" in any one part of your brain, but you can say that one part of your brain is critical to carrying out a particular skill. 10 | * It is difficult to separate what we think about something from what we feel about it. 11 | * We cannot learn how children normally operate in experiments performed under artificial or even threatening circumstances. 12 | * It is only in the presence of loving, respectful, trusting adults that children will learn all they are capable of learning, or reveal to us what they are learning. 13 | 14 | ### Games & Experiments 15 | 16 | * Carl Orff showed that when children are given many opportunities to improvise, to make up their own chants, rhythms, and tunes, their musical and verbal growth can be very rapid. 17 | * A child has no stronger desire than to make sense of the world, to move freely in it, and to imitate bigger people. So there must be something very strong with much of what we do in school if we feel the need to worry so much about "motivation." 18 | * Keeping children from touching anything that is not theirs dampers their confidence. Instead we should teach children to treat objects carefully, use them as they are meant to be used, and to put the objects back where they belong. 19 | * It must be exciting for a child, playing a game with an adult, to feel that by doing a certain thing, he can make that omnipotent giant do something, and that he can keep this up for as long as he likes. 20 | * Very young children have what we could call an Instinct of Workmanship. They want to do something as well as they can, not to please someone else but to please themselves. 21 | * Children don't seem to be born fearful of things. They learn what to fear from their elders. 22 | * Children, especially young ones, are very sensitive to emotion. They not only catch everything they feel, but blow it up to a larger-than-life size. 23 | * Children are cruel to each other, but they become distressed if near another child who is badly hurt or very unhappy. Few children are capable of the kind of sustained, deliberate cruelty so often shown by adults. 24 | * All children want and strive for increased mastery and control of the world around them, and all are to some degree humiliated, threated, and frightened by finding out that they don't have it. 25 | * The word *no*, for a two-year old, is the Declaration of Independence and the Magna Carta rolled into one. 26 | * To many four-year olds, doing a puzzle is only a means to an end, namely gaining the approval of the teacher or of each other. To a younger child, not in a very competitive or status-conscious situation, such a task is an end in itself. 27 | * It's useless to urge on people who are down; that just frightens or discourages them more. Instead we must draw them back, take off the pressure, reassure them, console them, and give them time to regain enough energy and courage to go back to the task. 28 | * The best games with children flow easily and naturally from the situation of the moment, and we must be ready to give up a game instantly and without regret if the child is not enjoying it. 29 | * Children find it fun to do something wrong that they know how to do right. Adults tend to discourage it, but we should enjoy and encourage it, as it is not always necessary to be right. 30 | * Children can use the scientific method, or the selective use of trial and error, to find something out, and are even conscious of using it. 31 | * When more people were craftsmen, children could easily learn by watching them. Now this is more difficult, because most work is not work as a child could understand it, and much work is now done by machines. 32 | * When a game teaches how something works, it also teaches that many actions have regular and predictable effects, and that the world is in many ways a sensible and trustworthy place. 33 | * Children resist unasked-for teaching because they hear in it the (perhaps unconscious) message, "You're not smart enough to see that this is important to learn, and even if you were, you're not smart enough to learn it." 34 | * Children will ask for help if they need it. But sending them messages of doubt and distrust may destroy their confidence in their ability to learn for themselves, and convince them that they are too lazy, incurious, and stupid to learn. 35 | * One of the many great advantages of home-schooled education is that children have a chance to see their parents and other adults work, and to join in if they wish. 36 | * When playing with an instrument or machine for the first time, children must pile up quite a mass of raw sensory data before they can begin trying to sort it out and how to make sense of it. 37 | * A trained scientist asks nature a question and then cuts the noise of information to a minimum. But to a child in a strange world, everything is noise, and until he has a great deal of data, he has no idea what questions to ask or what questions there are to be asked. 38 | * Consequently, children are better able to tolerate confusing data, to pick out its patterns. They are also less likely to make fast conclusions on the basis of too little data, or after having made such conclusions, to refuse to consider new and contradictory data. 39 | 40 | ### Talk 41 | 42 | * To a baby, how a sound feels seems to be as important as the sound itself. 43 | * A puppy raised apart from other dogs will know how to bark when he gets old enough, but it is from hearing people speak around them that babies get the idea of "speaking." 44 | * Perhaps two-year olds are so touchy because they discovered that they don't know how to talk; they are bursting with things to say, needs, and feelings, but have no way to say them. 45 | * Children learn to speak by patient and persistent experiment. Above all, they are willing to do things wrong even while trying their best to do them right. 46 | * Babies and young children like to hear adult conversation, and will often sit quietly for a long time just to hear it. To help little children as they learn to talk, talk to them, and let them be around when we talk to others. 47 | * When we name an object, we put it into a class of things that are like it. But babies do not, for some time they see just a mass of shifting shapes and colors, a single, ever-changing picture in front of them, and not as separate elements. 48 | * A baby is only ready to assign a name to something when he sees that is independent of its environment, and that the something is one of a family or class of like things. 49 | * We only learn words after grasping the large idea of communication by speech, then interpreting tone and context, and finally intuiting a rough outline of the grammar or structure of language. 50 | * Too much quizzing of a child is likely to make him begin to think that learning does not mean figuring out how things work, but getting and giving answers that please grownups. 51 | * A child's understanding of the world is uncertain and tentative. His understanding will grow faster if we can make ourselves have faith in it and leave it alone. 52 | * A family with little verbal skill can handicap a baby. Not just because there is so little talk, but also because, when the baby does try to talk, he is less often understood and thus less often encouraged. 53 | * Because children are so small, clumsy, inarticulate, foolish, and to some appealing, we easily underestimate the seriousness of many of their questions and concerns, and laugh at them indulgently or ignore them altogether. 54 | * Children will learn the language that most people speak around them. If a child grows up where people do not speak standard English, then we will do harm if we try to make him think that there is something wrong with his speech. 55 | * Children's senses are keen, they notice everything, and they want to do things like the grownups. If we speak well, and they hear us, then they will soon speak as we do. 56 | * Children will not "freeze" mistakes as bad habits. They instead make successive approximations, where they try, make mistakes, and then correct those mistakes. 57 | * If it takes a long time to develop a good habit, then it will take just as long to develop a bad one. So we don't always have to be in such a big hurry to correct children's mistakes. 58 | * Children are good at gathering and storing vague information and waiting patiently until, someday, they find they know what it means. 59 | * Maybe children don't like to hear stories of when they were younger because, to them, their littleness, helplessness, and clumsiness is not cute but humiliating, and so they don't want to be reminded of it. 60 | * The children need the most practice talking in school, but typically the teacher gets it. A child only talks to the teacher, and only when called upon. 61 | * To give children more opportunity to speak, we could let them work in small groups, and to talk quietly as they work. This also encourages independent study and more thinking. 62 | * We only get better at using words, whether hearing, speaking, reading, or writing, if we use those words to say something that we want to say, to people we want to say it to, and for purposes that are our own. 63 | -------------------------------------------------------------------------------- /how-to-solve-it.markdown: -------------------------------------------------------------------------------- 1 | ## How to Solve It: A New Aspect of the Mathematical Method 2 | 3 | by George Pólya 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/How-Solve-It-Mathematical-Princeton/dp/069111966X)!* 6 | 7 | ### Part 1: In The Classroom 8 | 9 | #### Purpose 10 | 11 | * pg 1: Ideally, the teacher should ask a question or indicate a step that could have occurred to the student himself. In general, help discreetly, unobtrusively. 12 | * pg 2: Focus the student on the unknown quantity. Curate such provoking questions that apply to "problems to find." They do not apply to "problems to prove." 13 | * pg 3: Start with questions and suggestions that are natural, simple, obvious, and just plain common sense. But do so in general terms. 14 | * pg 4: If such a question is repeatedly asked, it may be repeatedly helpful. The student may then ask himself this question, which may succeed in eliciting the right idea, at which point it is assimilated. 15 | * pg 5: When a teacher solves a problem before the class, he should dramatize his ideas a little and he should put to himself the same questions. 16 | * pg 5: The four phases of work are understanding the problem, making a plan, carrying out the plan, and finally looking back on the completed solution in order to review and discuss it. 17 | * pg 6: The teacher should ensure that a problem is well chosen, not too hard and not to easy, and interesting, so that the student understands the problem and desires its solution. 18 | * pg 7: The teacher can seldom afford to miss the questions: What is the unknown? What are the data? What is the condition? 19 | * pg 9: Ideas for a plan are based on past experience and formerly acquired knowledge. So it's often appropriate to start with the questions: Do you know a related problem? Could you use it? 20 | * pg 10: If you can't create a plan, try to restate the problem, or to solve some related problem. To ensure that you don't stray too far, ask: Did you use the whole data, or the whole condition? 21 | * pg 12: Prepare a gamut of more and more explicit hints for introducing a decisive auxiliary element. Do not simply reveal it. 22 | * pg 12: Devising a plan takes formerly acquired knowledge, good mental habits, concentration upon the purpose, and good luck. Carrying out the plan takes only patiences. 23 | * pg 13: When carrying out a plan, the student should be convinced of the correctness of each step. It should be seen. If not beyond the student's grasp, it could be proved. 24 | * pg 15: We have a natural opportunity to investigate the connections of a problem when looking back at its solution. Ask whether you could use the result, or the method, for some other problem. 25 | * pg 17: Questions providing "experimental evidence" for a solution gives it new significance. It has a better chance of being remembered, and such questions can be easily transferred to similar problems. 26 | -------------------------------------------------------------------------------- /how-to-win-friends-and-influence-people.markdown: -------------------------------------------------------------------------------- 1 | ## How to Win Friends & Influence People 2 | 3 | by Dale Carnegie 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/How-Win-Friends-Influence-People/dp/0671027034)!* 6 | 7 | ### Part 1: Fundamental Techniques in Handling People 8 | 9 | #### Chapter 1 10 | * pg 5: Criticism is futile because it makes one strive to justify himself; it’s dangerous because it wounds pride and arouses resentment. 11 | * pg 13: When dealing with people, you aren’t dealing with creatures of logic, but creatures of emotion motivated by pride and vanity. 12 | 13 | #### Chapter 2 14 | * pg 17: Everyone has a desire to feel important; praise can fulfill this desire and serve as a strong motivator. 15 | * pg 26: Don’t confuse flattery with appreciation; flattery is insincere and selfish. 16 | 17 | #### Chapter 3 18 | * pg 31: To influence people, talk about what they want and show them how to get it; don’t talk about what you want. 19 | * pg 42: The world is so full of self-seeking people, that an individual that tries to unselfishly tries to serve others has an enormous advantage. 20 | 21 | ### Part 2: Six Ways to Make People Like You 22 | 23 | #### Chapter 1 24 | * pg 52: Win friends by being genuinely interested in other people, instead of trying to get other people interested in you. 25 | * pg 58: Put yourself out to do things for other people that require time, energy, unselfishness, and thoughtfulness. 26 | 27 | #### Chapter 2 28 | * pg 64: There's more information in a smile than a frown, so encouragement is a more effective teacher than punishment. 29 | * pg 67: Fake a smile; act as though you were already happy, and that will tend to make you happy. 30 | * pg 68: Most folks are about as happy as they make up their minds to be. 31 | 32 | #### Chapter 3 33 | * pg 73: People find their name the most interesting of all; remembering that name and calling it easy is an effective compliment. 34 | * pg 78: The information we impart or request we make takes on special importance when we approach with a name. 35 | 36 | #### Chapter 4 37 | * pg 84: A violent critic is subdued in the presence of a patient, sympathetic listener, as all they desire is an audience. 38 | * pg 88: People are more interested in themselves and their wants and problems than they are in you and your problems. 39 | 40 | #### Chapter 5 41 | * pg 89: The road to a person's heart is to talk about the things he or she treasures most; research those things if you must. 42 | 43 | #### Chapter 6 44 | * pg 96: Obey the golden rule, and do unto others as you would have others do unto you. 45 | * pg 98: All people you meet feel superior to you in some way; in some subtle way, recognize their importance sincerely. 46 | 47 | ### Part 3: How to Win People to Your Way of Thinking 48 | 49 | #### Chapter 1 50 | * pg 111: Avoid arguments; the loser of an argument has his pride hurt, and will likely remain unconvinced anyway. 51 | * pg 113: Arguing allows a person to feel important by asserting their authority; admitting their importance disarms them. 52 | * pg 114: Distrust your first instinctive impression, and give your opponent a chance to talk without defense or debate. 53 | 54 | #### Chapter 2 55 | * pg 117: If proving someone wrong, do it subtly and adroitly, so you don't arouse opposition and handicap yourself. 56 | * pg 118: Admitting you may be wrong will stop all argument and inspire fairness and open-mindedness in your opponent. 57 | 58 | #### Chapter 3 59 | * pg 129: Saying about yourself the derogatory things someone else wants to say may improve their disposition. 60 | * pg 130: Admitting your errors clears the air of guilt and defensiveness, but often helps solve the problem created by the error. 61 | 62 | #### Chapter 4 63 | * pg 137: To win someone to your cause, first convince him that you are a sincere friend. 64 | 65 | #### Chapter 5 66 | * pg 144: Begin by emphasizing what you agree on; keep emphasizing, if possible, that you want the same end with different methods. 67 | * pg 145: Keep your opponent from saying “no”; a “yes” response moves their psychological process in the affirmative direction. 68 | 69 | #### Chapter 6 70 | * pg 152: Almost every successful person likes to reminisce about early struggles; use this to let them talk about themselves. 71 | * pg 154: When our friends excel us, they feel important; when we excel them, they feel inferior and envious, so let them talk profusely. 72 | 73 | #### Chapter 7 74 | * pg 156: Let the other person feel that the idea is his or hers; no one likes to feel that they’re being forced upon. 75 | 76 | #### Chapter 8 77 | * pg 161: Understand why a person thinks and acts how he does, and you have the key to his actions and personality. 78 | * pg 165: Think in terms of the other person's point of view, and see things from that angle as well as your own. 79 | 80 | #### Chapter 9 81 | * pg 168: Giving people the sympathy they thirst for can create good will and make them listen attentively. 82 | 83 | #### Chapter 10 84 | * pg 175: Appeal to the noble motives of someone, and not what you think may be the real reason behind an action. 85 | 86 | #### Chapter 11 87 | * pg 182: Merely stating a truth is not enough; use showmanship to make it vivid, interesting, and dramatic. 88 | 89 | #### Chapter 12 90 | * pg 188: Issue a challenge; everyone loves the chance for self-expression, proving worth, to excel and to win. 91 | 92 | ### Part 4: How to Change People Without Giving Offense or Arousing Resentment 93 | 94 | #### Chapter 1 95 | * pg 193: It i always easier to listen to unpleasant things after we have heard some praise for our good points. 96 | 97 | #### Chapter 2 98 | * pg 200: When following praise with criticism, join the two with "and," not "but," to avoid arousing resentment. 99 | * pg 201: Calling attention to mistakes indirectly works with sensitive people who may resent direct criticism. 100 | 101 | #### Chapter 3 102 | * pg 204: Before criticizing someone, begin by humbly admitting that you, too, are far from impeccable. 103 | * pg 206: Don't hesitate to admit your own mistakes, even the uncorrected ones, to change someone's behavior. 104 | 105 | #### Chapter 4 106 | * pg 208: Give suggestions and ask questions, don't give orders; this encourages cooperation, not rebellion. 107 | * pg 209: People are more likely to accept an order when part of the decision that led to its issue. 108 | 109 | #### Chapter 5 110 | * pg 214: You only destroy ego by causing someone to lose face, even if the other person is definitely wrong. 111 | 112 | #### Chapter 6 113 | * pg 217: B.F. Skinner showed that minimizing criticism and emphasizing praise reinforces only good behavior. 114 | * pg 219: Praise is more meaningful when singling out specific accomplishments, rather than general flattery. 115 | 116 | #### Chapter 7 117 | * pg 222: Give someone a reputation to live up to, treating the trait in need of improvement as an outstanding characteristic. 118 | 119 | #### Chapter 8 120 | * pg 227: Find a way to convince someone that they have an undeveloped flair for whatever they're attempting. 121 | 122 | #### Chapter 9 123 | * pg 232: Always make the other person happy about doing the thing you suggest. 124 | * pg 234: Put your request in a form that will convey to the other person the idea that they will personally benefit. 125 | 126 | -------------------------------------------------------------------------------- /html-5th-edition.markdown: -------------------------------------------------------------------------------- 1 | ## HTML 5th Edition 2 | 3 | by Elizabeth Castro 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/HTML-XHTML-CSS-Sixth-Edition/dp/0321430840)!* 6 | 7 | ### Chapter 1 8 | * Elements are block or inline; block elements are displayed on new lines, while inline elements are not. This is the difference between `div` and `span`. 9 | * If you save your document in UTF-8, and declare it as such when serving it, you don't have to use character references like `©`, with the exception of `&` for `&`. 10 | * XHTML requires the `DOCTYPE` and `html`, `head`, and `body` elements in a document, and that every attribute has a value (e.g. `noshade="noshade"`). 11 | * If a browser finds a `DOCTYPE`, then it uses standards mode; otherwise, it uses quirks mode. 12 | * A stylesheet has multiple rules. Each rule is composed of a selector, and between the curly brackets, a collection of declarations separated by semicolons. Each declaration has a property name, followed by a colon, and one or more values. 13 | * CSS uses inheritance, specificity, and location to resolve rule conflicts: 14 | * Many CSS properties affect not only the elements defined by the selector but also their descendants; this is called inheritance. 15 | * If multiple rules apply to an element and conflict with each other, the more specific rules take precedence (e.g. a rule for an id overrides a class); this is called specificity. 16 | * If this cannot decide which rule to apply, the last rule takes precedence; this is called location. 17 | * When declaring the length of an element, `em` is usually equal to the element's font size. 18 | 19 | ### Chapter 3 20 | * Declare the page encoding in UTF-8 with `` in the `` element. Starting the document with `` will put IE6 into quirks mode. 21 | * The `id` attribute automatically turns the element into an anchor, to which you can directly link. 22 | * A `span` has no inherent formatting, while a `div` only has the line break as inherent formatting. 23 | * You can use the `title` attribute to add a tool tip to anything; to suppress IE from using alt as a tooltip for images, use an empty title, i.e. `title=""`. 24 | 25 | ### Chapter 4 26 | * The `tt` element forces monospaced font; when displaying computer code, the `code` attribute is equivalent, but gives semantic meaning. 27 | * To strikethrough text, use the `del` element. 28 | * Use the `abbr` or `acronym` tag (if the abbreviation an be pronounced as a word) with the `title` attribute to explain their contents when hovering. 29 | 30 | ### Chapter 5 31 | * If a browser is asked to show a color outside its range, it can mix two colors (called ditherhing) or show the closest available one (called shifting). 32 | * The web-safe or browser-safe colors are the 216 colors that are not reserved by the browser and are supported by both Windows and Mac. 33 | * Each frame in GIF format is limited to 256 colors, although these colors can be selected from a much larger palete. 34 | * The PNG format is not limited to 256 colors, and like GIF is lossless and allows for transparency, but unlike GIF cannot have multiple frames. 35 | * The JPEG or JPG format, typically used for photos, uses lossy compression and so originals should be saved in a format like TIFF. 36 | 37 | ### Chapter 6 38 | * Add the `width` and `height` attributes to the `img` element so that the browser can display the text while the image loads. 39 | * Use the `br` element with the `clear` attribute so that the following elements will not display until the specified margin (`left`, `right`, or `all`) is clear. 40 | 41 | ### Chapter 7 42 | * Open a link in a new window by adding `target="_blank"` to the link element. 43 | * Links with the same value for `target` will all open in the same window. 44 | * Add the `tabindex` attribute between `0` and `32767` to links to define a custom tab order; links with the same index value are accessed in the order in which they appear. 45 | 46 | ### Chapter 8 47 | * A descendant selector of the form `A B` matches when an element `B` is an arbitrary descendant of some ancestor element `A`. 48 | * The universal selector is `*`, and `A * B` matches a `B` element that is a grandchild or later descendant of an `A` element. 49 | * The child selector of the form `A > B` matches when an element `B` is a child of an `A` element. 50 | * The adjacent sibling selector of the form `A + B` matches when an element `B` is an adjacent sibling of an `A` element. 51 | * The attribute selector `A[foo]` matches any `A` element with attribute `foo` set; `A[foo~="bar"]` restricts to only `foo` attributes containing `bar`, and `A[foo="bar"]` restricts to only `foo` attributes equal to `bar`. 52 | * Pseudo-classes select markup; the selector `A:first-child` chooses only the `A` elements that are the first child of some parent element. 53 | * When setting link properties, i.e. the `a` tag, define them in the order `link`, `visited`, `focus`, `hover`, `active`. 54 | * Pseudo-elements select content; the selector `A:first-line` or `A:first-letter` chooses the first line (which can change as the browser resizes) or first letter of any `A` element. 55 | 56 | ### Chapter 13 57 | * To change the marker, set the `list-style-type` property with values `disc`, `circle`, `square`, `decimal`, `upper-alpha`, `lower-alpha`, `upper-roman`, or `lower-roman`. 58 | * To use a custom image, set the `list-style-image` property with a value as the image URL; the image should be no larger than 15 x 15 pixels. 59 | * The `dl` element begins a definition list, suited for glossaries, where terms are in `dt` and definitions are in `dd`, alternating as necessary. 60 | * When styling nested lists, the selectors should reflect the types of nested lists, e.g. `ol li` and `ol ol li`. 61 | 62 | -------------------------------------------------------------------------------- /introducing-neuro-linguistic-programming.markdown: -------------------------------------------------------------------------------- 1 | ## Introducing Neuro-linguistic Programming 2 | 3 | by Joseph O'Connor and John Seymour 4 | 5 | ### Chapter 1 6 | * pg 3: NLP deals with the structure of human subjective experience; how we organize what we see, hear, and feel, and how we edit and filter the outside world through our senses. 7 | * pg 8: The four stages of learning are unconscious incompetence, conscious incompetence, conscious competence, and unconscious competence. Sometimes you must unlearn, or go back form step 4 to step 2. 8 | * pg 9: If you always do what you've always done, you'll always get what you've always got. If what you're doing isn't working, do something else. 9 | * pg 12: An outcome may only be achievable if several problems are solved first. Convert them into outcomes -- a problem is simply an outcome the wrong way up. 10 | * pg 15: Setting an outcome in the future creates a problem in the present; conversley, every problem in the present can be changed to a future outcome. 11 | * pg 17: A study found that in presenting, body language and eye contact made up over 90% of the impact, while content made up the remainder. 12 | * pg 20: By matching and mirroring body language and tonality you can create rapport, because people who are like each other, like each other. 13 | * pg 22: When building rapport, the word "but" is a destructive word that discounts what others say; "and" is innocent and simply expands on what has been said already. 14 | 15 | -------------------------------------------------------------------------------- /iphone-user-interface-design-projects.markdown: -------------------------------------------------------------------------------- 1 | ## iPhone User Interface Design Projects 2 | 3 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/iPhone-User-Interface-Design-Projects/dp/B005B1F51C)!* 4 | 5 | ### Chapter 1: App Cubby 6 | * pg 5: Read the iPhone Human Interface Guidelines book, and conform to Apple's UI conventions. 7 | * pg 8: Because the keyboard takes up so much space, have data entry focused on a single field or a small group of fields that fit above the keyboard. 8 | * pg 11: Don't worry about minimizing taps; confusion about where to tap wastes more time than an extra tap. 9 | * pg 17: Every touch of the screen should have some visual reaction, even if it doesn't actually accomplish anything. 10 | 11 | ### Chapter 2: Yet Another Google Reader 12 | * pg 29: The navigation view paradigm is not adept at moving from sibling to sibling; an auxiliary menu can provide this functionality. 13 | * pg 32: Apple's Application Definition Statement can help make right design decisions along the way, and has the format *[Your differentiator] [your solution] for [your audience]*. 14 | * pg 34: The `apple-touch-icon.png` is a 57x57 image used when you make a home screen bookmark from Mobile Safari. 15 | 16 | ### Chapter 3: Brightkite for the iPhone 17 | * pg 49: A more tab on the tab bar can expose features not worthy of the tab bar in a table view. 18 | * pg 52: Make signing up for a service as minimal as possible; move any additional tasks to perform after sign-up somewhere else, like the settings tab. 19 | * pg 55: A user can't tell the difference between a crash caused by a code defect and one that occurred at the hands of the memory watchdog. 20 | * pg 56: The address book is a natural resource for discovering friends who use your service. 21 | 22 | ### Chapter 4: Outpost 23 | * pg 63: Templating kits for OmniGraffle or Illustrator provide quick wire-framing abilities. 24 | * pg 71: You can take screenshots of buttons from native applications and recreate them using purely vector shapes and layer effects 25 | * pg 72: Textile is an alternative markup script to Markdown. 26 | 27 | ### Chapter 5: TanZen and Zentomino 28 | * pg 84: Work with a real device as soon as possible; the iPhone screen is smaller than you expect. 29 | * pg 87: Text can be explanatory, but it takes up screen space and needs to be internationalized. 30 | * pg 96: It's easy to see a visual element under a cursor in the simulator, but not one under your finger on an actual device. 31 | * pg 103: Give users what they need, not everything they want; otherwise your application will lack focus. 32 | * pg 105: A lower price app sells more copies, which places you higher on rankings lists, and that visibility is important. 33 | 34 | ### Chapter 6: Flash of Genius: SAT Vocab 35 | * pg 117: The Info button that comes with the iPhone API may be too small for many users to use; to fix this, put a big clear `UIButton` on top of it in Interface Builder. 36 | * pg 120: Without a decent icon, no one will ever look at your application; without a good one, you don't get noticed. 37 | * pg 122: Using `UIWebView` allows better control over typography with the risk of combining native and web elements in a messy fashion. 38 | * pg 125: Using an `UIAlertView` to explain something is not optimal but gets the job done; just don't use more than a few. 39 | 40 | ### Chapter 7: Postage 41 | * pg 131: Your application will be used on the go and for only a few moments at a time, so the interface must be streamlined. 42 | * pg 134: Every application preference represents a point where the development team could not make a tough choice. 43 | * pg 136: Do everything you can to delay or prevent having the user enter account credentials when using your application for the first time. 44 | * pg 138: The navigation bar can be repurposed to guide the user through a series of steps in accomplishing some larger task. 45 | * pg 147: Ensure that one partially obscured cell or item is visible in a list or table view to hint to the user that it can be scrolled. 46 | * pg 150: If an icon can't entirely describe a concept and requires a label, consider dropping the icon to increase the label font size for clarity. 47 | * pg 158: All lighting on the iPhone is from the top of the screen down; make your gradients, highlights, and drop shadows consistent with this. 48 | 49 | ### Chapter 8: Falling Balls and Gravity Pods 50 | * pg 170: The accelerometer is a natural replacement for a directional pad on game controllers. 51 | * pg 178: Sending messages to `nil` in Objective C is allowed and more efficient than explicitly checking if the receiver is `nil`. 52 | 53 | ### Chapter 9: Font Shuffle 54 | * pg 184: A typeface comprises an alphabet of letters, and build a family with members such as Roman, Bold, Italic, etc. 55 | * pg 187: The baseline is the only property of a digital typeface that is interpreted in a common way. 56 | * pg 188: In metal type, the em was the height of the metal body from which the letter arises; it's comparable the bounding box from digital type design. 57 | * pg 192: Some typography sources refer to sans-serif typefaces as Grotesque or Gothic, and serif types as Roman. 58 | * pg 200: The Lucidia typeface is a superfamily that covers all design styles, so the capital heights, x-heights, and main stem weights are coordinated. 59 | 60 | ### Chapter 10: Snow Reports for the iPhone 61 | * pg 217: Make the 1.0 release minimal; when you have feedback, decide features for the next version and release it, which assures users you're listening to them. 62 | * pg 218: Identify and acquire your third-party resources up front; not getting them can be a dealbreaker for your application. 63 | * pg 230: Avoid splash screens and only use loading screens if necessary. 64 | * pg 231: Always include a `UIPageControl` if your application has paging. 65 | * pg 232: Your application icon should have only one focal point; don't make it busy. 66 | 67 | -------------------------------------------------------------------------------- /javascript-patterns.markdown: -------------------------------------------------------------------------------- 1 | ## JavaScript Patterns 2 | 3 | by Stoyan Stefanov 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/JavaScript-Patterns-Stoyan-Stefanov/dp/0596806752)!* 6 | 7 | #### Chapter 1: Introduction 8 | * pg 3: Native objects are described by the ECMAScript standard and are either built-in or user-defined; host objects are defined by the host environment. 9 | * pg 4: A prototype is an object, not a class or anything special, and every function has a `prototype` property. 10 | 11 | #### Chapter 2: Essentials 12 | * pg 12: Globals declared with `var` outside any functions cannot be deleted; any implied globals are properties of the global object, and can be deleted. 13 | * pg 14: All variable declarations are hoisted to the top of a function, so referencing a variable declared later yields `undefined`, and not a global value with the same name. 14 | * pg 16: `HTMLCollection` objects are live queries against the document, and so iterating without caching their length is expensive. 15 | * pg 21: To avoid confusion caused by implied typecasting, use the `===` and `!==` operators that check both the values and the type of the expressions compared. 16 | * pg 22: Passing strings to `setInterval`, `setTimeout`, and the `Function` constructor is similar to using `eval` and should be avoided. 17 | * pg 26: To avoid ambiguity with Javascript's semicolon insertion mechanism, put the opening curly brace on the same line as the previous statement. 18 | * pg 34: At the expense of some verbosity, the YUIDoc system is language-agnostic and can document code in any language. 19 | * pg 36: If using a global variable more than once in a function, assign it to a local variable so it can be effectively minified. 20 | 21 | #### Chapter 3: Literals and Constructors 22 | * pg 40: A trailing comma after the last name-value pair in an object literal produces errors in IE, so avoid it. 23 | * pg 42: Invoking a constructor with `new` creates an empty object, referenced by `this`, that inherits from the method prototype. 24 | * pg 48: To test if an object is an array, check whether `Object.prototype.toString` returns `"[object Array]"` when applied to it. 25 | * pg 51: Use the `RegExp` constructor when the pattern is known only at runtime; otherwise, use the literal form. 26 | * pg 52: Number, string, and boolean primitives are automatically converted to their wrapper objects when methods on them are called. 27 | * pg 53: You can only assign properties to the wrapper objects for number, string, and boolean primitives. 28 | 29 | #### Chapter 4: Functions 30 | * pg 60: Function declarations and named function expressions have a `name` property, which is useful for both debugging and recursion. 31 | * pg 62: Function declarations and expressions are hoisted, but expressions will only have their declaration hoisted, not their definition. 32 | * pg 68: Self-defining functions overwrite themselves to do less work later, but erase method properties, while references to the old definition may still exist. 33 | * pg 70: Immediate functions are a good place to put initialization code that won't pollute the global namespace and will only run once. 34 | * pg 74: Initialization tasks in an anonymous object with a method to be called immediately adds structure, but may not be minified effectively. 35 | * pg 76: To serialize an object or array of objects as a key in a cache, use JSON. 36 | 37 | #### Chapter 5: Object Creation Patterns 38 | * pg 91: Assigning modules required to local variables lists dependencies in one place, runs faster, and is minified more effectively. 39 | * pg 94: Immediate functions that return object literals can provide the scope in which private members of the literal exist. 40 | * pg 98: Object literals with methods created by immediate functions can be assigned to method prototypes or namespace objects to create modules. 41 | * pg 100: A module can return a method to create a constructor; inside the module, the constructor prototype can be set up appropriately. 42 | * pg 106: If a public static method is a method added to a constructor, then this inside the static method will refer to the constructor method. 43 | * pg 109: A constant can be implemented as a private property with only a getter, but simply using variables in all caps is likely enough. 44 | 45 | #### Chapter 6: Code Reuse Patterns 46 | * pg 116: Prefer talking about constructors in JavaScript instead of classes, which can mean different things to different people. 47 | * pg 125: By introducing a proxy between a constructor and its parent prototype, no constructors have the same prototype, avoiding mistakes by modification. 48 | * pg 132: In the prototypical inheritance pattern, inheriting from the prototype object of the existing constructor avoids inheriting "own" properties. 49 | * pg 136: To re-use only a few methods of an object, don't inherit, but invoke `call` or `apply` to borrow them by binding your own object as this. 50 | 51 | #### Chapter 7: Design Patterns 52 | * pg 146: When returning a singleton upon every use to `new`, wrap the instance in an immediate function to hide it. 53 | * pg 153: A decorated object can be the prototype of another object that overrides methods and calls the prototype copies appropriately. 54 | * pg 160: A proxy can lazily initialize a "real subject" or cache values computed by it, saving resources. 55 | * pg 172: By copying (mixing in) the properties of a publisher object, you can turn any object into a publisher with subscribers. 56 | * pg 178: The observer program promotes looser coupling, but shuns sequential code execution which could be more understandable. 57 | 58 | #### Chapter 8: DOM and Browser Patterns 59 | * pg 184: Selector APIs that accept a CSS selector string and return matching DOM nodes are faster than selecting the nodes yourself. 60 | * pg 185: To minimize repainting, add node batches using document fragments, and update nodes by cloning a root and then replacing it. 61 | * pg 192: Methods that perform feature detection can rewrite themselves to use the supported method once found without any checks. 62 | * pg 195: If you only need to send data to the server, use an image beacon, and ensure it returns a 204 (No Content) response. 63 | * pg 197: Set the expires header value of served JavaScript far in the future, and adopt a naming and versioning pattern for the files. 64 | * pg 201: Dynamically created `script` tags do not stop further page downloads until they are downloaded and executed. 65 | * pg 202: To insert a new `script` element safely, insert it immediately before an existing `script` element in the document. 66 | * pg 205: To preload a script, create an `object` element with a data attribute with no width and height, or use an image beacon in IE. 67 | 68 | -------------------------------------------------------------------------------- /jquery-in-action.markdown: -------------------------------------------------------------------------------- 1 | ## jQuery in Action 2 | 3 | Bear Bibeault and Yehuda Katz 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/jQuery-Action-Second-Edition-Bibeault/dp/1935182323)!* 6 | 7 | ### Chapter 1: Introducing jQuery 8 | * pg 9: When `$` is passed a selector, the returned value contains matching elements in the order they appear in the document. 9 | * pg 12: Passing a method to `$` executes the method when the DOM has loaded, and doesn't wait for all resources to load. 10 | * pg 13: Passing a string containing HTML to `$` creates a document fragment that can then be added to the DOM. 11 | * pg 15: A test against `null` will check whether a value is either `null` or `undefined`. 12 | 13 | ### Chapter 2: Selecting the elements upon which to act 14 | * pg 21: The context for `$` can select or contain multiple DOM elements, which serve as multiple sub-trees to query on. 15 | * pg 27: Filters `:first` and `:last` return a single element, while `:first-child` and `:last-child` return elements from different sets of siblings. 16 | * pg 28: The `:nth-child` filter starts counting from 1 for CSS compatibility, while other filters start from 0. 17 | * pg 29: An attribute selector will only match the initial element state; for the real-time state, use a `filter` selector. 18 | * pg 38: Passing a negative value to the `get` method returns elements from the end of a wrapped set, unlike subscript notation. 19 | * pg 39: The `eq` method returns a single element like `get`, but inside of a new wrapped set. 20 | * pg 40: If no argument is passed to `index`, the ordinal index of the first element of the wrapped set within its siblings is returned. 21 | * pg 45: The `not` method removes elements that match its argument, while the `filter` method retains matching elements. 22 | * pg 50: The `contents` method of a wrapped set is frequently used to obtain the contents of `iframe` elements. 23 | * pg 51: TODO: difference between children and find? 24 | 25 | ### Chapter 3: Bringing pages to life with jQuery 26 | * pg 62: Removing an attribute doesn't remove any property in its corresponding DOM element, although its value may change. 27 | * pg 63: For attributes where presence decides behavior, passing `true` or `false` as the attribute value adds or removes it. 28 | * pg 64: Use the data method to bind values to DOM elements without using expandos, which can lead to memory leaks. 29 | * pg 69: No method for retrieving class names of an element is provided; you must split on the attribute value yourself, if it exists. 30 | * pg 71: The `css` method returns the computed value of any CSS property as a string, which may converting into a number. 31 | * pg 76: The `offset` and `position` methods must be used on visible elements; accuracy requires padding, margins, borders in pixels. 32 | * pg 79: For methods setting element content, if a wrapped set contains multiple targets, the argument is cloned as necessary. 33 | * pg 86: The `detach` method removes elements from the DOM but retains bound events or data; `remove` will unbind them as well. 34 | * pg 89: The `replaceAll` method returns no reference to the replaced elements; to keep a reference, use `replaceWith`. 35 | * pg 90: The `val` method returns the empty string if a form element isn't first in the wrapped set. 36 | 37 | ### Chapter 4: Events are where it happens! 38 | * pg 95: There is no DOM Level 0, but the term is used to describe what was implemented prior to DOM Level 1. 39 | * pg 109: By appending multiple suffixes to event names, you can put the handlers in multiple namespaces. 40 | * pg 111: The `focus` and `blur` events do not bubble up the DOM tree, but the `focusin` and `focusout` events do. 41 | * pg 114: Event property `keycode` isn't reliable across browsers for non-alphabetic characters, but the `which` property is. 42 | * pg 115: Handlers returning `false` cancel default behavior and stop propagation up the tree, but allow immediate propagation. 43 | * pg 116: A `live` event doesn't propagate; its handler runs only after the normal event reaches the context with which `live` was called. 44 | * pg 118: Unlike `trigger`, the `triggerHandler` method invokes handlers without bubbling, semantic actions, or live events. 45 | * pg 123: Unlike `mouseout`, the `mouseleave` event is not triggered when the cursor moves over the child of an element. 46 | * pg 135: Custom events and using the `live` method promotes loose coupling effectively. 47 | 48 | ### Chapter 5: Energizing pages with animations and effects 49 | * pg 139: Calling `show` on an element sets its display property to the element type default if no explicit value was provided. 50 | * pg 142: A convention is to add the `$` character as a prefix or suffix to variable names that refer to a wrapped set. 51 | * pg 149: The `show` or `hide` methods adjust width, height, and opacity when animated; `fadeIn` and `fadeOut` only adjusts opacity. 52 | * pg 151: Unlike `fadeIn` and `fadeOut`, `fadeTo` never removes elements from the display, and doesn't remember the original opacity. 53 | * pg 153: Stopping an animation does not revert changes to animated elements; their CSS values must be explicitly reset. 54 | * pg 155: End values for animation can assigned `show`, `hide`, and toggle`, or relative values can be assigned with `+=` and `-=`. 55 | * pg 164: To run all animations in a queue, a common idiom is to call the `dequeue` method at the end of a queued function. 56 | * pg 167: A function added to the `fx` queue must call dequeue at the end for the animations queued behind it to execute. 57 | 58 | ### Chapter 6: Beyond the DOM with jQuery utility functions 59 | * pg 170: Setting the `fx` flag to `false` will disable animations but still apply the desired effects. 60 | * pg 176: The browser detection flags are deprecated, so abstract away browser detection using custom support flags. 61 | * pg 178: The only argument to a `ready` handler is the jQuery object; naming the parameter `$` will hide any global reassignment. 62 | * pg 185: If the callback to the `map` function for `arrays` returns an array, its values are appended to the returned array. 63 | * pg 191: Passing any non-form elements in a wrapped set or array to `param` appends `&undefined=undefined` to the query string. 64 | * pg 192: The `param` method can construct a query string from a nested object by using square brackets to identify children. 65 | * pg 195: Use the `data` and `contains` methods instead of their wrapper equivalents when you have DOM element references. 66 | * pg 199: The `parseJSON` method expects well-formed JSON, which is much more strict than JS expression notation. 67 | 68 | ### Chapter 8: Talk to the server with Ajax 69 | * pg 240: If a response has a MIME type `text/xml`, `application/xml`, or ending in `+xml`, its body is parsed into `responseXML`. 70 | * pg 244: The `load` method uses POST only if its parameters are in an array or object hash; if a string or omitted, it uses GET. 71 | * pg 245: The `serialize` and `serializeAll` methods only collect successful form control values that participate in form submission. 72 | * pg 253: Use the callback to inject the response of the get or post methods into the DOM; unlike `load`, it is not automatic. 73 | * pg 264: Values passed to `ajaxSetup` aren't applied to `load`, and won't change the HTTP methods used by `get` and `post`. 74 | * pg 265: Global Ajax events are broadcast to every element in the DOM; there is no hierarchy through which they bubble. 75 | * pg 268: Global events `ajaxStart` and `ajaxStop` are triggered only once for a set of concurrent requests. 76 | * pg 274: The `abbr` tag is used to identify abbreviations, but can serve as a hook for flyouts used to define terms. 77 | 78 | ### Chapter 9: Introducing JQuery UI: themes and effects 79 | * pg 284: A theme's images folder must be in the same folder as its CSS file. 80 | * pg 287: The `ui-widget` class identifies the container element that is the ancestor of all elements that comprise the widget. 81 | * pg 288: Given the appropriate class name, rounded corners appear on any element, but only in supported browsers. 82 | * pg 290: To edit a custom theme created by ThemeRoller, visit the URL embedded in a comment of its CSS file. 83 | 84 | ### Chapter 10: jQuery UI mouse interactions: Follow that mouse! 85 | * pg 310: The `cancel` selector identifies elements on which drag operations cannot start, but the elements can still be draggable. 86 | * pg 314: Passing `enabled` to `draggable` re-enables draggability, and does not bestow draggability on non-draggable elements. 87 | * pg 319: When a `draggable` is released over a `droppable`, both the `drop` and `dropdeactivate` events occur. 88 | * pg 321: If a class applied by `activeClass` or `hoverClass` does not take precedence, the `!important` CSS qualifier can override. 89 | * pg 328: The `sortupdate` event may be the most important, as it only fires if the sort order of anything changes. 90 | * pg 329: Passing 'toArray' and 'serialize' to sortable to retrieve the order of its children requires that each child has an `id` attribute. 91 | * pg 335: Only the southeast corner of a resizable element has a grip icon; custom child elements must be created for the others. 92 | * pg 342: The selectable tolerance 'fit' can be problematic without nested selectables because drags must begin within a selection. 93 | 94 | ### Chapter 11: jQuery UI widgets: Beyond HTML controls 95 | * pg 348: The `buttonset` method acts on a set of buttons and themes them so that they appear as a cohesive unit. 96 | * pg 352: No custom events are defined for jQuery UI buttons; standard events like `click` must be used. 97 | * pg 359: A slider uses `a` elements for its handles so that they are focusable elements and can be controlled using the keyboard. 98 | * pg 361: Only use a progress bar if a reasonable level of accuracy is possible; use another activity indicator otherwise. 99 | * pg 374: If only one of `label` or `value` is specified for an autocomplete item, the provided data is used in both places. 100 | * pg 387: Date pickers have no events; you must rely exclusively on the callbacks assigned to the options. 101 | * pg 394: By default, any content loaded with Ajax will not be cached, so showing the tab will contact the server every time. 102 | * pg 395: A spinner, or string displayed while an Ajax tab loads, requires a `span` element be the child of the tab's anchor element. 103 | * pg 401: With the `navigation` option set, loading the page opens the panel whose anchor header matches that in `location.href`. 104 | * pg 407: Once a dialog box is created, it doesn't need to be created again to be reopened after closing. 105 | * pg 410: Override the `close` handler to prevent a dialog box from closing when it contains forms that fail validation. 106 | * pg 411: The dialog box content element is set as the context for event handlers, not the created `div` that contains it. 107 | 108 | -------------------------------------------------------------------------------- /leanpub-manual.markdown: -------------------------------------------------------------------------------- 1 | ## Leanpub Manual 2 | 3 | * A dedication is added through your book's Settings page, and is put before the Table of Contents. 4 | * Adding About the Author text on the Settings page overrides the About You text on your account profile. 5 | * Coupons let you sell your book at a discounted price, or let reviewers get free copies. 6 | * Only e-mail your readers once or twice a month at most. 7 | * Markdown supports almost all the Kramdown extensions, with the exception of HTML blocks and `<<` becoming the left guillemet. 8 | * Attributes should be alone on a line, with blank lines above and below. 9 | * Technical books are on 8.5"x11" paper with inch margins, leaving 6.5"x9" to work with. 10 | * With 300PPI images, an image can be 1950x2700 pixels, while the cover page should be exactly 2550x3300 pixels. 11 | * You can float and align an image on your page by using the `width` and `float` attributes. 12 | * Cover images can be in either JPEG or PNG format and must be named `title_page.jpg` or `title_page.png`. 13 | * If all your books are in stealth mode, then your profile is also invisible to the public. 14 | * When specifying whether libraries can purchase your book, consider that libraries can lend out an unlimited number of copies of your book without DRM. 15 | * You can add Google Analytics to your landing page. 16 | * Leanpub ignores all `.git` directories, and so you can use a Git repository as your `manuscript` directory. 17 | * To add a motto or epigraph to the beginning of a chapter, simply center the text. 18 | 19 | ### Markdown 20 | 21 | * An image is inserted by `![caption](images/filename.ext)`, or `![](images/filename.ext)` to insert without a caption. 22 | * To start a new part in your book, start a line with `-#` followed by the part title. 23 | * Create `frontmatter.txt`, `mainmatter.txt`, and `backmatter.txt` files that just contain `{frontmatter}`, `{mainmatter}`, and `{backmatter}`. 24 | * Surround text in carets (`^`) to make it superscript. 25 | * Adding two spaces at the end of a paragraph creates separation. This is useful when following a paragraph with another kind of text block. 26 | * You can center text by preceding it with `C> `. 27 | * Once you start a numbered list, it doesn't matter what number you put at the beginning of the line. 28 | * To put a code block in a list, indent it by 8 spaces, and place a blank line before and after the code block. 29 | * For a definition list, put the thing you want to define on a line by itself, and on the next line precede the definition with a colon (`:`). 30 | * Text in a blockquote is preceded with `> `. 31 | * Text in an aside, or sidebar, is preceded with `A> `. 32 | * In the same style as asides, use `W> ` for warnings, `T> ` for tips, `E> ` for errors, `I> ` for information, `Q> ` for questions, `D> ` for discussions, and `E> ` for exercises. 33 | * Create a code block by placing matching numbers of tildes before and after the block. 34 | * You can put code in its own folder, and refer to it with either `<<(code/filename.ext)` or `<<[title](code/filename.ext)`. 35 | * To create a link without alternative text, surround the URL in angle brackets (`<` and `>`). 36 | * There must be a blank line before and after a footnote definition, and the caret symbol is required. 37 | * Identifiers that you can crosslink to are preceded with `#` and enclosed in curly braces (`{` and `}`). 38 | * To force a page break, add `{pagebreak}` on a line by itself. 39 | * When defining a table, use vertical bars (`|`) to separate columns; also place bars before the first and after the last column. 40 | * To add more spacing between rows in a table, put a dash lined between them. 41 | * To exclude lines, you can precede the text with two `%` characters. 42 | * To use inline or block LaTeX math, surround the LaTeX with delimiters `{$$}` and `{/$$}`. 43 | * Curly quotes are automatically generated from straight quotes in your Markdown. 44 | * A hack to add more space between paragraphs is to add a blank table, defined as `| |`. 45 | 46 | -------------------------------------------------------------------------------- /learning-android.markdown: -------------------------------------------------------------------------------- 1 | ## Learning Android 2 | 3 | by Marko Gargenta 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Learning-Android-Marko-Gargenta/dp/1449390501)!* 6 | 7 | ### Chapter 3: Quick Start 8 | * pg 20: The mainfest file explains what the application consits of, what its main building blocks are, what permissions it requires, and so on. 9 | * pg 21: The layout XML is responsible for the layout of widgets, while the strings XML is responsible for their textual content. 10 | 11 | ### Chapter 4: Main Building Blocks 12 | * pg 29: An activity transitioning from a _starting_ state to a _running_ state is an expensive operation. 13 | * pg 30: An activity that is visible but not in focus is _paused_. Once not visible, it is in a _stopped_ state. 14 | * pg 30: A destroyed activity is no longer in memory. There's no guarantee that it will be stopped before being destroyed, so do all important work en route to the paused state. 15 | * pg 31: An explicit intent specifies the receiving component, while an implicit intent specifies only the type of receiver. 16 | * pg 32: Services are either _starting_, _running_, or _destroyed_, and this life cycle is controlled by the developer and not so much by the system. 17 | * pg 34: Broadcast receivers are a system-wide publish-subscribe system. Receivers are not actively running in memory, but do get to run some code when triggered. 18 | 19 | ### Chapter 6: Android User Interface 20 | * pg 48: Use XML to declare everything about the UI that is static, and then a programmatic approach to define what happens when the user interacts with its widgets. 21 | * pg 49: Layouts allocate space for their children, which can be views or other layouts in turn. 22 | * pg 50: If you nest multiple `LinearLayout` instances, consider `RelativeLayout`. Heavy nesting has negative effects on time to start the activity, CPU, and battery consumption. 23 | * pg 50: `AbsoluteLayout` positions its children at absolute coordinates on the screen. Although simple, it breaks when screen size, density, or orientation changes. 24 | * pg 54: Specifying `fill_parent` for `layout_height` or `layout_width` uses all available space, while `wrap_content` only uses as much space as is necessary. 25 | * pg 55: The `layout_gravity` specifies how a widget is positioned within its layout, while `gravity` specifies how the widget's content is positioned within the widget itself. 26 | * pg 57: The `setContentView` inflates from XML, or parses the XML and creates a corresponding Java object for each element. 27 | * pg 62: Beware that if your project doesn't have `R.java` generated, then Organize Imports will import the `android.R` class. 28 | * pg 64: A terminal running `adb logcat` at all times is faster for debugging than switching to the DDMS perspective in Eclipse. 29 | * pg 67: The `AsyncTask` class is used to help handle long operations that need to report to the UI thread when progress is made or finally completed. 30 | * pg 75: Do not use extensions when referring to other file resources; Android figures out the best file format automatically. 31 | * pg 77: Android optionally expands on the RGB color set with the alpha channel, so you can express values for each channel in hexadecimal as `#ARGB` or `#AARRGGBB`. 32 | * pg 79: Alternative resources, like strings in different languages or images with different pixel density, work by specifying the qualifiers in the names of their resource folders. 33 | * pg 81: The Hierarchy Viewer tool attaches to any device or emulator and introspect the structure of the current view. For performance, aim for flat, nested layouts. 34 | 35 | ### Chapter 7: Preferences, the Filesystem, the Options Menu, and Intents 36 | * pg 87: A subclass of `PreferenceActivity` uses `addPreferencesFromResource()` instead of `setContentView()` to set its content from an XML file containing preferences. 37 | * pg 88: Any building block like an activity, service, broadcast receiver, or content provider must be defined in the `AndroidManifest.xml` file. 38 | * pg 90: The "title condensed" attribute of a menu item is shown instead of the title attribute if space is limited. 39 | * pg 91: The `onCreateOptionsMenu()` is only called once to inflate the menu, and doesn't get called again until the activity is destroyed. 40 | * pg 96: The `/sdcard` partition is a poorly structured, free-for-all partition that is a suitable place to store large files such as music, photos, or videos. 41 | * pg 97: The `data` subfolder of the `/data` partition contains subfolders corresponding to each application, each named by the package used to sign the corresponding application. 42 | 43 | ### Chapter 8: Services 44 | * pg 101: An unbound service runs independently of activities. A bound service provides more specific APIs through Android Interface Definition Language, or AIDL. 45 | * pg 102: As long as any part of your app is running, the `Application` object will be created, and so is a good place for common state. 46 | * pg 104: You must add an `android.name` attribute to the `application` element in `AndroidManifest.xml` to specify your subclass of `Application`. 47 | * pg 107: The `onStartCommand` method is called whenever the service receives a `startService` intent, and unlike `onCreate` and `onDestroy`, can be called repeatedly. 48 | 49 | ### Chapter 9: The Database 50 | * pg 120: The single-file nature of SQLite makes security straightforward, as it boils down to filesystem security. 51 | * pg 122: Class `SQLiteDatabase` supports prepared statements for `INSERT`, `UPDATE`, `DELETE`, and `SELECT`; all other SQL statements must be executed directly. 52 | * pg 124: The versioning provided by `SQLiteOpenHelper` simplifies recognizing when the schema has changed and tables must be altered. 53 | * pg 127: The database is stored in the `databases` subdirectory in your application directory along the `/data/data` path. 54 | * pg 129: On the command line, `sqlite3` will not complain if the file you refer to does not exist, and will simply create a new database. 55 | 56 | ### Chapter 10: Lists and Adapters 57 | * pg 138: A `ScrollView` contains only one direct child, and should have its width and height specified as `fill_parent`. 58 | * pg 141: The `startManagingCursor()` method of `Activity` manages the cursor's life cycle the same way it manages its own. 59 | * pg 143: The `ListActivity` is convenient where the built-in `ListView` is the only widget in the activity. 60 | * pg 148: The method `DateUtils.getRelativeTimeSpan` provides a human-readable relative time since a given timestamp. 61 | * pg 150: The `ViewBinder` assigned to an adapter specifies what data should be bound in the default manner, and what data requires a custom bind. 62 | * pg 151: The category `android.intent.category.LAUNCHER` must be added to an activity's `` for the application to be shown in the launcher drawer. 63 | * pg 156: The `onMenuOpened()` callback allows you to customize menu items before the menu is displayed. 64 | 65 | ### Chapter 11: Broadcast Receivers 66 | * pg 163: If you don't specify a needed permission, you won't be notified when the event occurs, which could be a hard bug to find. 67 | * pg 167: If broadcasts are sent with an intent that no code is listening for, the broadcasts are simply ignored. 68 | * pg 169: The `BOOT_COMPLETED` intent requires the `RECEIVE_BOOT_COMPLETED` permission, but `CONNECTIVITY_CHANGE` requires `ACCESS_NETWORK_STATE`. 69 | * pg 172: A receiver can accept broadcasts only from senders with permission to send, while a sender can broadcast only to receivers with a permission to receive. 70 | 71 | ### Chapter 12: Content Providers 72 | * pg 176: The URI for a content provider has an authority named after the class, one or more segments to specify the data type, and an optional identifier. 73 | * pg 179: For updating, deleting, and querying data, the selection argument and some others are only used if no identifier was specified in the URI. 74 | * pg 180: The `query` method should not close the database, as that will destroy the returned cursor. 75 | * pg 184: The `onUpdate` method of a widget should update all widgets specified by the `appWidgetIds` parameter. 76 | * pg 185: The `include` element in a layout allows reusing one layout inside another so that code is not duplicated. 77 | 78 | ### Chapter 13: System Services 79 | * pg 190: Requesting updates from a system service may drain battery, so register for updates in `onResume` and unregister in `onPause`. 80 | * pg 194: The `onDraw` method of a view draws the view on the given canvas. 81 | * pg 199: Android divides location permissions into abstract fine location and coarse location permissions, such as GPS and wireless networks, respectively. 82 | * pg 206: An `IntentService` is a subclass of `Service` but runs on its own worker thread, and the work to perform is put in its `onHandleIntent` method. 83 | * pg 209: A `PendingIntent` allows you to start an activity, start a service, or send a broadcast at a future time. 84 | * pg 211: The `ELAPSED_REALTIME` parameter will keep the `AlarmManager` from waking up the phone just to run a scheduled alarm. 85 | * pg 214: The `getString` method of `Context` accepts a variable number of arguments at the end and applies them to the string from `strings.xml` using `String.format`. 86 | 87 | -------------------------------------------------------------------------------- /mongodb-the-definitive-guide.markdown: -------------------------------------------------------------------------------- 1 | ## MongoDB: The Definitive Guide 2 | 3 | by Kristina Chodorow and Michael Dirolf 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/MongoDB-Definitive-Guide-Kristina-Chodorow/dp/1449344682)!* 6 | 7 | ### Chapter 1: Introduction 8 | * pg 3: MongoDB uses memory-mapped files to push memory management to the operating system. 9 | 10 | ### Chapter 2: Getting Started 11 | * pg 6: Documents with the same key-value pairs but in different orders are distinct. 12 | * pg 7: Partitioning data into collections yields speed gains from data locality given the right access patterns. 13 | * pg 8: Subcollections are a naming convention for organizing documents; there is no enforced relationship. 14 | * pg 9: A namespace is a collection name prepended with its containing database, and should be less than 100 bytes in practice. 15 | * pg 14: Help for database commands is provided by `db.help()`, and help for collections is provided by `db.foo.help()`. 16 | * pg 15: If a collection name is a property of the database class, or if it contains invalid Javascript in its name, use `db.getCollection` instead. 17 | * pg 18: If you retrieve a document with a 4-byte integer in the shell and save it back, it is updated to an 8-byte floating point value because all numbers are floating point in JS. 18 | * pg 18: An 8-byte integer is always printed with its float approximation; if it is not accurate, the top and bottom keys display the high-order and low-order 4 bytes, respectively. 19 | * pg 19: Omitting the `new` keyword when calling the `Date` constructor returns a string representation of the date, which can cause problems everywhere. 20 | * pg 22: The client can assign any type of value to the `_id` key; if none is present, the driver automatically assigns one of type `ObjectId`. 21 | 22 | ### Chapter 3: Creating, Updating, and Deleting Documents 23 | * pg 24: Data validation is pushed to the drivers; the server only checks for an `_id` key and that the data does not exceed 4MB. 24 | * pg 25: Calling `remove` on a collection removes all documents but not the collection or its indexes; drop the collection to delete them as well. 25 | * pg 27: Ensure that `update` always specifies a unique document; the best way is to match on the `_id` key if you know it. 26 | * pg 30: Calling `update` without using an `$` operator for modifying key-value pairs will perform a full-document replacement, not a partial update. 27 | * pg 33: Use `$addToSet` with `$each` to add multiple unique values to an array acting as a set; this cannot be done by combining `$ne` with `$push`. 28 | * pg 34: The `$pull` operator removes all elements from an array that match some criteria, not just one element. 29 | * pg 35: The positional operator `$` refers to the index of an element in an array that matches the query, allowing updates without knowing the index a priori. 30 | * pg 36: If `$push` becomes a bottleneck, consider pulling an embedded array out into a separate collection. 31 | * pg 37: An upsert creates a new document by applying any modifier documents to the criteria document, including any `$` operators like `$inc`. 32 | * pg 38: The update command may affect all matching documents in the future, so always specify the optional arguments `upsert_bool` and `multi_bool`. 33 | * pg 41: By default, the `findAndModify` command will return the preupdate document; this can be changed by setting the new key. 34 | * pg 42: Safe operations run `getLastError` immediately following an operation, which contains additional information (e.g. for an update or remove, the number of documents affected). 35 | * pg 43: Use safe operations while debugging; for example, an unsafe insert will not receive from the server a duplicate key error. 36 | * pg 44: Popular drivers use connection pooling, so a read submitted after a write by the client can reach the server first by being sent across a different connection. 37 | 38 | ### Chapter 4: Querying 39 | * pg 46: Keys with values of `1` in the second argument of `find` are always returned; keys with values of `0` are never returned. 40 | * pg 48: AND-type queries are most efficient if the first arguments eliminate results quickly; OR-type queries are most efficient if the first arguments match results quickly. 41 | * pg 49: Conditionals are an inner document key, while modifiers are always a key in the outer document. 42 | * pg 49: Multiple update modifiers cannot be used on a single key, but no such rule applies to query conditionals. 43 | * pg 50: A query document with a key of `null` matches documents missing the key altogether; to find keys whose value is `null`, check that the value is `$in [null]`, and that `$exists` returns `true`. 44 | * pg 52: The `$size` operator cannot be combined with another `$` conditional, adding a `size` key to the document allows the query, but will not update correctly with the `$addToSet` operator. 45 | * pg 53: Even though the `$slice` operator is used in the second argument to `find`, all keys in a document are returned unless otherwise specified. 46 | * pg 54: Dot notation on query documents allows reaching into embedded documents; it also means that when saving URLs as keys, the period character must be replaced. 47 | * pg 55: The `$elemMatch` operator ensures that all the following keys belong to the same embedded document. 48 | * pg 56: Use `$where` queries as a last resort; to reduce their penalty, use query filters in combination with them or use an index to filter based on the non-`$where` clauses. 49 | * pg 57: Only once `hasNext` is invoked on a cursor is the database queried; this allows chaining. 50 | * pg 59: Skips on cursors is slow; to paginate sorted elements, perform the query for the next page with the clause that the elements should be greater (or less than) the last value shown. 51 | * pg 60: To randomly select a document in a collection, have each map some key to a random value, and use `findOne` to find the first element greater than or less than another random value. 52 | * pg 61: Using the `explain` option with a query doesn’t perform it, but returns the indexes used, number of results, how long it takes, etc. instead. 53 | * pg 62: A document may be returned twice or inconsistencies may arise if you run a query without the snapshot option that returns multiple batches from the server. 54 | 55 | ### Chapter 5: Indexing 56 | * pg 67: If an index has *n* keys, it will make queries on any prefix of those keys fast. 57 | * pg 68: Order the keys when specifying an index so that frequently used data is spread over fewer pages, and therefore more likely to be in memory. 58 | * pg 69: A sort without an index requires pulling all the data into memory to sort it; if too large, the server will simply return an error. 59 | * pg 70: If a key does not exist, the index stores its value as *null*; given a unique index, it is easy to insert multiple documents missing a key and have all but the first fail. 60 | * pg 75: Given a query, the query optimizer first tries all query plans concurrently; that plan is remembered for future queries on the same keys. 61 | * pg 76: Invoking the `ensureIndex` method without the background option will block all other requests while the index is being built. 62 | * pg 78: The `geoNear` command returns the distance of each result from the query point; the `near` command does not, but must be used if you have more than 4MB of results. 63 | * pg 79: Geospatial indexes aren’t perfect for spherical shapes, but are fine for anything not a large distance. 64 | 65 | ### Chapter 6: Aggregation 66 | * pg 82: The `distinct` command finds all distinct values for a given key, but can’t find all distinct keys. 67 | * pg 87: The best way to find all keys across all documents in a collection is to use MapReduce. 68 | * pg 88: Reduce must return a document that can be used as input to reduce later, and so you cannot count on the input holding one of the initial documents or being a certain length. 69 | * pg 91: The MapReduce output collection is deleted by default when your shell or connection closes; to persist it, add the `keeptemp` or `out` option. 70 | * pg 92: Client-side values under the scope key passed to a MapReduce are immutable in the `map`, `reduce`, and `finalize` methods. 71 | 72 | ### Chapter 7: Advanced Topics 73 | * pg 94: All documents passed to the `runCommand` method are converted to queries on the `$cmd` collection. 74 | * pg 96: The `ping` command will return immediately even if the server is in a lock. 75 | * pg 99: If a capped collection has a maximum size in bytes and a maximum number of elements, the first limit encountered is used. 76 | * pg 100: The default sort of capped collections is the natural sort order, which corresponds to the insertion order; noncapped collections guarantee no particular default ordering. 77 | * pg 103: The metadata for each file is stored in the `fs.files` collection, which allows using traditional commands to inspect the filesystem. 78 | * pg 104: The `db.eval` function locks the database, and so can be used to introduce multidocument transactions. 79 | * pg 106: Use a scope with your MongoDB driver to pass user-defined variables to server-side Javascript while avoiding injection attacks. 80 | * pg 107: The first key in a `DBRef` must be `$ref` (the collection name), followed by `$id`, and then optionally `$db`. 81 | * pg 109: Storing an `_id` is more compact, but `DBRefs` are useful when storing heterogeneous references to documents in different collections. 82 | 83 | -------------------------------------------------------------------------------- /more-iphone-3-development.markdown: -------------------------------------------------------------------------------- 1 | ## More iPhone 3 Development 2 | 3 | by David Mark and Jeff LaMarche 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/More-iPhone-Development-Tackling-Beginning/dp/143022505X)!* 6 | 7 | ### Chapter 11: MapKit 8 | * pg 369: When testing if a coordinate is within a map view’s displayed region, be sure to account for the international date line. 9 | * pg 370: The annotation view is the object that gets displayed on the map, not the floating window (or callout) that is displayed when it’s selected. 10 | * pg 373: Your map view’s delegate is notified with all annotations; test the annotation class and return `nil` for any classes you don’t recognize. 11 | * pg 376: If you need to track the user’s location, let the map view do it for you. 12 | * pg 378: You can redefine properties to be more permissive than declared in a protocol or in a superclass. 13 | * pg 379: A newline in a string will be stripped out when displayed in the annotation’s callout view. 14 | * pg 385: The location manager may give you stale data from the cache at first; you can ignore it and wait until fresh data arrives. 15 | 16 | ### Chapter 14: Keeping Your Interface Responsive 17 | * pg 458: Non-repeating timers are not typically used; instead, call the method `performSelector:withObject:afterDelay`. 18 | * pg 472: Accessors declared `atomic autorelease` returned values, so if another thread sets a new value through a mutator, the old value is not deallocated under a thread still working with it. 19 | * pg 473: Most of UIKit is not thread safe; don’t set or retrieve values or work with outlets from threads other than the main thread. 20 | * pg 475: When subclassing `NSOperation`, the main method must create its own `autorelease` pool, and wrap all logic in a `@try` block so no uncaught exceptions kill the application. 21 | * pg 478: Sending a `cancel` message to an operation only sets the property; it is up to the main method to check whether it has been cancelled and stop appropriately. 22 | * pg 489: Key value observation enables notification whenever objects are changed. 23 | 24 | -------------------------------------------------------------------------------- /neat-words.markdown: -------------------------------------------------------------------------------- 1 | * ambit (n): the scope or extent of something 2 | * anodyne (adj): unlikely to offend, often deliberately so 3 | * apophenia (n): seeing connections or patterns in random data 4 | * apoplectic (adj): filled with rage 5 | * atavistic (adj): characterized by reversion to something primitive or ancestral 6 | * attenuated (adj): weakened in force or effect 7 | * blithely (adv): happily, or in a joyous manner 8 | * cachet (n): prestige, or the state of being respected 9 | * capacious (adj): spacious, roomy 10 | * chafed (v): become annoyed because of a restriction or inconvenience 11 | * cosset (v): care for and protect in an overindulgent way 12 | * demure (adj): reserved, modest, and shy 13 | * denouement (n): the final resolution of the intricacies of a plot 14 | * despotism (n): absolute power or control 15 | * diminuendo (n, v, adj, adv): reduction of force or loudness 16 | * disabuse (v): to rid oneself or another of error or fallacy 17 | * doyen (n): the most respected or prominent person in given field 18 | * epistemic (n): relating to knowledge, cognitive 19 | * equanimity (n): calmness or composure in difficult situations 20 | * ersatz (adj): a poor-quality imitation 21 | * evince (v): to reveal the presence of 22 | * expiate (v): to make amends, atone 23 | * facile (adj): ignoring the true complexities of an issue, superficial 24 | * functionary (n): paper-pusher, bean counter 25 | * grist (n): useful material to support an argument 26 | * hagiography (n): a biography which is uncritically supportive of its subject 27 | * hirsute (adj): hairy 28 | * impishly (adv): mischievously 29 | * importune (v): to harass (someone) persistently for or to do something 30 | * imprimatur (n): official approval or sanction 31 | * inchoate (adj): just begun and so undeveloped; rudimentary 32 | * ineluctable (adj): impossible to avoid 33 | * inveigh against (v): to protest or criticize bitterly or vehemently 34 | * l'esprit de l'escalier (n): thinking of the perfect retort too late 35 | * legerdemain (n): a display of skill or adroitness, wizardry 36 | * leitmotif (n): a dominant or recurring theme 37 | * magisterial (adj): having or showing great authority 38 | * martial (adj): warlike 39 | * mensch (n): a person of integrity and honor 40 | * métier (n): an activity in which one excels, forte 41 | * milquetoast (adj): feeble, insipid, or bland 42 | * monastic (adj): a simple way of living with few possessions and no people near you 43 | * moratorium (n): a temporary suspension of activity 44 | * oeuvre (n): the complete works of a writer, painter, or other artist 45 | * opprobrium (n): severe criticism and blame 46 | * polity (n): a politically organized unit 47 | * preternatural (adj): beyond what is normal or natural 48 | * pro forma (adv): as a matter of form or politeness 49 | * protean (adj): easily and continuously changing 50 | * provenance (n): the place of origin of something 51 | * puerile (adj): childishly silly and trivial 52 | * purgatory (n): a place or condition of suffering or expiation 53 | * raise Cain (v): to raise trouble, raise hell 54 | * rapacious (adj): inordinately greedy, extortionate 55 | * referendum (n): a vote where an entire electorate is invited 56 | * rejoinder (n): a sharp or witty reply 57 | * reproach (n): an expression of rebuke, strong disapproval 58 | * salient (adj): most noticeable or important 59 | * salvific (adj): leading to salvation 60 | * samizdat (n): clandestine copying and distribution of banned literature 61 | * skein (n): a tangled or complicated arrangement, state, or situation 62 | * simpatico (adj): likeable and easy to get on with 63 | * simulacrum (n): an unsatisfactory imitation or substitute 64 | * soi-disant (adj): self-styled, self-proclaimed 65 | * specious (adj): superficially plausible, but actually wrong 66 | * spurious (adj): based on false reasoning or information that is not true 67 | * sui generis (adj): unique 68 | * third rail (n): dangerous area of discussion, commonly used in politics 69 | * to brook (v): to tolerate or allow 70 | * unalloyed (adj): complete and unreserved 71 | * unrequited (adj): (of a feeling, esp. love) not returned or rewarded 72 | * vainglory (n): excessive vanity 73 | * vertiginous (adj): extremely high or steep 74 | * vivisection (n): ruthlessly sharp and detailed criticism or analysis 75 | * waiflike (adj): apparently homeless, starving, or forsaken 76 | -------------------------------------------------------------------------------- /ppk-on-javascript.markdown: -------------------------------------------------------------------------------- 1 | ## ppk on JavaScript, 1/e 2 | 3 | by Peter-Paul Koch 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/ppk-JavaScript-1-Peter-Paul-Koch/dp/0321423305)!* 6 | 7 | ### Chapter 1: Purpose 8 | * pg 6: A fat client emphasizes JS and reduces load times, thereby increasing usability; a thin client uses little JS and thereby increases accessibility. 9 | * pg 10: ECMA standardized the JS core language, but the W3C created the DOM specification which includes event handling and CSS modification. 10 | * pg 15: JS cross-window communication is allowed only when the pages in both windows come from the same domain (not even related subdomains). 11 | * pg 15: Documents in different subdomains can communicate with each other by setting document.domain to some value part of their real domains. 12 | 13 | ### Chapter 2: Context 14 | * pg 29: In 2002 Stuart Langridge coined the term "unobtrusive scripting" which is where the JS will hook itself into a page for enhanced usability. 15 | * pg 35: Add and remove DOM elements in a form with JS instead of simply hiding them because hidden fields are submitted too. 16 | * pg 38: Don't use the `javascript` pseudo-protocol link which is a no-op for noscript users; instead, add an `onclick` handler with a default value. 17 | * pg 41: The JS event equivalents of CSS `:hover` are not `mouseover` and `mouseout`, but `mouseenter` and `mouseleave` which are only supported by IE. 18 | * pg 41: A CSS dropdown menu triggered by a `li:hover` style cannot accommodate keyboard users because they can't focus on `li`, whereas a JS one could. 19 | * pg 46: No `mouseover` event will ever trigger if the user doesn't use a mouse -- to assist keyboard users, use a `focus` event. 20 | * pg 47: Screen readers read a page from top to bottom, so modifying a part of the page that is already read will be missed by the reader. 21 | * pg 53: If you have a link with an `onclick` handler but no sensible `href` value, just generate the link with JS so noscript users never see it. 22 | * pg 55: If redirecting a user, use `location.replace()` instead of assigning `location.href` to gracefully handle the use clicking the Back button. 23 | * pg 57: Don't use the `noscript` tag -- the user agent may know enough JS to ignore it, but not all the functionality you actually need. 24 | 25 | ### Chapter 3: Browsers 26 | * pg 69: The rendering engine for Internet Explorer is called Trident. 27 | * pg 77: Don't write a script for one browser first and add support for other browsers later on; solve nasty incompatibilities at the start, not the end. 28 | * pg 81: When doing object detection, always try and use the standards-compliant method first, and fall through to any proprietary ones. 29 | * pg 88: Don't do browser detection; but if you need some sort of introspection, always use `navigator.userAgent`. 30 | * pg 97: The `alert` method is useful for debugging, but tiresome if in a loop and you've found the problem; in this case, use `confirm` to break out of it. 31 | 32 | ### Chapter 4: Preparation 33 | * pg 112: Custom attributes fail (X)HTML validation, can can encode name-value pairs for hooks not easily expressed in a `class` attribute. 34 | * pg 121: The `script` tag in `head` can include scripts from other domains, since this is decided by the Webmaster and implicitly judged safe. 35 | * pg 122: If using XHTML, the content of the `script` tag must be defined as `CDATA`, which tells the parser not to parse the contents. 36 | * pg 128: Running JS initialization code using `window.onload` waits for all images to load; to avoid this, put the `script` tag before the closing `body` tag. 37 | 38 | ### Chapter 5: Core 39 | * pg 155: The value `undefined` is returned when a) a variable is declared but unassigned; b) you access an `undefined` property of an object; c) a function argument is defined, but no value is passed it to it. 40 | * pg 155: The `typeof` operator yields `"function"` on functions when they're really objects, and yields `"object"` when applied to `null`. 41 | * pg 160: When converting to `boolean`, `null`, `undefined`, `0`, `NaN`, and the empty string are `false`; everything else is `true`. 42 | * pg 160: To convert a string to a number, multiply by `1` or subtract `0`; to convert a variable to a boolean, apply the `!` operator twice. 43 | * pg 166: Comparison operators will interpret (i.e. convert) their operands to numbers if they can, otherwise they perform lexicographic comparison. 44 | * pg 172: JS makes no distinction between integers and floating point values; they're both numbers. 45 | * pg 176: The `toFixed` method of a number converts it to a string with the specified number of decimals. 46 | * pg 177: The `parseInt` and `parseFloat` will parse the leading number of a string that can contain non-numeric characters. 47 | * pg 189: The operators `&&` and `||` don't return `true` or `false`, but the value of the last expression they evaluated. 48 | * pg 198: The value after a `case` statement must have the same data type as the variable in the `switch`; no data-type conversion happens. 49 | * pg 208: You can `continue` or `break` from an outer loop by using a label. 50 | * pg 209: Unlike Java, you can not catch particular exception types -- you can only do `catch (e)`, which is the exception object. 51 | * pg 217: Javascript functions run in the scope in which they are defined, not in the scope from which they're executed. 52 | * pg 218: A nested function has access only to the final value of a local variable; beware of them accessing loop counters, etc. 53 | * pg 221: Predefined JS objects are either internal (e.g. the `String` objects) or host objects (created by Javascript's host, the browser). 54 | * pg 225: The `this` keyword always refers to the object the method is defined on. 55 | * pg 226: Client-side Javascript binds treats global variables as properties of the `window` object. 56 | * pg 235: The W3C DOM `nodeList` data type resembles an array, but is read-only and lacks all the methods defined by `Array`. 57 | 58 | ### Chapter 6: BOM 59 | * pg 242: When the user loads a new page, the `window` object is wiped clean but not destroyed, so references remain intact. 60 | * pg 245: After one window opens another, if the browser hasn't had time to download the page yet, its properties may be unavailable. 61 | * pg 251: The `window.open` method returns a reference to the new window, which has a property `opener` referring to the caller window. 62 | * pg 255: When the user closes a window, its `window` object remains available, but its `closed` property is set to `true`. 63 | * pg 257: Every `window` object has a `close` method; some browsers won't execute it, others open a dialog box for permission. 64 | * pg 261: You can only read the length of `window.history`, not its URLs; to navigate, use its `go`, `back`, and `forward` methods. 65 | * pg 265: The `focus` method brings a window to the front of the stacking order, while `blur` hides the window. 66 | * pg 268: The first argument of `setTimeout` can be a string that is interpreted as a JS command, or a plain function reference. 67 | * pg 270: The browser may set `lastModified` as either January 1 1970 or the current date if the server does not send the header. 68 | * pg 275: A cookie is stored in a name/value pair, where the name is what makes a cookie unique for a given path. 69 | * pg 276: If a page sets a cookie, only pages in that directory and its subdirectories can access them unless its path is changed. 70 | * pg 277: If a cookie is created in a subdomain, but its domain is changed to the top-level domain, it is now associated with all subdomains. 71 | * pg 278: When `document.cookie` is assigned to, a new cookie is created; when read, it contains all cookies separated by semicolons. 72 | * pg 281: A resource loaded from a third party domain allows that domain to set cookies, but modern browsers refuse them by default. 73 | 74 | ### Chapter 7: Events 75 | * pg 288: The `click` event is the only accessible mouse event, firing when the user has focused on an element and presses Enter. 76 | 77 | ### Chapter 8: DOM 78 | * pg 356: In XML, `getElementById` searches through attributes with the type (not the name) id, as defined in the DTD. 79 | * pg 359: The `children` node list contains only the element nodes (not text nodes) in `childNodes`, but it is not part of the DOM or fully supported. 80 | * pg 362: The `document.documentElement` and the `document.body` allow access to the `html` and `body` tags, respectively. 81 | * pg 375: The `document.createTextNode` argument cannot contain HTML entities; instead, use the `innerHTML` property. 82 | * pg 376: The `cloneNode` method will not clone event handlers, so you must redefine them on the clone. 83 | * pg 378: To work with IE, add generated table elements to a `tbody`, and create radio buttons with `innerHTML` instead of the DOM. 84 | * pg 382: Assigning `innerHTML` is 3 to 30 times faster than using pure DOM methods. 85 | * pg 392: HTML attributes are nodes in the DOM, while JS properties belong to the object representing the tag. 86 | * pg 393: Some JS properties are mapped to HTML attributes, e.g. the inline style, event handlers, and form fields, links, and images. 87 | * pg 395: IE does not support empty text nodes, while all other browsers do. 88 | * pg 398: The best defense against empty text nodes is to not use `previousSibling`, `nextSibling`, or `childNodes` at all. 89 | * pg 401: A `nodeList` is dynamic, so beware of introducing errors by adding or removing elements as you iterate over it. 90 | * pg 408: In the level 0 DOM, the `elements` associative array of a form maps a value to all radio buttons with that value as its name. 91 | * pg 410: In the level 0 DOM, for a `select` box, assigning `null` to an element deletes it, while assigning an element inserts it. 92 | * pg 416: You can check whether an element is in DOM hyperspace by checking if it has a parent node. 93 | 94 | -------------------------------------------------------------------------------- /pro-git.markdown: -------------------------------------------------------------------------------- 1 | ## Pro Git 2 | 3 | from http://progit.org/book/ 4 | 5 | ### Chapter 1: Getting Started 6 | * In distributed version control systems, clients don't just check out the latest copies of files, but fully mirror the repository. 7 | * When you commit, or save the state of your project in Git, it takes a snapshot of all files instead of computing their differences. 8 | * The entire project history is saved locally, so most operations in Git need only local resources and work quickly. 9 | * The working directory is a checkout of one version of the project; these files are pulled out of the compressed git directory, or repository. 10 | * A staged file is modified in the working directory and marked as part of your next commit snapshot to the git directory. 11 | 12 | ### Chapter 2: Git Basics 13 | * Tracked files were in the last snapshot; untracked files are everything else, or files not in your last snapshot or staging area. 14 | * The `add` command tracks and stages an untracked file, and stages a tracked and modified file, overwriting any staged copy. 15 | * Running `diff` shows what you've changed but not yet staged; adding `--staged` shows what you've staged and will commit next. 16 | * Running `diff` compares files in the working directory with their staged copies, not those in the repository. 17 | * Passing `--cached` to `rm` only removes a file from staging, so it is untracked; omitting it also removes the file from the working directory. 18 | * The `--stat` option for `log` shows summarized diff stats for files; `--graph` shows branch and merge history and is useful with `--pretty`. 19 | * To limit the output of `log` to specific files and paths, append them to the command, preceded by a double dash. 20 | * Run `commit` with `--append` to overwrite your last commit; without adding any files, you will simply overwrite your commit message. 21 | * The `fetch` command doesn't merge new data with your own; `git pull` will try to automatically merge, and works if you've run `clone`. 22 | * When running `git push origin master`, `origin` is the server to push to, and `master` is the branch to push. 23 | * Annotated tags are recommended over lightweight tags; they're stored as full objects, are checksummed, and include a message. 24 | * If you forget to `tag` immediately after a `commit`, specify the `commit` checksum or its unique prefix at the end of the command. 25 | 26 | ### Chapter 3: Git Branching 27 | * The `git branch` command creates a new brach, but the `HEAD` pointer does not refer to the new branch until you use `checkout`. 28 | * To create a branch and switch to it at the same time, run the `checkout` command with the `-b` option. 29 | * Without a clean working state when switching branches, conflicts may arise; using `stash` and `commit` amending can help. 30 | * If a conflict arises while merging, you must manually edit the file and then use add to put it in the staging area. 31 | * It is safe to delete unstarred branches listed by `git branch --merged`; branches listed by `--no-merged` cannot be deleted yet. 32 | * Topic branches are short-lived branches you create and use for a single particular feature or related work. 33 | * Remote branches refer to the state of branches on remote repositories, which move upon any network communication. 34 | * A `fetch` retrieves new remote branches as read-only pointers prefixed with `origin/`, which you manually `merge` to make editable. 35 | * Tracking branches are local branches directly associated with a remote branch, so `git pull` and `git push` work without arguments. 36 | * Using `rebase` replays changes from one line of work onto another, so the log will show a linear history instead of a parallel one. 37 | * Don't `rebase` commits that you'e pushed to a public repository, as others will base work on commits that you've rebased. 38 | 39 | ### Chapter 6: Git Tools 40 | * Passing `--abbrev-commit` to the `git log` command will use unique SHA-1 prefixes in the output. 41 | * The reflog only contains changes to your local repository; after you've cloned a repository, your reflog will initially be empty. 42 | * Using `^{n}` a the end of a reference refers to its nth parent; using `~{n}` traverses n parents up the ancestry tree. 43 | * The double-dot shows commits only reachable by the latter reference; the triple-dot shows reachable by either, but not both. 44 | * Running `git add` in interactive mode with `-i` and selecting 5 or `p` allows staging parts of files; when done, use `git commit`. 45 | * The `stash` command takes the dirty state of your working directory and saves it on a stack of unfinished changes you can reapply later. 46 | * To restage files that were staged when you created a stash, run `stash apply` with the `--index` option. 47 | * Using `stash branch` branches from the commit you were on when you stashed your work, then applies and drops the stash. 48 | * Amending a commit is like a very small `rebase`, so don't amend your last commit if you've already pushed it. 49 | * To modify a commit farther back, run `rebase` in interactive mode to rebase them onto the `HEAD` they were originally based. 50 | * The `filter-branch` command allows rewriting your history easily, but don't use it if other people have based work off those commits. 51 | * Passing `-C` to `blame` tries to figure out where snippets of code within the file came from if they were copied from elsewhere. 52 | * After you run `bisect`, don't forget to run `bisect` reset to reset your `HEAD` to where you started, or you'll end up in a weird state. 53 | * Submodules are recorded as the exact commit they're at; this way, the environment an be recreated exactly. 54 | * Subtree merging maps one project as a subdirectory of the other and vice versa, and fixes many problems of submodules. 55 | * To get a `diff` between the branch of a subproject and the superproject it's merged into, you must run `diff-tree` instead of `diff`. 56 | 57 | ### Chapter 9: GIt Internals 58 | * Low-level git commands are called the plumbing commands; those you use at the command line are porcelain commands. 59 | * Git stores trees and blobs; a tree contains blob or subtree entries, where each entry has a mode, type, and filename. 60 | * Trees capture the content of your staging area or index; commits annotate a tree with who saved the snapshot, when, and why. 61 | * References or refs are files that store SHA-1 values of commits; `HEAD` isn't another SHA-1 value, but a reference name. 62 | * The tag object is like a commit object, containing a tagger, date, message, and pointer, but points to a commit and not a tree. 63 | * While files are normally stored in a "loose object format," pack files that contain delta values are created occasionally. 64 | * All references under `refs/heads` on the server are written to `refs/remotes/origin` locally; branches can be qualified with the latter. 65 | * A refspec mapping remote branches to local references cannot have partial globs, but namespacing achieves the same ends. 66 | * If you reset and lose commits, the reflog tracks changes to `HEAD`, so branching from a reflog entry can surface them again. 67 | * Deleted large files still take up space because the entire history is stored; amending this is destructive to your commit history. 68 | 69 | -------------------------------------------------------------------------------- /rework.markdown: -------------------------------------------------------------------------------- 1 | ## Rework 2 | 3 | by Jason Fried and David Heinemeier Hansson 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Rework-Jason-Fried/dp/0307463745)!* 6 | 7 | ### Takedowns 8 | * pg 19: Make decisions right before you do something, not far in advance; long term plans are just guesses. 9 | * pg 23: It's okay to stay small; once big, it's hard to shrink without firing people and damaging morale. 10 | 11 | ### Go 12 | * pg 35: Build what you need, so you'll know the right answers, assess its quality directly, and love your work. 13 | * pg 43: Have a point of view and strong opinions; otherwise everything is debatable, and decisions are hard. 14 | * pg 50: Taking outside money relinquishes control to VCs, deprioritizes customers, and is distracting. 15 | * pg 56: A business without a path to profit isn't a business, it's a hobby. 16 | * pg 62: Avoid mass, like excess staff, long-term contracts, lock-ins, road maps, etc. to stay lean and agile. 17 | 18 | ### Progress 19 | * pg 72: Prioritize working on the most important part of your business so it's the best it can be; defer the rest. 20 | * pg 77: Make decisions, don't wait for the perfect solution; decisions build momentum and boost morale. 21 | * pg 90: When you make something, you always make something else; sell those byproducts. 22 | 23 | ### Productivity 24 | * pg 102: Don't throw good time after bad work; ensure that what you're working on matters. 25 | * pg 108: Meeting suck: they convey little information, drift off-subject, require preparation, and procreate. 26 | * pg 115: Momentum fuels motivation; build it through constant small victories that generate enthusiasm. 27 | * pg 121: Don't forego sleep: you'll be stubborn, uncreative, inefficient, irritable, and lose motivation. 28 | * pg 127: You'll feel guilty over long lists, then stress out; divide and conquer into small, manageable lists. 29 | 30 | ### Competitors 31 | * pg 136: If you're a copycat, you're in a passive position where you're always behind the times. 32 | * pg 141: If a competitor sucks, pick a fight; you'll stand out, earn followers, and ignite passions of users. 33 | 34 | ### Evolution 35 | * pg 153: Get into the habit of saying no; saying yes is easy, but you often wind up regretting it. 36 | * pg 157: Let customers outgrow you; focus on features that attract new customers, not please old ones. 37 | * pg 164: Feature requests that matter you'll hear over and over, so no need to write them down. 38 | 39 | ### Promotion 40 | * pg 174: Teach your customers; even if people don't use your product, they'll still be your fans. 41 | * pg 188: Niche bloggers are hungry for finding the new thing; stories that start there can go mainstream. 42 | * pg 191: Give away something for free; if your product is strong enough, people will come back for more. 43 | 44 | ### Hiring 45 | * pg 201: Don't hire anyone until you've tried the job yourself; then you'll know what and who to look for. 46 | * pg 206: Hiring more people than needed leads to invented projects, which adds cost and complexity. 47 | * pg 210: A cover letter lets you hear someone's actual voice; you can tell if it's in tune with your company. 48 | * pg 222: Great writers are great candidates, for clear writing is clear thinking. 49 | * pg 227: Hire potential employees for a mini-project; in a real work environment, the truth comes out. 50 | 51 | ### Damage Control 52 | * pg 235: Responding to customers quickly with a personal response is the best customer service. 53 | * pg 238: A good apology accepts responsibility, provides details of the problem, and a solution. 54 | 55 | ### Culture 56 | * pg 251: Don't make up problems you don't have yet; decisions don't lost forever anyway. 57 | * pg 262: Don't sound big and formal; communicate simply and directly, without legal or PR oversight. 58 | * pg 268: Saying ASAP devalues any request without it; use emergency language when really needed. 59 | 60 | -------------------------------------------------------------------------------- /rocket-surgery-made-easy.markdown: -------------------------------------------------------------------------------- 1 | ## Rocket Surgery Made Easy 2 | 3 | by Steve Krug 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Rocket-Surgery-Made-Easy-Do-It-Yourself/dp/0321657292)!* 6 | 7 | * pg 8: Small, informal, do-it-yourself usability testing is also called discount usability testing. 8 | 9 | ### Chapter 1: What DIY Testing Is 10 | * pg 13: Quantitative tests prove things by measuring others and are rigorous; qualitative tests simply acquire insights to improve what you're building. 11 | * pg 16: The serious problems are usually easy to find, so focus on those; you can get rid of “hidden” ones when you have more resources. 12 | * pg 19: Web analytics can tell you what people are doing on your site, but they can't tell you why. 13 | 14 | ### Chapter 3: A Plan You Can Follow 15 | * pg 24: Try testing a morning a month; the shortness simplifies recruiting, while the recurrence eliminates having to decide when to test as you just test whatever you have. 16 | * pg 28: Do all the tests back-to-back in a half day so the debrief can be conducted with details still fresh in everyone's mind. 17 | 18 | ### Chapter 4: The Hardest Part Is Starting Early Enough 19 | * pg 32: The worse shape something is in, the less you want to show it, but the more you can benefit if you do. 20 | * pg 33: Usability test on other sites with the same kind of content or features you'll implement, and then learn from their mistakes. 21 | * pg 35: If you sketch on a napkin, ask someone what they think it is, but not their opinion or their feedback. 22 | * pg 37: Visual design can introduce usability problems, so test “comps,” or visual treatments of your wireframes. 23 | 24 | ### Chapter 5: Who To Test And How To Find Them 25 | * pg 41: Requiring participants with domain knowledge excludes first-time and new users; instead, recruit loosely and grade on a curve. 26 | * pg 43: You need three participants; any more yields diminishing returns, increases tedium, and surfaces more nits that make triaging difficult. 27 | * pg 47: If you put out an invitation for testing, screen them to see if they really meet your qualifications, and are comfortable talking out-loud. 28 | * pg 49: Have a substitute participant “on-call” in case a participant doesn't show up, so that you're not wasting your observers' time. 29 | * pg 49: Don't use participants again at a later round, as they know too much already. 30 | 31 | ### Chapter 6: Picking Tasks And Writing Scenarios 32 | * pg 52: A good “filler” task for a participant who finishes early is to have them do a task on a competitor's site. 33 | * pg 55: Phrase tasks without using uncommon or unique words that appear on the screen, or else it's a simple game of word-finding. 34 | 35 | ### Chapter 7: Why You Should Use Boring Checklists 36 | * pg 57: On the day of testing, checklists get mundane details out of your head so you can give your full attention to the participant. 37 | 38 | ### Chapter 8: Conducting The Test Session 39 | * pg 63: The facilitator must tell the participants what to do and keep them moving without answering questions, and enact the think aloud protocol, or have them verbalize their thoughts. 40 | * pg 67: Set the screen resolution to something the average user likely has, not what a developer uses. 41 | * pg 69: Turn off software that might interrupt the test, add bookmarks for any pages you'll need to open, and clear all browsing data. 42 | * pg 75: Start by asking them what they make of the home page, such as what you can do there; don't ask for their opinion of it. 43 | * pg 77: If the participant is miserable, the task is taking too long, or you aren't learning anything more, move on to the next task. 44 | * pg 78: Ask substantial questions such as why the participant made particular choices at the end, after the tasks are completed, so you don't interrupt the flow or accidentally give clues. 45 | * pg 79: Users aren't designers, and they usually don't always know what they need, or even what they really want. 46 | * pg 82: Ask what the participant is thinking only if you're not entirely sure; don't make it a function of time and interrupt the user while reading or making progress. 47 | * pg 86: It's okay to be persistent and a bit ruthless; you're paying the participant for their time, and if you don't get what you need, you're wasting everyone's time. 48 | 49 | ### Chapter 9: What Observers Should Look For 50 | * pg 92: Have key stakeholders watch tests live instead of recordings; it's more compelling, and you benefit from the shared group experience and comparing observations. 51 | * pg 93: Observers should take notes, find the three most important usability problems they saw in the session, and suggest questions for the facilitator to ask the participant. 52 | * pg 100: The only time a team should be troubled by testing is when it's done so late in development that there's no time to fix any problems. 53 | 54 | ### Chapter 10: Comparing Notes And Deciding What To Fix 55 | * pg 104: You'll have more usability problems than resources to fix, so focus ruthlessly on the most serious problems. 56 | * pg 106: In the debriefing, list all observed problems, identify the ten worst, and then discuss what simple fixes to make within the next month. 57 | 58 | ### Chapter 11: Why Doing Less Is The Best Way To Fix Things 59 | * pg 111: Make the smallest and simplest change you can; you can spend the time to implement the perfect solution later. 60 | * pg 115: If a tweak doesn't work, try a stronger version if it; if that doesn't work, try another tweak before resorting to redesigning. 61 | * pg 117: If you're adding something to address a usability problem, question it; usually removing anything distracting is better. 62 | 63 | ### Chapter 12: Common Problems And How To Fix Them 64 | * pg 123: Someone who starts off lost on your web site will stay lost; don't let too many stakeholders add too many disorienting bits. 65 | * pg 124: Subtle visual distinctions that work in print don't work on the web; focus on making the important parts really stand out. 66 | 67 | ### Chapter 13: Playing Nicely With Others 68 | * pg 132: If you need buy-in from key stakeholders, ROI arguments are weak; make them observers in a live usability test. 69 | 70 | ### Chapter 14: Remote Testing 71 | * pg 138: You can't ask questions or probe with unmoderated remote testing, but it is cheap and still helpful. 72 | * pg 139: Don't try any form of remote testing until you have some in-person tests under your belt. 73 | 74 | -------------------------------------------------------------------------------- /summary-the-seven-habits-of-highly-effective-people.markdown: -------------------------------------------------------------------------------- 1 | ## Summary: The 7 Habits of Highly Effective People 2 | 3 | by ExecutiveGrowth Summaries, summarizing Stephen R. Covey 4 | 5 | ### Introduction: Principles, Paradigms, and Habits 6 | 7 | * Principles are the compass that show what actions move us toward our goals; paradigms show us the landscape we must cross; habits serve as the tools to traverse that space. 8 | * Principles are the qualities of human character that have been lauded throughout history because they consistently prove effective. 9 | * A paradigm forms the basis of how we see the world. 10 | * Habits are the tools of your principles and enable you to act upon your paradigms. 11 | 12 | ### Part I: Ownership & Definition 13 | 14 | #### 1. Principle of Ownership (Habit 1: Be Proactive) 15 | 16 | * The Principle of Ownership says we have the capability to take control of our lives. In life, we either act or are acted upon. 17 | * When maintaining ownership of our lives becomes a principle, we are forced to admit that *we* let ourselves go and *we* stopped trying. But it also gives us ownership over the successes of our lives. 18 | * This paradigm shift paves the way for the first habit of *Be Proactive*. 19 | 20 | #### 2. Principle of Direction (Habit 2: Begin with the End in Mind) 21 | 22 | * The Principle of Direction says that living an undirected life is untenable, and with the Principle of Ownership it argues for self-directed proactivity. 23 | * The second habit is *Begin with the End in Mind*, so that our actions fit into the blueprint of our lives. 24 | * As we adopt the habits, we grow through the *Maturity Continuum*, with the three stages of dependence, independence, and interdependence. 25 | * The concept of *Centeredness* says that what we value most will determine other aspects of our lives – such as our self-esteem, relationships, and consistency. 26 | * One of the biggest mistakes we all make is choosing entities rather than principles as our centers. 27 | * If the center of our existence is the well being of an entity, then our state of mind becomes susceptible to everything that those entities are susceptible to. 28 | * If we place immutable principles at our center, we remain steadfast in the face of whatever bad events may transpire to those entities. 29 | * We all have roles, and the well-principled core informs us how to best fulfill those roles. By identifying our roles, we identify our long-term goals for our relationships. 30 | 31 | ### Part II: Progress & Achievement 32 | 33 | #### 3. Principle of Individual Progress (Habit 3: First Things First) 34 | 35 | * The Principle of Individual Progress says that individuals should become *more* capable over time rather than *less* capable. 36 | * Living builds experience in every moment, and through experience we grow. Furthermore, it is through mindful experience that we grow toward a specific end. 37 | * The third habit is *First Things First*, where the first things are whatever maximize production and increase production capability (called P/PC). 38 | * To put first things first means to engage with activities that increase our production capability. 39 | * We each have a *Circle of Concern*, within which is a *Circle of Influence* which contains those things that we can have an *immediate* effect on. 40 | * When we spend time in the *Circle of Concern*, the *Circle of Influence* contracts as we lose out on opportunities to work within it. 41 | * In a *Time Management Matrix*, we want to spend as much time in Quadrant 2 (Important & Not Urgent) since it boosts our production capability. 42 | * To shrink Q1 (Important & Urgent) activities, eliminate Q3 and Q4 activities and substitute them with Q2 actions. Over time, Q2 actions will increase our PC, resulting in less Q1. 43 | 44 | #### 4. Principle of Abundance (Habit 4: Think Win/Win) 45 | 46 | * Two overlooked outcomes in addition to the normal win/lose breakdown: 47 | * Win: The concern is winning, and the outcome for the other party doesn't matter. 48 | * Win/Win or No Deal: Both parties commit to a Win/Win, and if none can be found then there are no hard feelings. 49 | * The *Principle of Abundance* embraces an *Abundance Mentality*, which says there is more than enough for everyone. 50 | * The *Scarcity Mentality* in business often gives rise to Win/Lose paradigms. 51 | * The relationship between two parties improves when they find a Win/Win solution. 52 | * If you are attempting to find a Win/Win solution but the other party does not trust you, then you must build *character* with them. 53 | * Character means proving yourself by your actions repeatedly. The consistency of acting on our principles shows others that our actions will always be chosen according to those principles. 54 | * The *Emotional Bank Account (EBA)* models building trust through character. It says that: 55 | 1. We have a joint account with whomever we have a relationship with, and its currency is trust. 56 | 2. Our actions are either deposits or withdrawals. 57 | * Building the EPA is critical because strong relationships yield better opportunities for both parties, and enable Win/Win outcomes. 58 | * A Win/Win or No Deal outcome preserves the relationship in the event that a solution cannot be found. 59 | * If you can tolerate a Lose/Win outcome, then you can preserve the relationship and may thereby achieve a much larger win down the road. 60 | 61 | #### 5. Principle of Effective Communication (Habit 5: Seek First to Understand, then to Be Understood) 62 | 63 | * The fifth habit *Seek First to Understand, then to Be Understood* says that by listening and gathering information, we can proceed more effectively. 64 | * By seeking first to be understood, you often come away from interactions with no new information. 65 | * The *Principle of Effective Communication* maintains that it is better if our interactions yield growth. 66 | * When your primary goal is to be heard, you are acting like you are struggling and you need to be validated and recognized. 67 | * Listening supplies *Psychological Air*, which allows each party to share openly and feel heard, accepted, and understood. The resulting free flow of ideas can be exceptionally powerful. 68 | * *Empathetic Listening* is listening where we seek first to understand the other person's paradigms and principles. 69 | * Empathetic listening makes a large deposit in the EBA by showing other people that we value our common humanity more than we care about forcing our beliefs upon them. 70 | 71 | #### 6. Principle of Team Execution (Habit 6: Synergy) 72 | 73 | * Our psychological needs require maintenance in four areas: physical, spiritual, mental, and social. 74 | * The *Principle of Team Execution* says that we need each other to thrive, and helps meet our social need. 75 | * Along the *Maturity Continuum* of dependence, independence, and interdependence, our ideal state is on the border between independence and interdependence. 76 | * The sixth habit, *Synergy*, happens when the team produces more than the sum of its parts and the production of ideas depends on the participation of each team member. 77 | * Only when a high state of trust exists, and the Emotional Bank Accounts are rich, does synergy become possible. 78 | * Unlike an ordinary team, each member of a synergistic group seeks the Win/Win outcome. 79 | * *Negative Synergy* is when a group becomes so toxic that each member attempts to fail the project. In the end there may be no deal, but the EBA is now empty. 80 | * Because negative synergy can be as powerful as synergy, it's crucial to approach team interaction with Win/Win or No Deal. 81 | 82 | ### Part III: Perpetual Growth 83 | 84 | #### 7. Principle of Greater Attainment (Habit 7: Sharpen the Saw) 85 | 86 | * The *Principle of Greater Attainment* says that our lives should reflect an *Upward Spiral* that comprises of learning, committing, and doing. 87 | * The final habit *Sharpening the Saw* means that each day we take time to focus on obtaining a *Daily Private Victory*. 88 | * This victory is won by engaging with the three independent dimensions of our lives: the mental, the physical, and the spiritual. 89 | * To meet the social/emotional dimension, we use the *Daily Public Victory* where we find a way to assist our family, friends, or colleagues in some small way each day. 90 | -------------------------------------------------------------------------------- /the-knack.markdown: -------------------------------------------------------------------------------- 1 | ## The Knack: How Street-Smart Entrepreneurs Learn to Handle Whatever Comes Up 2 | 3 | by Norm Brodsky and Bo Burlingham 4 | 5 | *I, [Michael Parker](http://omgitsmgp.com/), own this book and took these notes to further my own learning. If you enjoy these notes, please [purchase the book](http://www.amazon.com/Street-Smarts-All-Purpose-Tool-Entrepreneurs/dp/1591843200)!* 6 | 7 | ### Chapter 1: How to Succeed in Business 8 | * pg 6: The initial goal of every business is to survive long enough to see if it's viable, or can pay its own bills. 9 | * pg 9: Cost of sales subtracted from sales is your gross profit; as a percentage of sales, it's your gross profit margin. 10 | * pg 10: The higher your gross margin, the fewer sales needed to cover expenses, and the longer your capital will last. 11 | * pg 11: Reserve additional capital at the start; putting up additional capital after you think you've made the maximum investment required is hard. 12 | * pg 13: Sales do not equal cash; your gross profit must cover your expenses, so maintain the highest margin you're capable of achieving. 13 | * pg 20: When you reach critical mass, don't be carefree; stay on top of the numbers and let them balance your emotions. 14 | 15 | ### Chapter 2: The Right Stuff 16 | * pg 27: Once you have an ongoing, viable business, you must put its welfare first and never do anything to put it in jeopardy. 17 | * pg 29: The only opportunity a start-up should think about is building a customer base that will make the business viable. 18 | 19 | ### Chapter 3: Why Startups Fail 20 | * pg 42: Revolutionary concepts are risky; there is nothing more expensive than educating a market. 21 | * pg 44: Having a niche for a startup is important because you can't compete with established players on price, but need high gross margins. 22 | * pg 50: Write your first business plan for nobody but yourself; you need to test assumptions before you go out and raise money. 23 | 24 | ### Chapter 4: Where the Money Is 25 | * pg 58: The more debt you use to finance a startup, the greater the potential increase in its equity value. 26 | * pg 60: Approach long-shot investors first; you'll likely be turned down, but at least you'll learn something from the rejection. 27 | * pg 62: Asset-based lenders take control of your receivables; it has no incentive to help you, as it only depends on your customers. 28 | * pg 66: Don't ignore your banker when you don't need anything; meet regularly with them to build good relationship. 29 | * pg 71: When you need cash right away, asking from your best accounts will alienate them; and use personal relationships to collect. 30 | 31 | ### Chapter 5: Magic Numbers 32 | * pg 76: Low-margin sales can help build relationships, but must be dealt with when the focus turns to increasing profitability. 33 | * pg 77: Tracking numbers by hand gives you a better feel for them; when a computer does the work, the numbers are made abstract. 34 | * pg 79: Finding key numbers that you can track daily or weekly and measure the health of your business can help avoid downturns. 35 | * pg 83: A new customer will cost you, up front, for the daily cost of goods sold and any related overhead until you first collect. 36 | * pg 89: Acquirers buy the potential to make money in the future; they'll pay less if the risk of losing your cash flow is greater. 37 | 38 | ### Chapter 6: The Art of the Deal 39 | * pg 92: Negotiate first about a secondary matter; a concession there will give you bargaining power on your number one issue. 40 | * pg 96: It's always best to keep the other side guessing. 41 | * pg 102: It's okay to walk away from a dispute a little unhappy; don't let emotions dictate your business decisions. 42 | 43 | ### Chapter 7: It Begins with a Sale 44 | * pg 107: Once you know your niche, you can use that knowledge to build a solid customer base even in a competitive market. 45 | * pg 113: Remain flexible after you start your company; no niche lasts forever, as other companies will copy what you do. 46 | * pg 115: If your competitors respect you, it's probably deserved; if they think you're a lowlife, you're probably in trouble. 47 | 48 | ### Chapter 8: Good Sales, Bad Sales, and the Ones That Got Away 49 | * pg 120: Focus on small customers first; they yield high gross margins, and if you lose one it won't spell the end of your business. 50 | * pg 124: Giving away your ideas and expertise builds trust; you demonstrate your commitment to the customer's best interests. 51 | * pg 127: Don't sell the best things important to you; listen to a customer, and sell them on your solutions to what they find important. 52 | * pg 131: Never sell unused capacity at a discount; full-time customers won't tolerate paying more for the same service, and will leave. 53 | * pg 133: You can discount for volume, special terms, or maintain price while adding value; just don't discount excess capacity. 54 | 55 | ### Chapter 9: Customers for Keeps 56 | * pg 139: Nurture a customer relationship by teaching them your business; help them be smart buyers and smart consumers. 57 | * pg 142: Simply talking to customers lets you know their needs, but also shapes the company culture. 58 | 59 | ### Chapter 10: How to Lose Customers 60 | * pg 148: Raise prices gradually to cover creeping expenses and maintain strong profit margins; a business with weak margins won't sell. 61 | * pg 152: Rules takes away your employees' ability to use common sense in responding to reasonable customer requests. 62 | 63 | ### Chapter 11: The Decision to Grow 64 | * pg 155: Let your personal goals, such as where you want to be in five years and what you'll earn, help decide your business growth rate. 65 | * pg 156: Look for new services to offer current customers, as the easiest customer to get is the one you already have. 66 | * pg 158: If you don't have a firm grasp on what's driving the success of your business, growing it could devalue it. 67 | 68 | ### Chapter 12: Becoming the Boss 69 | * pg 167: Befriending your employees can lead to promoting incompetent ones, or not letting them go soon enough. 70 | * pg 168: You're the boss, but don't need to become the manager; delegate the responsibility and do what you do best. 71 | * pg 172: Have procedures in place to make theft difficult and catch it without your supervision, but check up from time to time. 72 | * pg 178: Transitioning to shared leadership creates structure which employees want, where the rules are known and applied evenly. 73 | 74 | ### Chapter 13: The One Thing You Can't Delegate 75 | * pg 182: A strong company culture binds your employees to the business; others will notice, and the quality of job applicants will rise. 76 | * pg 187: Only allow one corporate culture in the company; if managers create subcultures, chaos and corporate politics arise. 77 | * pg 190: Attacking creeping expenses requires everybody's help, which doesn't happen unless employees care about the company. 78 | 79 | ### Chapter 14: Selling Is a Team Sport 80 | * pg 196: Salespeople who stick around and perform consistently are invaluable, so screen out those dreaming of their own business. 81 | * pg 198: Avoid hotshot salespeople who focus only on sales and beat systems; they can sully relationships with your customers. 82 | * pg 201: Putting salespeople on salary encourages them to work together as a team, where each can bring their strengths to a deal. 83 | * pg 202: Commissioned salespeople make sure a customer belongs to them, not the company; that connection is their livelihood. 84 | * pg 203: You can't hire new salespeople on salary alone; instead, start them with commission, and then buy it out later. 85 | 86 | ### Chapter 15: Help! I Need Somebody 87 | * pg 211: Outside perspectives are important because we look for the type of solution that we are most comfortable with. 88 | * pg 218: Don't look to accountants for business advice; they deal with historical data, and so will never question your assumptions. 89 | * pg 221: Lawyers should only provide legal advice; their duty to protect clients from liabilities and risk aversion makes for bad business. 90 | 91 | ### Chapter 16: When the Student Is Ready, the Teacher Appears 92 | * pg 236: Don't let everyday business demands stop you from addressing the cause of a problem, not just its symptoms. 93 | * pg 239: Learning all you can about a customer, its representatives, and every surrounding aspect is a competitive advantage. 94 | * pg 244: There are more opportunities than you can take advantage of, and real ones don't disappear; so take time to think things over. 95 | 96 | ### Chapter 17: Keeping Up with the Stones 97 | * pg 246: Bringing on another full-time salesperson is a decision to grow; do it carefully, or it can have long-term repercussions. 98 | * pg 253: A web site allows finding one-time buyers very cheaply, whom you don't have to offer discounts given to regular customers. 99 | * pg 254: Once viable, you can accept some high-volume, low-margin sales so long as not getting paid doesn't jeopardize your business. 100 | * pg 260: You need to love your business, or else you'll have a hard time convincing anyone else to make commitments to you. 101 | 102 | -------------------------------------------------------------------------------- /the-managers-path.markdown: -------------------------------------------------------------------------------- 1 | ## The Manager's Path: A Guide for Tech Leaders Navigating Growth and Change 2 | 3 | by Camille Fournier 4 | 5 | ### Ch 1: Management 101 6 | 7 | * The experience of being managed is the foundation on which you build your own management philosophy. 8 | * 1-to-1 meetings create a human connection between you and your manager, and provide a regular opportunity for speaking privately. 9 | * Great managers notice when your normal energy level changes, and cares enough to ask you about it. 10 | * The feedback from a manager should be somewhat public if it's praise, and private if it's criticism. 11 | * Good managers know that delivering feedback quickly is more valuable than waiting for a convenient time to say something. 12 | * Praising in public publicizes the laudable efforts, and reinforces what positive behavior looks like. 13 | * A manager should show you the larger picture of how your work fits into the team's goals, and help you find purpose in that. 14 | * Managers can't guarantee promotions, but good ones know what the system is looking for and can help you build those achievements and skills. 15 | * To be a CTO one day, find the best managers and mentors you can, and watch them work; also build a strong network of peers. 16 | * Developing a sense of ownership and authority for your own experiences at work is a big step in owning your career and workplace happiness. 17 | * If you are managed, spend time thinking about what you want, and then work with your manager to get what you want. 18 | * As you become more senior, your manager expects you to bring solutions, not problems. 19 | * There is a difference between a strong manager and a manager that you like as a friend, or even one you respect as an engineer. 20 | -------------------------------------------------------------------------------- /vimtutor.markdown: -------------------------------------------------------------------------------- 1 | ### Lesson 2.3: On Operations and Motions 2 | * `w` is until the start of the next word, excluding its first character. 3 | * `e` is until the end of the current word, including the last character. 4 | 5 | ### Lesson 2.6: Operating on Lines 6 | * In the command `dd`, the second `d` isn't a motion. It's just a shortcut by the vim designers. 7 | 8 | ### Lesson 2.7: The Undo Command 9 | * Typing a capital `U` will undo all changes on a line. 10 | * Typing `Ctrl`+`R` will redo the commands, or undo the undos. 11 | 12 | ### Lesson 3.3: The Change Operator 13 | * To change until the end of a word, type `ce`. 14 | 15 | ### Lesson 3.4: More Changes Using `c` 16 | * The change operator accepts a number and a motion like `d`. 17 | 18 | ### Lesson 4.1: Cursor Location and File Status 19 | * Typing `Ctrl`+`g` will display the filename and the position in the file. 20 | * Typing `gg` will move to the start of a file, and typing `G` moves to the bottom. 21 | 22 | ### Lesson 4.2: The Search Command 23 | * Typing `Ctrl`+`o` will jump to an older location. Typing `Ctrl`+`i` will jump to a newer location. 24 | 25 | ### Lesson 4.4: The Substitute Command 26 | * To substitute only on the current line, type `:s/old/new`. 27 | * To substitute in a range of lines, type `:#,#s/old/new/g`. 28 | * To find each occurrence and prompt for substitution, type `:%s/old/new/gc`. 29 | 30 | ### Lesson 5.3: Selecting Text to Write 31 | * To save part of a file, select it in visual mode before executing `:w`. 32 | 33 | ### Lesson 5.4: Retrieving and Merging Files 34 | * To insert the contents of a file, type `:r FILENAME`. 35 | 36 | ### Lesson 6.3: Another Way to Replace 37 | * Type `R` to replace more than one character. 38 | 39 | ### Lesson 6.4: Copy and Paste Text 40 | * You can also use `y` as an operator, e.g. `yw` yanks one word. 41 | 42 | ### Lesson 6.5: Set Option 43 | * If you want to ignore case for just one search command, use `/[term]\c. 44 | 45 | ### Lesson 7.1: Getting Help 46 | * Type `:help` to get help. Add an argument to get help on a particular subject. 47 | 48 | ### Lesson 7.3: Completion 49 | * Tab completion works for commands, as well as filenames following `:e` or `:w`. 50 | 51 | -------------------------------------------------------------------------------- /why-dont-they-teach-me-this-in-school.markdown: -------------------------------------------------------------------------------- 1 | ## Why Didn't They Teach Me This in School?: 99 Personal Money Management Principles to Live By 2 | 3 | by Cary Siegel 4 | 5 | ### Life Lesson 6 | 7 | * Don't surprise your partner by changing your financial habits when you're married. Money is one of the biggest things that couples fight about. 8 | * The quickest way to financial downfall is divorce. At best, you split your money in half. 9 | * Aside from education, childcare, healthcare, food, and clothing, you must provide a larger house, larger car, higher utility bills, entertainment, sports, and other utilities for your child. 10 | * If you always live below your means, you will always have extra money to save and invest. Over the years that money will continue to grow, and you'll have financial security. 11 | * The cost of maintenance and repairs can be significant in the short term. But the cost of not maintaining and repairing "stuff" is much more significant in the long run. 12 | * Those who don't get involved in financial careers will have personal money management experience you can learn from. But don't have a friend as your investment advisor. 13 | * Think of your first job as an extension of college learning, but where the company is paying you to learn. This will put you at an advantage both in your career and financially. 14 | * Consult the Internet, your library, your company, a mentor, and friends and family, and spend one hour a week learning about personal finance. 15 | * Get rich slowly and enjoy the journey to wealth. If you work slowly for the almighty dollar and ultimate wealth, you may not enjoy the journey. 16 | * Set realistic and attainable financial goals. Set them both monthly and annually and periodically analyze them to see what you achieved and what you missed. 17 | * Long term financial goals are easy to lose track of, so relentlessly set and recalibrate them. They will provide you with a purpose for working hard. 18 | * Always know your net worth. Add up everything you own and subtract everything you owe. 19 | 20 | ### Budgeting and Saving Lesson 21 | 22 | * Develop a written budget and evaluate it every single month. Ensure that more money comes in than goes out. 23 | * What goes in includes salary, bonus and commissions, dividends and interests, and gifts. What goes out includes housing, utilities, automobile, food, entertainment, insurance, loans, charity, savings, 401K, and miscellaneous expenses. 24 | * In December, tally up your income and expenses for the current year and then forecast for the next year. Develop a net worth statement for this year, and then one for the following year. Ascertaining your financial health will let you develop strategies for managing it. 25 | * Save and invest half of every salary increase. Remember that you were living on your old salary before you got a raise. 26 | * Save 90% of every bonus or non-planned income, including inheritances or tax refunds. If you take the attitude that it is found money, you tend to waste it rather than use it wisely. 27 | * Understand the value of your employee benefits, such as health insurance, vacation and personal days, long-term and short-term disability, 401K plans, bonus plans, and stock options. 28 | * Have an emergency fund to cover unexpected automobile, medical, prescription, home maintenance and repair, and veterinary expenses. This will save you both stress and money. 29 | * Take one month every year and strip your spending down to the bare essentials. This will show you how difficult or easy it is to do, and puts your priorities in order. Consider January to balance out the holiday spending. 30 | * There is always a coupon that saves you money on stuff that you're already buying. More importantly, don't buy products just because they are discounted. 31 | * When doing work on your home, get two or three estimates and play them off of each other. Also see how much you can save by paying cash for things. 32 | * A large percentage of consumer rebates are not redeemed, so fill one out and send it in immediately, even if the company says you have thirty days or so. 33 | * Focusing on spending is contagious. Budgeting and net worth statements can serve as the "scorecards" of your achievement. 34 | 35 | ### Spending Lesson 36 | 37 | * Do not keep up with the Joneses. The only people you ultimately answer to are you and your family. You must recognize that there will always be people who live better than you. 38 | * Don't think only of the purchase price of your car, but it's total cost of ownership. Some are one-time, and others are recurring. Some are also unexpected. 39 | * Prioritize your wants and needs. As an aside, if you do not make savings a top priority of yours, then it will never happen. So ensure that it is a top priority of yours. 40 | * If something sounds too good to be true, it probably is. Stay away from it. Strangers aren't just going to give you something for nothing. 41 | * Be wary of small bargains. Consider its discounted price versus first price, utility, quality, and difficulty in acquiring the bargain. If it's something you don't need, then use your willpower. 42 | 43 | --------------------------------------------------------------------------------