Toptal Engineering Blog

The Toptal Engineering Blog is a hub for in-depth development tutorials and new technology announcements created by professional freelance software engineers in the Toptal network.
Subscribe for daily updates today and check out the wealth of technical resources and videos published by the Toptal network.
Fixing the “Heartbleed” OpenSSL Bug: A Tutorial for Sys Admins

A potentially critical problem, nicknamed “Heartbleed”, has surfaced in the widely-used OpenSSL cryptographic library. The vulnerability is particularly dangerous in that potentially critical data can be leaked and the attack leaves no trace.

As a user, chances are that sites you frequent regularly are affected and your data may have been compromised. As a developer or sys admin, sites or servers you’re responsible for are likely to have been affected.

Here are the key facts you need to know about this dangerous bug and how to mitigate your vulnerability.

Continue reading →
iOS User Interfaces: Storyboards vs. NIBs vs. Custom Code

I often hear iOS developers ask some variant of the same key question: “What’s the best way to develop a UI in iOS: through Storyboards, NIBs, or code?”

Answers to this question, explicitly or implicitly, tend to assume that there’s a mutually exclusive choice to be made, one that is often addressed upfront, before development.

I’m of the opinion that there’s no single choice to be made. Rather, each option has its strengths and weaknesses—and there’s no need to use any one of them in isolation.

Continue reading →
Go Programming Language: An Introductory Tutorial

Go is a relatively new language with a number of attractive features. It’s great for writing concurrent programs, thanks to an excellent set of low-level features for handling concurrency. In many cases, though, a handful of reusable abstractions over those low-level mechanisms makes life much easier. This introductory tutorial walks you through building one such abstraction: a wrapper that can turn any data structure into a transactional service in Go.

Continue reading →
Hosting a Tech Conference for a Software Developer Network: The CordobaJS Event

Beyond its beauty, in recent years Córdoba has been enjoying a rapidly growing reputation as a technology center, one that may soon rival Buenos Aires as Argentina’s main technology hub. Last month, Toptal coordinated and hosted a highly successful and well-attended JavaScript Technical Conference in Córdoba, Argentina. Read about how the event came together and the vibrant network of software developers in and around Córdoba.

Continue reading →
Django, Flask, and Redis Tutorial: Web Application Session Management Between Python Frameworks

I love and use Django in lots of my personal and client projects, mostly for those involving relational databases and more classical web applications. However, by design, Django is very tightly coupled with its ORM, Template Engine System, and Settings object. Plus, it’s not a new project: it carries a lot of baggage from the past to remain backwards compatible.

In a few of my client projects, we’ve chosen to give up on Django and use a micro framework like Flask, typically when the client wants to do some interesting stuff with the framework. At the same time, we often need user registration, login, and more, all of which is easily handled with Django.

The question emerged: is Django an all-or-nothing deal? Should we drop it completely from the project, or is there a way to combine some it with the flexibility of other frameworks?

Continue reading →
Concurrency and Fault Tolerance Made Easy: An Akka Tutorial with Examples

Writing concurrent programs is hard. Having to deal with threads, locks, race conditions, and so on is highly error-prone and can lead to code that is difficult to read, test, and maintain. This post provides an introductory guide to the Scala-based Akka framework, showing (with code samples) how Akka facilitates and simplifies the implementation of robust, concurrent, fault-tolerant applications.

Continue reading →
Python Class Attributes: An Overly Thorough Guide

In a recent phone screen, I decided to use a class attribute in my implementation of a certain Python API. My interviewer challenged me, questioning whether my code was syntactically valid, when it was executed, etc. In fact, I wasn’t sure of the answers myself. So I did some digging.

Python class attributes. No one really knows when (or how) to use ‘em. In this guide, I walk through common pitfalls and conclude with a list of valid use-cases that could save you time, energy, and lines of code.

Continue reading →
Elasticsearch for Ruby on Rails: A Tutorial to the Chewy Gem

Elasticsearch provides a powerful, scalable tool for indexing and querying massive amounts of structured data, built on top of the Apache Lucene library.

