RSSAmplifier

Blog

Philippe Creux

I am a Software Developer. I deeply care about crafting healthy software.

pcreux.comRSS feed ↗12 posts

Latest posts

Rails Dashboards that scale – with SQL and dry-struct

While we can piece together Reports and Dashboards using ActiveRecord, it can be more efficient to use SQL to transform data and dry-struct to turn query results into Ruby objects with strong typing. Why Not ActiveRecord? ActiveRecord is a great ORM for typical CRUD operations. While it offers a handful of methods to aggregate data such as .group , .sum , and .joins , they are not sufficient for…

Building a Robust Data Synchronization Framework with Rails

At Zipline , we offer a one-stop shop application for retail employees that handles everything from clocking to task management and team communication. To achieve this, we need to integrate with numerous third-party applications with unique requirements. We decided to develop a satellite service called ZipIO for data synchronization. In this post, I’ll review our journey of building this robust…

Organize your Rails codebase with aaa engines

Once a Rails app has 50+ models and controllers, it’s time to organize the code by feature using Rails engines. We give each feature a directory containing the app code, tests, migrations, and routes specific to it. It looks like a mini-rails app that only contains the code related to that feature. Working with these mini-rails apps is a breeze! You can fully expand the app/* directories, and they…

Handling webhooks in Ruby on Rails

I had to handle webhooks on most web applications that I worked on: email events (deliveries, bounces, etc), payment/subscription notifications, inbound emails, etc. They can all contain large payloads and multiple events, and they expect the app to return promptly a successful response otherwise they eventually retry. I recommend to: Make the controller as simple as possible and process webhooks…

Snapshot testing with dbt

I really enjoy building data warehouses using dbt . dbt is a simple framework to define data transformation using plain SQL. We use it to transform data from our operational databases into tables for our datawarehouse. Our dbt project can target both Postgres and BigQuery. This enables us to build the datawarehouse locally on Postgres. While we can quickly verify that the SQL syntax is valid,…

Event Sourcing made Simple

Five Practices for Robust Ruby on Rails applications

Be nice to others and your future-self: use Data Objects

Weather forecast retrospective meeting

Elegant tests with Truth Tables

Healthy Codebase and Preparatory Refactoring

Gourmet Service objects