My Year in: Tech

I started out 2020 taking my first relatively prolonged vacations of the last 15 years or so: 3 weeks. Coming out of the first year of my twin children, the break was welcome.

To recap, I was working at Toptal’s core and had just finished recruiting a new team, having hired 3 new front-end engineers. I put myself in contention for a promotion to Engineering Manager. At Toptal this was a rarefied position. The company was about 600 or 700 people and only 4 EMs existed. They were opening 4 new spots. I was looking for a step forward, not necessarily associated with a title.

Almost parallel to that, a former colleague tweeted that his company, Circuit, was looking for people. I really love this guy, Filipe Alvarenga, so any company he’s working for must have virtues. I met Jack Underwood, one of Circuit’s founders and its CEO. I felt good about him and the company. It helped that Jack publishes monthly letters to the public about how the company is doing, and they seemed very candid.

Circuit provides technological infrastructure for last-mile deliveries. Think managing your daily routes if you are an individual driver, and also doing that in a team of dozens of drivers.

I was hired at the Team Lead level, same as I had been at Toptal. The idea was to expand the front-end headcount at Circuit and create a React team. When I joined, in the second half of March, the world had just been turned upside down by Covid. All plans at the company changed very quickly: despite the immense negatives of the pandemic, Circuit was in a position to help things and grow significantly, as deliveries exploded everywhere.

I operated as an engineer for the rest of the year. In my first 2 or 3 weeks I wrote an application where recipients of deliveries could track their shipments. It was relatively simple, and got shipped quite smoothly. That was the first application written in React at Circuit.

The company’s focus had shifted to really serving teams of drivers. It’s a natural progression from individual drivers, to teams, and eventually to enterprise.

Our back-end uses Firestore, a serverless product from Google, and there was work to do there after completing the recipient application. I shipped or helped ship several of these cloud functions, both for external and internal use. What was missing in our backend were tests. A colleague had just started writing unit tests in the repo. I spent weeks of off-time trying to learn how to properly test back-end functions in Firestore. The documentation is not helpful and I could not find good materials. So I pieced out the knowledge, tried things, and eventually got one version to work, then we all improved on it. I think this was our main achievement of the year, technically. Soon the tests spread out in the app, all colleagues were writing tests, and I believe we got a much more productive rest of the year with the benefits of serious test coverage.

After some work converting our internal admin panel to React, we took on the rewrite of, also in React. SpeedyRoute is an acquisition made by Circuit some time ago, originally written in CoffeeScript. We completely rewrote it in React, and now the UI looks a bit more contemporary too. Around then the decision was made to convert all our web applications to React, and to start the new ones in React as well, phasing out Ember.js.

At this point, we were in the last quarter of 2020 and we were ready to go back to the original plan for my joining Circuit. Jack invited me to lead the recruiting of 4 front-end engineers. It was great to be back doing interpersonal-focused work. The internal recommendations of engineers were very strong and this helped the process move quite quickly. We now have 3 hires and may close out the 4th soon.

The newcomers will start in the first few weeks of January, and we will spawn a team to rewrite our most important web client, Circuit for Teams.

The year was challenging, of course, but at work it did not feel proportional to a global pandemic. The culture at Circuit is driven but very balanced, the founders are sensible, very intelligent, and rational. They are always present, designing and coding along, so it feels they get a much more realistic sense of how things are progressing than if they were only doing management. And because they are working with everyone, it is just natural that we can talk frequently and issues get resolved quickly.

The company more than tripled its annual recurring revenue from US$3M to just over US$10M this year. There were next to no major bugs or incidents, and a lot got done during the year. Interactions with everyone were unfailingly pleasant and constructive.

I was the 8th person in the company when I joined, we are now 12 and, with the new team, will be at least 16 in the first quarter of 2021. It will be fun to help grow the company, help keep the good things that can be kept of the current structure, and also help add good things for it to scale nicely. We have reasons to be optimistic that Circuit will accomplish this.

