The Curious Case of the Flip-Flop

Ruby’s flip-flop operator is obscure and rarely useful, often adding confusion rather than clarity. Recognizing it helps when reading unfamiliar code.

Using rbenv on Ubuntu 18.04+

Set up rbenv on Ubuntu 18.04+ with custom plugins and build dependencies to manage multiple Ruby versions reliably.

Perform Sidekiq jobs immediately in development

Run Sidekiq jobs synchronously in development to avoid a separate worker process and benefit from code reloading.

RSpec example groups can be named using symbols

RSpec example groups and shared examples can use symbols as names, even though the official docs do not mention it.

Using the Facebook Graph API

Server-to-server access to the Facebook Graph API can use an app token instead of OAuth; some resources still require a user-authenticated request.

Upgrade to LibreOffice 5.x on Ubuntu

Upgrade Ubuntu to LibreOffice 5.x by removing old packages and obsolete PPAs, then installing the newer release and optional language or GTK support.

Git: Diff per word or character

git diff normally compares whole lines; --color-words and --color-words=. provide word or character level change highlighting for finer review.

Ubuntu: Fix "An error occurred while installing pg"

pg gem installation on Ubuntu can fail when PostgreSQL development headers are missing; installing libpq-dev restores Bundler installs.

Paperdragon: Explicit Image Processing

File attachment handling for images without automatic framework integration, useful when explicit processing and storage control are preferred.

Openstack: Create a Flavor

Create and list OpenStack Nova flavors by defining RAM, disk, swap, and vCPU resources for instances.

Why Most Freelancers Set Their Clients Up For Failure (And How To Fix This)

Freelancers can damage client outcomes when short-term task delivery overrides business goals and continuity. Aligning work with the client’s larger needs reduces preventable failure.

Rails routes: Extracting collection actions into their own controllers

Rails routing can make singleton collection pages awkward to place under a namespace without adding :project_id; custom controller paths or namespace/resource combinations keep URLs and controllers aligned.

Rspec: Complex argument expectations for should_receive

Tight should_receive(...).with(...) expectations on hashes are brittle and produce unreadable failures. Block-based argument checks keep RSpec assertions clearer and more flexible.

What we know about PDFKit

PDF generation from Rails uses a WebKit-based wrapper around wkhtmltopdf, with print styling, headers, footers, and binary-version pitfalls.

Complexity in Software 3: The Constructal Law

Software complexity affects maintainability and design quality; the constructal law offers a way to think about how systems evolve toward better flow and structure.

JavaScript: Moving elements inside an array, modifying the array in place

Reordering an array element in place is awkward in JavaScript; splice-based helpers move items by offset and ignore out-of-bounds shifts.

Testing drag&drop with Selenium

Selenium webdriver cannot trigger native drag events, making drag-and-drop interfaces hard to test. jQuery-based simulation libraries can emulate sortable interactions in test code.

Linux: Get your public IP address from the shell

Quickly prints the machine’s public IP address from the shell using a simple external lookup command.

Transactional HTML Email Templates

HTML email styling is fragile across clients and devices, making transactional messages hard to build and test. Open-source templates reduce the work needed for common transactional emails.

Rails 3: Mass assignment protection and .create_with

create_with and where can bypass Rails 3 mass-assignment protection, allowing protected attributes to be set from untrusted input.

jQuery: Work with text nodes and comment nodes

contents() returns all child nodes, including text and comment nodes, and filter() can isolate non-element nodes by nodeType.

Vastly increase the usability of Thunderbird's search

Thunderbird search can be awkward when results open in faceted view and relevance sorting hides recent mail. Add-ons can switch results to list view and sort by date.

Interacting with a Microsoft Exchange server from Ruby

Connect Ruby to Exchange Web Services for mail, calendar, and meeting data when Outlook-only tasks need automation.

Rest-ORM for Angular: Restmod

Creates Angular objects for working with RESTful APIs and streamlines client-side data access through an ORM-style layer.