Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Logically Negating an ActiveRecord scope

If you simply want to know how to negate an ActiveRecord scope, and you don’t care how it works, here’s the TL;DR:

scope(:not), ->(scope) { where(scope.where_values.reduce(:and).not) }

Arel is the powerful library that powers the Rails ActiveRecord library. It’s also black magic (and largely undocumented black magic at that).

Read more »

LABS
Geek glossary: spy

So spies are pretty easy. They’re test doubles, used like mocks, but instead of setting up expectations before an event, you check the state of the spy after the event, since it records every known message sent to it.

Spy frameworks haven’t taken off in Ruby as much as in other languages, such as JavaScript.

Read more »

LABS
Ruby/rails performance tools

You have a rails webapp, you’re doing TDD, you are always implementing the simplest thing that could possibly work. Well guess what, the simplest is not always the most performant. If you are always doing simplest thing you’ll not likely to face performance issues early in the product especially if it’s a new product and you won’t have lots of users nor data.

Read more »

LABS
Geek glossary: mock

This is my second post on the trinity of test tools known as ‘test doubles’. The first covered stubs. This one is all about mocks, which are woefully misunderstood and loathed by many.

If you want to know more about the history of mock objects, get a copy of GOOS.

Read more »

LABS
Learning Processes

Every person have their own way of learning, for each one of us there is a method that works better. We have to try and understand the differences and that another person may be slower/faster to learn using a particular method.

Read more »

LABS
Oh, the programs you'll DRY!

Someone just told you your code isn’t DRY, and you have no idea what they’re talking about. You’re fresh out of college, and you’re starting to fear that your Computer Science degree left you woefully unprepared for the challenge of real-world software engineering.

Read more »

LABS
Geek glossary: stub

Over the next few blog posts I intend to bang a few more nails in the coffin of the widespread misunderstanding of stubs, mocks and spies. Many before me have had a crack at this (see Ben Moss’s post for discussion and links), and many of those blog posts and books helped me to understand what exactly these code design tools are for.

Read more »

LABS
SASS from a developer eyes

I enjoy writing CSS more than the average developer, and I like when I have tools that can help me write better code, be it CSS or regular programming. SASS is my favorite CSS pre-processor and I often see it be underused or misused.

Read more »

LABS
Spying on Your Tests with VCR

VCR is a great tool for recording http requests during a test suite so that you can play them back later when the external server is not running or available. However, I’d like to show you how to abuse VCR into giving you the ability to spy on the network interactions during your test suite.

Read more »

LABS
Paradigms, Perceptions, Reactions and Motivations

Most programmers I’ve met, not to say all of us, like what we do and enjoy our achievements everyday. Every good class written, every nice refactoring, every file we delete. Even though we enjoy our work very ver much, day to day life can become boring  and you can become a complacent robot that does not care about their achievements and is not as motivated anymore.

Read more »