Paagman.dev
Articles Open Source About

Articles

Sometimes I write small blog posts about topics that interest me. You'll find them below.

Ruby on Rails
Ruby
Testing
Random

Ruby on Rails

Do not use map or pluck to pre-select records

August 25, 2020

Better ways of pre-selecting records in Rails.

Ignoring existing database migrations with Rubocop

August 21, 2020

A quick way to ignore existing database migrations with Rubocop.

Ignoring Sidekiq jobs in development

July 8, 2020

Introducing a Sidekiq middleware to ignore jobs.

Viewing the raw database attributes from your Rails model

June 10, 2020

Use the Rails console to see how data comes from the database.

Dumping the structure of one table in the Rails console

May 4, 2020

Use Rails built-in methods to check the database schema.

Ruby

Undefined local variables and conditions in Ruby

July 3, 2020

Quirky behavior with (un)initialized variables explained.

Using empty if statements for clarity

July 3, 2020

Empty if statements can something be useful.

Don't use early returns to handle simple cases

February 27, 2020

Early returns are not always the best solution.

Testing

Don't test your code by running the exact same code

January 9, 2020

Make your tests more robust by testing outputs instead of code.

Random

Enterprise Software

October 11, 2019

Paagman.dev Email Twitter GitHub LinkedIn

Copyright © 2020 Dennis Paagman — Theme by Masilotti.com.