My Year in: Books

My reading year was as strange as this year was.

In 2020 I finished 38 books. For the first time the majority of the books I consumed was in audio form: 22 audiobooks. None of them was in languages I have been studying, like Italian, German or Russian.

The most meaningful books of the year for me were books I have not finished yet. I have been reading Goethe’s Italian Journey in German since 2017, at a snail’s pace. That’s because all the German I know I am learning in this very book. For a few months, in the first half so far of the pandemic, I read a good few dozen pages of the book. Goethe’s still in Venice in my reading, which means that at this rate it’s a coin toss whether I will finish the book or die first. But it’s been a wonderful read, and coming into contact with a new language is magical, we see hidden structures of humanness reveal themselves in very touching ways.

In early March I went to Portugal once again after some 15 years. The country felt a lot happier now. I bought a copy of Os Lusíadas by Luís de Camões with the original text from 1572. Os Lusíadas is probably the most famous book in the Portuguese language of all time, and its title plays off the Iliad. As the pandemic shut the world down just about a week after this trip to Portugal, I slowly read about a third of Os Lusíadas. The book is as dense with references as can be, each verse carries one or more allusions to mythology and Portuguese history. There are books that help navigate Os Lusíadas, and I followed one of those. It helped a lot. This effort felt worthwhile — it’s so beautiful to witness our native language at a different state, and at the highest level. I feel no big hurry to finish this book.

Another important book I read some of, at no hurry, and haven’t yet finished, is Lacan’s Seminar number 3: The Psychoses. I have no special interest in psychoses, I just tried to follow the numbering of the books as I’ve already read the first two. It is a challenging read for me in the original manuscript, in French. But when it hits you it hits you hard.

There came a point in the pandemic when all these serious reads felt like too much. It became clear I needed to exercise more after several months stuck inside. I took to my bycicle and, when riding in the mountains, listening to audiobooks took over completely. Almost all of these were forgettable, entertainment material, many were about cycling feats which yielded only-passable literature.

Of the books I finished in 2020, I mention Psychoanalytic Listening — Methods, Limits and Innovations by Salman Akhtar as the most memorable. The topic of high-level listening interests me a lot these days. Salman Akhtar does a great job of breaking down and explaining the most fundamental act of a psychoanalyst. I feel this book is applicable outside psychoanalysis and, if you undergo phychoanalysis, even more so.

These were the books I read this year. Please friend me on Goodreads if you’d like.

TDD with Firestore functions emulator

Having spent time running tests inside and outside Firestore’s emulator, I learned that using the emulator is more than 50% faster.

Here is the latest flow we are using at Circuit. If you know of a simpler way, please let me know at gus [at] getcircuit [dot] com.

Basic version

firebase emulators:exec --only firestore 'jest'

You can replace jest with the runner of your choice.

Abstract the emulator call

Install scripty:

yarn add scripty

