Baruco 2014—
You should have been there
David Vrensk2014-09-18
Jeremy Walker
• Avoid the monorail
• Huge gem files, collisions
• Pubsub! (gem install propono)
• AWS sns sqs
• Bit.ly/baruco14
Matz: mRuby• New devices. Small, but strong CPUs,
much memory.
• Cruby not good for embedded. Too big. Too much posix.
• Jruby too much Java. JavaME is not enough java.
• Japanese gov grant 2009-2011
Matz...
• Copied lua api
• Incremental generational GC.
• C99
• MRI 1.9-compatible syntax-wise
• Sinatic—Sinatra clone
• Micro satellites! Mruby in space!
Piotr Szotkowski: Standard library
• Struct
• Yaml/store
• Heredocs in method calls
• Webrick
• Gserver (TCP)
• Enumerable#flat_map
• abbrev
• module_function
• Enum.combination
• DRb
• Ipaddr
• Rinda!
Piotr Szotkowski...
• Benchmark
• Why is stdlib Integer#prime? slower than a naive implementation?
• Read enumerable.rb, and again.
• End of line (stdlib blog posts)
Pat Shaughnessy: active record
• Generating SQL
• Executing SQL
• The b-tree algorithm
• Arel. E.F. Codd. AST. Visitor pattern.
• Lehman & Yao: efficient b-trees
• Dive deep, have fun.
Emily Stolfo: backwards compatible APIs
• Innovation and stability are at odds in the ruby community
• Reactions to breakage:
• not part of the official API
• my bad, sorry
• yank, re-release
Emily Stolfo...
• Configurability and stability are at odds
• Api wrapper vs native api
• Do 3 things:
• simple api
• clear communication
• semver
Emily Stolfo...
• Changelogs! www.keepachangelog.com
• Be nice. Tell ppl you don't support 1.8.7 even if 1.8.7 isn't supported in itself.
• Ppl avoid semver because it's holding them back. Innovation is more important to rubyists.
José Tomas Albornoz: Twitch plays Pokemon• Java robot lib to send keystrokes. Latency.
• tom7.org/mario
• Writing a new emulator. Mimey.
• Commit and learn. Conference-driven development!
• Irresponsible ruby: Too clever or interesting to deploy on your day job.
• Learned how computers work.
Leon Gersing: Keep software weird
• Meaning is derived through experience
Ryan Levick: Type safety in ruby
• Types are better than tests because math
• Compiler less likely to be buggy than your tests
• Save your tests for business logic
Lightning talks• Yorick Petersén
• Oga - new XML parser, made to be enjoyable
• Tom Stuart (not evil)
• Burrows-wheeler transform
• Philip Nash
• My code is more popular than me
• Chuck Norris bot, Vin Diesel bot
Brian Shirai: Types as premature optimisation
• Static types. We don't need them. And we're not good at them.
• Making a sandwich: What would be a purely functional recipe to make a sandwich?
Brian Shirai...
• We learn not from own failure, not from success of others, but from failure of others.
• Card trick: We're bad at types.
Brian Shirai...
• The power of interoperability: why objects are inevitable
• Messages are the core of objects.
• Let functions have types. We can handle that.
Erik Michaels-Ober: Writing fast Ruby
• Don Knuth: a 12% improvement, easily obtainable, should be done based on experience from other engineering disciplines. (December 1974)
sferik...
• Levels: design, source, build, compile, runtime
• Algos, fast ruby, build flags, all but MRI, GC malloc limit
sferik...
• Knuth again: programmers are bad at guessing what's slow.
• Benchmark
• Benchmark/ips runs a certain time instead of n iterations
sferik...
• Activesupport symbol-to-proc was slower than blocks so rails stopped using it internally. SymToProc in ruby is faster than blocks.
• Flat_map 4.5x faster than map+flatten but rubinius implemented it as map+flatten.
Jason R Clark: Spelunking in ruby
• Collecting tricks and tools
• JasonRClark.com/debug
Evan Phoenix: Services, services,
• What is micro service?
• Single data type.
• Or a single operation.
• Or logical group (email).
Evan Phoenix...
• Benefits:
• the "don't break my shit" rule.
• Separate velocity vectors.
• You can't break encapsulation on someone else's machine.
• Plenty of pitfalls
Evan Phoenix...
• Shared Model Pain. Don't share AR code between projects.
Evan Phoenix...
• Now deployment becomes a mess. Use one solution for all. Force them to use the same solution.
• Config needs to be centralised. Stop using .yml, move to env vars. 12factor rules.
Evan Phoenix...
• Do a fire drill once a month. Pretend. Check things. There will be many places to check. Practice.
• Expect failure. Gracefully degrade. Use back pressure: returning errors better than crashing.
Evan Phoenix...
• How and what. Don't argue over how x talks to y. One convention for all.
• ... But what about synchronous/asynchronous?
• How? RPC, REST, or message passing
Evan Phoenix...
• Enables multi-lang. But every new language needs the same tools as the others: logging, etc.
• Build that part first, or you won't have it when you need it.
Evan Phoenix...
• Break up when you reach the Human Cognitive Mass threshold.
• Every sufficiently complex problem domain will hit the HCM threshold.
• Team HCM is smaller than individual HCM. Because communication.
Evan Phoenix...
• Services should be the right size for your team.
• Tooling matters
• Sacred cows make the best hamburgers says Evan Phoenix.
Tom Stuart: Refactoring ruby with monads
• Book: understanding computation
• Gh/tomstuart/monads
Matt Aimonetti: Go auth urself
• story time
Evil Tom Stuart: Smalltalk, lisp, shell
• opinion time
Julian Cheal: Dancing with robots
• show time
Will watch again
• Leon Gersing
• Evan Phoenix
• (good) Tom Stuart
All of them• JEREMY WALKER—Avoid the
monorail• YUKIHIRO MATSUMOTO—mruby:
AltRuby• PIOTR SZOTKOWSKI—Standard
Library, Uncommon Uses• PAT SHAUGHNESSY—Twenty
Thousand Leagues Under ActiveRecord
• EMILY STOLFO—Release Responsibly
• JOSÉ TOMÁS ALBORNOZ—How I built my own Twitch-Plays-Pokémon
• LEON GERSING—Keep Software Weird
• RYAN LEVICK—A Dangerous Game: Safety in Ruby
• BRIAN SHIRAI—Types As Premature Optimization
• ERIK MICHAELS-OBER—Writing fast Ruby
• JASON R. CLARK—Spelunking in Ruby
• EVAN PHOENIX—Services, Services, Everywhere!
• TOM STUART—Refactoring Ruby with Monads
• MATT AIMONETTI—Go Auth Urself• EVIL TOM STUART—Smalltalk, Lisp,
Bash: Three Interesting Languages• JULIAN CHEAL—Dancing with
Robots
Retrospective
• Format (facts + opinions)
• Content
• facts
• opinions
• Level?
• Too long? Too short?
Thank you!David Vrensk
We’re changing e-commerce in Spain forever