Machine Learning Made Simple with Ruby

How is it possible to make automatic classification work properly without resorting to using external prediction services? Starting with Bayesian classification, you can use the ruby gem classifier-reborn to create a Latent Semantic Indexer. Hands on!

Thinking in React

Pete Hunt walks you through the process of creating a React.js application, explaining the process and how to think the React.js way.

Go and Ruby-FFI

How to write a shared library in Go that can be loaded by Ruby-FFI.

Profiling & Optimizing in Go

Transcript of a talk going through the tools and strategies for profiling and optimizing Go.

Best practices for a new Go developer

Read what Gophers from across the world have to say to the question — “What best practices are most important for a new Go developer to learn and understand?”

Microservices Resource Guide

Martin Fowler’s guide to microservices is a collection of recommended articles, presentations, and materials regarding the subject.

Practical Persistence in Go: Organising Database Access

In this post the author takes a look at four different methods for organizing your code and structuring access to your database connection pool.

Getting Started with Rails 5's ActionCable and Websockets

An introduction to Rails 5’s new feature, ActionCable.

A Neural Network in 11 lines of Python

A bare bones neural network implementation to describe the inner workings of backpropagation.

Stack Overflow: Replacing a 32-bit Loop Count Variable with 64-bit Introduces Crazy Performance Deviations

Very interesting low level discussion about optimization and how empirical optimization can also be misleading.

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:

User.for_auto_suggest.limit(3)

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

User.for_auto_suggest.limit(3).map(&:city)

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 ] }

...you 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 Brunch.io 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

Infer

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