Unit testing in Elixir

It’s been a few months now that we’ve been toying with Elixir here at OmbuLabs. Particularly with Phoenix. However, I like to toy a bit with the language without the added complexity of a framework on it, in order to better understand it, how it works and how things are done.

It took me a while, but as I read through “Programming Phoenix”, I had the idea to implement a “simple” calculator program in Elixir. The reasons were quite simple:

  • I wanted to better grasp unit testing with ExUnit, and a calculator has very clear specifications, making it the ideal candidate.
  • I also wanted to put a little twist to things and while math has very clear specs, it can have some very complex operations, so I decided to make my calculator do derivations.

For those of you that aren’t versed in calculus, don’t worry, I’ll give just what you need to know in order to understand what I’m doing, but trust me, you won’t need to really understand calculus to understand the code.

Read more »

Design Patterns in Ruby - Intro

The title says it all, but how does one actually implement object oriented design patterns in Ruby? If you’re like me and always struggled with putting what you read about programming into an actual implementation and the examples in the book or around the internet weren’t enough to quell your doubts, read on.

Read more »

What is TypeScript Anyway?

To the seasoned developer this may seem like a silly question, but to developers who are self-taught, bootcamp trained, or even just have never come across a project in TypeScript - understanding exactly what it is and how to use it can be a bit of a mystery.

In this article we will try to explain the basic concepts behind TypeScript, and the reasons for using it.

Read more »

How to pick an open source project to contribute to

Open source powers many of the tools that we rely on daily for our work. As developers, we have the privilege of being able to read, learn, and build from thousands of codebases at our fingertips. What better way to give back to the community that creates the software that powers our world than to contribute to those very same tools?

Contributing to the open source community can be daunting for a seasoned developer, let alone a novice. One problem I’ve had as an early-career developer has been figuring out how to find a project that aligns with my interests as well as the skills that I want to practice. One great resource I’ve found very helpful with finding answers to my questions is the book [Forge Your Future with Open Source, by VM Brasseur] (https://pragprog.com/titles/vbopens/forge-your-future-with-open-source/).

In this article, I will show you what I’ve learned from VM Brasseur’s book about what to consider when I’m determining what open source projects to work on.

Read more »

Webpack ALL The Assets!!

With the release of Rails 6, Webpack was introduced as the default JavaScript bundler by using the Webpacker gem. We tend to think about Webpack only as a tool to handle JavaScript files, but it can be used to handle all kinds of asset files. This article shows how to create a Rails app that uses only Webpack to handle all the assets, including images, fonts, styles and videos.

Read more »

The I in SOLID

Today we will discuss the I in SOLID which, you may or may not know, represents the Interface Segregation Principle (ISP). This is the fourth article in the SOLID series. We have already discussed the Single Responsibility, Open/Closed and Liskov Substitution principles.

In this post we will discuss the value of and the process for crafting easy to maintain interfaces. If we have enough time we will also discuss how interfaces might apply to dynamically typed languages such as Ruby. With no further ado, let us start by finding out what an interface actually is.

Read more »

What It's Like to Work at OmbuLabs

OmbuLabs is a fully remote company based out of Philadelphia with team members in many countries. Currently we are growing pretty steadily, and we thought it would be a good idea to let prospective employees know what it would be like to work at OmbuLabs.

This article is based on questions we often get during interviews, so we hope it helps if you are thinking about applying to OmbuLabs. You can learn more about the recruitment process here.

Read more »

Sharing knowledge: where to hear from our experts

At OmbuLabs one of our core values is Open by Default, which means that we want to have open communications, contribute to open source projects, give back to our community, and become thought leaders in our industry. We also believe that one great way to give back to the community is sharing our knowledge, especially the things that we discover as developers in our day-to-day.

That’s why we try to keep consistency in this blog and also encourage every team member to speak at conferences, on podcasts and at meetups. I want to share with you things that are working for us as an “open by default” team.

Read more »

The L in SOLID

This post is the third one in the SOLID principles series. The first post discussed the single responsibility principle and in the second post we discussed the open / closed principle. Next, as the title suggests, we will take a look at the principle represented by the letter L from the SOLID acronym. L is for the Liskov Substitution Principle (LSP).

In simple terms LSP requires that supertypes and subtypes be swappable without affecting the correctness of a program.

Read more »

The O in Solid

In a previous post we considered the practical value of the Single Responsibility Principle (SRP). This is the second post in this series where we take a deeper look at each of the SOLID principles.

Robert C. Martin (a.k.a. “uncle Bob”) refers to the O in Solid as the heart of Object Oriented (OO) design. He goes so far as to say that this principle improves reusability and maintainability more than any other OO principle. You most likely already know that the O in SOLID belongs to the Open/Closed Principle (OCP).

We often hear about SRP or DRY (don’t repeat yourself) but seemingly less often about OCP. It turns out that this principle lays the foundation for many of the OO best practices. In this post we will talk about OCP and find out why uncle Bob is such an advocate of OCP.

Read more »

Behind The Scenes: Rails UJS

Rails UJS (Unobtrusive JavaScript) is the JavaScript library that helps Rails do its magic when we use options like remote: true for many of the html helpers.

In this article I’ll try to explain the main concept of how this works to make it transparent for the user. Knowing a bit about the inner workings can help when debugging issues and also if we need to do something more complex than the provided interactions but reusing what’s provided.

If you are using an old version of Rails and you are still using jquery-ujs, some code will not reflect how it does the magic, but most of these concepts apply as well (rails-ujs is a re-implementation of jquery-ujs removing the jquery dependency).

Read more »

Building with Hotwire

Previously, I outlined the new hotness that is Hotwire. New features are nice, but what can you build with it? Let’s build a little project, and let’s make it something different from the usual Twitter clone that’s being used to demonstrate this new feature. Instead, I’ll show how to build a basic scrolling price ticker like you’d see on any stock site that updates in real time. We’ll learn a few interesting things along the way.

Read more »

Measuring the Impact of Software Maintenance

“If you can’t measure it, it doesn’t exist” - Peter Drucker

Tackling technical debt can be a thankless task. You can spend hours tidying up old files but at the end there’s little to prove it was a good use of time. No target was met and no new feature exists to show the bosses.

The lack of metrics means that maintenance tasks gets pushed back behind work with obvious outcomes and the debt keeps building.

To make matters worse, the costs of technical debt are also hidden. Projects will start to overrun and developers will get burnt out, but there’s nothing clearly showing that tech debt is the reason why. It means maintenance starts to feel like a chore with no obvious outcome or benefit.

We have had to come up with ways to show the value of our work when performing maintenance for clients, so we wanted to share them here to serve as inspiration for other developers.

Read more »