SlideShare a Scribd company logo
One Man
                         Lightning Talks
                         An opportunity to witness disaster



                                  Ryan McGeary
                             http://ryan.mcgeary.org
                                    @rmm5t

   Bill Brookman
Showman Extraordinaire


Monday, April 4, 2011
Do Your Commit
                        Messages Suck?

                               Ryan McGeary
                          http://ryan.mcgeary.org
                                 @rmm5t




Monday, April 4, 2011
The
             Bad


Monday, April 4, 2011
Bad

   587a09c
   dfe4c3e
   9770886
   7587f8b
   9052cb8
   8af6da0
   0536fc7
   d5e07c7
   0328c7c
   3ee25cd
   c3f7275
   9f474bc
   8a0f74c
   dffb0db
   0841841
   19900ba
   e5a524a
   af0a3bb              deploymoreenvcap
                        Stagingscript
                        g
                        Working?
                        whoops
                        again
                        Read from
                        Updated scripts
                        Againfixed
                        More staging
                        cleanup
                        file
                        staging
                        setup
                        fixes



Monday, April 4, 2011
More Bad

    8b48352
    3a61755
    bf77372
    eec60db             this isstupid
                                a fucking
                        what a hassle
                        seriously a
                        fucking
                        hassle hassle



Monday, April 4, 2011
Again Bad

    18c3f84             Huge commit




Monday, April 4, 2011
Huge Whoops More Again
                           Serious Hassle Bad
    c1c38fc               Update deploy
                          recipe with some
                          stuff. I dunno.
                          it's late

Monday, April 4, 2011
The
      Good


Monday, April 4, 2011
Good

    0835022             Updated basic
                        auth prompt to
                        reflect app name


