Testing

A Game of Thrones: LCG

Determines Best Sets to Buy Based on Meta Analysis  

Analyses the Meta for A Game of Thrones: Living Card Game and returns the best sets to buy. Method Uses data pulled from the following websites: Cards & Set Database: https://thronesdb.com/api/ Meta Statistics: http://thestonedrum.com/#/overview Considerations Considers agenda cards ~3x more important than a normal card. Considers plot cards ~2x more important than a normal card. Considers popular neutrals and non-loyal cards slightly more important (as they can be used in more decks). more»

Why I Believe Rails is Still Relevant in 2019

Why You and Your Team Should Consider Ruby on Rails  

You might have read the infamous blog posts titled “Rails is Dead”, but I have seen development teams flounder over and over again when they try and reinvent the wheel using NodeJS on the backend. Rails is Scalable Despite the negative press, I’ll argue rails does scale. After developers at Twitter have spoken at length about their issues with Rails performance, it’s easy to get the wrong idea. Rails is not the fastest framework in the world… but I will argue that performance is the last thing you should worry about when you want to scale. more»

21 Commandments for Greenfield Development

A Developer's Guide to New Projects  

The “greenfield” project is known by developers as a productivity Nirvana. It is a beautiful place where there is no legacy, no bugs and endless possibilities. It is also littered with mines. I’ve recently seen a number of anti-patterns around the creation and early growth new projects, and thought I’d summarize the anti-patterns I’d seen in the past as a guide for developers to avoid these common pitfalls. 1. Get a Pipeline in Place Early Run your tests automatically. more»

Surgeons Who Won’t Sew

And What It Means for Your Engineering Team  

Then she gets up and leaves. The patient is still on dialysis, still bleeding in places, and their internal organs are still on show for everyone else in the room. The patient’s immediate future is secure, but eventually they are still going to bleed to death. As a DevOps engineer, perhaps one of the best things you can do for an engineering team is to empower them to write and utilize tests. more»

Flexible Config

Ruby configuration management  

FlexibleConfig promotes good OOP design, and the separation of logic and configuration in your Ruby classes.

FlexibleConfig allows you to set class constants cleanly in ruby with the heirarchical structure and clean workflow of YML config, without sacrificing the flexibility and immediacy of ENVironment variables.

more»

Your Production Environment Isn’t Always So Important

The Cost of Moving Slowly  

Until you have found product-market fit, your production environment is often just another test environment. It’s not testing your code, it’s testing your customers. At a previous startup company, we had a few hundred thousand users. Not all that many, but enough to get some interesting data and be in a position to use it to optimize the business. We had previously built a recommendation engine in Elasticsearch which all our users were piped through, and we user it to provide daily recommendations based on our most recent data. more»

API Buddy

Live coding playlist: building a Ruby API testing and documentation tool  

API Buddy is a DSL for defining stubbed RESTful API endpoints, and generating documentation and tests based on the schema. more»

RSpec Describe Method

RSpec shorthand for describing individual methods  

RSpec Describe Method is a ruby gem that provides a shorthand for testing specific methods of classes.

It supports both instance methods and class methods, with or without arguments.

more»

Active Hash

Rails models powered by static files  

ActiveHash is a simple base class that allows you to use a ruby hash as a readonly datasource for an ActiveRecord-like model.

ActiveHash assumes that every hash has an :id key, which is what you would probably store in a database. This allows you to seamlessly upgrade from ActiveHash objects to full ActiveRecord objects without having to change any code in your app, or any foreign keys in your database.

It also allows you to use #has_many and #belongs_to (via belongs_to_active_hash) in your AR objects.

ActiveHash can also be useful to create simple test classes that run without a database - ideal for testing plugins or gems that rely on simple AR behavior, but don’t want to deal with databases or migrations for the spec suite.

more»