Add an entry to package.json:

  "scripts": {
    "test": "scripty"

Create a directory called scripts in the root of your project.

Create a file with path and name scripts/test:

#!/usr/bin/env sh

firebase emulators:exec --only firestore "yarn jest $str"

Allow computer to run this file:

chmod 644 scripts/test

Now you can run yarn test and add anything you would add to the command, like yarn test --watch, yarn test /path/to/test.file.

Enable connecting with a browser’s debugger

Add an entry to package.json:

  "scripts": {
    "debug": "scripty"

Create a file with path and name script/debug:

#!/usr/bin/env sh

firebase emulators:exec --only firestore "node --inspect node_modules/.bin/jest --watch --runInBand $str"

Allow computer to run this file:

chmod 644 scripts/debug

Add debugger to any line of your Firestore code.

Run yarn debug — you can also pass a filename to focus on it right away.

Open your browers’s developer tools.

Click on the green cube (Node’s logo):

This will open the debugger and you’re ready to step debug your code.

Simple tips for applying for a new development job

For several years, recruiting has been a part of my job in software. A few times I’ve been on the other side, looking for a job myself.

There are many low-hanging-fruit-type tips that can really make a difference when we look for a job. By making mistakes myself, seeing them made while recruiting, and by talking to colleagues, it’s now possible for me to list a few. Some may seem obvious to you — if you haven’t yet recruited, you’re in for a surprise over how common they are, and how much they affect the chances of someone getting a great job.

Learn about the company first

Before starting your application, spend no less than an hour attentively studying the company. Go to YouTube, try to watch videos involving top leadership. Read articles and learn about the people there.

Apply only to companies you care about

If you are in full application mode, apply to no more than 3 companies per day. Ideally 1 company.

If the company’s purpose doesn’t resonate with you, recognize the fact and move on.

Look at companies’ careers pages

Several companies, often the best ones, don’t advertise open jobs. They have their own careers pages and, relying on their reputations, will wait for applications.

For people who like to work remotely, Remotive’s company list has been helpful to a few people I know:

Don’t wait to apply

Once you’ve learned about a company and feel enthusiastic about it, apply immediately. In the global development market, good companies receive hundreds of applications on the first day or two after they post a job.

Apply to many jobs

While not applying to just any open job, do apply to as many of them as you truly like. Statistically, odds are low that you will be called for one given opportunity.

Start early

If I am suggesting you do not apply to too many positions each day, but to apply to many positions, by consequence I am suggesting you start early in your job search. Maybe practicing going through recruiting processes even before you need or want to do it can be ideal.

No spelling or grammar errors

Make it perfect in the language the company operates in. Pay someone, or a service, if needed. Great companies will quickly screen out applications that have language mistakes. By writing minimally well, expect to go to the top 10% of all applications.

Add a Github link to your CV

This is a huge differential. Prefer Gitlab or Bitbucket? Great, use your favorite. Don’t have public repos? Add repos of things you study, it’s perfectly fine. Make sure you add very good READMEs enabling visitors to run and test your repos.

Nothing like relationships

All the above may not be necessary if you have good relationships with former colleagues. You may be sought out before you need to look for a job. For this to happen, it is not enough to be very proficient at the technical part, people have to like spending time with you.

Git basics while typing less

Very short git commands

As computer programmers evolve in their craft, they increasingly identify repetitive tasks at all levels. One of the most basic levels is typing on the keyboard. Some programmers choose to invest effort and minimize typing. I am one of those people.

Git commands are among the ones I use the most, as listed in decreasing order with the number of times for each:

1241 gc
637 gco
583 v
419 git
373 cd
368 rm
316 mv
302 yarn
299 gb
247 gto
215 ga
213 c
191 gst
136 bundle
124 ©
115 mkdir
114 cp
106 npm
106 gt

If you’d like to see yours, you can run the following on the terminal: history | awk 'BEGIN {FS="[ \t]+|\|"} {print $3}' | sort | uniq -c | sort -nr | head -n 20

Please note that the number 20 at the end is the number of results to retrieve.

Back to my own history, you can see that:

  1. I use a lot of aliases
  2. Most of them are git-related, and that’s why they start with a g; gc is git commit, gco is git checkout and so on.

Recently I have taken this to the extreme, and so far the results have been excellent. Below are the commands I am able to run:

c (git commit or git commit -m, depending on the args passed)

p (git push)

a. (git add .)

b (git checkout -b)

The c function works for the following cases:

  1. c (will open the text editor for a long commit message)
  2. c “Your commit message” (acts as an alias for git commit -m
  3. c Your commit message (the one I love as you just type c plus the message, and it works)

While p and a. are calls with no args, with b you must simply add a branch name.

These are extremely simple improvements to the flow, and together with many others that I created or that I use from libraries, they make the path from brain to computer shorter and more pleasant.

To see how these are implemented, please visit this gist:

The commands in the gist which are not defined in this file come from oh-my-zsh plugins.