Monday, April 4, 2011
Good

    950b8de
    0835022              Updated basic
                        Fixed password reset for
                        users who use the same
                         authonprompt accounts
                        email    multiple  to
                        [Fixes #11102389] name
                         reflect app


Monday, April 4, 2011
More Good
    3224fff Added an extra 10s while sleeping
            after a Twitter rate-limit error

                        * Twitter isn't always ready
                          immediately after sleeping the
                          advertised amount of time.




Monday, April 4, 2011
More Good
    334a2c4 Fixed bug related to contact syncing
            [#9190663]

                        Contacts that should have been tagged both friend and
    3224fff Added an extra 10s while sleeping
            follower were having those tags toggled on each
            after a Twitter rate-limit error
                        #profile_sync run.


                        If the contact had "follower", and ready
                        * Twitter isn't always profile_sync was
                           immediately after sleeping the
                        run, then the code would set the system_tags to
                           advertised amount of time.
                        ["following"], blowing away the "follower" tag.


                        It would do the same thing vice versa for the

                        "following" system tag.




Monday, April 4, 2011
Template
                              Ya generic
                          AR#6375]
    Moved all static pages into
                    M   M
    PagesController [Finishes
                SU
                     I  S
    * Cleaned up the routes
                       Lpage creation
    * Simplified TA
                 static
            DE


Monday, April 4, 2011
Template
    Moved all static pages N
           B                 T a generic
                        E into
     VE  R            M                 #
             FR  A [Finishes #6375]ET
    PagesController G
                               CK
    * Cleaned up the routes TI
             HY
    * Simplified static page creation
          W


Monday, April 4, 2011
Verbs
                        184   Added
                         85   Fixed
                         76   Upped
                         31   Removed
                         24   Switched
                         21   Improved
                         20   Updated
                         16   Renamed

Monday, April 4, 2011
“Vendor Everything”        Ryan McGeary
                        http://ryan.mcgeary.org
      Still Applies            @rmm5t




Monday, April 4, 2011
ge ms              em
                           r/              ig   .g
                en      do              nf
              v                    co
Monday, April 4, 2011
WHY?
Monday, April 4, 2011
Check in your
                           .rvmrc

                        rvm ruby-1.9.2



Monday, April 4, 2011
RVM Gemsets
                        Are Overrated

Monday, April 4, 2011
Let Bundler Follow the
                              --path
    $ bundle install --path vendor
    $ echo 'vendor/ruby' >> .gitignore




Monday, April 4, 2011
Package Your Gems in
                         vendor/cache

                        $ bundle package



Monday, April 4, 2011
Help!
    alias               b="bundle"
    alias               bi="b install --path vendor"
    alias               bu="b update"
    alias               be="b exec"
    alias               binit="bi && b package && echo 'vendor/ruby'
                                  >> .gitignore"




Monday, April 4, 2011
Summary

    $ bundle install --path vendor
    $ bundle package
    $ echo 'vendor/ruby' >> .gitignore




Monday, April 4, 2011
CoffeeScript
       A little language that compiles into JavaScript



                             Ryan McGeary
                        http://ryan.mcgeary.org
                               @rmm5t




Monday, April 4, 2011
Jeremy Ashkenas
               JavaScript's less
           ostentatious kid brother CoffeeScript is
                                           an attempt to
                          one-to-one      expose the good
                        with JavaScript       parts of
                                          JavaScript in a
                        better              simple way.
                   functional syntax

                          compiles to
                        the good parts


http://jashkenas.github.com/coffee-script/
Monday, April 4, 2011
if (typeof elvis !== "undefined" && elvis !== null) {
      alert("I knew it!");
    }




Monday, April 4, 2011
alert "I knew it!" if elvis?




Monday, April 4, 2011
var cube, square;
                        square = function(x) {
                           return x * x;
                        };
                        cube = function(x) {
                           return square(x) * x;
                        };




Monday, April 4, 2011
square = (x) -> x * x
                    cube   = (x) -> square(x) * x




Monday, April 4, 2011
var _i, _len, _ref, _result, food, lunch;
             lunch = (function() {
               _result = []; _ref = ['toast', 'cheese', 'wine'];
               for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                 food = _ref[_i];
                 _result.push(eat(food));
               }
               return _result;
             })();




Monday, April 4, 2011
lunch = (eat food for food in ['toast', 'cheese', 'wine'])




Monday, April 4, 2011
var _i, _j, _len, _len2, _ref, _ref2, roid, roid2;
        _ref = asteroids;
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          roid = _ref[_i];
          _ref2 = asteroids;
          for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) {
            roid2 = _ref2[_j];
            if (roid !== roid2) {
              if (roid.overlaps(roid2)) {
                roid.explode();
              }
            }
          }
        }




Monday, April 4, 2011
for roid in asteroids
               for roid2 in asteroids when roid isnt roid2
                 roid.explode() if roid.overlaps roid2




Monday, April 4, 2011
Installation
  $ brew install node
  $ curl http://npmjs.org/install.sh | sh

  # Add /usr/local/share/npm/bin to PATH



  $ npm install coffee-script




Monday, April 4, 2011
Usage
              $ coffee -c path/to/script.coffee

              $ coffee --watch experimental.coffee

              $ coffee --print *.coffee > all.js




Monday, April 4, 2011
Significant Whitespace

                        if happy and knowsIt
                          clapsHands()
                          chaChaCha()
                        else
                          showIt()


Monday, April 4, 2011
Significant Whitespace

                        if (happy && knowsIt) {
                          clapsHands();
                          chaChaCha();
                        } else {
                          showIt();
                        }


Monday, April 4, 2011
Functions
                 square = (x) -> x * x

                 area   = (x, y) -> x * y

                 noop   = ->



Monday, April 4, 2011
Functions
                        var area, noop, square;
                        square = function(x) {
                           return x * x;
                        };
                        area = function(x, y) {
                           return x * y;
                        };
                        noop = function() {};


Monday, April 4, 2011
Objects
                                         var kids;
                kids =                   kids = {
                  brother:                  brother: {
                                               name: "Max",


                                    >>
                    name: "Max"                age: 11
                    age: 11                 },
                                            sister: {
                  sister:                      name: "Ida",
                    name: "Ida"                age: 9
                                            }
                    age: 9
                                         };




Monday, April 4, 2011
Lexical Scoping / Variable Safety

                                        (function() {
                                          var change, inner, outer;
                outer = 1                 outer = 1;
                change = ->
                                   >>
                                          change = function() {
                                             var inner;
                  inner = -1                 inner = -1;
                  outer = 10                 return (outer = 10);
                                          };
                inner = change()
                                          inner = change();
                                        }).call(this);




Monday, April 4, 2011
OOP
                class Animal
                  constructor: (@name) ->

                        move: (meters) ->
                          alert @name + " moved " + meters + "m."

                class Snake extends Animal
                  move: ->
                    alert "Slithering..."
                    super 5

                sam = new Snake "Sammy the Python"
                sam.move()




Monday, April 4, 2011
OOP
                var Animal, Snake, sam;
                var __extends = function(child, parent) {
                      var ctor = function(){};
                      ctor.prototype = parent.prototype;
                      child.prototype = new ctor();
                      child.prototype.constructor = child;
                      if (typeof parent.extended === "function") parent.extended(child);
                      child.__super__ = parent.prototype;
                   };
                Animal = function(_arg) {
                   this.name = _arg;
                   return this;
                };
                Animal.prototype.move = function(meters) {
                   return alert(this.name + " moved " + meters + "m.");
                };
                Snake = function() {
                   return Animal.apply(this, arguments);
                };
                __extends(Snake, Animal);
                Snake.prototype.move = function() {
                   alert("Slithering...");
                   return Snake.__super__.move.call(this, 5);
                };
                sam = new Snake("Sammy the Python");
                sam.move();




Monday, April 4, 2011
Pattern Matching
                 theBait   = 1000
                 theSwitch = 0

                 [theBait, theSwitch] = [theSwitch, theBait]




                 weatherReport = (location) ->
                   [location, 72, "Mostly Sunny"]

                 [zip, temp, forecast] = weatherReport "20175




Monday, April 4, 2011
Pattern Matching
               var _ref, forecast, temp, theBait, theSwitch, weatherReport, zip;
               theBait = 1000;
               theSwitch = 0;
               _ref = [theSwitch, theBait];
               theBait = _ref[0];
               theSwitch = _ref[1];




               weatherReport = function(location) {
                  return [location, 72, "Mostly Sunny"];
               };
               _ref = weatherReport("20175");
               zip = _ref[0];
               temp = _ref[1];
               forecast = _ref[2];




Monday, April 4, 2011
String and RegExp Interpolation
                 quote = "A picture is a fact."
                 author = "Wittgenstein"
                 phrase = "#{quote} -- #{author}"

                 sentence = "#{ 22 / 7 } approximates π"

                 sep   = "[./- ]"
                 dates = /d+#{sep}d+#{sep}d+/g




Monday, April 4, 2011
String and RegExp Interpolation

                var author, dates, phrase, quote, sentence, sep;
                quote = "A picture is a fact.";
                author = "Wittgenstein";
                phrase = ("" + (quote) + " -- " + (author));

                sentence = ("" + (22 / 7) + " is a decent approximation of π");

                sep = "[./- ]";
                dates = (new RegExp("d+" + (sep) + "d+" + (sep) + "d+", "g"));




Monday, April 4, 2011
Array and Object Comprehensions

                 foods = ['toast', 'cheese', 'wine']
                 lunch = (eat(food) for food in foods)

                 yearsOld = max: 10, ida: 9, tim: 11
                 ages = for child, age of yearsOld
                   "#{child} is #{age}"




Monday, April 4, 2011
Array and Object Comprehensions
                var _i, _len, _ref, _result, age, ages, child, food, foods, lunch, yearsOld;
                var __hasProp = Object.prototype.hasOwnProperty;
                foods = ['toast', 'cheese', 'wine'];
                lunch = (function() {
                  _result = []; _ref = foods;
                  for (_i = 0, _len = _ref.length; _i < _len; _i++) {
                    food = _ref[_i];
                    _result.push(eat(food));
                  }
                  return _result;
                })();

                yearsOld = {
                   max: 10,
                   ida: 9,
                   tim: 11
                };
                ages = (function() {
                   _result = []; _ref = yearsOld;
                   for (child in _ref) {
                     if (!__hasProp.call(_ref, child)) continue;
                     age = _ref[child];
                     _result.push("" + (child) + " is " + (age));
                   }
                   return _result;
                })();




Monday, April 4, 2011
Function Binding

          Account = (customer, cart) ->
            @customer = customer
            @cart = cart

                 $('#checkout').bind 'click', (event) =>
                   @customer.purchase @cart




Monday, April 4, 2011
Function Binding

                var Account;
                var __bind = function(func, context) {
                      return function(){ return func.apply(context, arguments); };
                   };
                Account = function(customer, cart) {
                   this.customer = customer;
                   this.cart = cart;
                   return $('#checkout').bind('click', __bind(function(event) {
                      return this.customer.purchase(this.cart);
                   }, this));
                };




Monday, April 4, 2011
The Rest...
                        Slicing and Splicing
                        Splat Arguments
                        Existential Operator
                        Everything is an expression; always a return value
                        Pattern matching with object literals
                        Switch/When/Else
                        While/Until/Loop
                        Try/Catch/Finally
                        Chained comparison
                        Multiline Strings, Heredocs, and Block Comments


                                  http://jashkenas.github.com/coffee-script/
Monday, April 4, 2011
Ideas for Getting Started




Monday, April 4, 2011
How We Use
           MongoDB
          at BusyConf
                Making great
            conferences even better
                        busyconf.com
                        Ryan McGeary
                          Jim Garvin
Monday, April 4, 2011
Monday, April 4, 2011
Why MongoDB?


Monday, April 4, 2011
Why NOT MongoDB?


Monday, April 4, 2011
Event

                           Day 1      Day 2     Day 3

              Track 1 Track 2 Track 3 TimeSlot 1

      TimeSlot 1        TS 2   TS 3           Activity

         Activity Activity Activity Speaker

            Speaker 1   S2 S3
Monday, April 4, 2011
Events               Days
                                          1..N

                                  o n?
                              i ti    Tracks         1..N
                          pos
                                          1..N
                   1..N
                                     TimeSlots
                                          1..1

                                     Activities
                                                             T A?
                                                           DA
                                          1..N
                                                         A
                                                     ET Links
                                                  1..N
                                     Speakers      M

Monday, April 4, 2011
Event
               Day 1                        Day 1
               Track 1                      Track 1
                TimeSlot 1     TimeSlot n    TimeSlot 1 TimeSlo
                Activity        Activity     Activity   tActivit
                                                          n
                 S1     Sn      Speaker       S1 Sn y    Speak
                                                         er

                  Track n                   Track n
                  TimeSlot 1                TimeSlot 1
                   Activity                 Activity
                   Speaker                   Speaker


                  TimeSlot n                TimeSlot n

Monday, April 4, 2011
Event

                         Day 1        Day 2        Day n...


                         Track 1      Track 2      Track n...


                         TimeSlot 1   TimeSlot 2   TimeSlot n...




                           Activity                   Speaker

Monday, April 4, 2011
HTML5
     Application
      Caching
       There are only two hard
     things in Computer Science:
         cache invalidation
          and naming things.
            -- Phil Karlton


             Ryan McGeary
        http://ryan.mcgeary.org
               @rmm5t
Monday, April 4, 2011
diveintohtml5.org




Monday, April 4, 2011
Browser Support




Monday, April 4, 2011
Cache Manifest
    <!DOCTYPE HTML>
    <html manifest="/mobile.manifest">
    <body>
    ...
    </body>
    </html>

                        text/cache-manifest

Monday, April 4, 2011
CACHE Sections
    CACHE MANIFEST
    http://www.google-analytics.com/ga.js
    /favicon.ico
    /javascripts/application.js
    /stylesheets/screen.css
    /data.json



Monday, April 4, 2011
NETWORK Sections
    CACHE MANIFEST

    NETWORK:
    *

    CACHE:
    http://www.google-analytics.com/ga.js
    /favicon.ico
    /javascripts/application.js
    /stylesheets/screen.css
    /data.json




Monday, April 4, 2011
FALLBACK Sections
    CACHE MANIFEST

    FALLBACK:
    / /offline.html

    NETWORK:
    *

    CACHE:
    http://www.google-analytics.com/ga.js
    /favicon.ico




Monday, April 4, 2011
Expiring The Cache
    CACHE MANIFEST
    # Updated: <%= something.updated_at %>
    # Released: <%= application_released_at %>

    NETWORK:
    *

    CACHE:
    # ...




Monday, April 4, 2011
window.applicationCache
           checking                                      error


              updated          NO
              manifest?              noupdate

                         YES

     downloading                     progress

                                                      swapCache()
                                NO    already   YES
                cached                cached?         updateready


Monday, April 4, 2011
Ryan McGeary
      ryan.mcgeary.org    @rmm5t    ryan@mcgeary.org




         McGeary Consulting Group

Monday, April 4, 2011
Attributions
           http://jashkenas.github.com/coffee-script/              http://www.flickr.com/photos/grebo_guru/13864695/
           http://www.flickr.com/photos/74234765@N00/488955057/    http://www.flickr.com/photos/span112/2245983695/
           http://www.flickr.com/photos/adunne/3974874247/         http://www.flickr.com/photos/bigkurt/4425700131/
           http://www.flickr.com/photos/28111377@N07/2970550798/
           http://www.flickr.com/photos/7678790@N06/3380560365/    http://www.zazzle.com/html5_t_shirt-235389073464260795
           http://www.flickr.com/photos/40775750@N00/531138641/
           http://www.flickr.com/photos/86176561@N00/492795782/    http://www.flickr.com/photos/princesstheater/3530252342
           http://www.flickr.com/photos/77555797@N00/133942287/    http://www.flickr.com/photos/littlegreenfroggy/2806572646
           http://www.flickr.com/photos/34580986@N03/4985041197/   http://www.flickr.com/photos/raster/3563135804
           http://www.flickr.com/photos/83275741@N00/291831432/    http://www.flickr.com/photos/mwichary/2290328252/
           http://www.flickr.com/photos/58115002@N00/3283033324/   http://www.flickr.com/photos/37996583811@N01/2443301175/
           http://www.flickr.com/photos/15133799@N02/3339157498/   http://www.flickr.com/photos/revdancatt/435273886/
           http://www.flickr.com/photos/17731548@N00/981372736/
           http://www.flickr.com/photos/7576193@N07/2476397335/
           http://www.flickr.com/photos/48553010@N00/408767516/
           http://www.free-computer-wallpapers.com/pictures/
           Television_wallpaper/Alias_2
           http://www.flickr.com/photos/44742295@N00/3998772594/
           http://www.flickr.com/photos/79659919@N00/3413379549/
           http://www.flickr.com/photos/82402200@N00/523497824/



Monday, April 4, 2011

More Related Content

Similar to One Man Lightning Talks

Railsify your web development
Railsify your web developmentRailsify your web development
Railsify your web development
Thomas Lundström
 
Doctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 ParisDoctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 ParisJonathan Wage
 
Javascript Unit Testting (PHPBenelux 2011-05-04)
Javascript Unit Testting (PHPBenelux 2011-05-04)Javascript Unit Testting (PHPBenelux 2011-05-04)
Javascript Unit Testting (PHPBenelux 2011-05-04)
Tom Van Herreweghe
 
Caz &amp; Work Scope
Caz &amp; Work ScopeCaz &amp; Work Scope
Caz &amp; Work Scopebrettdillon
 
Intro to Micro-frameworks
Intro to Micro-frameworksIntro to Micro-frameworks
Intro to Micro-frameworks
jsmith92
 
Einstein finalist.nl
Einstein finalist.nlEinstein finalist.nl
Einstein finalist.nl
Vincent Everts
 
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011Finalist - open IT oplossingen
 
Desacoplando aplicaciones
Desacoplando aplicacionesDesacoplando aplicaciones
Desacoplando aplicaciones
Alvaro Videla
 

Similar to One Man Lightning Talks (8)

Railsify your web development
Railsify your web developmentRailsify your web development
Railsify your web development
 
Doctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 ParisDoctrine In The Real World sflive2011 Paris
Doctrine In The Real World sflive2011 Paris
 
Javascript Unit Testting (PHPBenelux 2011-05-04)
Javascript Unit Testting (PHPBenelux 2011-05-04)Javascript Unit Testting (PHPBenelux 2011-05-04)
Javascript Unit Testting (PHPBenelux 2011-05-04)
 
Caz &amp; Work Scope
Caz &amp; Work ScopeCaz &amp; Work Scope
Caz &amp; Work Scope
 
Intro to Micro-frameworks
Intro to Micro-frameworksIntro to Micro-frameworks
Intro to Micro-frameworks
 
Einstein finalist.nl
Einstein finalist.nlEinstein finalist.nl
Einstein finalist.nl
 
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
Inspiratiemiddag_Vincent_Everts_Finalist generatie_einstein_komt_eraan_07042011
 
Desacoplando aplicaciones
Desacoplando aplicacionesDesacoplando aplicaciones
Desacoplando aplicaciones
 

Recently uploaded

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 

One Man Lightning Talks

  • 1. One Man Lightning Talks An opportunity to witness disaster Ryan McGeary http://ryan.mcgeary.org @rmm5t Bill Brookman Showman Extraordinaire Monday, April 4, 2011
  • 2. Do Your Commit Messages Suck? Ryan McGeary http://ryan.mcgeary.org @rmm5t Monday, April 4, 2011
  • 3. The Bad Monday, April 4, 2011
  • 4. Bad 587a09c dfe4c3e 9770886 7587f8b 9052cb8 8af6da0 0536fc7 d5e07c7 0328c7c 3ee25cd c3f7275 9f474bc 8a0f74c dffb0db 0841841 19900ba e5a524a af0a3bb deploymoreenvcap Stagingscript g Working? whoops again Read from Updated scripts Againfixed More staging cleanup file staging setup fixes Monday, April 4, 2011
  • 5. More Bad 8b48352 3a61755 bf77372 eec60db this isstupid a fucking what a hassle seriously a fucking hassle hassle Monday, April 4, 2011
  • 6. Again Bad 18c3f84 Huge commit Monday, April 4, 2011
  • 7. Huge Whoops More Again Serious Hassle Bad c1c38fc Update deploy recipe with some stuff. I dunno. it's late Monday, April 4, 2011
  • 8. The Good Monday, April 4, 2011
  • 9. Good 0835022 Updated basic auth prompt to reflect app name Monday, April 4, 2011
  • 10. Good 950b8de 0835022 Updated basic Fixed password reset for users who use the same authonprompt accounts email multiple to [Fixes #11102389] name reflect app Monday, April 4, 2011
  • 11. More Good 3224fff Added an extra 10s while sleeping after a Twitter rate-limit error * Twitter isn't always ready immediately after sleeping the advertised amount of time. Monday, April 4, 2011
  • 12. More Good 334a2c4 Fixed bug related to contact syncing [#9190663] Contacts that should have been tagged both friend and 3224fff Added an extra 10s while sleeping follower were having those tags toggled on each after a Twitter rate-limit error #profile_sync run. If the contact had "follower", and ready * Twitter isn't always profile_sync was immediately after sleeping the run, then the code would set the system_tags to advertised amount of time. ["following"], blowing away the "follower" tag. It would do the same thing vice versa for the "following" system tag. Monday, April 4, 2011
  • 13. Template Ya generic AR#6375] Moved all static pages into M M PagesController [Finishes SU I S * Cleaned up the routes Lpage creation * Simplified TA static DE Monday, April 4, 2011
  • 14. Template Moved all static pages N B T a generic E into VE R M # FR A [Finishes #6375]ET PagesController G CK * Cleaned up the routes TI HY * Simplified static page creation W Monday, April 4, 2011
  • 15. Verbs 184 Added 85 Fixed 76 Upped 31 Removed 24 Switched 21 Improved 20 Updated 16 Renamed Monday, April 4, 2011
  • 16. “Vendor Everything” Ryan McGeary http://ryan.mcgeary.org Still Applies @rmm5t Monday, April 4, 2011
  • 17. ge ms em r/ ig .g en do nf v co Monday, April 4, 2011
  • 19. Check in your .rvmrc rvm ruby-1.9.2 Monday, April 4, 2011
  • 20. RVM Gemsets Are Overrated Monday, April 4, 2011
  • 21. Let Bundler Follow the --path $ bundle install --path vendor $ echo 'vendor/ruby' >> .gitignore Monday, April 4, 2011
  • 22. Package Your Gems in vendor/cache $ bundle package Monday, April 4, 2011
  • 23. Help! alias b="bundle" alias bi="b install --path vendor" alias bu="b update" alias be="b exec" alias binit="bi && b package && echo 'vendor/ruby' >> .gitignore" Monday, April 4, 2011
  • 24. Summary $ bundle install --path vendor $ bundle package $ echo 'vendor/ruby' >> .gitignore Monday, April 4, 2011
  • 25. CoffeeScript A little language that compiles into JavaScript Ryan McGeary http://ryan.mcgeary.org @rmm5t Monday, April 4, 2011
  • 26. Jeremy Ashkenas JavaScript's less ostentatious kid brother CoffeeScript is an attempt to one-to-one expose the good with JavaScript parts of JavaScript in a better simple way. functional syntax compiles to the good parts http://jashkenas.github.com/coffee-script/ Monday, April 4, 2011
  • 27. if (typeof elvis !== "undefined" && elvis !== null) { alert("I knew it!"); } Monday, April 4, 2011
  • 28. alert "I knew it!" if elvis? Monday, April 4, 2011
  • 29. var cube, square; square = function(x) { return x * x; }; cube = function(x) { return square(x) * x; }; Monday, April 4, 2011
  • 30. square = (x) -> x * x cube = (x) -> square(x) * x Monday, April 4, 2011
  • 31. var _i, _len, _ref, _result, food, lunch; lunch = (function() { _result = []; _ref = ['toast', 'cheese', 'wine']; for (_i = 0, _len = _ref.length; _i < _len; _i++) { food = _ref[_i]; _result.push(eat(food)); } return _result; })(); Monday, April 4, 2011
  • 32. lunch = (eat food for food in ['toast', 'cheese', 'wine']) Monday, April 4, 2011
  • 33. var _i, _j, _len, _len2, _ref, _ref2, roid, roid2; _ref = asteroids; for (_i = 0, _len = _ref.length; _i < _len; _i++) { roid = _ref[_i]; _ref2 = asteroids; for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { roid2 = _ref2[_j]; if (roid !== roid2) { if (roid.overlaps(roid2)) { roid.explode(); } } } } Monday, April 4, 2011
  • 34. for roid in asteroids for roid2 in asteroids when roid isnt roid2 roid.explode() if roid.overlaps roid2 Monday, April 4, 2011
  • 35. Installation $ brew install node $ curl http://npmjs.org/install.sh | sh # Add /usr/local/share/npm/bin to PATH $ npm install coffee-script Monday, April 4, 2011
  • 36. Usage $ coffee -c path/to/script.coffee $ coffee --watch experimental.coffee $ coffee --print *.coffee > all.js Monday, April 4, 2011
  • 37. Significant Whitespace if happy and knowsIt clapsHands() chaChaCha() else showIt() Monday, April 4, 2011
  • 38. Significant Whitespace if (happy && knowsIt) { clapsHands(); chaChaCha(); } else { showIt(); } Monday, April 4, 2011
  • 39. Functions square = (x) -> x * x area = (x, y) -> x * y noop = -> Monday, April 4, 2011
  • 40. Functions var area, noop, square; square = function(x) { return x * x; }; area = function(x, y) { return x * y; }; noop = function() {}; Monday, April 4, 2011
  • 41. Objects var kids; kids = kids = { brother: brother: { name: "Max", >> name: "Max" age: 11 age: 11 }, sister: { sister: name: "Ida", name: "Ida" age: 9 } age: 9 }; Monday, April 4, 2011
  • 42. Lexical Scoping / Variable Safety (function() { var change, inner, outer; outer = 1 outer = 1; change = -> >> change = function() { var inner; inner = -1 inner = -1; outer = 10 return (outer = 10); }; inner = change() inner = change(); }).call(this); Monday, April 4, 2011
  • 43. OOP class Animal constructor: (@name) -> move: (meters) -> alert @name + " moved " + meters + "m." class Snake extends Animal move: -> alert "Slithering..." super 5 sam = new Snake "Sammy the Python" sam.move() Monday, April 4, 2011
  • 44. OOP var Animal, Snake, sam; var __extends = function(child, parent) { var ctor = function(){}; ctor.prototype = parent.prototype; child.prototype = new ctor(); child.prototype.constructor = child; if (typeof parent.extended === "function") parent.extended(child); child.__super__ = parent.prototype; }; Animal = function(_arg) { this.name = _arg; return this; }; Animal.prototype.move = function(meters) { return alert(this.name + " moved " + meters + "m."); }; Snake = function() { return Animal.apply(this, arguments); }; __extends(Snake, Animal); Snake.prototype.move = function() { alert("Slithering..."); return Snake.__super__.move.call(this, 5); }; sam = new Snake("Sammy the Python"); sam.move(); Monday, April 4, 2011
  • 45. Pattern Matching theBait = 1000 theSwitch = 0 [theBait, theSwitch] = [theSwitch, theBait] weatherReport = (location) -> [location, 72, "Mostly Sunny"] [zip, temp, forecast] = weatherReport "20175 Monday, April 4, 2011
  • 46. Pattern Matching var _ref, forecast, temp, theBait, theSwitch, weatherReport, zip; theBait = 1000; theSwitch = 0; _ref = [theSwitch, theBait]; theBait = _ref[0]; theSwitch = _ref[1]; weatherReport = function(location) { return [location, 72, "Mostly Sunny"]; }; _ref = weatherReport("20175"); zip = _ref[0]; temp = _ref[1]; forecast = _ref[2]; Monday, April 4, 2011
  • 47. String and RegExp Interpolation quote = "A picture is a fact." author = "Wittgenstein" phrase = "#{quote} -- #{author}" sentence = "#{ 22 / 7 } approximates π" sep = "[./- ]" dates = /d+#{sep}d+#{sep}d+/g Monday, April 4, 2011
  • 48. String and RegExp Interpolation var author, dates, phrase, quote, sentence, sep; quote = "A picture is a fact."; author = "Wittgenstein"; phrase = ("" + (quote) + " -- " + (author)); sentence = ("" + (22 / 7) + " is a decent approximation of π"); sep = "[./- ]"; dates = (new RegExp("d+" + (sep) + "d+" + (sep) + "d+", "g")); Monday, April 4, 2011
  • 49. Array and Object Comprehensions foods = ['toast', 'cheese', 'wine'] lunch = (eat(food) for food in foods) yearsOld = max: 10, ida: 9, tim: 11 ages = for child, age of yearsOld "#{child} is #{age}" Monday, April 4, 2011
  • 50. Array and Object Comprehensions var _i, _len, _ref, _result, age, ages, child, food, foods, lunch, yearsOld; var __hasProp = Object.prototype.hasOwnProperty; foods = ['toast', 'cheese', 'wine']; lunch = (function() { _result = []; _ref = foods; for (_i = 0, _len = _ref.length; _i < _len; _i++) { food = _ref[_i]; _result.push(eat(food)); } return _result; })(); yearsOld = { max: 10, ida: 9, tim: 11 }; ages = (function() { _result = []; _ref = yearsOld; for (child in _ref) { if (!__hasProp.call(_ref, child)) continue; age = _ref[child]; _result.push("" + (child) + " is " + (age)); } return _result; })(); Monday, April 4, 2011
  • 51. Function Binding Account = (customer, cart) -> @customer = customer @cart = cart $('#checkout').bind 'click', (event) => @customer.purchase @cart Monday, April 4, 2011
  • 52. Function Binding var Account; var __bind = function(func, context) { return function(){ return func.apply(context, arguments); }; }; Account = function(customer, cart) { this.customer = customer; this.cart = cart; return $('#checkout').bind('click', __bind(function(event) { return this.customer.purchase(this.cart); }, this)); }; Monday, April 4, 2011
  • 53. The Rest... Slicing and Splicing Splat Arguments Existential Operator Everything is an expression; always a return value Pattern matching with object literals Switch/When/Else While/Until/Loop Try/Catch/Finally Chained comparison Multiline Strings, Heredocs, and Block Comments http://jashkenas.github.com/coffee-script/ Monday, April 4, 2011
  • 54. Ideas for Getting Started Monday, April 4, 2011
  • 55. How We Use MongoDB at BusyConf Making great conferences even better busyconf.com Ryan McGeary Jim Garvin Monday, April 4, 2011
  • 58. Why NOT MongoDB? Monday, April 4, 2011
  • 59. Event Day 1 Day 2 Day 3 Track 1 Track 2 Track 3 TimeSlot 1 TimeSlot 1 TS 2 TS 3 Activity Activity Activity Activity Speaker Speaker 1 S2 S3 Monday, April 4, 2011
  • 60. Events Days 1..N o n? i ti Tracks 1..N pos 1..N 1..N TimeSlots 1..1 Activities T A? DA 1..N A ET Links 1..N Speakers M Monday, April 4, 2011
  • 61. Event Day 1 Day 1 Track 1 Track 1 TimeSlot 1 TimeSlot n TimeSlot 1 TimeSlo Activity Activity Activity tActivit n S1 Sn Speaker S1 Sn y Speak er Track n Track n TimeSlot 1 TimeSlot 1 Activity Activity Speaker Speaker TimeSlot n TimeSlot n Monday, April 4, 2011
  • 62. Event Day 1 Day 2 Day n... Track 1 Track 2 Track n... TimeSlot 1 TimeSlot 2 TimeSlot n... Activity Speaker Monday, April 4, 2011
  • 63. HTML5 Application Caching There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Ryan McGeary http://ryan.mcgeary.org @rmm5t Monday, April 4, 2011
  • 66. Cache Manifest <!DOCTYPE HTML> <html manifest="/mobile.manifest"> <body> ... </body> </html> text/cache-manifest Monday, April 4, 2011
  • 67. CACHE Sections CACHE MANIFEST http://www.google-analytics.com/ga.js /favicon.ico /javascripts/application.js /stylesheets/screen.css /data.json Monday, April 4, 2011
  • 68. NETWORK Sections CACHE MANIFEST NETWORK: * CACHE: http://www.google-analytics.com/ga.js /favicon.ico /javascripts/application.js /stylesheets/screen.css /data.json Monday, April 4, 2011
  • 69. FALLBACK Sections CACHE MANIFEST FALLBACK: / /offline.html NETWORK: * CACHE: http://www.google-analytics.com/ga.js /favicon.ico Monday, April 4, 2011
  • 70. Expiring The Cache CACHE MANIFEST # Updated: <%= something.updated_at %> # Released: <%= application_released_at %> NETWORK: * CACHE: # ... Monday, April 4, 2011
  • 71. window.applicationCache checking error updated NO manifest? noupdate YES downloading progress swapCache() NO already YES cached cached? updateready Monday, April 4, 2011
  • 72. Ryan McGeary ryan.mcgeary.org @rmm5t ryan@mcgeary.org McGeary Consulting Group Monday, April 4, 2011
  • 73. Attributions http://jashkenas.github.com/coffee-script/ http://www.flickr.com/photos/grebo_guru/13864695/ http://www.flickr.com/photos/74234765@N00/488955057/ http://www.flickr.com/photos/span112/2245983695/ http://www.flickr.com/photos/adunne/3974874247/ http://www.flickr.com/photos/bigkurt/4425700131/ http://www.flickr.com/photos/28111377@N07/2970550798/ http://www.flickr.com/photos/7678790@N06/3380560365/ http://www.zazzle.com/html5_t_shirt-235389073464260795 http://www.flickr.com/photos/40775750@N00/531138641/ http://www.flickr.com/photos/86176561@N00/492795782/ http://www.flickr.com/photos/princesstheater/3530252342 http://www.flickr.com/photos/77555797@N00/133942287/ http://www.flickr.com/photos/littlegreenfroggy/2806572646 http://www.flickr.com/photos/34580986@N03/4985041197/ http://www.flickr.com/photos/raster/3563135804 http://www.flickr.com/photos/83275741@N00/291831432/ http://www.flickr.com/photos/mwichary/2290328252/ http://www.flickr.com/photos/58115002@N00/3283033324/ http://www.flickr.com/photos/37996583811@N01/2443301175/ http://www.flickr.com/photos/15133799@N02/3339157498/ http://www.flickr.com/photos/revdancatt/435273886/ http://www.flickr.com/photos/17731548@N00/981372736/ http://www.flickr.com/photos/7576193@N07/2476397335/ http://www.flickr.com/photos/48553010@N00/408767516/ http://www.free-computer-wallpapers.com/pictures/ Television_wallpaper/Alias_2 http://www.flickr.com/photos/44742295@N00/3998772594/ http://www.flickr.com/photos/79659919@N00/3413379549/ http://www.flickr.com/photos/82402200@N00/523497824/ Monday, April 4, 2011