speakerdeck.com

Presentation about optimizing Ruby on Rails apps. From Nico Hagenburger (homify's lead frontend developer).

Ruby's __FILE__ keyword returns the path to the current file. On popular for this are Ruby binaries: #!/usr/bin/env ruby...

Here is a symbol of an eight note: ♪ Its two-byte hex representation is 0x266A. This card describes how to...

tenderlovemaking.com

You can define methods using def or define_method. In the real world, there is no performance difference.

This is quite an edge case, and appears like a bug in Rails (4.2.6) to me. Update: This is now...

Note: This applies to plain Ruby scripts, Rails does not have this issue. When you work with Ruby strings, those...

makandra dev
dev.mensfeld.pl

Ruby 2.3.0 has been around since end of 2015. It brings some pretty nice new features! Make sure to read...

You can download .gem files using gem fetch: gem fetch activesupport consul This will produce files like active-support-5.0.0.gem and consul-0.12.1.gem...

mitrev.net

As announced before, Ruby has introduced a safe navigation operator with version 2.3.0. receiver&.method prevents NoMethodErrors by intercepting method...

blog.blockscore.com

#dig lets you easily traverse nested hashes, arrays, or even a mix of them. It returns nil if any intermediate...

When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is...

PostgreSQL uses the C library's locale facilities for sorting strings: First, all the letters are compared, ignoring spaces and...

Converting string characters to or from their integer value (7-bit ASCII value or UTF-8 codepoint) can be done...

As your Rails project grows, you will accumulate a number of small patches. These will usually fix a bug in...

blog.skylight.io

Helix allows you to implement performance-critical code of your Ruby app in Rust, without requiring glue code to bridge...

When dealing with time zones in Rails, there is one key fact to keep in mind: Rails has configurable time...

Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...

github.com

Stackprof is a sampling call-stack profile for Ruby 2.1+. Instead of tracking all method calls, it will simply collect...

github.com

Uses FFI and works all relevant operating systems. If you'd try to do it yourself, you'd have to...

techblog.netflix.com

You login to a Linux server with a performance issue: what do you check in the first minute? uptime

nateberkopec.com

rack-mini-profiler is a powerful Swiss army knife for Rack app performance. Measure SQL queries, memory allocation and CPU...

In Ruby 2.3 you can use <<~ instead of <<- to automatically remove indentation from a HEREDOCs: str = <<~MESSAGE Hello Universe!

The nokogiri gem provides different packages for several platforms. Each platform-specific variant ships pre-built binaries of libxml2, e.g...

E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...