OCTOBER 20, 2020

Updates are available

The compact disc—the CD—was co-developed by Philips and Sony back in the 1980s.1 This format was initially developed to store and play music but was then adapted to what we know as the CD-ROM to store data as well, and other formats followed that allowed us to read and write different kinds of data.

In 1995, Microsoft shipped Windows 95 as a CD-ROM and also as a pack of 13 or 26 floppy disks for compatibility with older computers that didn't have a compact disc reader. The entire Windows 95 operating system was only around 22 to 24 megabytes. (More than four times smaller than Instagram for iPhone!)

Priced at dozens or hundreds of dollars, software used to come packed in a huge box. The lucky software, the one that could afford the development costs, would update every couple of years. Windows 95, for instance, released a few updates and patches in 1996 and 1997, while Windows 98 was cooking.

The transaction happened at a physical store where we were buying something tangible: a program packed in a box.

The Office Suite—Microsoft Word, Excel, and PowerPoint—was bought in a box and installed in your machine with a CD. Every time you formatted your computer or bought a new one, you would come back to those CDs and re-install the software. Office 2003. 2009. 2013. These updates demarcated the appearance of file formats and new functionality that wouldn't work in older versions.

Today you buy a phone with a set of preinstalled apps and, right at your fingertips, you have an app store. With a payment method, you can make a transaction with a finger tap, your fingerprint, or a scan of your face. The app starts installing right away. Maybe free, maybe a couple of dollars. This world is cheaper but gets more and more expensive as we transition into a subscription model. And stores are not only on your phone but on your tablet, laptop, browser, and even on your photo camera or game console.

We get notified of new versions of the apps we use daily. And there's a culture of constant improvement in which applications like Dropbox, Spotify, or Uber release a new version weekly or bi-weekly to keep up-to-date.

At any stage, software bugs can be introduced, existing ones fixed, and new functionality added. We used to have a program that would continue to work the same way for years. But we now have what's called liquid software. Ever-changing code and hundreds of version numbers. (Dropbox is up to version 107.4.443 as I write these lines!)

We're in an era of constant updates, and there's no way back. If there's a bug today, we expect a fix tomorrow. A patch, an update. The problem comes when we can't say no and need to keep programs up-to-date to run on the latest operating systems that would otherwise stop functioning.

Software rots.

In the mobile world, there's a chance that you never upgrade and use a fixed set of functionality. But the web is different. When you load a website, it might have been re-deployed. A new version, updated seconds ago, runs in your browser. The red button you used yesterday to send an email might have changed its place, color, or shape overnight. A piece of functionality you liked (or the annoying bug you had yesterday) might suddenly go away.

An alternative might be to use custom systems, systems with slower update cycles in which backward compatibility is a priority.

Yet it's unlikely we'll ever go back to the once-a-year update, the diskette, or the CD.

  1. Compact disc. Wikipedia. 

OCTOBER 13, 2020

If it can be automated, it will

With automations in place, the need to spend time on manual tasks disappears; you can do more in less time and your duties are delegated to the machine, which completes them in the background while you do other things. You're free to move onto new endeavors. As John Maeda says, "Savings in time feel like simplicity."

I guess you'd agree with me that, while the job of scribes was fundamental for spreading knowledge back when printers didn't exist, there's no point in copying documents by hand today.

Automation shifts our perception of what we do and augments our production capacity, often devaluing the human labor involved.

When the technology allows for it, we relegate essential tasks to automated systems which don't require any human input, while other tasks—less important but harder to automate—end up filling the bulk of our time with manual labor.

Effortless automated processes are easy to underestimate. One click and you've got access to millions of online publications, books, and other content. One more click and the book is sent to your Kindle, printed at home, or shipped to your house.

If it can be automated, it will.

However, it's important to remember that the amount of labor involved to complete a task—or the lack thereof—doesn't determine its importance, and that the time and effort required to perform a task heavily depends on skill.

Even when we assign excessive value to processes that involve manual labor, the importance and necessity of a task should be defined with independence of the amount of hours required to complete it and its complexity.

Still, difficulty and expertise highly determine how much you'll get paid for work and, as more and more processes are automated, we'll have a harder time finding jobs that pay well.

