quattro_4 scribble

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

Rebuild 185-200

Rebuild: 185: Shake iPad Pro to Undo (naan)

Rebuild: 186: Not Enough Gigs for Instagram (N)

Rebuild: 187: Zombie Modifier (hak)

Rebuild: 188: Two-Phase Commit (fumiakiy)

Rebuild: Aftershow 188: Alternative Timeline (fumiakiy)

Rebuild: 189: Server-side Emacs (typester)

Rebuild: 190: The 360-Degree Camera Bug (higepon)

Rebuild: 191: Two More Bowls of Rice (hak)

Rebuild: Aftershow 191: Alternative Momoi (hak)

Rebuild: 192: The Future Is Now (N)

Rebuild: 193: Winter Is Coming (gfx)

Rebuild: 194: Micro-Earth At Your Fingertips (hak)

Rebuild: Aftershow 194: Moe Military Post-Apocalyptic (hak)

Rebuild: 195: Notch By Perfume (N)

Rebuild: 196: Fashionable Udon (higepon)

Rebuild: 197: Intel Inside (hak)

Rebuild: Aftershow 197: Peer Pressure Gaming (hak)

Rebuild: 198: Gaming Hogehoge (drikin)

Rebuild: 199: The End of an Era (rui314)

  • Government shutdown
  • Cloud Speech API
  • heroku postgres
    • 10000行制限
    • json column

Rebuild: 200: Leather Jacket King (hak)

