quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

RubyPlus #27

https://www.rubyplus.com/podcasts/321-Episode-27

  • Mastering Ruby Exceptions
    • free 39 pages book
  • Reading Ruby Code: Ruby Object Mapper - Exploration
    • rom = ROM.container(:sql, 'sqlite::memory') do |conf|
      • require 'pry'; binding.pry
  • Google App Engine adds C#, Node.js, and Ruby options
  • Faster Rails: How to Check if a Record Exists
    • Loading too much data into memory
    • N+1 queries
    • lack of cached values
    • the lack of proper databases indexes
    • advice is to always use exists?
      • present? => 2892.7 ms, any? => 400.9 ms, empty? => 403.9 ms, exists => 1.1 ms
  • Testing Third Party Interactions
  • Google Spreadsheets and Ruby
  • Smarter CSV
    • direct processing with Mongoid or ActiveRecord
    • parallel processing with Resque or Sidekiq
  • Towards Minimal, Idiomatic, and Performant Ruby Code
    • necessary to trade performance for readability, or readability for performance
  • ODBC and writing your own ActiveRecord adapter
    • ODBCAdapter.register
  • Micro-optimizations matter: preventing 20 million system calls
    • sigprocmask
  • ActiveRecord Prepared Statements Can Cause Memory Leaks
    • statement_limit: 200 in config/database.yml
  • Ruby ActionCable Client
    • Client for integrating a ruby application with a remote ActionCable-based backend
    • EventMachine.run do
      • url = 'ws://example.com'
  • Easily Translate Enums in Rails.
    • i18n Post.translated_status(:published) #=> "Was published"