<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OnyxRaven</title>
    <description>Thoughts, tips, and code from a software engineer
</description>
    <link>https://blog.onyxraven.com/</link>
    <atom:link href="https://blog.onyxraven.com/feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Mon, 01 Sep 2025 13:18:51 -0700</pubDate>
    <lastBuildDate>Mon, 01 Sep 2025 13:18:51 -0700</lastBuildDate>
    <generator>Jekyll v3.10.0</generator>
    
      <item>
        <title>Ruby On Ales Day 2</title>
        <description>&lt;h1 id=&quot;baby-driven-development-bdd&quot;&gt;Baby Driven Development: BDD&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://speakerdeck.com/asheren/bdd-baby-driven-development&quot;&gt;Slides&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;@allie_p - ongoing study and survey on dev+parenting
    &lt;ul&gt;
      &lt;li&gt;more single, non senior, adopted children&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;similarities&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Know how to Google (filtering, right searches)&lt;/li&gt;
  &lt;li&gt;Earned Dogmatism (close ears to opinions beacuse think you are expert)&lt;/li&gt;
  &lt;li&gt;Debugging (common issues, inspecting logs (haha), reintroducing single features)&lt;/li&gt;
  &lt;li&gt;build new features&lt;/li&gt;
  &lt;li&gt;don’t forget about happiness&lt;/li&gt;
  &lt;li&gt;pairing is encouraged&lt;/li&gt;
  &lt;li&gt;learning new things&lt;/li&gt;
  &lt;li&gt;nobody really knows what they’re doing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;challenges&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;being good mom,developer,employee,wife&lt;/li&gt;
  &lt;li&gt;parents struggle to keep up&lt;/li&gt;
  &lt;li&gt;time for projects, code challenges, for new jobs&lt;/li&gt;
  &lt;li&gt;flexible hours&lt;/li&gt;
  &lt;li&gt;help with empathy and patience&lt;/li&gt;
  &lt;li&gt;small percent say hurt, but say slowed or changed (actually hurt?)&lt;/li&gt;
  &lt;li&gt;no time to waste&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;solutions&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;parental leave&lt;/li&gt;
  &lt;li&gt;work from home, creative working options&lt;/li&gt;
  &lt;li&gt;support systems,&lt;/li&gt;
  &lt;li&gt;train managers of parents&lt;/li&gt;
  &lt;li&gt;realistic expectations&lt;/li&gt;
  &lt;li&gt;normalize&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;good things to think about for managers, teammembers and parents&lt;/li&gt;
  &lt;li&gt;also some just for anyone with interesting/dependent situations&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;how-to-stop-hating-your-tests&quot;&gt;How to stop hating your tests&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;Justin Searls @searls&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://blog.testdouble.com/posts/2015-11-16-how-to-stop-hating-your-tests.html&quot;&gt;Video from RubyConf&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;why the hate?
    &lt;ul&gt;
      &lt;li&gt;experimentation -&amp;gt; production, some tests.  slow -&amp;gt; slaves to tests&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;prevention&lt;/li&gt;
  &lt;li&gt;structure, isolation, feedback&lt;/li&gt;
  &lt;li&gt;structure
    &lt;ul&gt;
      &lt;li&gt;test files too big to fail
        &lt;ul&gt;
          &lt;li&gt;tests make big objects even harder to deal with&lt;/li&gt;
          &lt;li&gt;rule of product&lt;/li&gt;
          &lt;li&gt;one more argument? double the tests&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;too many small things!?&lt;/li&gt;
      &lt;li&gt;tests that go off script
        &lt;ul&gt;
          &lt;li&gt;can do 3 things - setup, invoke, verify, Given, When, Then (and)&lt;/li&gt;
          &lt;li&gt;call out 3 phases in tests&lt;/li&gt;
          &lt;li&gt;make tests clear&lt;/li&gt;
          &lt;li&gt;rspec-given&lt;/li&gt;
          &lt;li&gt;easy to read&lt;/li&gt;
          &lt;li&gt;calls out code smells&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;hard to read
        &lt;ul&gt;
          &lt;li&gt;test code is untested.  shouldn’t have logic&lt;/li&gt;
          &lt;li&gt;rspec context vs describe&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;framework
        &lt;ul&gt;
          &lt;li&gt;balance between terse and expressive&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;accidental creativity
        &lt;ul&gt;
          &lt;li&gt;subject, result&lt;/li&gt;
          &lt;li&gt;consistency&lt;/li&gt;
          &lt;li&gt;point out unimportant stuff, important stuff&lt;/li&gt;
          &lt;li&gt;test data should be minimal, also minimally meaningful&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;isolation
    &lt;ul&gt;
      &lt;li&gt;clear focus
        &lt;ul&gt;
          &lt;li&gt;define types of tests&lt;/li&gt;
          &lt;li&gt;create suites&lt;/li&gt;
          &lt;li&gt;separate out levels of abstraction
            &lt;ul&gt;
              &lt;li&gt;unit (mock) vs integration (dont mock)&lt;/li&gt;
              &lt;li&gt;clear rules for each level&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;too realistic
            &lt;ul&gt;
              &lt;li&gt;realistic are slower, take more time, more complex&lt;/li&gt;
              &lt;li&gt;increase focus on tested vs controlled&lt;/li&gt;
              &lt;li&gt;cant predict unknowns.  Might be able to write targeted test after&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;redundant coverage
            &lt;ul&gt;
              &lt;li&gt;thourough, but redundant&lt;/li&gt;
              &lt;li&gt;how detect? coverage tools - avg hits per line&lt;/li&gt;
              &lt;li&gt;can combine/eliminate test layers?&lt;/li&gt;
              &lt;li&gt;outside-in tdd&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;careless mocking
            &lt;ul&gt;
              &lt;li&gt;thoughtful isolation&lt;/li&gt;
              &lt;li&gt;can treat test pain as symptom not cause&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;app frameworks&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;test feedback
        &lt;ul&gt;
          &lt;li&gt;useless error msgs&lt;/li&gt;
          &lt;li&gt;long runs
            &lt;ul&gt;
              &lt;li&gt;throw out tests? (at least skip)&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;false negatives
            &lt;ul&gt;
              &lt;li&gt;erode confidence in tests&lt;/li&gt;
              &lt;li&gt;redundant coverage&lt;/li&gt;
              &lt;li&gt;poor mocking&lt;/li&gt;
              &lt;li&gt;slow tests&lt;/li&gt;
              &lt;li&gt;track failures, how long to fix, use to improve suites&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-1&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;very quick preso with lots of slides and points&lt;/li&gt;
  &lt;li&gt;but a lot of tips and tricks, things to keep in mind to make tests better&lt;/li&gt;
  &lt;li&gt;work on speed because less likely to skip things when it takes too long&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;a-machine-state-of-mind&quot;&gt;a machine state of mind&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@vaidehijoshi&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://slides.com/vaidehijoshi/machinestateofmind&quot;&gt;Code&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;dont know what you’re doing, but thats ok&lt;/li&gt;
  &lt;li&gt;state machine
    &lt;ul&gt;
      &lt;li&gt;state, data, changes&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;what looks like state machine?
    &lt;ul&gt;
      &lt;li&gt;state or status column&lt;/li&gt;
      &lt;li&gt;timestamps with null value&lt;/li&gt;
      &lt;li&gt;start_date and end_date&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;directed graph&lt;/li&gt;
  &lt;li&gt;acts as state machine
    &lt;ul&gt;
      &lt;li&gt;states&lt;/li&gt;
      &lt;li&gt;callbacks&lt;/li&gt;
      &lt;li&gt;block passed to state transition, only fires if succeed&lt;/li&gt;
      &lt;li&gt;guards&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-2&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;aasm vs workflow&lt;/li&gt;
  &lt;li&gt;with start/end how to use state machine?&lt;/li&gt;
  &lt;li&gt;tracking state transitions&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;in-the-name-of-whiskey&quot;&gt;In the Name of Whiskey&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@juliaferraioli&lt;/li&gt;
  &lt;li&gt;can i hug that?
    &lt;ul&gt;
      &lt;li&gt;image -&amp;gt; can hug?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;whiskey
    &lt;ul&gt;
      &lt;li&gt;managable, objective data&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;feature vector
    &lt;ul&gt;
      &lt;li&gt;numeric values&lt;/li&gt;
      &lt;li&gt;matrix math&lt;/li&gt;
      &lt;li&gt;tensor = n dimensional array&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;tensorflow
    &lt;ul&gt;
      &lt;li&gt;deferred execution&lt;/li&gt;
      &lt;li&gt;define compute graph&lt;/li&gt;
      &lt;li&gt;tensor object -&amp;gt; matrices , but eval&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;k-means clustering
    &lt;ul&gt;
      &lt;li&gt;k = number of groupings&lt;/li&gt;
      &lt;li&gt;iterative to converge centers&lt;/li&gt;
      &lt;li&gt;choosing k important&lt;/li&gt;
      &lt;li&gt;initialization of centers is important&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;tensorflow
    &lt;ul&gt;
      &lt;li&gt;fortran? just use docker image&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;whiskey k-means
    &lt;ul&gt;
      &lt;li&gt;flavors grouping doesnt quite look like regional grouping&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;neural network
    &lt;ul&gt;
      &lt;li&gt;input -&amp;gt; ??? -&amp;gt; output&lt;/li&gt;
      &lt;li&gt;hidden layer - guides for choosing, lots of math&lt;/li&gt;
      &lt;li&gt;each input to each neuron, to output&lt;/li&gt;
      &lt;li&gt;init each layer (again, initial state important)&lt;/li&gt;
      &lt;li&gt;how to optimize (each iter)&lt;/li&gt;
      &lt;li&gt;training, testing&lt;/li&gt;
      &lt;li&gt;accuracy&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;lessons, goals
    &lt;ul&gt;
      &lt;li&gt;pronouncing scotch incorrectly&lt;/li&gt;
      &lt;li&gt;data collection is hard&lt;/li&gt;
      &lt;li&gt;86 points not much&lt;/li&gt;
      &lt;li&gt;wrong data is still wrong&lt;/li&gt;
      &lt;li&gt;thinking in n-dimensions is brain-bending&lt;/li&gt;
      &lt;li&gt;bit.ly - k-means-scotch tensorflow-oss ff-nn learn-tensorflow gentle-intro-ml&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-3&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;no ruby interface for tensorflow (sound familliar), but yes python&lt;/li&gt;
  &lt;li&gt;try TF for recommendation boost, offer ‘rating’, think about what tf would mean for ocr&lt;/li&gt;
  &lt;li&gt;maybe a talk on something fun like playing a video game via NN learning?&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;fold-paper-scisors---origami-cut-and-fold-problem&quot;&gt;fold, paper, scisors - origami cut and fold problem&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@sailorhg - bubblesort zines&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://speakerdeck.com/sailorhg/fold-paper-scissors-ruby-on-ales-2016&quot;&gt;Slides&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;tech and art&lt;/li&gt;
  &lt;li&gt;paper folding algorithms - provable&lt;/li&gt;
  &lt;li&gt;any polygonal shape with just one cut - proved&lt;/li&gt;
  &lt;li&gt;fold so all cuts are all aligned on the same line&lt;/li&gt;
  &lt;li&gt;angle bisector
    &lt;ul&gt;
      &lt;li&gt;if intersect - straight skeleton&lt;/li&gt;
      &lt;li&gt;shrink original shape along bisectors&lt;/li&gt;
      &lt;li&gt;stop when shrnk to point&lt;/li&gt;
      &lt;li&gt;two edges merge to line as its own&lt;/li&gt;
      &lt;li&gt;separate into two disjoint shapes, continue algorithm&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;shoes + ruby geometry&lt;/li&gt;
  &lt;li&gt;computational folding theory&lt;/li&gt;
  &lt;li&gt;not all sets of edges fold flat&lt;/li&gt;
  &lt;li&gt;extend inner skeleton to edges&lt;/li&gt;
  &lt;li&gt;how to generalize
    &lt;ul&gt;
      &lt;li&gt;must meet shape edge at 90 degrees&lt;/li&gt;
      &lt;li&gt;every internal vertex - wont need them all&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;mountain valley foldability
    &lt;ul&gt;
      &lt;li&gt;can detect in vs out folds&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;can generate too many folds&lt;/li&gt;
  &lt;li&gt;can be used for
    &lt;ul&gt;
      &lt;li&gt;folding solar panels&lt;/li&gt;
      &lt;li&gt;3d modeling?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-4&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;fun application of algorithm theory&lt;/li&gt;
  &lt;li&gt;could be a fun project to turn into 3d app showing folds&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;crystal-programming-lang&quot;&gt;Crystal Programming Lang&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@leinweber&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Citus Data - sharding automated&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/will/roa2016_crystal&quot;&gt;Code&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;crystal play - online browser for live workbook&lt;/li&gt;
  &lt;li&gt;ruby inspired&lt;/li&gt;
  &lt;li&gt;built on llvm&lt;/li&gt;
  &lt;li&gt;fully self-hosted&lt;/li&gt;
  &lt;li&gt;static method dispatch&lt;/li&gt;
  &lt;li&gt;easy to link c&lt;/li&gt;
  &lt;li&gt;classes are still open&lt;/li&gt;
  &lt;li&gt;modules + mixins&lt;/li&gt;
  &lt;li&gt;
    &lt;table&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;common idioms (?, trailing conditionals,&lt;/td&gt;
          &lt;td&gt; &lt;/td&gt;
          &lt;td&gt;=, parens, spec framework)&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/li&gt;
  &lt;li&gt;tooling&lt;/li&gt;
  &lt;li&gt;can chain things in to_procs&lt;/li&gt;
  &lt;li&gt;union type (compiletime). methods downstream need to be defined (typewise) downstream.&lt;/li&gt;
  &lt;li&gt;nil can be checked at compiletime&lt;/li&gt;
  &lt;li&gt;explicit casting&lt;/li&gt;
  &lt;li&gt;method overloading&lt;/li&gt;
  &lt;li&gt;abstract classes, abstract methods&lt;/li&gt;
  &lt;li&gt;touples&lt;/li&gt;
  &lt;li&gt;Generics (parameterize types)&lt;/li&gt;
  &lt;li&gt;macros
    &lt;ul&gt;
      &lt;li&gt;method template language, looks a lot like liquid&lt;/li&gt;
      &lt;li&gt;can shell out at compile time&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;no orm yet…&lt;/li&gt;
  &lt;li&gt;Linking against c code
    &lt;ul&gt;
      &lt;li&gt;since llvm, quite simple. just define interface&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;regex pcre&lt;/li&gt;
  &lt;li&gt;profiling c code - instruments on osx&lt;/li&gt;
  &lt;li&gt;misc
    &lt;ul&gt;
      &lt;li&gt;structs (stack alloc), io (evented!), code formatter (built in), concurrency (channels + coroutines like go)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;crystal-lang.org/docs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-5&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;seems like lang has been around for a while and is still very young&lt;/li&gt;
  &lt;li&gt;compare to rust&lt;/li&gt;
  &lt;li&gt;but, way of solving type problems pretty interesting&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;when-good-software-goes-bad&quot;&gt;when good software goes bad&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@reinh&lt;/li&gt;
  &lt;li&gt;sotware fails alot&lt;/li&gt;
  &lt;li&gt;culture - behavior, beliefs, values, symbols and meanings we share as a group of people&lt;/li&gt;
  &lt;li&gt;quality - software that is valuable to someone&lt;/li&gt;
  &lt;li&gt;failure - difference between expectation and observation&lt;/li&gt;
  &lt;li&gt;process patterns
    &lt;ol&gt;
      &lt;li&gt;oblivious - dont even know theres a process, not following any process. capable of solving own problem, and you are using it&lt;/li&gt;
      &lt;li&gt;variable - we do whatever we feel like in the moment. poor adherence to process, depend on individuals. separates developer from user. blaming appears.
        &lt;ul&gt;
          &lt;li&gt;require great relation with customer, competant professionals, not solving a problem too big for team&lt;/li&gt;
          &lt;li&gt;myth - rockstar programmer - completely dependent on performance&lt;/li&gt;
          &lt;li&gt;only follow process when convenient&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;routine - we follow routines (except when we dont). plan to solve all problems
        &lt;ul&gt;
          &lt;li&gt;depend on plans, managers to implement. exceptional cases are problem&lt;/li&gt;
          &lt;li&gt;problem cant be bigger than small team handle&lt;/li&gt;
          &lt;li&gt;myth - rockstar manager - repeatable, but not repeated. blindly follow process.&lt;/li&gt;
          &lt;li&gt;name magic - ‘agile’, ‘tdd’, ‘lean’ - imbue with powers just saying&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;steering pattern - choose among routines by the results they produce
        &lt;ul&gt;
          &lt;li&gt;usually management training (not individual contrib)&lt;/li&gt;
          &lt;li&gt;processes not super well defined, but goals well defined. recover if process doesnt work&lt;/li&gt;
          &lt;li&gt;problem hard enough for simple routine to not work&lt;/li&gt;
          &lt;li&gt;some control/negotiate with externaliies.  can reject arbritrary schedule/constraint&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;(+1more?) - 85% at variable, 1% at level 3, 0 at 4 or 5&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
  &lt;li&gt;Cybernetic Control
    &lt;ul&gt;
      &lt;li&gt;feedback to make good choices, iteratively&lt;/li&gt;
      &lt;li&gt;inputs - resources, requirements, randomness&lt;/li&gt;
      &lt;li&gt;outputs - software, outputs&lt;/li&gt;
      &lt;li&gt;variable - no controller between inputs and outputs - software somehow comes out&lt;/li&gt;
      &lt;li&gt;controller - manages requirements - needs feedback from outputs&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;nonlinear system
    &lt;ul&gt;
      &lt;li&gt;inputs dont correlate to outputs&lt;/li&gt;
      &lt;li&gt;humans really hard at predicting&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;deal with nonlinear
    &lt;ul&gt;
      &lt;li&gt;governing actions - prioritizing.&lt;/li&gt;
      &lt;li&gt;act early, small, often.&lt;/li&gt;
      &lt;li&gt;if you can’t see it, it doesnt exist - get visibility&lt;/li&gt;
      &lt;li&gt;if you cant understand it, you cant fix it&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;models
    &lt;ul&gt;
      &lt;li&gt;Mythical Man Month - failure for lack of calendar time - make model explicit&lt;/li&gt;
      &lt;li&gt;make model explicit and share them&lt;/li&gt;
      &lt;li&gt;implicit - developers will do what i tell them.  i can add people to make it go faster. bugs occur at random. the more pressure, the faster they work. I know how to identify best developers
        &lt;ul&gt;
          &lt;li&gt;characteristic of variable orgs&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;feedback/control systems needed at all models
    &lt;ul&gt;
      &lt;li&gt;control nonlinear effects&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;better software - spend time thinking about people&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-6&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;great talk on process, types of process, etc.&lt;/li&gt;
  &lt;li&gt;obvious that levels are a bit fluid&lt;/li&gt;
