COMPLEX WEB APPS MADE SIMPLE

written by PrimeHammer

Tag: Ruby

Search by radius in Redis

Published by Ondrej
2 min read

Since version 3.2.0 Redis that was released on May 6, 2016, the database introduces geospatial commands. Simply said it means that you can ask database like this: I would like to get list of nearest airports in selected location. Let’s extend this use case with pagination and implement it with Ruby.

Test Pyramid

Published by Jiří Werner
5 min read

Why do testing at all? It goes without saying that modern web development cannot be done without some form of automated testing. Working on a code base without a solid test suite is just creating problems in the long run and inviting a lot of future pains when your new feature breaks the app, and […]

Open-Closed Principle in Ruby

Published by Tom Kadwill
3 min read

Open-closed is one of the SOLID principles, an acronym originally coined by Uncle Bob. In this post I will cover what open-closed is, why it is important and how it applies to Ruby.

Introducing a new GoPay gem for handling payments

Published by Ondrej Zadnik
3 min read

Hi everyone, I’m Ondrej and I’m a co-author of GoPay Ruby gem. In this blog post, I’ll tell you how we make our lives easier when handling payments via GoPay REST API.

Single Responsibility Principle

Published by Erich Kaderka
5 min read

In computer programming, SOLID (Single responsibility, Open-closed, Liskov substitution, Interface segregation and Dependency inversion) is a mnemonic acronym introduced by Michael Feathers for the “first five principles” named by Robert C. Martin in the early 2000s that stands for five basic principles of object-oriented programming and design. The principles, when applied together, intend to make […]

Playing with “joins” in ActiveRecord

Published by Ivan
4 min read

On many occasions we need to load multiple records with associations from a database. The easiest way is to access this is via iteration (.each) written in Ruby. This is not the best approach as it can result in issuing 1+n queries (complexity O(n)) instead of single query (O(1)). Using iteration isn’t optimal because as the […]

Introduction to TDD

Published by David
5 min read

Here at PrimerHammer, we use TDD (Test-Driven Development) as our primary and most trusted method of building code that is sustainable, well designed and easy to read. TDD is what allows us to safely refactor our code without the fear of changing its behavior or “breaking things”. If you are not sure what TDD is […]