Building on the foundation of Elasticsearch and the Elasticsearch-Ruby client, we’ve developed and released our own improvement (and simplification) of the Elasticsearch application search architecture that also provides tighter integration with Rails. We’ve packaged it as a Ruby gem named Chewy.

This post discusses how we accomplished this, including the technical obstacles that emerged during implementation.

Continue reading →
Your Boss Won't Appreciate TDD: Try This Behavior-Driven Development Example

Testing. It always seems to get left to the last minute, then cut because you’re out of time, budget, or whatever else. Management wonders why developers can’t just “get it right the first time”, and developers (especially on large systems) can be taken off-guard when different stakeholders describe different parts of the system.

With behavior-driven development, you can turn testing into a shared process that focuses on the behaviors of the system, why they matter, and who cares.

Continue reading →
Automated Android Crash Reports with ACRA and Cloudant

Making a basic Android app is easy. But making it reliable, scalable, and robust, on the other hand, can be quite challenging. With thousands of available devices pumped out from tons of different manufacturers, assuming that a single piece of code will work reliably across phones is naive at best. Segmentation is the greatest tradeoff for having an open platform, and we pay the price in the currency of code maintenance, which continues long after the app passes the production stage.

In this post, we’ll walk through a solution: automated crash reporting with ACRA and a Cloudant back-end, all visualizable with acralyzer.

Continue reading →
In Search of the Elite Few – Finding and Hiring the Best Software Developers in the Industry

Effective interviewing and hiring is as much of an art as it is a science. Nonetheless, approaches and methodologies do exist for evaluating the more subtle dimensions of a software developer’s skills and abilities. When used collectively, these techniques yield a highly effective screening process with a proven track record of success. That process is what this post is all about.

Continue reading →
A Guide to Building Your First Ember.js App

As modern web applications do more and more on the client-side (the fact itself that we now refer to them as “web applications” as opposed to “web sites” is quite telling), there has been rising interest in client-side frameworks. There are a lot of players in this field but for applications with lots of functionality and many moving parts, two of them stand out in particular: Angular.js and Ember.js.

Angular.js has already been introduced on this blog, so we’re going to focus on Ember.js in this post, in which we’ll build a simple Ember application to catalog your music collection. You’ll be introduced to the framework’s main building blocks and get a glimpse into its design principles.

Continue reading →
Computational Geometry in Python: From Theory to Application

When people think computational geometry, in my experience, they typically think one of two things:

  1. Wow, that sounds complicated.
  2. Oh yeah, convex hull.

In this post, I’d like to shed some light on computational geometry, starting with a brief overview of the subject before moving into some practical advice based on my own experiences in computational geometric programming with Python.

Continue reading →
A Year Building a WebRTC Application: Lessons in Startup Engineering

I’ve been an Engineer at Toptal for just about one year now, working on the same project since I joined the network: Ondello, a service that connects doctors and patients over WebRTC.

When I first joined Ondello, I was hired as a Senior Ruby on Rails Developer, tasked to build a service up from scratch. These days, we’re a team of multiple developers working on a fairly large, complex system.

With this post, I’d like to share the story behind Ondello. Specifically, I’d like to talk about: how a simple application became not-so-simple, and how our use of cutting-edge technologies posed problems I’d never considered before.

Continue reading →
An Introduction to Mocking in Python

More often than not, the software we write directly interacts with what we would label as “dirty” services. In layman’s terms: services that are crucial to our application, but whose interactions have intended but undesired side-effects—that is, undesired in the context of an autonomous test run.

For example: perhaps we’re writing a social app and want to test out our new ‘Post to Facebook feature’, but don’t want to actually post to Facebook every time we run our test suite.

The Python unittest library includes a subpackage named unittest.mock—or if you declare it as a dependency, simply mock—which provides extremely powerful and useful means by which to mock and stub out these undesired side-effects.

Continue reading →
Subscribe
The #1 Blog for Engineers
Get the latest content first.
No spam. Just great engineering posts.
The #1 Blog for Engineers
Get the latest content first.
Thank you for subscribing!
You can edit your subscription preferences here.