ruby


42 performance tips for Ruby on Rails

Some I already, some I don't. Good to know anyway.

Power assert

Power Assert shows each value of variables and method calls in the expression. It is useful for testing, providing which value wasn't correct when the condition is not satisfied.

How to minimize RSpec `describe`/`context` nesting

Shared contexts to the rescue!

A Modern Web Application With Rails

Suggestions for new projects using Rails. A lot of sensible suggestions here.

How small can a Ruby on Rails app be?

Apparently, really small. Just one file for a Rails app that runs with Rack. Wonder if there's scope here for a basic CRUD app using this template?

Awesome Ruby

Nice to a new version of this.

The Safe Navigation Operator (&.) in Ruby – Georgi Mitrev

Definitely makes digging into nested objects much easier to read.

You Shouldn’t Use Faker (or other test randomization libraries)

Faking data can result in test failures.

Is WEBrick Webscale?

Yes, and a few more other things you might not know.

Using Ruby and Amazon SQS FIFO Queues

Guide to using strongly-ordered FIFO queues with Ruby and Amazon SQS.

GitHub - nikolalsvk/ordinare: Ordinare sorts gems in your Gemfile alphabetically

ordinare - Ordinare sorts gems in your Gemfile alphabetically

First-Class Tests

The definition of different types of tests.

Conditionality is filtering. Don't filter control flow, filter data.

Great example of removing conditional logic from your code.

Composition vs Inheritance