RubyPlus #34


  • Redis 4.0 General Availability
    • new replication engine and the ability to extend Redis itself
  • How I reduced my database server load by 80%
    • heroku pg:outliers command which comes from this Heroku a pg:extras CLI extension.
  • How to safely store API keys in Rails apps
    • Pros & Cons - Save directly in codebase, Save in ENV, Save in DB
    • Save in DB and encrypt attr_encrypted
  • Spreadsheet Architect
    • turn any activerecord relation or ruby object collection into a XLSX, ODS, or CSV spreadsheet
  • Fast CSV Report Generation with Postgres in Rails
    • conn.copy_data "COPY (#{sql_query}) TO STDOUT #{options};" do
  • Rails on Docker: Getting Started with Docker and Ruby on Rails
    • docker run --rm -it --env RAILS_ENV=development ...
  • 2 Tests You Should Run Against Your Ruby Project
  • Speed Up Your Rails Test Suite By 6% In 1 Line
      • config.logger = Logger.new(nil)
  • Ruby on Rails Code Audits: 8 Steps to Review Your App
    • grep -v 'add_index' db/schema.rb | grep '_id' | wc -l
    • grep 'add_index' db/schema.rb | wc -l
    • grep -ir 'todo' app/*
  • Running feature specs with Capybara and Chrome headless
    • capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
      • chromeOptions: { args: %w[headless disable-gpu] }
  • Graphing Benchmark Results in Ruby
    • benchmark-ips
  • 5 ways we’ve improved flakey test debugging

RubyPlus #33


  • Nanoc - Static Site Generator
    • flexible static-site generator (a small personal blog to a large corporate website)
  • Demystifying Rails
  • Upgrading Shopify to Rails 5
    • Upgrading the Shopify monolith - one of the oldest and the largest Rails applications in the industry
      • from Rails 4.2 to 5.0 took us nearly a year.
  • Helpful Resources for Your Rails App Upgrade
  • Ruby Standard Gems
    • Default gems
    • Bundled gems
  • Testing Cookies in Rails
    • rack-test get_cookie method
    • Timecop
  • How We Upgraded A Very Large App from Rails 3 to Rails 4
    • BUNDLE_GEMFILE=Gemfile_rails4 bundle exec
  • redis_dashboard
    • Sinatra app to monitor Redis servers
    • mount RedisDashboard::Application, at: "redis_dashboard"
  • nplusone_control
    • expect { ... }.to perform_constant_number_of_queries.matching(/INSERT/)
  • Replacing a Complex Regular Expression with a Simple Parser
    • Step through a string, character by character
    • Append each character to a buffer
    • When a token-separating condition is encountered, save the buffer to an array and empty it.
  • What I learnt today from reading gems' code
    • Sidekiq
      • Sidekiq.redis_pool
      • yielding for configuration
    • ActiveSupport::TaggedLogging
    • self.new in a module
  • ActiveRecord callbacks: an after_commit gotchya
    • callbacks can certainly enable bad design
  • Ruby Code Formatter

RubyPlus #32


  • Performance Updates from RailsConf 2017
  • Why write code when more dependencies will do?
    • Polyfill implements newer Ruby features into older versions
  • RedDot RubyConf 2017
    • Two days single track Ruby conference is taking Place in June 22-23 in Singapore
  • Fragment Caching with Rails 5.1
  • Announcing an open data set on the open source community
    • Open Source Survey
    • What people value in the software they use and in open source projects
    • How and where people find and provide help
    • Privacy preferences and practices
    • Employer policies around using and contributing to open source
    • Negative experiences and their consequences
    • Personal backgrounds of community members
  • Grafana 4.3 Beta Release
    • New Heatmap Panel
    • Elasticsearch Histogram Aggregation
  • RailsConf 2017: Perusing the Rails Source Code - A Beginners Guide
    • This video outlines steps you can take to explore the inner workings of Rails
  • Instantly prepare your ERB templates for translation!
  • darnbrokenrails: A Cyber Security/Code Quality Teaching Tool for Rails
    • cybersecurity / code quality teaching tool for Rails
    • bundler-audit, brakeman, rails_best_practices

Ruby Facets #7

Seven.new | Ruby Facets

  • What makes Rails a framework worth learning in 2017?
    • despite all the front-end progress and excitement, there’s always a need for the back-end for databases, computing, job queueing, mailers, push notifications, and much more
  • Ossert
    • Ossert
    • Maintenance, Popularity, Maturity
  • The Difference Between to_s & to_str In Ruby
    • to_str - object CAN behave like a String
  • ROM 3.0
    • rom-sql and rom-repository
  • Ruby Coercion Protocols
  • Two screencasts, two ways to erradicate Ruby nil values
    • Ruby Tapas
    • Special Case and Null Object patterns

RubyPlus #31


  • HTTP2 Server
  • RailsPanel: A Chrome Extension for Rails Development
    • tailing of development.log
    • db/rendering/total times, parameter list, rendered views and more
  • Background jobs and deploys
    • indempotent
    • Always prefer many smaller jobs to one large job
  • What About Warmup?
  • Deploying a Rails Application to Elastic Beanstalk
    • Elastic Beanstalk in a Virtual Private Cloud (VPC) on Amazon AWS
  • Faster Rails: Is Your Database Properly Indexed?
    • double index (polymorphic)
    • Any frequently used sorting can be improved by using a dedicated index
  • A Starter Guide to Ruby Backend Performance
    • bullet, rack-mini-profiler
    • derailed_benchmarks
  • Polyfill: Use Newer Ruby Features on Older Versions
    • The polyfills are built using refinements so there is no monkey patching
  • Don’t Use Objects as Hash Keys in Ruby
    • 313% slower than it would with a Symbol type object
  • The hidden cost of the invisible queries in Rails
    • if Actor.limit(1).count == 0
    • exists? method is good
  • CuckooFilter
    • a probabilistic datastructure which is objectively better than Bloom Filters for set-membership queries

RubyPlus #30


  • Rails 5.1 Released
    • manage JavaScript dependencies from NPM via Yarn
    • Optionally compile JavaScript with webpack
    • jQuery is no longer a default dependency
    • system tests using Capybara
    • encrypted secrets
    • parameterized mailers
  • Oj (Optimized JSON) 3.0 Released
    • Faster than the built in Ruby json gem
  • Write Native Ruby Extensions ‘Without Fear’
    • Helix makes writing Ruby classes in Rust
  • Boot large ruby/rails apps faster
    • optional support for ActiveSupport and YAML, to optimize and cache expensive computations
  • Search and Autocomplete in Rails with Postgres
  • Rails 5.1 has introduced Date#all_day helper
    • User.where(created_at: Date.today.all_day)
      • SELECT "users".* FROM "users" WHERE ("users"."created_at" BETWEEN $1 AND $2)
  • The Good, Bad and Ugly: The Story of a Rails 5 Upgrade
  • acli: A Command-Line Client for Action Cable
    • Action Cable command-line client
    • written in mRuby
  • Implicit Code : Programming with a love of the implicit
    • DHH: explicit code is not always better
  • Ruby on Rails: the Bad and Good parts
    • Hanami, Roda
  • Postgres tips for Rails developers
    • Manage long running queries with statement time-outs
    • Finding misbehaving queries
  • Some Lesser-Known Features in Rails 5.1
    • More consistent tag helpers
  • Caution when using before_destroy with model association
    • before_destroy :remove_external_account, prepend: true
  • Parsing Excel Files with Ruby
    • axlsx, rubyXL, roo, creek, spreadsheet, simple_xlsx_reader