Skip to Content

Our racing thoughts

Rails basic API authentication with Sorcery and JWT

APIs have become more and more popular due to increasing demand for development of mobile and single page apps, and so the need of sessionless server-side applications, being those that are token-based the most popular ones now days due to their relative easy implementation. Here you have a great example that uses JWT to secure a microservice-based application.

JWT (or jot) stands for JSON Web Token and as it states it is a web token structured in a JSON format. JWTs are composed of 3 parts: the header, the payload, and the signature. In short, the header contains the type of token and the algorithm for the cryptographic signing; the payload (or claim) contains the information wanted...

Dev jobs: A microservices architecture journey

Recently at Tangosource I was assigned to work on an internal project named Dev Jobs (see dev jobs on iOS and dev jobs on Android), where I had the chance to work next to great teammates and implement a microservice architecture with Ruby on Rails, nodeJS, JWT, Ionic, Docker, and several testing tools, including RSpec, Mocha, Frisby, and Protractor. In this first post, I’ll explain the basics of the microservice architecture.

What is a Microservice Architecture ?

Martin Fowler gives a great definition.

“The microservice architectural style is an approach to developing a single application as a...

Developer levels: the right skill set for the job.

Back when software was developed in Fortran and C, you needed a lot of knowledge to write anything of significance.  Originally, Fortran lacked even the concept of a data structure .  In the 1990s, an array was a contiguous chunk of memory containing a fixed number of structs or of pointers. Alternatively, one could create a struct where one field was a pointer to the next struct in the array, a true linked list.  You had to write all the code that manipulated anything.  You had to decide if an array or a linked list was best for each situation.  You had to decide if you were gonna use Quick Sort or needed a Heap Sort or if a Bubble...

Benefits of WordPress + Docker in a production environment + troubleshooting guide.

Hello,

Even though we are a Rails development team, we use WordPress for our blog. We love Rails, but WordPress provides a robust solution for our blogging needs. And lately, we have been experimenting with Docker + WordPress.

So, why Docker?

There are quite a few straightforward reasons why we use Docker with WordPress, namely:

  • Docker reduces clutter.
  • We can run a couple of Rails applications and WordPress instances on the same server.
  • It helps with version conflict management in Rails apps
  • It allows for the duplication of a production server into staging for testing purposes.

 

We can “dockerize” an application, run it in our laptops, run tests and then deploy with confidence that it will work. If you are new to Docker, you should read What is Docker and Dockerizing...

Long live your app: MongoDB Replication

The scenario

Not so long ago a customer requested that we provide the highest server reliability that we could. The application was pretty big, with about seven servers per environment. We needed to increase reliability in web servers and databases. In this article, I’ll explain how we achieved that from the database side.

While searching for options, we found that MongoDB (which was the database engine we were using) offered several options that increase your database reliability, i.e.:
MongoDB – Sharding
MongoDB – Replication

We went for MongoDB Replication –also known as Replica Set– because our customer needed a solution ASAP, and the configuration needed is minimal. Besides, it offers whole database replication, which we needed to implement other security measures, like backups.

Enough context for...

Angular.JS controller communication

AngularJS is a Javascript framework made by Google. Over the last few years, its popularity has increased exponentially. Its main features are double data binding, DOM control, form validation and the use of reusable components. Plus, it’s fairly easy to use, which makes AngularJS one of the top choices when looking for a Javascript framework.

When we start working with Angular, we come to this question very quickly: how can we set our controllers to communicate with each other? Which option is the best?

It is typically assumed that in Angular.js there should be only one controller per view. Sometimes, however, we have no choice but to have two controllers within the same page, and they will need to interact with each other.

Given...

Introducing Planning Poker: manage sprint planning and retros like a pro.

Intro

Are you happy with the app you use to do feature estimation in your Scrum process? We weren’t either. How about the way you collect feedback after a sprint is done? We’ve got you covered.

Introducing Planning Poker: the tool to manage Scrum pointing sessions AND retrospectives in the same place, under an Open Source license, for free! How sweet is that? In this post, we’ll tell you why we built this app, and what were we looking for (spoiler alert: you will see those expectations fulfilled in our app). Then, we’ll show you how it actually works, on a step-by-step tutorial to master the main features. Finally, we’ll refer to the technical stack and the reasons behind choosing those specific technologies....

A Tmux crash course: tips and tweaks.

~ Intro

If you are one of those devs who uses the terminal a lot and ends up with way too many tabs open, or practices pair programming, then this post is for you. During the last months, I’ve started using Tmux a lot. Since I’ve found it to be very useful, I thought I would write a post where I share a few recommendations and pro-tips. I’ll show you what Tmux is and how to use it in combination with Vim to make a more effective and elegant use of the Terminal.

So, this is what we’ll cover:

  1. Tmux basics.
  2. The best of Tmux
    1. Windows
    2. Panes
    3. Sessions
    4. Fast text navigation and copying
    5. And a very neat pair programming feature
  3. Tweaks to improve Vim integration.
    1. Colorscheme background
    2. Static cursor shape
    3. Indentation at pasting
  4. A...

HTML5 Canvas: playing with shapes and images.

The World Wide Web Consortium (WWC) introduced Canvas with HTML5 last year. We think it’s a pretty interesting drawing tool. So, we decided to experiment with it and share our findings in the form of a short tutorial in this blog post. We’ll cover the basics and mention a couple of recommendations for deeper learning.

To start understanding Canvas, think of it as an area on your page where you can draw and render graphs. It’s user together with Javascript, taking advantage of its properties and methods. Its purpose is to be a container for graphics, as it has no drawing abilities on its own. It may seem like a simple element, however, it can be used for complex tasks, like creating 2D animations. You can see examples...

Don’t let working remotely ruins your performance

Certainly, the concept of ‘remote work’ sounds very tempting…

(Photo credit: Jan Kaláb)

… but don’t let that fool you! Working remotely is a double-edged sword.

I have found three main areas you need to take care of if you want to stay productive while working remotely: discipline, communication, and time zones. Keep reading to see why I am saying this, plus some tips that will prevent you from performing poorly. And who knows, perhaps you’ll end up having a better performance working remotely than if working onsite.

Discipline

I remember the first time I worked remotely, it felt awesome! I could start or pause work at any time I wanted. And that feeling of freedom, of being able to go to the kitchen and grab...