Inceptionism: Going Deeper into Neural Networks

Very cool technique to peek inside a complex neural network built to interpret images.

Regexes: The Bad, the Better, and the Best

A story about how just a few characters can make such a big difference in performance

First Aid Git

FAQ and solutions for the most common git issues.

Cleaning Up Git Branches

The article shows how to clean up unused branches from your git repository.

What is Branch Prediction?

Interesting discussion and answer about branch prediction, which is a interesting subject on it’s own.

Checking for N+1 queries isn't necessarily intuitive. Here's one simple way to verify you have eliminated these pesky queries.

This article isn't meant to review all the nuances of includes, joins, or N+1s but to highlight a technique to check a given query.

Take the following scope:

scope :for_auto_suggest, -> {
  includes(:user_verification, :profile_photo_files, { account: [:roles, :career_preference] }, { user_professional_detail: [:specialty] }, { user_practice_contact: [:country] })

Because ActiveRecord lazily evaluates queries, running the following on console doesn't necessarily highlight the N+1 problem:


However, you can force it to show you the N+1 by requesting the joined attribute you're after:


At this point you'll see something that looks suspicious:

City Load (0.4ms)  SELECT  `cities`.* FROM `cities`  WHERE `cities`.`id` = 127817 LIMIT 1
  app/models/user.rb:449:in `city_name'
  bin/rails:8:in `<top (required)>'
City Load (0.3ms)  SELECT  `cities`.* FROM `cities`  WHERE `cities`.`id` = 102319 LIMIT 1
  app/models/user.rb:449:in `city_name'
  bin/rails:8:in `<top (required)>'
City Load (0.2ms)  SELECT  `cities`.* FROM `cities`  WHERE `cities`.`id` = 127561 LIMIT 1
  app/models/user.rb:449:in `city_name'
  bin/rails:8:in `<top (required)>'

By modifying your scope to include the associated model :city in the correct nested association...:

{ user_practice_contact: [:country, :city ] } can re-run the same scope and the log will look more like this:

City Load (0.3ms)  SELECT `cities`.* FROM `cities`  WHERE `cities`.`id` IN (127817, 102319, 127561)
  bin/rails:8:in `<top (required)>'

This is exactly what you want to see.

When should you use DateTime and when should you use Time?

Interesting write-up and explanation about the difference of DateTime and Time objects.

Inside NGINX: How We Designed for Performance & Scale

NGINX leads the pack in web performance, and it’s all due to the software's design. Whereas many web servers and application servers use a simple threaded or process-based architecture, NGINX stands out with a sophisticated event-driven architecture that enables it to scale to hundreds of thousands of concurrent connections on modern hardware.

Practical Cryptography With Go

This book explaining cryptography in Go is a good resource for both learning about cryptography and Go.

The Guide

This is an attempt at a comprehensive guide to Brunch, an excellent builder for browser apps that gives Grunt, Gulp, Broccoli, et al. a run for their money.

How to Undo (Almost) Anything with Git

Tips & tricks explaining how to properly undo commits on Git.

Libraries & Tools


A tool to detect bugs in Android and iOS apps before they ship.

Critical Vulnerabilities in JSON Web Token Libraries

This post describes a vulnerability with JSON Web Tokens (JWT). It's an interesting read and has good to know vulnerability.

Testing Strategies in a Microservice Architecture

A series of slides about Microservice testing strategies.

WebSockets From Scratch

How to implement a WebSocket server from scratch in Ruby. It’s a good way to learn the protocol.

How to learn C: An introduction for the high-level programmer

Learning C (and lower-level languages) can help develop an understanding of what happens behind the scene.

Architecting Websites For The HTTP/2 Era

The arrival of HTTP/2 will require a bit of re-thinking how we handle websites (and webservers). This makes it a good time to reflect on what those changes can bring.

It’s a trap! Systems traps in software development

In her seminal work on systems thinking, Systems Thinking — A Primer, Dana Meadows describes a number of systems structures that tend to result in “problematic behaviour.” She calls such archetypes ‘traps’, as a failure to recognize them as such can result in unexpected problems. Such traps are extremely common in all areas of life, and are no less prevalent in software development.

The Unreasonable Effectiveness of Recurrent Neural Networks

This is a very interesting article about Recurrent Neural Networks, how it works, and its applications.

Wizard and Warriors series

An interesting series of articles touching on Object Orientation, Domain-Driven-Design, and how not reflecting about the Domain can cause problems quickly down the road. I recommend reading them in order.

What the Pack?

Quick article explaining the Array#pack and String#unpack methods used for serializing (packing) data into byte streams and back.