This trend to delegate processes to the machine contributes to the undervaluation of manual work, except when the human factor provides something different that makes it unique.

OCTOBER 13, 2020

To write text to a file using Python, you can either append text or overwrite all existing contents with new text.

Appending text

To append text, open the file in append mode, write to it to add lines of text, and close it.

file = open('/path/to/file.txt', 'a') # 'a' is append-to-end-of-file mode
file.write('Adding text to this document.')

Overwriting text

You can also write the entire contents of the files, overwriting any existing content using the w mode instead of a.

file = open('/path/to/file.txt', 'w') # 'w' is overwrite mode
file.write('This will override any existing content in the text to this document.')

Line breaks

You can use \r\n or \n and other codes to add line breaks to your document.

file = open('/path/to/file.txt', 'w') # 'w' is overwrite mode
file.write('First line.\nSecond line.\nThird line.\n\nNono.MA')
# file.txt
First line.
Second line.
Third line.


OCTOBER 8, 2020

To determine whether a file or directory exists using Python you can use either the os.path or the pathlib library.

The os library offers three methods: path.exists, path.isfile, and path.isdir.

import os

# Returns True if file or dir exists

# Returns True if exists and is a file

# Returns True if exists and is a directory

The pathlib library has many methods (not covered here) but the pathlib.Path('/path/to/file').exists() also does the job.

import pathlib

file = pathlib.Path('/path/to/file')

# Returns True if file or dir exists

OCTOBER 6, 2020

What would a scrivener do if gifted a printer?

Before the invention of printing, professional scribes copied manuscripts by hand. Woodblock printing, movable type, etching, and other inventions preceded the printing press, in our efforts to automate such a labor-intensive task as the duplication and production of text documents.

It would be hard to make a living rewriting books with pen nowadays. Printers and the internet make it easy and cheap to reproduce text documents or ship books to your house.

If we were to travel back in time and gifted a professional copyist a printer, they'd probably lit it on fire. I wonder how their life would change if, instead of burning the printer, they decided to use it.

SEPTEMBER 30, 2020

When manipulating semantic segmentation datasets, I found myself having to downsize segmentation masks without adding extra colors. If the image is cleanly encoded as a PNG, only the colors representing each of the classes contained in the label map will be present, and no antialias intermediate colors will exist in the image.

When resizing, though, antialias might add artifacts to your images to soften the edges, adding new colors that don't belong to any class in the label map. We can overcome this problem loading (or decoding) input images with TensorFlow as PNG and resizing our images with TensorFlow's NEAREST_NEIGHBOR resizing method.

(You can find a list of all TensorFlow's resize methods here, and an explanation of what each of them does here.)

import tensorflow as tf

# Read image file
img ='/path/to/input/image.png')

# Decode as PNG
img =