&lt;/ul&gt;
</description>
        <pubDate>Fri, 01 Apr 2016 10:00:00 -0700</pubDate>
        <link>https://blog.onyxraven.com/ruby/rubyonales/2016/04/01/roa-day2.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/rubyonales/2016/04/01/roa-day2.html</guid>
        
        
        <category>ruby</category>
        
        <category>rubyonales</category>
        
      </item>
    
      <item>
        <title>Ruby On Ales Day 1</title>
        <description>&lt;h1 id=&quot;opensource-survival-guide&quot;&gt;Opensource Survival Guide&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@blowmage&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://speakerdeck.com/blowmage/open-source-survival-guide&quot;&gt;Slides&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;3 types of users
    &lt;ul&gt;
      &lt;li&gt;maintainers
        &lt;ul&gt;
          &lt;li&gt;typically at mastery level&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;collaborators&lt;/li&gt;
      &lt;li&gt;consumers&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Dreyfus Model of Skill Acquisition
    &lt;ul&gt;
      &lt;li&gt;novice
        &lt;ul&gt;
          &lt;li&gt;rigid adherence to rules, rote recetitation&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;competence
        &lt;ul&gt;
          &lt;li&gt;situational perception, all work equal important&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;proficiency
        &lt;ul&gt;
          &lt;li&gt;coping with crowdedness (more things than able to do)&lt;/li&gt;
          &lt;li&gt;actions in relation to goals&lt;/li&gt;
          &lt;li&gt;planning, routines&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;expertise
        &lt;ul&gt;
          &lt;li&gt;holistic view&lt;/li&gt;
          &lt;li&gt;prioritization&lt;/li&gt;
          &lt;li&gt;own path&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;mastery
        &lt;ul&gt;
          &lt;li&gt;trancend reliance on rules, guidelines&lt;/li&gt;
          &lt;li&gt;deep, tacit understanding&lt;/li&gt;
          &lt;li&gt;based on experience, instinct&lt;/li&gt;
          &lt;li&gt;what is possible&lt;/li&gt;
          &lt;li&gt;analytical approach&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;documentation
    &lt;ul&gt;
      &lt;li&gt;readme&lt;/li&gt;
      &lt;li&gt;rubydoc.info&lt;/li&gt;
      &lt;li&gt;guides&lt;/li&gt;
      &lt;li&gt;screencasts&lt;/li&gt;
      &lt;li&gt;examples&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;can typically teach down 1 or 2 levels from current
    &lt;ul&gt;
      &lt;li&gt;just hard to know context/view&lt;/li&gt;
      &lt;li&gt;effort to do whatever documentation possible, so each level can continue&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;encouraging contrib
    &lt;ul&gt;
      &lt;li&gt;add a CONTRIBUTING file, and explain setting up dev env, contacting maintainers, running tests, code conventions/style requirements, etc&lt;/li&gt;
      &lt;li&gt;rubocop, CI, issue labels (help wanted, easy, docs, etc)&lt;/li&gt;
      &lt;li&gt;vagrant/docker&lt;/li&gt;
      &lt;li&gt;beginner friendly usergroups
        &lt;ul&gt;
          &lt;li&gt;LA ROR study groups?&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;communication
    &lt;ul&gt;
      &lt;li&gt;remote, different skills. technical writing, tone&lt;/li&gt;
      &lt;li&gt;“The Box” - Leadership and Self Deception (book)
        &lt;ul&gt;
          &lt;li&gt;self-deception&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;applies to any team&lt;/li&gt;
  &lt;li&gt;concentration on not justifying&lt;/li&gt;
  &lt;li&gt;step outside box, reconsider situation&lt;/li&gt;
  &lt;li&gt;be truthful&lt;/li&gt;
  &lt;li&gt;pairing - screenhero&lt;/li&gt;
  &lt;li&gt;encourage team to contrib opensource - learn how to contribute (get over intimidation as a group)&lt;/li&gt;
  &lt;li&gt;RubyTogether - official 501c6 trade org - support OSS&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;including-people&quot;&gt;Including People&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@indirect - Andre Arko&lt;/li&gt;
  &lt;li&gt;ruby weird reputation of sexist dudebros?
    &lt;ul&gt;
      &lt;li&gt;old reputation, maybe from early rails?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;not diversity, inclusion&lt;/li&gt;
  &lt;li&gt;bias and exclusion problem&lt;/li&gt;
  &lt;li&gt;https://jacobian.org/writing/great-documentation/&lt;/li&gt;
  &lt;li&gt;How to include
    &lt;ul&gt;
      &lt;li&gt;Code of Conduct&lt;/li&gt;
      &lt;li&gt;docs (dev and end user)&lt;/li&gt;
      &lt;li&gt;issue acceptance&lt;/li&gt;
      &lt;li&gt;support is voice of users&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;how to involve contributors
    &lt;ul&gt;
      &lt;li&gt;ask people for help&lt;/li&gt;
      &lt;li&gt;pairing&lt;/li&gt;
      &lt;li&gt;ask lots of questions, be honest about whats hard&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;respect and empathy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-1&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;similar to the first talk, but still good&lt;/li&gt;
  &lt;li&gt;more of an experience based talk.  Andre works on Bundler&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;orbits&quot;&gt;Orbits&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@habitmelon&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/tlehman/ooo&quot;&gt;Slides&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/tlehman/newtonian&quot;&gt;Code&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Geometry rules define space&lt;/li&gt;
  &lt;li&gt;Model Universe, Rules, Objects&lt;/li&gt;
  &lt;li&gt;Can model 2 body but not 3&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-2&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Lots of the math of vectors, etc, explaining what the ruby ended up being&lt;/li&gt;
  &lt;li&gt;links have the code, which is pushing to a websocket server for realtime position rendering. Kind of a fun idea&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;choices&quot;&gt;Choices&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@erniemiller&lt;/li&gt;
  &lt;li&gt;LivingSocial alums&lt;/li&gt;
  &lt;li&gt;interactive presentation (websocket omg)
    &lt;ul&gt;
      &lt;li&gt;users make choices, changes the preso&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;choices have consequences&lt;/li&gt;
  &lt;li&gt;loss aversion&lt;/li&gt;
  &lt;li&gt;easy to get distracted from important choices&lt;/li&gt;
  &lt;li&gt;intentionality - choose your choices.&lt;/li&gt;
  &lt;li&gt;github.com/ernie/venture&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-3&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;good think-piece on making choices&lt;/li&gt;
  &lt;li&gt;could be very interesting elixir code&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;writing-a-test-framework-from-scratch&quot;&gt;Writing a test framework from scratch&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;@the_zenspider&lt;/li&gt;
  &lt;li&gt;github/zenspider&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://github.com/zenspider/microtest&quot;&gt;Code&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;microtest - walk through quick test runner&lt;/li&gt;
  &lt;li&gt;Done &amp;gt; Good - can make good later&lt;/li&gt;
  &lt;li&gt;good walkthrough of refining an idea&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-4&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;pretty quick walkthrough of how minitest works, how test framework works&lt;/li&gt;
&lt;/ul&gt;

&lt;hr /&gt;

&lt;h1 id=&quot;self-teaching-for-developers&quot;&gt;Self teaching for developers&lt;/h1&gt;

&lt;ul&gt;
  &lt;li&gt;Aja Hammerly&lt;/li&gt;
  &lt;li&gt;@thagomizer_rb - github/thagomizer&lt;/li&gt;
  &lt;li&gt;learn&lt;/li&gt;
  &lt;li&gt;learn hard stuff&lt;/li&gt;
  &lt;li&gt;‘thinky’ stuff - ideas not skills&lt;/li&gt;
  &lt;li&gt;build scaffolds for learning more&lt;/li&gt;
  &lt;li&gt;MOOCS - online courses
    &lt;ul&gt;
      &lt;li&gt;coursera, itunesU, etc&lt;/li&gt;
      &lt;li&gt;video, forums, homework, quizzes, tests, structured, vetted. time consuming, feel like school&lt;/li&gt;
      &lt;li&gt;read the syllabus&lt;/li&gt;
      &lt;li&gt;be realistic about time&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Study Groups&lt;/li&gt;
  &lt;li&gt;rosalind, exercism, project euler&lt;/li&gt;
  &lt;li&gt;books
    &lt;ul&gt;
      &lt;li&gt;exercises&lt;/li&gt;
      &lt;li&gt;onine content&lt;/li&gt;
      &lt;li&gt;Elements of Computing Systems - Nisan and Shocken&lt;/li&gt;
      &lt;li&gt;Clause and Efect - Clocksin&lt;/li&gt;
      &lt;li&gt;The Pragmatic Programmer - Hunt and Thomas&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;talks
    &lt;ul&gt;
      &lt;li&gt;prolog&lt;/li&gt;
      &lt;li&gt;teach right after/during learnings&lt;/li&gt;
      &lt;li&gt;do talks, meet people, get jobs&lt;/li&gt;
      &lt;li&gt;tips: topic, you want to give. keep simple.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;hack week
    &lt;ul&gt;
      &lt;li&gt;team building&lt;/li&gt;
      &lt;li&gt;protyping&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;learning time
    &lt;ul&gt;
      &lt;li&gt;read, hack, watch video&lt;/li&gt;
      &lt;li&gt;dedicated time&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;thoughts-5&quot;&gt;Thoughts&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;good ideas for team building, projects, etc&lt;/li&gt;
  &lt;li&gt;also for personal learning&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Thu, 31 Mar 2016 10:00:00 -0700</pubDate>
        <link>https://blog.onyxraven.com/ruby/rubyonales/2016/03/31/roa-day1.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/rubyonales/2016/03/31/roa-day1.html</guid>
        
        
        <category>ruby</category>
        
        <category>rubyonales</category>
        
      </item>
    
      <item>
        <title>RubyConf 2014 - Day 3</title>
        <description>&lt;h1 id=&quot;keynote---social-coding-contract&quot;&gt;Keynote - Social Coding Contract&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;startups consume opensource&lt;/li&gt;
  &lt;li&gt;poor contributors&lt;/li&gt;
  &lt;li&gt;opensource - intersection between philosophy and economics&lt;/li&gt;
  &lt;li&gt;awfulness vs progress - more as time goes on until theres a breaking point&lt;/li&gt;
  &lt;li&gt;opensource is progress
    &lt;ul&gt;
      &lt;li&gt;.c and .h files out there randomly&lt;/li&gt;
      &lt;li&gt;makefiles help&lt;/li&gt;
      &lt;li&gt;jar files&lt;/li&gt;
      &lt;li&gt;gemfile (bundler) - dependencies discovered and resolved&lt;/li&gt;
      &lt;li&gt;npm - huge tree of dependencies - windows max file path limit&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;dependencies are hard to update
    &lt;ul&gt;
      &lt;li&gt;come back a year and try to update everything&lt;/li&gt;
      &lt;li&gt;downstream changes with loose versioning&lt;/li&gt;
      &lt;li&gt;need -&amp;gt; convenience -&amp;gt; complexity -&amp;gt; risk -&amp;gt; mystery&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;maintainer
    &lt;ul&gt;
      &lt;li&gt;early adopter - awesome, then disappears&lt;/li&gt;
      &lt;li&gt;late adopter - stable vs stale - ask for unseen features, ask for more
        &lt;ul&gt;
          &lt;li&gt;better customres than users? paid options/dual license?&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;should be ok to say no, (but help you to do it)&lt;/li&gt;
      &lt;li&gt;trolls :-(&lt;/li&gt;
      &lt;li&gt;no maintainer is forever&lt;/li&gt;
      &lt;li&gt;what happens when maintainer leaves goes away etc&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;cloud services
    &lt;ul&gt;
      &lt;li&gt;all are going to shut down at some point&lt;/li&gt;
      &lt;li&gt;most opensource is centralized from convenience&lt;/li&gt;
      &lt;li&gt;what if rubygems/npm disappear? what would decentralized repo look like?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;adoption requires trust
    &lt;ul&gt;
      &lt;li&gt;explicit trust vs implicit trust&lt;/li&gt;
      &lt;li&gt;marketing&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;security
    &lt;ul&gt;
      &lt;li&gt;open&lt;/li&gt;
      &lt;li&gt;uncomfortable number of people read source to exploit it&lt;/li&gt;
      &lt;li&gt;as software gets more popular, importance of audit goes up, but motivation to audit goes down because implicit trust of popular project&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;communication
    &lt;ul&gt;
      &lt;li&gt;scale up fidelity - chat, pairing, video, in person&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;systems programmers
    &lt;ul&gt;
      &lt;li&gt;conservative, cautious&lt;/li&gt;
      &lt;li&gt;embedded and realtime failures have grave consequences&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;using dependencies
    &lt;ul&gt;
      &lt;li&gt;understanding debt - outsourcing understanding of a problem&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;schneems---richard-schneeman---text-distance---githubcomschneemsgoing_the_distance-bitlygoing_the_distance&quot;&gt;@schneems - Richard Schneeman - Text distance - github.com/schneems/going_the_distance bit.ly/going_the_distance&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Edge (edit) distance = cost to change one word into another&lt;/li&gt;
  &lt;li&gt;Hamming distance (signal distance)
    &lt;ul&gt;
      &lt;li&gt;measures errors in a string, only if same length&lt;/li&gt;
      &lt;li&gt;detect and correct erros in binary and telecommunications&lt;/li&gt;
      &lt;li&gt;does not include insert/delete, only substitution&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Levenstein distance - http://en.wikipedia.org/wiki/Levenshtein_distance
    &lt;ul&gt;
      &lt;li&gt;calculate deletion/insertion&lt;/li&gt;
      &lt;li&gt;calculate distance between every substring&lt;/li&gt;
      &lt;li&gt;take minimum&lt;/li&gt;
      &lt;li&gt;recursive O(n^n) 1647 iterations?&lt;/li&gt;
      &lt;li&gt;has a lot of repeats&lt;/li&gt;
      &lt;li&gt;calculate with a matrix
        &lt;ul&gt;
          &lt;li&gt;sorta example
            &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&quot;&quot; =&amp;gt; &quot;saturday&quot; = row 1-&amp;gt;7
&quot;&quot; =&amp;gt; &quot;sunday&quot; = col 1-&amp;gt;6
s -&amp;gt; a = 1
su -&amp;gt; s = (0)+1
sa -&amp;gt; su = (0)+1
sat -&amp;gt; sun = (1)+1 = 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;            &lt;/div&gt;
          &lt;/li&gt;
          &lt;li&gt;final cost is last entry in the matrix&lt;/li&gt;
          &lt;li&gt;48 interations m*n&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Peter Norvig has paper on how Google did spelling
    &lt;ul&gt;
      &lt;li&gt;word counts - higher count higher probability&lt;/li&gt;
      &lt;li&gt;edit distance between words, weighted with probability&lt;/li&gt;
      &lt;li&gt;cache found corrections&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;did_you_mean gem
    &lt;ul&gt;
      &lt;li&gt;in better_errors - helps find no method errors&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;more algorithms
    &lt;ul&gt;
      &lt;li&gt;Jaro Winkler distance - for large number of distance calculations&lt;/li&gt;
      &lt;li&gt;rosetta code&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;benchmarking-ruby---githubcomdavybenchmarking_ruby---davystevenson&quot;&gt;Benchmarking Ruby - github.com/davy/benchmarking_ruby - @davystevenson&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;why benchmark
    &lt;ul&gt;
      &lt;li&gt;certainty in performance&lt;/li&gt;
      &lt;li&gt;benchmark in gems, ruby itself&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;require &apos;benchmark&apos;&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Benchmark.bm { report { n.times { stuff } }; }&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;Pros: easy, in stdlib&lt;/li&gt;
      &lt;li&gt;Cons: variable fiddling, difficult output, boilerplate code&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;benchmark/ips&lt;/code&gt; - iterations per second
    &lt;ul&gt;
      &lt;li&gt;like benchmark&lt;/li&gt;
      &lt;li&gt;how many iterations in 100ms&lt;/li&gt;
      &lt;li&gt;run for 5 seconds&lt;/li&gt;
      &lt;li&gt;comparison&lt;/li&gt;
      &lt;li&gt;Pros: a bit less fiddly, measures iterations per second, same syntax, compare&lt;/li&gt;
      &lt;li&gt;Cons: gem, snapshot view into performance&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;benchmark/bigo&lt;/code&gt; - determine big-o of operation
    &lt;ul&gt;
      &lt;li&gt;generator, generate array etc&lt;/li&gt;
      &lt;li&gt;size changing over time&lt;/li&gt;
      &lt;li&gt;print/generate charts&lt;/li&gt;
      &lt;li&gt;Pros: range of inputs, charts,&lt;/li&gt;
      &lt;li&gt;Cons: gem, longer runtime, not always applicable&lt;/li&gt;
      &lt;li&gt;compare, compares to known big-o notation lines&lt;/li&gt;
      &lt;li&gt;can constrain parameters of test set&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;how to benchmark effectively
    &lt;ul&gt;
      &lt;li&gt;is environment consistent?&lt;/li&gt;
      &lt;li&gt;verify/test actual results&lt;/li&gt;
      &lt;li&gt;dont change behavior over runs&lt;/li&gt;
      &lt;li&gt;only modifying one thing?&lt;/li&gt;
      &lt;li&gt;accidently mutating objects?&lt;/li&gt;
      &lt;li&gt;set controls (understand how other code to setup benchmark affects)&lt;/li&gt;
      &lt;li&gt;using random effectively? (is random going to change behavior)&lt;/li&gt;
      &lt;li&gt;what are you benchmarking - best case, worst case, or average case?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Terraformer
    &lt;ul&gt;
      &lt;li&gt;converts types&lt;/li&gt;
      &lt;li&gt;geography related tasks&lt;/li&gt;
      &lt;li&gt;convex hull algorithm
        &lt;ul&gt;
          &lt;li&gt;jarvis march (simple code) based on input size, worse if points are on edge&lt;/li&gt;
          &lt;li&gt;monotone chain (better, doesnt change based on types of objects)&lt;/li&gt;
          &lt;li&gt;test average and worst cases to pick&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Conclusion
    &lt;ul&gt;
      &lt;li&gt;Verify assumptions, control changes&lt;/li&gt;
      &lt;li&gt;Learn more about code, ruby&lt;/li&gt;
      &lt;li&gt;When Benchmark? just use benchmark.ips&lt;/li&gt;
      &lt;li&gt;When Benchmark.ips? all the time? good for spot checks and expansive analysis&lt;/li&gt;
      &lt;li&gt;When Benchmark.bigo? range of sizes, results in chart form, ok if it takes a while&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;More
    &lt;ul&gt;
      &lt;li&gt;Writing Fast Ruby - Erik Michaels-Ober&lt;/li&gt;
      &lt;li&gt;Fast ruby repo&lt;/li&gt;
      &lt;li&gt;Derailed benchmarks - for rails, ram required over time&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;ruby-performance-secrets---alexander-dymo&quot;&gt;Ruby performance secrets - Alexander Dymo&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;ruby-performance-book.com&lt;/li&gt;
  &lt;li&gt;how to understand whats wrong, how to find your own perf tips &amp;amp; best practices&lt;/li&gt;
  &lt;li&gt;how is slow sometimes? garbage collection&lt;/li&gt;
  &lt;li&gt;how to check object creation / allocation
    &lt;ul&gt;
      &lt;li&gt;profiler - needs patched ruby (railsexpress) - 2.1.4 no patch right now&lt;/li&gt;
      &lt;li&gt;gem install ruby-prof&lt;/li&gt;
      &lt;li&gt;kcachegrind/qcachegrind&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby-prof -p call-tree --mode=allocations &amp;gt; out&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;look at source code&lt;/li&gt;
      &lt;li&gt;gdb - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;r -e &apos;ruby code&apos;&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;memoization and block conversion are tough - create objects&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;func!&lt;/code&gt; modify in place (except when it doesnt), should be faster (except when it isnt)
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ruby-prof -p call-tree --mode=memory &amp;gt; out&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;challenge all tips/tricks/practices&lt;/li&gt;
  &lt;li&gt;dont guess, profile&lt;/li&gt;
  &lt;li&gt;do not need patched intrepreter for cpu ruby-prof, only memory/alloc&lt;/li&gt;
  &lt;li&gt;ObjectSpace. - profiler better for whole view&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;real-world-ruby-performance-at-scale---aaron-quint---aq---paperless-post---githubquirkey-paperlesspost&quot;&gt;REAL WORLD RUBY PERFORMANCE AT SCALE - Aaron Quint - @aq - paperless post - github/quirkey /paperlesspost&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;tips and tricks are the clifs notes of tech learning&lt;/li&gt;
  &lt;li&gt;step 1: acceptance - its your fault
    &lt;ul&gt;
      &lt;li&gt;x doesnt scale is bs: scale for what? to what degree? with what hardware? etc&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;step 2: diagnosis
    &lt;ul&gt;
      &lt;li&gt;metrics - measurements - mmmnumbers - milliseconds&lt;/li&gt;
      &lt;li&gt;playing golf (lowest num lines/code)&lt;/li&gt;
      &lt;li&gt;vertical, request descending through stack - horizontal are tiers&lt;/li&gt;
      &lt;li&gt;vertical - single action or code path&lt;/li&gt;
      &lt;li&gt;horizontal - more nodes, faster hardware&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;step 3: treatment&lt;/li&gt;
  &lt;li&gt;features vs speed - opposing forces
    &lt;ul&gt;
      &lt;li&gt;fast means being stable too&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;example - json for days - paper browser
    &lt;ul&gt;
      &lt;li&gt;json -&amp;gt; javascript&lt;/li&gt;
      &lt;li&gt;cache invalidated&lt;/li&gt;
      &lt;li&gt;shared cached sections&lt;/li&gt;
      &lt;li&gt;uncached perf still a problem&lt;/li&gt;
      &lt;li&gt;ppprofiler
        &lt;ul&gt;
          &lt;li&gt;benchmark&lt;/li&gt;
          &lt;li&gt;rblineprof&lt;/li&gt;
          &lt;li&gt;notification counts&lt;/li&gt;
          &lt;li&gt;memoryprofiler&lt;/li&gt;
          &lt;li&gt;markdown output&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;profiling numbers are relative&lt;/li&gt;
  &lt;li&gt;stackprof and stackprof-remote
    &lt;ul&gt;
      &lt;li&gt;read between the lines, other stuff going on&lt;/li&gt;
      &lt;li&gt;samples whats on stack at a given point&lt;/li&gt;
      &lt;li&gt;doesnt allocate heap memory, doesnt greatly affect perf&lt;/li&gt;
      &lt;li&gt;flamegraphs - tall and wide are places to optimize&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;sometimes it is your fault, for being cheap, sometimes you can throw money at the problem&lt;/li&gt;
  &lt;li&gt;start with a hitlist
    &lt;ul&gt;
      &lt;li&gt;start at the top, work way down (most used -&amp;gt; least used)&lt;/li&gt;
      &lt;li&gt;number of req * 90% response time = “total worst time”&lt;/li&gt;
      &lt;li&gt;like newrelic already has&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;big wins are not the point
    &lt;ul&gt;
      &lt;li&gt;small changes over time&lt;/li&gt;
      &lt;li&gt;keep doing it&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;if you’re not failing, you’re not being honest&lt;/li&gt;
  &lt;li&gt;dont just make tools, learn to use them&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Wed, 19 Nov 2014 01:30:00 -0800</pubDate>
        <link>https://blog.onyxraven.com/ruby/rubyconf/2014/11/19/rubyconf-2014-3.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/rubyconf/2014/11/19/rubyconf-2014-3.html</guid>
        
        
        <category>ruby</category>
        
        <category>rubyconf</category>
        
      </item>
    
      <item>
        <title>RubyConf 2014 - Day 2</title>
        <description>&lt;h1 id=&quot;keynote---sandi-metz---madam-sandi-tells-your-future&quot;&gt;Keynote - Sandi Metz - MADAM SANDI TELLS YOUR FUTURE&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Matz is nice and so we are nice (minaswan)&lt;/li&gt;
  &lt;li&gt;Scroll -3000 to 0&lt;/li&gt;
  &lt;li&gt;Romans - Codex (books) - random access. read and write at the same time&lt;/li&gt;
  &lt;li&gt;Scriptorium - snarky comments -&lt;/li&gt;
  &lt;li&gt;0 to 1400 - written by hand&lt;/li&gt;
  &lt;li&gt;1450 - gutenberg
    &lt;ul&gt;
      &lt;li&gt;yak shaving - letter print (swort?) - wear out quickly&lt;/li&gt;
      &lt;li&gt;need reliable way to copy sworts&lt;/li&gt;
      &lt;li&gt;lost the rights&lt;/li&gt;
      &lt;li&gt;print shops
        &lt;ul&gt;
          &lt;li&gt;upper case and lower case&lt;/li&gt;
          &lt;li&gt;stereotypes - whole pages cast instead of just the individual letters&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;still set by hand. newspapers have to do it every day&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;18x linotype
    &lt;ul&gt;
      &lt;li&gt;dynamicly cast a whole line of type&lt;/li&gt;
      &lt;li&gt;machine to create lines of type, molds lead after lining up&lt;/li&gt;
      &lt;li&gt;edison called 8th wonder of the world&lt;/li&gt;
      &lt;li&gt;newspapers 8 to 48 pages per issue&lt;/li&gt;
      &lt;li&gt;newspapers actively recruited deaf employees&lt;/li&gt;
      &lt;li&gt;never complain about CSS again&lt;/li&gt;
      &lt;li&gt;worldwide literacy&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;hot to cold type&lt;/li&gt;
  &lt;li&gt;the fortune : everything will change
    &lt;ul&gt;
      &lt;li&gt;death, decay, obscelence&lt;/li&gt;
      &lt;li&gt;the ‘happy path’ of life&lt;/li&gt;
      &lt;li&gt;MVP - health, happyness&lt;/li&gt;
      &lt;li&gt;contribute&lt;/li&gt;
      &lt;li&gt;do for others&lt;/li&gt;
      &lt;li&gt;always something that needs doing&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;fringe-ruby---2--cats--4--cute-how-math-works-in-ruby---chris-hoffman---yarmiganosca---optoro&quot;&gt;Fringe Ruby - 2 + CATS = 4 * CUTE: HOW MATH WORKS IN RUBY - Chris Hoffman - @yarmiganosca - Optoro&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;numerical coercion&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;#coerce(numeric) -&amp;gt; array&lt;/code&gt; - find a common type between the two operands
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1.2.coerce(3) =&amp;gt; [3.0, 1.2]&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Vectors - can we make these work with coerce?
    &lt;ul&gt;
      &lt;li&gt;yes, define coerce and operation(s)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Dimensional analysis
    &lt;ul&gt;
      &lt;li&gt;gem unitary&lt;/li&gt;
      &lt;li&gt;size * dimension&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Other uses
    &lt;ul&gt;
      &lt;li&gt;currency manipulation (gem conversions)&lt;/li&gt;
      &lt;li&gt;balance chemical equations?&lt;/li&gt;
      &lt;li&gt;function scaling/composition&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;fringe-ruby---a-partial-multiverse-model-of-time-travel-for-debugging---brock-wilcox&quot;&gt;Fringe Ruby - A PARTIAL-MULTIVERSE MODEL OF TIME TRAVEL FOR DEBUGGING - Brock Wilcox&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;pry-byebug (2.0+)&lt;/li&gt;
  &lt;li&gt;YARV bytecode
    &lt;ul&gt;
      &lt;li&gt;trace codes - hooks into VM state&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;pry-timetravel
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;back&lt;/code&gt; to step backwards into previous state&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;every next, fork and suspend the fork&lt;/li&gt;
  &lt;li&gt;back, grab most recent child fork&lt;/li&gt;
  &lt;li&gt;pid = fork
    &lt;ul&gt;
      &lt;li&gt;if pid parent; else child&lt;/li&gt;
      &lt;li&gt;$$ = current pid&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;signals (OS Callbacks)
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Signal.trap&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Process.kill&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;SIGTSTP - SIGSTOP (uncatchable) - no io, etc, -&amp;gt; SIGCONT (continue, unstop)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;limitations
    &lt;ul&gt;
      &lt;li&gt;can only go back as far as snapshots&lt;/li&gt;
      &lt;li&gt;shared file handles, incl sockets&lt;/li&gt;
      &lt;li&gt;threads :-( - no copy of threads&lt;/li&gt;
      &lt;li&gt;memory exhaustion&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;complication
    &lt;ul&gt;
      &lt;li&gt;shell detects stop, inside
        &lt;ul&gt;
          &lt;li&gt;fix : make dummy parent process&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;killing parent processes
        &lt;ul&gt;
          &lt;li&gt;fix : kill the others&lt;/li&gt;
          &lt;li&gt;except everything will have this, so force? &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Kernel.exit!&lt;/code&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;zombies
        &lt;ul&gt;
          &lt;li&gt;child exited, but parent doesnt waitpid - process is dead, yet remains&lt;/li&gt;
          &lt;li&gt;owned by init&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;snapshot tree?
    &lt;ul&gt;
      &lt;li&gt;can back to pid&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;‘snap $cmd’&lt;/li&gt;
  &lt;li&gt;autosnapshot and prune
    &lt;ul&gt;
      &lt;li&gt;autosnap every stack frame change&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;other techniques
    &lt;ul&gt;
      &lt;li&gt;yarv - keep track of everything there&lt;/li&gt;
      &lt;li&gt;ocaml debugger does fork()&lt;/li&gt;
      &lt;li&gt;“why is reverse debugging rarely used” on stackexchange&lt;/li&gt;
      &lt;li&gt;elm-lang, watches what is changed&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;jruby-9000---charles-nutter-headius--tom-enebo-tom_enebo&quot;&gt;JRuby 9000 - Charles Nutter @headius &amp;amp; Tom Enebo @tom_enebo&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Ruby on JVM
    &lt;ul&gt;
      &lt;li&gt;native threads, tooling, JIT&lt;/li&gt;
      &lt;li&gt;pull in any java library, ehcache, neo4j, lucene&lt;/li&gt;
      &lt;li&gt;other languages, scala, jython, clojure, groovy&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;JRuby 1.7 == Ruby 1.8 or 1.9 - new releases frequently&lt;/li&gt;
  &lt;li&gt;JRuby 9 == Ruby 2.2(+) - release mid Jan?
    &lt;ul&gt;
      &lt;li&gt;New runtime&lt;/li&gt;
      &lt;li&gt;Major IO &amp;amp; Encoding&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;timing
    &lt;ul&gt;
      &lt;li&gt;startup time (from command line)&lt;/li&gt;
      &lt;li&gt;warmup time (until best performance)&lt;/li&gt;
      &lt;li&gt;running time (now running)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;indy (invoke dynamic) - high warmup time, lower stable time&lt;/li&gt;
  &lt;li&gt;MRI - internal representation -&amp;gt; interpreter&lt;/li&gt;
  &lt;li&gt;Jruby - internal representation -&amp;gt; (interpreter) -&amp;gt; java bytecode -&amp;gt; native code&lt;/li&gt;
  &lt;li&gt;why not JIT everything? cause warmup is slow.
    &lt;ul&gt;
      &lt;li&gt;JIT creates lots of classes&lt;/li&gt;
      &lt;li&gt;more code for the JVM to deal with&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;benchmarking
    &lt;ul&gt;
      &lt;li&gt;benchmark/ips or perfer&lt;/li&gt;
      &lt;li&gt;with warmup/rehearsal time&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;jvm and jruby are mixed mode - interpreter -&amp;gt; JIT&lt;/li&gt;
  &lt;li&gt;example&lt;/li&gt;
  &lt;li&gt;deoptimization (undo optimizations) to try crazy optimizations and rollback if it doesnt work&lt;/li&gt;
  &lt;li&gt;Jruby –dev (skip jit) faster warmup for dev&lt;/li&gt;
  &lt;li&gt;Drip - new jvm for next command, like spring preloader
    &lt;ul&gt;
      &lt;li&gt;tell what to preboot, gets faster&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;New runtime (IR)
    &lt;ul&gt;
      &lt;li&gt;no AST, semantic representation&lt;/li&gt;
      &lt;li&gt;traditional compiler design&lt;/li&gt;
      &lt;li&gt;no heap allocated arguments, removes extra binding&lt;/li&gt;
      &lt;li&gt;add jruby –debug&lt;/li&gt;
      &lt;li&gt;compiler optimizations (dead code, constant propogation, inlining, unboxing) - done with pluggable compiler passes&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;new IO and character Transcoding (M17n)
    &lt;ul&gt;
      &lt;li&gt;MRI gives thin wrapper around fd&lt;/li&gt;
      &lt;li&gt;JVM gives Channel, which looks like fd&lt;/li&gt;
      &lt;li&gt;old Jruby emulates libc fd&lt;/li&gt;
      &lt;li&gt;JDK uses UTF16&lt;/li&gt;
      &lt;li&gt;impossible to emulate some POSIX stuff&lt;/li&gt;
      &lt;li&gt;new IO layer (OpenFile) - passes nearly all, performance better, match MRI&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Old JIT
    &lt;ul&gt;
      &lt;li&gt;16k loc just for bytecode gen&lt;/li&gt;
      &lt;li&gt;one-off optimizations&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;New JIT
    &lt;ul&gt;
      &lt;li&gt;95% done&lt;/li&gt;
      &lt;li&gt;56k loc&lt;/li&gt;
      &lt;li&gt;equal performance, lots of room to improve&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Memory Analysis + debugging
    &lt;ul&gt;
      &lt;li&gt;VisualVM. GC, java object level&lt;/li&gt;
      &lt;li&gt;Ruby-centric version&lt;/li&gt;
      &lt;li&gt;Alienist - java -&amp;gt; ruby heap dump
        &lt;ul&gt;
          &lt;li&gt;mri version?&lt;/li&gt;
          &lt;li&gt;size, query language?&lt;/li&gt;
          &lt;li&gt;allow implementation specific data&lt;/li&gt;
          &lt;li&gt;spec for json format&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;TODOs
    &lt;ul&gt;
      &lt;li&gt;finish JIT&lt;/li&gt;
      &lt;li&gt;AOT compiler (jrubyc)&lt;/li&gt;
      &lt;li&gt;IR compile &amp;amp; interp speedups&lt;/li&gt;
      &lt;li&gt;Refinements&lt;/li&gt;
      &lt;li&gt;MRI test suite&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;How to help
    &lt;ul&gt;
      &lt;li&gt;run master - jruby-head (in travisci)&lt;/li&gt;
      &lt;li&gt;openjdk8 oraclejdk8 openjdk7&lt;/li&gt;
      &lt;li&gt;rbenv/ruby-build jruby-9(.0.0.0)-dev&lt;/li&gt;
      &lt;li&gt;setup for dev - clone; mvn -Pbootstrap;&lt;/li&gt;
      &lt;li&gt;run tests/specs, find excluded that is fixed&lt;/li&gt;
      &lt;li&gt;fork, create a branch, send a PR
        &lt;ul&gt;
          &lt;li&gt;implement tagged/excluded&lt;/li&gt;
          &lt;li&gt;mine for bugs (Beginner tags)&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;elixr&quot;&gt;Elixr&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Thread - lots of ways to shoot self in foot&lt;/li&gt;
  &lt;li&gt;Built on Erland VM - Erricson labs - telephone switch&lt;/li&gt;
  &lt;li&gt;Not just a CoffeeScript for Erlang&lt;/li&gt;
  &lt;li&gt;better tools, syntax, standardlib&lt;/li&gt;
  &lt;li&gt;Tools
    &lt;ul&gt;
      &lt;li&gt;iex (REPL) - built in doc system, in markdown&lt;/li&gt;
      &lt;li&gt;mix (project mgr, create project, manage dependencies, run tests)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;pipe operator
    &lt;ul&gt;
      &lt;li&gt;data transformations - (nested fns)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Actor concurrency model
    &lt;ul&gt;
      &lt;li&gt;“Process”&lt;/li&gt;
      &lt;li&gt;performs one task&lt;/li&gt;
      &lt;li&gt;send and receipt messages, messages are pattern matched to methods&lt;/li&gt;
      &lt;li&gt;unshared memory&lt;/li&gt;
      &lt;li&gt;Ackermann function&lt;/li&gt;
      &lt;li&gt;unprocessed messages are buffered (queued)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Fault tolerance
    &lt;ul&gt;
      &lt;li&gt;supervision tree. supervisors are just processes&lt;/li&gt;
      &lt;li&gt;can restart processes, kill them off etc&lt;/li&gt;
      &lt;li&gt;keep calm and let it crash&lt;/li&gt;
      &lt;li&gt;supervisor heirarchy can take over and put system back together&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;http load tester example
    &lt;ul&gt;
      &lt;li&gt;coordinator, create workers, track responses&lt;/li&gt;
      &lt;li&gt;workers just send message back with result&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;task is like a future/promise
    &lt;ul&gt;
      &lt;li&gt;runs in a container.  await to gather result&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;distributed
    &lt;ul&gt;
      &lt;li&gt;message passing between processes on network are transparent&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Phoenix Framework&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;my-little-c-extension-lego-robots-are-magic---brandon-hays&quot;&gt;MY LITTLE C EXTENSION: LEGO ROBOTS ARE MAGIC - Brandon Hays&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;about burnout&lt;/li&gt;
  &lt;li&gt;how to C in ruby
    &lt;ul&gt;
      &lt;li&gt;start a gem, good guide on rubygems&lt;/li&gt;
      &lt;li&gt;include ruby.h&lt;/li&gt;
      &lt;li&gt;include c dependencies&lt;/li&gt;
      &lt;li&gt;magic Init_native to define module, method(s)&lt;/li&gt;
      &lt;li&gt;cast C types to Ruby types&lt;/li&gt;
      &lt;li&gt;(VALUE self) - own ruby object&lt;/li&gt;
      &lt;li&gt;segfaults (yay)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;wrap the rest of the API&lt;/li&gt;
  &lt;li&gt;Style Guide
    &lt;ul&gt;
      &lt;li&gt;Keep low level like C (ugly)&lt;/li&gt;
      &lt;li&gt;Low level wrappers in a ::Native module&lt;/li&gt;
      &lt;li&gt;prefix c method helpers&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;C Ext Cheat sheets (links in slides)&lt;/li&gt;
  &lt;li&gt;atone for cheating :-)&lt;/li&gt;
  &lt;li&gt;oh no, people are using it&lt;/li&gt;
  &lt;li&gt;how did it help burnout?
    &lt;ul&gt;
      &lt;li&gt;just doing something for self&lt;/li&gt;
      &lt;li&gt;play to get &amp;lt;3 back&lt;/li&gt;
      &lt;li&gt;play is how you realize unlimited potential&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Tue, 18 Nov 2014 01:30:00 -0800</pubDate>
        <link>https://blog.onyxraven.com/ruby/rubyconf/2014/11/18/rubyconf-2014-2.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/rubyconf/2014/11/18/rubyconf-2014-2.html</guid>
        
        
        <category>ruby</category>
        
        <category>rubyconf</category>
        
      </item>
    
      <item>
        <title>RubyConf 2014 - Day 1</title>
        <description>&lt;h1 id=&quot;keynote---yukihiro-matz---feeding-the-sharks&quot;&gt;Keynote - Yukihiro “Matz” - “Feeding the Sharks”&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;OSS developer community like sharks
    &lt;ul&gt;
      &lt;li&gt;move or die, move somewhere else more interesting&lt;/li&gt;
      &lt;li&gt;History of rubyconf announcement/discussions&lt;/li&gt;
      &lt;li&gt;exciting new but uncertain ideas&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Ruby 3
    &lt;ul&gt;
      &lt;li&gt;(Still lots coming in 2.2)&lt;/li&gt;
      &lt;li&gt;Concurrency
        &lt;ul&gt;
          &lt;li&gt;GIL&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;JIT
        &lt;ul&gt;
          &lt;li&gt;LLVM?&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Static typing
        &lt;ul&gt;
          &lt;li&gt;?&lt;/li&gt;
          &lt;li&gt;Scala, Dart, Typescript, ECMA6, Go&lt;/li&gt;
          &lt;li&gt;(python has hints, but not checked) - mypy has optional checker&lt;/li&gt;
          &lt;li&gt;Performance
            &lt;ul&gt;
              &lt;li&gt;do we need static typing for speed? Maybe JIT is enough&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;Compile Time checking
            &lt;ul&gt;
              &lt;li&gt;static analysis, refactoring&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;Documentation
            &lt;ul&gt;
              &lt;li&gt;better than comments/yard&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;why not
            &lt;ul&gt;
              &lt;li&gt;duck typing&lt;/li&gt;
              &lt;li&gt;optional static to allow overload, but ended up a mess&lt;/li&gt;
              &lt;li&gt;ruby should keep being ruby, w/ duck typing&lt;/li&gt;
              &lt;li&gt;DRY&lt;/li&gt;
              &lt;li&gt;would restrict require, define_method, method_missing (meta programming)&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;-&amp;gt; Soft Typing
            &lt;ul&gt;
              &lt;li&gt;type inference&lt;/li&gt;
              &lt;li&gt;Type represented as set of methods signatures (or class/module, which are a set)&lt;/li&gt;
              &lt;li&gt;closer communication between compiler and user (ide) - knows methods needed&lt;/li&gt;
              &lt;li&gt;fallback&lt;/li&gt;
              &lt;li&gt;static analyzer&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;advanced---i-3-promises-in-ruby---dinshaw-gobhai---tallfriend&quot;&gt;Advanced - I &amp;lt;3 Promises in Ruby - Dinshaw Gobhai - @tallfriend&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;https://github.com/dinshaw/promises-in-ruby - https://github.com/dinshaw/promises&lt;/li&gt;
  &lt;li&gt;fn -&amp;gt; promise (respond_to :then) (lambdas)&lt;/li&gt;
  &lt;li&gt;Uses Thread.new&lt;/li&gt;
  &lt;li&gt;Fulfill and Reject
    &lt;ul&gt;
      &lt;li&gt;in promise block, call fufill if ok, call reject if rejected&lt;/li&gt;
      &lt;li&gt;uses method() turns method names into lambda&lt;/li&gt;
      &lt;li&gt;catches all errors, calls reject&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;All and Any on lists of promises (from spec)&lt;/li&gt;
  &lt;li&gt;Return a promise immediately&lt;/li&gt;
  &lt;li&gt;fulfill or reject&lt;/li&gt;
  &lt;li&gt;chainable&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;advanced---letting-concurrency-help-you-today---richard-bishop---rbondev&quot;&gt;Advanced - Letting Concurrency help you today - Richard Bishop - @rbondev&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Great language for getting feet wet in concurrency&lt;/li&gt;
  &lt;li&gt;Concurrency about dealing with lots of things at once, Parallelism is doing a lot of things at once&lt;/li&gt;
  &lt;li&gt;parallel - overlapping, no communiciation, concurrent - communication&lt;/li&gt;
  &lt;li&gt;Primitives - Processes, Threads, Events&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Threads&lt;/em&gt;&lt;/li&gt;
  &lt;li&gt;Libraries:
    &lt;ul&gt;
      &lt;li&gt;Celluloid - Actor and Object - pass messages - pools and supervisors
        &lt;ul&gt;
          &lt;li&gt;Actor -&amp;gt; mailbox -&amp;gt; messages (message queue)&lt;/li&gt;
          &lt;li&gt;Sidekiq -&lt;/li&gt;
          &lt;li&gt;Sucker_Punch - in memory&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Puma&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Concurrent Design&lt;/li&gt;
  &lt;li&gt;Elixr
    &lt;ul&gt;
      &lt;li&gt;Erlang VM, Concurrency as paradigm - actors and message passing&lt;/li&gt;
      &lt;li&gt;Supervision tree -&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;(SOA) - separate processes, message queue
    &lt;ul&gt;
      &lt;li&gt;gives modularity&lt;/li&gt;
      &lt;li&gt;now coupled over the network, rely on reliability&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Defending ruby&lt;/li&gt;
  &lt;li&gt;overall a bit too high level for an Advanced track talk. Wanted more actual solutions. Sounds like music would have been better (@lsegal Loren Segal)&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;future-proofing-your-3rd-party-integrations---idlehands---jeffery-matthias&quot;&gt;Future proofing your 3rd party integrations - @idlehands - Jeffery Matthias&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Sendgrid - PHP app being refactored into Ruby (not Go, lol) - PivotalLabs helped them&lt;/li&gt;
  &lt;li&gt;Keep 3rd party logic out of our code&lt;/li&gt;
  &lt;li&gt;Make 3rd party behavior predictable&lt;/li&gt;
  &lt;li&gt;Make 3rd party replacable&lt;/li&gt;
  &lt;li&gt;Adapter - just a gem.  use Gemfile &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gem &apos;&apos;, path: &apos;relativepath&apos;&lt;/code&gt;
    &lt;ul&gt;
      &lt;li&gt;Still wrap your own adapter around their gem&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Clearly define internal vocabulary&lt;/li&gt;
  &lt;li&gt;Use internal vocab, adapt to external (prefer internal as needed)&lt;/li&gt;
  &lt;li&gt;Use Data Transfer Object (put necessary parameters, validate attributes)&lt;/li&gt;
  &lt;li&gt;Abstract Service - make interface for the adapter&lt;/li&gt;
  &lt;li&gt;Adadapter/Interface (gem) - separate from implementation, contains DTO and abstracts. Helps enforce generic use&lt;/li&gt;
  &lt;li&gt;gem - uptyped - type checking etc&lt;/li&gt;
  &lt;li&gt;use sandbox when available&lt;/li&gt;
  &lt;li&gt;create a fake service or user VCR - has to be consistently maintained&lt;/li&gt;
  &lt;li&gt;use dependency injection - pass the class to be used underneath&lt;/li&gt;
  &lt;li&gt;CI should hit the sandbox / real code regularly&lt;/li&gt;
  &lt;li&gt;Flexibility + separation of concerns&lt;/li&gt;
  &lt;li&gt;Portability (messgage bus, etc)
    &lt;ul&gt;
      &lt;li&gt;DTO helps&lt;/li&gt;
      &lt;li&gt;consistent Abstract Interface&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;going-evergreen---kane-baccigalupi---rubyghetto&quot;&gt;GOING EVERGREEN - Kane Baccigalupi - @rubyghetto&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;Greenfield - new and bright and interesting and easy to work with&lt;/li&gt;
  &lt;li&gt;Brownfield - old project, ongoing maintenance&lt;/li&gt;
  &lt;li&gt;how to get it green&lt;/li&gt;
  &lt;li&gt;SOLID
    &lt;ul&gt;
      &lt;li&gt;Single Responsibility - should only change for one reason&lt;/li&gt;
      &lt;li&gt;Open / Closed - open for extension, closed for modification (inheritance)&lt;/li&gt;
      &lt;li&gt;Liskov (Substitution) - parent more specific than child&lt;/li&gt;
      &lt;li&gt;Interface segregation -&lt;/li&gt;
      &lt;li&gt;Dependency Inversion - high level should not depend on low level. abstractions should not depend on details (dependency injection)&lt;/li&gt;
      &lt;li&gt;help respond to change. rules are tightly coupled. motivated by change&lt;/li&gt;
      &lt;li&gt;great guidelines if you know it already&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Sandi’s 5 Rules&lt;/li&gt;
  &lt;li&gt;STD2
    &lt;ul&gt;
      &lt;li&gt;Small - small classes, small methods. easier to read&lt;/li&gt;
      &lt;li&gt;Test drive it&lt;/li&gt;
      &lt;li&gt;D2 - Dependency Inject, Law of Demeter (low communication)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;Rules dont make code, teams make code&lt;/li&gt;
  &lt;li&gt;Code is about communication&lt;/li&gt;
  &lt;li&gt;affective metrics (hiring)
    &lt;ul&gt;
      &lt;li&gt;communicative&lt;/li&gt;
      &lt;li&gt;enjoyable&lt;/li&gt;
      &lt;li&gt;motivated&lt;/li&gt;
      &lt;li&gt;self aware
        &lt;ul&gt;
          &lt;li&gt;impostor syndrome vs arrogance&lt;/li&gt;
          &lt;li&gt;learning style&lt;/li&gt;
          &lt;li&gt;impact control (how my behavior impact others)&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;design - refactoring instinct&lt;/li&gt;
      &lt;li&gt;faith - ?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;fighting-bugs-with-hacks---paul-gross---pgr0ss&quot;&gt;Fighting Bugs with Hacks - Paul Gross - @pgr0ss&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;If debugging is the process of removing bugs, then programming must be the process of putting them in - E. Dijkstra&lt;/li&gt;
  &lt;li&gt;Testing is good for showing there are bugs, but bad at proving their absence&lt;/li&gt;
  &lt;li&gt;Fail Fast (Martin Fowler)&lt;/li&gt;
  &lt;li&gt;Structure systems to reduce severity&lt;/li&gt;
  &lt;li&gt;Hazard mitigation
    &lt;ul&gt;
      &lt;li&gt;add code to check things that shouldnt be needed, but would mitigate severity of bug&lt;/li&gt;
      &lt;li&gt;check a few important things&lt;/li&gt;
      &lt;li&gt;figure out invariants of system
        &lt;ul&gt;
          &lt;li&gt;customer_id, patient_id&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;add checks, fail fast, add alert&lt;/li&gt;
      &lt;li&gt;scoped find hook - force ‘customers’ to be scoped to merchant (braintree)
        &lt;ul&gt;
          &lt;li&gt;can bypass with special parameter (safety)&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;focus on validity of data
    &lt;ul&gt;
      &lt;li&gt;doublecheck calculations and allow for rerun&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;write checks outside of normal flow of code
    &lt;ul&gt;
      &lt;li&gt;keep very simple&lt;/li&gt;
      &lt;li&gt;alerts on num transactions (old ones), high numbers, latency&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;hacks at development time&lt;/li&gt;
  &lt;li&gt;safe migrations
    &lt;ul&gt;
      &lt;li&gt;unsafemigrationerror (alias old method)&lt;/li&gt;
      &lt;li&gt;add/remove&lt;/li&gt;
      &lt;li&gt;unsafe prefix to bypass&lt;/li&gt;
      &lt;li&gt;TODO find gem for this?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;sanity specs
    &lt;ul&gt;
      &lt;li&gt;doublecheck ids &lt;em&gt;public_id&lt;/em&gt; indexes&lt;/li&gt;
      &lt;li&gt;indexes on relations? automatic?
        &lt;ul&gt;
          &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ActiveRecord.tables.indexes&lt;/code&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;automated checks on crazy / dangerous operations&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;your-bright-metaprogramming-future---betsy-haibel-w-optoro-betsythemuffin&quot;&gt;Your bright metaprogramming future - Betsy Haibel \w Optoro @betsythemuffin&lt;/h1&gt;
&lt;ul&gt;
  &lt;li&gt;not skynet or magical or perl (lol)&lt;/li&gt;
  &lt;li&gt;code that treats the program as just data&lt;/li&gt;
  &lt;li&gt;Object.send(method, *args)
    &lt;ul&gt;
      &lt;li&gt;sends a message to the object&lt;/li&gt;
      &lt;li&gt;breaks grep (hard to find cause method names are obsured)&lt;/li&gt;
      &lt;li&gt;cyclomatic complexity - paths that can take through code&lt;/li&gt;
      &lt;li&gt;limit scope of dynamic method calls, keep closer to the code its calling&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;method_missing
    &lt;ul&gt;
      &lt;li&gt;need respond_to_missing&lt;/li&gt;
      &lt;li&gt;call super (chaining)&lt;/li&gt;
      &lt;li&gt;method_missing is slow by itself - define_method once found?
        &lt;ul&gt;
          &lt;li&gt;if you’re gunna do this,  maybe predefine these instead&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;consider using a different paradigm&lt;/li&gt;
      &lt;li&gt;good for objects (OpenStruct), delegators (Delegator mixin)?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;define_method
    &lt;ul&gt;
      &lt;li&gt;performance at load is pretty slow - causes class / method table rebuild&lt;/li&gt;
      &lt;li&gt;wrap in a method (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;define_...&lt;/code&gt;) so can be tested/redefined&lt;/li&gt;
      &lt;li&gt;Put these into an anonymous module?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;hooks
    &lt;ul&gt;
      &lt;li&gt;normal: inherited, included, extended&lt;/li&gt;
      &lt;li&gt;weird: method_added, method_removed, singleton_*&lt;/li&gt;
      &lt;li&gt;dont?!
        &lt;ul&gt;
          &lt;li&gt;consider using a simple macro and using a separate object&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Mon, 17 Nov 2014 02:00:00 -0800</pubDate>
        <link>https://blog.onyxraven.com/ruby/rubyconf/2014/11/17/rubyconf-2014-1.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/rubyconf/2014/11/17/rubyconf-2014-1.html</guid>
        
        
        <category>ruby</category>
        
        <category>rubyconf</category>
        
      </item>
    
      <item>
        <title>Rails REST API versioning</title>
        <description>&lt;p&gt;There have been a few other articles regarding versioning REST APIs in Rails.  Many reference &lt;a href=&quot;http://railscasts.com/episodes/350-rest-api-versioning&quot;&gt;this RailsCasts (#350)&lt;/a&gt; to set up header based versioning, and there have been a few setting up path based versioning using the ‘namespace’ feature in Rails 3 routing.&lt;/p&gt;

&lt;p&gt;Our API was set up with path based using routing namespaces, and we moved ahead happily with v1.&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;namespace&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:v1&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;resource&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:ping&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;Api::V1::PingController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;...&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;GET http://example.org/v1/ping
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Recently we started working on v2 features, and started in a new namespace, looking just like v1.  To make it easy on our apps, we wanted to make all the API calls against the v2 api, even on controllers that didn’t get an ‘upgrade’ into the v2 namespace.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;http://example.org/v1/ping
http://example.org/v2/ping #fallback to the v1
http://example.org/v2/pong #use v2 namespace
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This is a non-obvious operation.  In most REST cases, redirects like explained in &lt;a href=&quot;http://stackoverflow.com/questions/9627546/api-versioning-for-rails-routes/9627796#9627796&quot;&gt;this StackOverflow post&lt;/a&gt; are not possible because you shouldn’t redirect POSTs (technically an HTTP 301 response should work, but there are few HTTP clients that respect that strict mode.  If you don’t believe a 301 response to a POST should result in a new POST, read &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot;&gt;the spec&lt;/a&gt; carefully).&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://joshsymonds.com/&quot;&gt;Josh Symonds&lt;/a&gt; talks about how &lt;a href=&quot;http://joshsymonds.com/blog/2013/02/22/existing-rails-api-solutions-suck/&quot;&gt;existing API solutions are terrible&lt;/a&gt;, and really only one of the gems Symonds talks about in his post handles ‘fallback’ apis: &lt;a href=&quot;https://github.com/filtersquad/rocket_pants&quot;&gt;rocket_pants&lt;/a&gt;.  I wasn’t keen on using the whole kit of rocket_pants features, so I looked into &lt;a href=&quot;https://github.com/filtersquad/rocket_pants/blob/master/lib/rocket_pants/routing.rb&quot;&gt;how the ‘api’ method works&lt;/a&gt;.  Its just a fancy wrapper around a ‘scope’ line.&lt;/p&gt;

&lt;p&gt;Taking a cue from that, I came up with the replacement for the ‘namespace’ lines:&lt;/p&gt;

&lt;div class=&quot;language-ruby highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:module&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;v2&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;:api_version&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:constraints&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:api_version&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/v2/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
   &lt;span class=&quot;n&quot;&gt;resource&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:pong&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;scope&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:module&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;v1&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&apos;:api_version&apos;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:constraints&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:api_version&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;sr&quot;&gt;/v[12]/&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do&lt;/span&gt;
  &lt;span class=&quot;n&quot;&gt;resource&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:ping&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;A few notes about the scope line:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;specs/tests that test ‘route_to’ assertions will need to respect the fact that :api_version will be included in the list of route parameters&lt;/li&gt;
  &lt;li&gt;regex against paths cannot be anchored.  It throws an exception at app startup time (which Passenger may hide), because those regexes are already anchored, and really you’re only working on one piece of the path at a time.&lt;/li&gt;
  &lt;li&gt;Order matters in routing - it is evaluated top-down so pay attention to the fallbacks.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, in the v2 scope, we can also override a given resource with a controller from the new namespace, since it will match first.&lt;/p&gt;
</description>
        <pubDate>Wed, 18 Sep 2013 08:39:00 -0700</pubDate>
        <link>https://blog.onyxraven.com/ruby/rails/routing/2013/09/18/rails-rest-api-versioning.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/rails/routing/2013/09/18/rails-rest-api-versioning.html</guid>
        
        
        <category>ruby</category>
        
        <category>rails</category>
        
        <category>routing</category>
        
      </item>
    
      <item>
        <title>MP4Box can fix your online-hosted MP4s</title>
        <description>&lt;p&gt;I just discovered MP4Box (available in osx homebrew as well as other places).  It has tools for rearranging your MP4 videos to optimize them for streaming.  We just did this on all our videos, and not only do they start up faster on every device, it fixed some devices that refused to play our videos!&lt;/p&gt;

&lt;p&gt;Our magic incantation was simple: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;MP4Box -hint $file&lt;/code&gt;&lt;/p&gt;
</description>
        <pubDate>Wed, 09 Jan 2013 06:56:00 -0800</pubDate>
        <link>https://blog.onyxraven.com/mp4/2013/01/09/mp4box-fix-online-mp4s.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/mp4/2013/01/09/mp4box-fix-online-mp4s.html</guid>
        
        
        <category>mp4</category>
        
      </item>
    
      <item>
        <title>Toggle Rails Caching in RSpec Suites</title>
        <description>&lt;p&gt;Useful snippet for enabling/disabling the cache during rspec&lt;/p&gt;
</description>
        <pubDate>Mon, 07 Jan 2013 00:20:00 -0800</pubDate>
        <link>https://blog.onyxraven.com/rspec/caching/2013/01/07/rspec-cache-toggle.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/rspec/caching/2013/01/07/rspec-cache-toggle.html</guid>
        
        
        <category>rspec</category>
        
        <category>caching</category>
        
      </item>
    
      <item>
        <title>Log example names/descriptions from rspec</title>
        <description>&lt;p&gt;This can help dig into the logs for a spec file.  You can do one of these two things (both is overkill)&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4339818.js&quot;&gt; &lt;/script&gt;

</description>
        <pubDate>Wed, 19 Dec 2012 04:42:52 -0800</pubDate>
        <link>https://blog.onyxraven.com/rspec/gist/2012/12/19/log-example-names-rspec.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/rspec/gist/2012/12/19/log-example-names-rspec.html</guid>
        
        
        <category>rspec</category>
        
        <category>gist</category>
        
      </item>
    
      <item>
        <title>Local/Server synchronization with Ruby and FSEvent</title>
        <description>&lt;p&gt;A lot of the work I do is PHP/html type coding. I try to keep a local setup that is able to run all of my code without too much trouble, but eventually all that code has to be tested on something resembling the production environment, or there are certain functions that can only be performed there (say, handling NFS mounts, or attaching to databases otherwise firewalled on my local machine). In those situations, I need to be able to quickly copy my code from my local machine to the development server. I used to do this manually, but the cycle of edit-save-copy-test was really annoying. Aptana and Eclipse have some tools that help, but I don’t use those tools anymore day-to-day, and they seemed to always get messed up.&lt;/p&gt;

&lt;p&gt;I took while to find a suitable setup for keeping files in sync like this. Somehow I came across doubledown, a ruby script using the OSX FSEvent framework. For whatever reason, I couldn’t quite make it work on my machine (YMMV), so I took the idea and searched for other uses of FSEvent out there. I came across a few rubygems wrapping FSEvent nicely, and wrote a script around that. First, you’ll probably want to set up ssh keys. This will let you rsync over ssh without having to log in every time (kind of important on this one). I don’t like the idea of having keys that don’t have a password, so I use keychain to manage my keys. In my ~/.zshrc I have the following snippet:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4366205.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;The random delay lets me launch more than one shell at a time (my default windowgroup in Terminal.app is has two) without conflict.&lt;/p&gt;

&lt;p&gt;Second, you’ll want to have a way to fully-sync your directories. The following script does this with a single command, and with some options provided by gnu getopt. The biggest features are a preset source/destination (which can be appended), and skipping .svn/.hg directories. In a rush, skipping those makes a HUGE speed difference (especially when skipping svn).&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4366220.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;Now for the actual ruby script using FSEvent. It also includes using growl to notify on synchronization events. While not required, it is nice to know when things are synched (and it lets me know the script is still running), but it can get a bit spammy (especially running svn up on a directory).&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4366239.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;These scripts aren’t perfect, and are meant to be modified to your own needs and preferences. Its so nice not to have to worry about manually syncing the directories anymore though!&lt;/p&gt;
</description>
        <pubDate>Sun, 02 Oct 2011 02:12:00 -0700</pubDate>
        <link>https://blog.onyxraven.com/ruby/osx/rsync/2011/10/02/sync-ruby-fsevent.html</link>
        <guid isPermaLink="true">https://blog.onyxraven.com/ruby/osx/rsync/2011/10/02/sync-ruby-fsevent.html</guid>
        
        
        <category>ruby</category>
        
        <category>osx</category>
        
        <category>rsync</category>
        
      </item>
    
  </channel>
</rss>