# Resize using nearest neighbor to avoid adding new colors
# For that purpose, antialias is ignored with this resize method
img = tf.image.resize(
  (128, 128), # (width, height)
  antialias=False, # Ignored when using NEAREST_NEIGHBOR

# Save the resize image back to PNG

SEPTEMBER 29, 2020

If someone were to follow you all day long..

..they'd probably be surprised by how you do certain things.

Things they never thought of doing that way and assumed everyone else did differently.

What would you surprise us with?

SEPTEMBER 23, 2020

Linters analyze code to catch errors and suggest best practices (using the abstract syntax tree, or AST). (Function complexity, syntax improvements, etc.)

Formatters fix style. (Spacing, line jumps, comments, etc.)

SEPTEMBER 22, 2020

The Myth of Sisyphus

In 1942, Albert Camus published a philosophical essay titled The Myth of Sisyphus and his novel The Stranger. According to Encyclopaedia Britannica, Camus' essay "contains a sympathetic analysis of contemporary nihilism and touches on the nature of the absurd." These two works, often seen as thematically complementary, are believed to have established his reputation.1

"Camus argues that life is essentially meaningless, although humans continue to try to impose order on existence and to look for answers to unanswerable questions. Camus uses the Greek legend of Sisyphus, who is condemned by the gods for eternity to repeatedly roll a boulder up a hill only to have it roll down again once he got it to the top, as a metaphor for the individual’s persistent struggle against the essential absurdity of life."

In 2020, it's easy to fall into the trap of mindlessly repeating the same routine over and over again. Every once in a while, we need to stop and reflect; To meditate on whether what we’re doing makes sense and find out how to get out of the loop to spend time doing what gives us joy. I believe there’s no need to constantly measure productivity—some of what we do should just be play. That's exactly what, as I understand, happens in the Greek myth of Sisyphus, in which a man is condemned to repeat a useless task day after day. How far is our daily loop of work from this punishment? There's more work after today's tasks. The ball repeatedly rolls down as we near the top.

"According to Camus, the first step an individual must take is to accept the fact of this absurdity. If, as for Sisyphus, suicide is not a possible response, the only alternative is to rebel by rejoicing in the act of rolling the boulder up the hill. Camus further argues that with the joyful acceptance of the struggle against defeat, the individual gains definition and identity."1

In Cal Newport's words, "the key to thriving in our high-tech world […] is to spend much less time using technology." But regardless of how much technology is available to us, we struggle to spend less time in front of our screens, constantly exploring new life hacks in search of the elusive perfect life.

Last year, Daniel Natoli and yours truly worked together on Sisyphus, a short film produced by Getting Simple and Peripheria Films based on the Greek myth and Albert Camus' essay that attempts to portray our repetitive days running around, hunted by a sense of urgency.

It's been a pleasure to work with Daniel Natoli, Marina Diaz Garcia, and Pablo de la Ossa and I hope we'll bring you other works in the near future. I invite you to keep an eye on the work of Peripheria Films.

You can now watch the short film online and listen to a podcast interview with its director—Daniel Natoli—on his experience making the film.

Watch Sisyphus

Listen to: Daniel Natoli — The Making of Sisyphus

  1. The Editors of Encyclopaedia Britannica. (2020). The Myth of Sisyphus. Encyclopedia Britannica. Online version. Retrieved September 21, 2020.  

SEPTEMBER 16, 2020

Daniel Natoli — The Making of Sisyphus

For the latest episode of Getting Simple, I had a great conversation with director Daniel Natoli on his experience making Sisyphus, Getting Simple's first short film, which we are releasing online today.

It's easy to fall into the trap of mindlessly repeating the same routine over and over again. Every once in a while, we need to be reminded to stop and reflect; To meditate on whether what you’re doing makes sense; To find out how to get out of the loop and do what gives you joy. There’s no need to measure how productive each of your actions is—some of it should just be play.

That's exactly what, as I understand, happens in the Greek myth of Sisyphus, in which a man is condemned to repeat a useless task day after day.

Watch Sisyphus

Listen to: "Daniel Natoli — The Making of Sisyphus"

SEPTEMBER 15, 2020

Four laws to create good habits

In his book—Atomic Habits—James Clear presents a four-step pattern as the backbone of every habit. The four stages of habit are: cue, craving, response, and reward.

In his own words, "The cue is what triggers your brain to initiate a behavior. […] Cravings are the motivational force behind every habit. […] The response is the actual habit you perform. […] Rewards are the end goal of every habit."1

Clear mentions that we chase rewards because they satisfy us and they teach us. His framework involves four laws to create a good habit that go hand in hand with the four stages of a habit I just mentioned: make it obvious, make it attractive, make it easy, and make it satisfying.

By inverting these four laws to create good habits, Clear establishes four laws to break bad ones: make it invisible, make it unattractive, make it difficult, and make it unsatisfying.

This text is an excerpt of my Getting Simple podcast episode on Atomic Habits, where you can learn more on how I try to apply this method to strengthen my habits.

  1. Clear, James. How To Start New Habits That Actually Stick. Accessed on Monday, September 14, 2020. 

SEPTEMBER 15, 2020

Present your works of art in a virtual gallery. Visit Kunstmatrix.

SEPTEMBER 11, 2020

"Less than 50 days after the release YOLOv4, YOLOv5 improves accessibility for realtime object detection." Read the Roboflow post.


Here are resources that are helping me get started with machine learning, and a few that I would have loved to have known about earlier. I'll probably be updating this page with new resources from time to time.

Stanford Cheat Sheets

A summary of terms, algorithms, and equations. (I barely understand the equations.=) These sheets, developed by Afshine and Shervine Amidi, differentiate between artificial intelligence (AI), machine learning (ML), and deep learning (DL) but many concepts overlap with each other. See this Venn diagram.

Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems

I highly recommend this book I'm going through at the moment, written by an ex-Googler who worked in YouTube's video-classification algorithm. It's dense but it introduces you to all relevant artificial intelligence, machine learning, and deep learning concepts, and guides you through preparing custom datasets to train algorithms, a bit of data science I guess. At the same time, it introduces you to three of the most-used machine learning frameworks—Sci-Kit Learn, Keras, and TensorFlow, being this last one the one I use on my day-to-day job developing and releasing machine learning models for production. Similar frameworks are Caffe or PyTorch, this one being used by Facebook developers. (Thanks for Keith Alfaro for the recommendation.)

Open-source code and tutorials

I got started with machine learning by trying open-source algorithms. It's common to visit the GitHub repository corresponding to a paper and give it a try. Two examples are Pix2Pix (2016) and EfficientDet (2020). You try to use their code as is, then try to use a custom dataset for training and see how the model performs for your needs.

TensorFlow re-writes many of these models and makes easy-to-follow tutorials.

  • Pix2Pix in TensorFlow Core - Made by the Google TensorFlow team, this tutorial offers you to View the code on GitHubDownload the Jupyter Notebook (written in Python) or Run the Notebook in Google Colab (where you can press a button in the cloud and see how each piece of Python code runs to understand the different parts of setting up and training an algorithm. Reading the dataset, peparing the training and validation set, creating the model, training it, and more).
  • TensorFlow tutorials - This is a good place to get your hands dirty. While machine learning has a strong theoretical component you can leave that aside and start by training and testing models for image classification, object detection, semantic image segmentation, and a lot more tasks.

Friendly user interfaces

  • Runway - A friend of mine, Cristóbal Valenzuela, is building his own machine learning platform for creatives. It's the place for people who don't know how to code (or don't want to) to be able to use complex machine learning models, training them with custom data and deploying them to the cloud. Here's an interview where he told me about the beginnings of Runway.
  • Machine Learning for Designers Talk - A talk I gave talking about these types of interfaces, a few projects, and the role they play for designers and people who don't know how to code.


Other resources

  • TensorFlow: Tensor and Image Basics - A video with basic tensor and image operations in TensorFlow. How to use tensors to encode images and matrices and visualize them.
  • TensorFlow: Visualizing Convolutions - A video to visualize the filters of an image convolution, an operation known for its ability to extract image features in an unsupervised way to perform classification tasks used in convolutional neural networks.
  • Awesome Machine Learning - A big and frequently-updated list of machine learning resources.
  • Suggestive Drawing - This is my Harvard's masters thesis, in which I explore how the collaboration between human and artificial intelligences can enhance the design process.

Found this post useful?


Terminal E, Logan Airport

As I was waiting to depart to Spain, I met Lei and his son, Eric, at Boston Logan's Terminal E, right before boarding their plane to Beijing—back when there was no need to wear face masks or to stay two-meters away from strangers.

Eric watched over my shoulder to see what I was drawing. As far as my notes say, he spoke in broken English. But we managed to communicate with the help of his dad. They were both impressed of the Pentel water brush, which they hadn't seen before.

Eric pointed out his nickname—Dodo—when I said my name was Nono.

With a Croquetilla sticker stuck to his chest, Eric recorded a time-lapse of myself sketching an Air France plane.

In his own sketchbook, he was drawing a face in what I believe was an attempt to portray Lei—his dada—who showed me Eric's sketches on his phone (among which was an Iron-Man-looking character and a gun of his own design).

Lei an a few of his friends are architects, and he was sad to hear I'm not an architect anymore.


Quantity or Quality Podcast

Hi Friends,

Here's a new episode on how generating lots of ideas might help you achieve originality from the Sketches series, a combination of two of my previous sketches post turned into audio.

"Many people fail to achieve originality because they generate a few ideas and then obsess about refining them to perfection." —Adam Grant, Originals

Listen to "Sketches — Quantity or Quality"


Color or not

My drawing process is (nearly) always the same; I grab a pen, stroke the main lines of something I see, add detail, and shade. Afterwards, I make a decision based on how much I like the drawing and how much time is available to finish it—whether to add color or not.

I might get in love with the plain, black-and-white drawing and feel scared of spoiling the piece with watercolor even when I know color adds another dimension to the story told by my sketch. But I've been practicing.

The stress of coloring fades away the more I practice, and the positive feedback loop makes me color more of my sketches, improving my skill at the same time.

I've scanned certain drawings before and after coloring. This, apart from letting me keep a copy of the uncolored version of the drawing, might serve to train a machine learning algorithm which might learn how I color my sketches.

That fear of ruining what's half-done prevents us from improving.

Let's beat the resistance.

AUGUST 25, 2020

Hit a wall

An easy way to avoid distractions while working on your device is to logout from email, social media, and any other accounts that often steal your time.

Next time you try to check out one of those sites you'll hit a wall—the login page.

You'll get a second chance to decide whether to give into the distraction or to continue working and come back to the site later.

If that's not enough, tools such as Freedom or SelfControl let you block websites and apps for set periods of time, forcing you to stick to whatever you need to work on.

AUGUST 24, 2020

Apache Groovy (Groovy Lang) "is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java program, and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming."

AUGUST 18, 2020

The lemon tree

The fact that you will go to sleep tonight and wake up tomorrow makes you feel immortal. A seventy-year-old person has gone through this loop more than 25,000 times. There's still plenty of time to live—you think.

But despite science's lengthy efforts to vanquish death itself: we all die eventually. A feeling of permanence fools us into thinking that what surrounds us today will be there forever.

Around twenty five years ago, I moved with my family into a new house. Among other greenery, two lemon trees were planted by the porch.

Last year, I sat in the garden and sketched one of them.

Under the right conditions, certain tree species live for centuries. For citrus trees, the average life expectancy is fifty years.

Barely a few months after my drawing, the lemon tree dried out and got cut off the ground. Now the grass covers its trunk's remains while his twin brother is still kicking.

Every day is a new opportunity to acknowledge what you have.

Nothing lasts forever.

AUGUST 13, 2020

While macOS ships with Python 2 by default, you can install set Python 3 as the default Python version on your Mac.

First, you install Python 3 with Homebrew.

brew update && brew install python

To make this new version your default add the following line to your ~/.zshrc file.

alias python=/usr/local/bin/python3

Then open a new Terminal and Python 3 should be running.

Let's verify this is true.

python --version # e.g. Python 3.8.5

How do I find the python3 path?

Homebrew provides info about any installed "bottle" via the info command.

brew info python
# python@3.8: stable 3.8.5 (bottled)
# Interpreted, interactive, object-oriented programming language
# /usr/local/Cellar/python@3.8/3.8.5 (4,372 files, 67.7MB) *
# ...

And you can find the path we're looking for grep.

brew info python | grep bin
# /usr/local/bin/python3
# /usr/local/opt/python@3.8/libexec/bin

How do I use Python 2 if I need it?

Your system's Python 2.7 is still there.

/usr/bin/python --version # e.g Python 2.7.16

You can also use Homebrew's Python 2.

brew install python@2

Before you go

If you found this useful, you might want to join my mailing lists; or take a look at other posts about code, Python, and macOS.

AUGUST 11, 2020

Imbued with memories

I guard my favorite sketches until I can work on a good story. Yet I acknowledge I won't ever find the time to write stories for all of them. Stories serve to describe how I experienced a given location, person, or object, or to elaborate a concept that lightly relates to a featured drawing.

Always timestamped, illustrations evoke memories of sketched artifacts, places, and people. However, when removed from their surrounding context, drawings act as timeless, platonic abstractions.

The windy road to Korakonisi brings me back to a one-off drive around Zakynthos with Aziz and Mikela. We are out of face masks teleports me to a conversation with Sanjay from Paris to Toronto in times when few people wore face masks around. But floating sketches of my Hatefjäll IKEA office chair make me think of the idea of this chair and not about a particular moment in time in which I was using it. What color is this chair? Is it comfortable? Is it adjustable?

Whereas a contextualized sketch is imbued with memories of the time and place in which it was sketched, a sketch of an item without context sparks thoughts of the item itself, not about the moment in which you sketched it (except when the item itself is representative of a salient event or moment in time).

A similar effect can be achieved documenting memorable events and abstract ideas with other mediums.

I'm repeatedly surprised by the power of drawings, texts, videos, photos, audio notes, and smells for memory reactivation.

AUGUST 4, 2020

Phone. Keys. Mask.

This New Yorker cartoon by Erika Sjule made me laugh.

For years, Phone, Keys, Wallet has been my usual house-leaving check.

Contactless payments recently let me keep my wallet at home and pay with my phone using Apple Pay.

After the lockdown, I repeatedly find myself coming back home right after leaving the house.

Phone. Keys. Mask!

When will we be able to leave the mask at home?

JULY 28, 2020

Jack of all trades, master of none

Back in the Renaissance, having skill in many different areas was seen as a good thing. But things changed. Movements such as the industrial revolution required individuals to specialize in one task to repeat it over and over and over—like cogs.

The phrase, "Jack of all trades, master of none," has been used to negatively refer to people who engaged in eclectic activities. Even in today's culture, doing different activities with less specialization has bad connotations.

I had a conversation with portfolio careerist Carmen Chamorro for a new episode of Getting Simple. We talked about the benefits of working in different fields, managing multiple interests, and how recognizing a potential Renaissance-like profile might positively influence your career.

Trust your nature. Be you. Don't be scared. We are all needed and we are all here. There is a balance in the world. We just need to go to the right place of the puzzle. You are here with a profile, and you are here to use it and to be authentic. Trust yourself, accept yourself, and have fun. —Carmen Chamorro

Listen to "From 9-to-5 to Freedom, A Journey to A Portfolio Career."

JULY 21, 2020

Work or walk?

Last week, I talked about repetition, automation, organization, and disconnection.

Ever since I started the podcast, I've had to prepare, manually, multiple texts in order to release each episode in various podcast providers—Apple Podcasts, Spotify, Overcast—on the Getting Simple website, and on the newsletter.

Each text was slightly different and editing them by hand wasn't pleasing. I've released dozens of episodes this way.

I've completed a round of code edits I've been working on over the past months to automate most of the tedious work required each time I publish a new episode, and released a new podcast page layout and audio player.1

Behind the scenes, I have individual text boxes for each component of the episode notes, including the episode summary, description, links, credits, release date, duration, and more.

I can now create new episodes with ease and preview the content that will show up on podcast providers, the website, and the newsletter, with the satisfaction of having made it possible on my own instead of relying on other platforms.

After more than thirty episodes, repetition removed friction from my podcast-releasing workflow. Yet I won't ever be faster than an automatic system that apart from freeing my time reduces potential human error.

The system I have in place makes my entire episode library highly organized, helping me focus on new content and reducing stress.

Altogether, automated systems such as this one can let us disconnect and reclaim time to be humans.

Whether you continue working or go for a walk in the time you get back is on you.

  1. Even though this new layout works on mobile it shines the most on large screens. 

JULY 20, 2020

Carmen Chamorro — From 9-to-5 to Freedom, A Journey to A Portfolio Career

I had a conversation with portfolio careerist Carmen Chamorro for a new episode of Getting Simple. We talked about the benefits of working in different fields, managing multiple interests, and how recognizing a potential Renaissance-like profile might positively influence your career.

Listen to "From 9-to-5 to Freedom, A Journey to A Portfolio Career"

JULY 14, 2020

Repetition, automation, organization, and disconnection

Repetition removes friction.

Automation frees time.

Organization helps focus.

Disconnection breeds life.

JULY 7, 2020

Unitaskers: Introduction

This piece is an introduction to a new series—called Unitaskers—that will feature single-purpose artifacts that let you do one thing.

Think, for instance, of a graphite pencil. It's useful to write or draw. You can sharpen it to get thin lines or tilt it to get thicker, faded strokes. You can write a letter or draw a house. You can trace continuous lines or do pointillism. But there isn't much more you can do with it.

In the opposite spectrum are your computer or your smartphone—they can virtually do anything, from drawing and writing to setting an alarm, sending emails, but they make doing something with focus harder than ever before.

How does your thought process change when you write with pencil and paper instead of typing on your laptop? When you read a book on Kindle instead of reading on your tablet? When you capture audio notes with a hand-recorder instead of using your phone?

Let’s find out.

Each essay of the series will use an object (or family of objects) as a source of inspirations to share stories and facts around finding focus in our age of distraction.

JUNE 30, 2020

You can measure the time elapsed during the execution of TypeScript commands by keeping a reference to the start time and then subtracting the current time at any point on your program from that start time to obtain the time elapsed between two points in time.

const start = new Date().getTime();

// Run some code..

let elapsed = new Date().getTime() - start;

Let's create two helper functions to get the current time (i.e. now) and the elapsed time at any point from that moment.

// Returns current time
// (and, if provided, prints the event's name)
const now = (eventName = null) => {
    if (eventName) {
      console.log(`Started ${eventName}..`);
    return new Date().getTime();

// Store current time as `start`
let start = now();

// Returns time elapsed since `beginning`
// (and, optionally, prints the duration in seconds)
const elapsed = (beginning = start, log = false) => {
    const duration = new Date().getTime() - beginning;
    if (log) {
    return duration;

With those utility functions defined, we can measure the duration of different events.

// A promise that takes X ms to resolve
function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));

// Measure duration (while waiting for 2 seconds)
(async function demo() {
    const waitInSeconds = 2;
    let beginning = now(`${waitInSeconds}-second wait`);
    // Prints Started 2-second wait..
    await sleep(waitInSeconds * 1000);
    elapsed(beginning, true);
    // Prints 2.004s

Before you go

If you found this useful, you might want to join my mailing lists; or take a look at other posts about code, React, and TypeScript.

JUNE 30, 2020


More than a year ago, I was sitting with my Mom sketching an Eastern Island stone statue. We were, though, thousands of kilometers away from the Chilean island, right by the entrance of the Wellcome Gallery at the British Museum.

Back then, I didn't know that that drawing would be both the opener of the first of a series of A4-sized Moleskine sketchbooks and the first illustration to make it into my sketches newsletter in July 2, 2019.

One year later, I find myself with fifty-three published sketches and stories.

I won't lie: it wasn't easy.

Some posts were fast to write, others required an intensive back-and-forth effort of writing and reviewing and writing and reviewing.

Many times, I've talked about my daily routine and habits, and about the process I follow to make this newsletter happen. I've wondered if I was repeating myself too much, but ever since I read John Maeda's advice I don't worry too much about it. "Repetition, repetition, repetition. It works. It works. It works."

In these pieces, I try to share things I learn that might inspire you as much as they inspired me, and tell stories with a personal tone without turning this newsletter into a personal diary. This is not a how-to guide, it's an art experiment and a literary exercise.

Many of my journaling notes are for me to keep. Yet I'll continue revisiting my notes and using the dozens of unpublished drafts as a source of inspiration for future stories.

I'd like to THANK YOU for pushing me to keep going in one way or another.

On top of writing a story and drawing, scanning, and editing a sketch—every Tuesday—I was hesitant to translate every single story to Spanish. "If you don't translate [your stories] to Spanish I probably won't read them," a friend said. As a native Spanish speaker who's been reading in English for the past ten years, I've used the translation of these posts as a way to practice my Spanish writing skills.

Some stories even made it into the Getting Simple podcast. (I produced an augmented audio version of Stories Are The Answer including clips from Patrick Winston's lectures.)

My girlfriend and my Mom have supported me heavily, providing feedback on most posts and helping with things that didn't sound quite right in Spanish.

Friends reviewed drafts; brainstormed; shared ideas on the publication format and the web layout; and spotted typos or simply corrected my English.

Many of you replied to my emails with insightful points of view.


Happy newsletterversary.

Want to see older publications? Visit the archive.

Listen to Getting Simple .