FEBRUARY 21, 2020

In C#, .NET, and Visual Studio, you can use the Random Class to generate random numbers.

First, you create a random number generator.

var random = new Random(1); // where 1 is our seed

Then you request the next random number (or next random double).

// Next random number
var aRandomNumber = random.Next();

// Next random double
var aRandomDouble = random.NextDouble();

FEBRUARY 19, 2020

Nodi is a promising web-based visual programming environment that, at first sight, reminds me of Grasshopper and can be used on a browser tab.

And, while writing these lines, I checked their home page.

Node is an online node-based geometry design tool and social development environment. […] You can create a model with a feeling of operation like Grasshopper and Dynamo.

Haven't looked in depth yet, but it seems to support some 2d and 3d geometry, math, exporting to formats like obj and dxf and stl, and much more.

I'll close with a Twitter quote from Masatatsu Nakamura.

It feels very intuitive to a Grasshopper user, but is built entirely on web tech.

FEBRUARY 18, 2020

I was born on a day of rest—on a Sunday morning at 10:50 am.

Today, I'm turning thirty years old.

I've been alive for 10,957 days (1,565 weeks and 2 days) and, looking at it that way, it might as well make sense to celebrate my 11,000th day on April 1, 2020. Back then in 1990, when I was born, my sister was 1,224 days old. 1

What would you tell your twenty-year-old self? I wanted to ask myself this question today, as I often ask others on the podcast. Let's see what I came up with.

  • Friends and family are more important than anything else.
  • Side projects are as important (or even more) than school and work. They define who you really are and give meaning to your life.
  • Document everything as you do it (and write everyday). You'll love being able to look back at what you're doing today when you're older.

It's hard to find meaning and purpose, and extremely easy to get caught on doing one thing after the other, spanning across years—if not decades—without asking yourself the real question, so I'll keep asking myself, day after day: What do you want to be when you grow up?

  1. As I used to do before on Wolfram Alpha, you can now Google time spans and get the amount of days, like, for instance, days between 1990-02-18 and today↩︎

FEBRUARY 11, 2020

I grew up sitting at the table to eat—often half-sitting with one knee, ready to flee to my computer or my toys.

A year ago, right when we moved into our new place, we were slow to acquire new furniture. For a few days, maybe weeks, we'd do picnics in the living room, waiting for our table to arrive. We'd eat on top of a blanket. We'd eat on the floor. The picnics were fun.

We then bought a table and four chairs. The picnic season was over.

I like to test myself by relocating objects to a different place and paying attention to when the next time I want to use them is. I'd take things I don't use too often to my old bedroom at my parents house (mostly empty) or simply put the things I use daily inside of a closet at my house.

After storing (or hiding) certain things—even for short periods of time—you can truly feel how essential they are to the life you enjoy living, and experience alternative ways of living without them.

Most of us have a table. But we rarely eat on the floor.

FEBRUARY 10, 2020

Let say you stage all your Git changes and then commit them.

git add --all
git commit -m "Edit REDME.md"

There's a typo on REDME — should read README — and we want to "amend" this error.

git commit --amend

The commit --amend command lets you edit the commit message in the vim editor.

You can also change the message by specifying the new message in the command line with the -m argument.

git commit --amend -m "Edit README.md"

As the commit message is part of the commit itself, editing the message alters the commit hash, which means that if you've already pushed a commit to a remote, the remote won't let you push the new edit directly. But you can force that to happen.

git push --force branch-name

FEBRUARY 6, 2020

We're more virtually connected than ever before. But we're also more disconnected than any other civilization before us. We've created shallow ways of communication (say, email or instant messages) which generate a false sense of connection. It's harder to connect in deep ways with our closest friends—a brief walk, talking on the phone, or a video conference may suffice. But, surprisingly, we spend a huge amount of time learning about random details from the trendiest influencers that we don't even know from our closest friends and probably should.

Today, I share with you what I've learned and what's changed over the past year, and new habits that seem to be here to stick with me for years to come.

Listen to "A Year of Transformation"

FEBRUARY 6, 2020

npx and create-react-app make it easy to create a new app running React and TypeScript.

npx create-react-app my-app --template typescript

Then you go into the folder and run the app.

cd my-app
npm start

You can create a JavaScript (non-TypeScript) app by removing the last bit—--template typescript. And you can also run the app with yarn start.

If, as I was, you're not getting the app working, you might have an older global installation of create-react-app. In my case I installed it with npm install -g create-react-app (which I could verify by running create-react-app -V on the Terminal. To make sure npx uses the latest version of create-react-app you need to uninstall the global version installed with npm.

npm uninstall -g create-react-app

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.

FEBRUARY 5, 2020

git push origin $(git branch | grep \* | cut -d ' ' -f2)

FEBRUARY 5, 2020

"How does one achieve peace of mind?" On the latter point, Plutarch's advice was the same as Seneca's: focus on what is present in front of you, and pay full attention to it.

—Sarah Bakewell, How to Live: A Life of Montaigne in One Question and Twenty Attempts at An Answer

FEBRUARY 4, 2020

The Feed is a casual way to endlessly scroll through your highlights. Think of it as a replacement for twitter or facebook, except you're scrolling through your books, articles, and ideas rather than digital junk food.

FEBRUARY 4, 2020

It's not I don't have the time but This is not important enough for me.

It's not I can't do this but I didn't sit down to try.

It's not I wish I could do that but I've never tried to do that.

FEBRUARY 4, 2020

There's a full list of colors in Windows C# .NET Framework to be used with WPF and XAML components, both accessible through System.Windows.Media.Colors and System.Drawing.KnownColor. These are their names.

AliceBlue, AntiqueWhite, Aqua, Aquamarine, Azure, Beige, Bisque, Black, BlanchedAlmond, Blue, BlueViolet, Brown, BurlyWood, CadetBlue, Chartreuse, Chocolate, Coral, CornflowerBlue, Cornsilk, Crimson, Cyan, DarkBlue, DarkCyan, DarkGoldenrod, DarkGray, DarkGreen, DarkKhaki, DarkMagenta, DarkOliveGreen, DarkOrange, DarkOrchid, DarkRed, DarkSalmon, DarkSeaGreen, DarkSlateBlue, DarkSlateGray, DarkTurquoise, DarkViolet, DeepPink, DeepSkyBlue, DimGray, DodgerBlue, Firebrick, FloralWhite, ForestGreen, Fuchsia, Gainsboro, GhostWhite, Gold, Goldenrod, Gray, Green, GreenYellow, Honeydew, HotPink, IndianRed, Indigo, Ivory, Khaki, Lavender, LavenderBlush, LawnGreen, LemonChiffon, LightBlue, LightCoral, LightCyan, LightGoldenrodYellow, LightGray, LightGreen, LightPink, LightSalmon, LightSeaGreen, LightSkyBlue, LightSlateGray, LightSteelBlue, LightYellow, Lime, LimeGreen, Linen, Magenta, Maroon, MediumAquamarine, MediumBlue, MediumOrchid, MediumPurple, MediumSeaGreen, MediumSlateBlue, MediumSpringGreen, MediumTurquoise, MediumVioletRed, MidnightBlue, MintCream, MistyRose, Moccasin, NavajoWhite, Navy, OldLace, Olive, OliveDrab, Orange, OrangeRed, Orchid, PaleGoldenrod, PaleGreen, PaleTurquoise, PaleVioletRed, PapayaWhip, PeachPuff, Peru, Pink, Plum, PowderBlue, Purple, Red, RosyBrown, RoyalBlue, SaddleBrown, Salmon, SandyBrown, SeaGreen, SeaShell, Sienna, Silver, SkyBlue, SlateBlue, SlateGray, Snow, SpringGreen, SteelBlue, Tan, Teal, Thistle, Tomato, Turquoise, Violet, Wheat, White, WhiteSmoke, Yellow, YellowGreen

And here's a function that returns a string list—List<string>—with all color names as strings.

/// <summary>
/// Get a list of all Windows colors
/// </summary>
/// <returns></returns>
public static List<string> Colors()
    // Create empty list
    List<string> colorList = new List<string>();

    // Get type of KnownColor enum
    var color = typeof(System.Drawing.KnownColor);

    // Enumerate all known color names in enum
    var colors = Enum.GetValues(color);

    // Remove 27 from beginning
    var from = 27;

    // Remove 7 elements from the end
    var to = colors.Length - 7;

    // Only keep color names and not user interface colors
    for (int i = from; i < to; i++)

    // Return filtered color list
    return colorList;

You can then use one of the colors by its string name.

// Use 19th color
// System.Windows.Media.ColorConverter
var color = ColorConverter.ConvertFromString(colors[19]);

Having the entire list is useful to randomly select colors or to iterate through them. If you have an index and you want to use this list (or a shorter list) and start again when you run out of colors, you can do this.

// System.Windows.Media.ColorConverter
var color = ColorConverter.ConvertFromString(colors[index % colors.Count]);

You could also use a color with its string name, directly.

// System.Windows.Media.ColorConverter
var color = ColorConverter.ConvertFromString("Crimson");

And, lastly, you can cherry-pick and tailor your own custom Color list and use the same calls as before.

public static List<string> colors = new List<string>() {

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, C#, TypeScript, and React.

FEBRUARY 3, 2020

Google Dataset Search is a search engine from Google that helps researchers locate online data that is freely available for use. The company launched the service on September 5, 2018, and stated that the product was targeted at scientists and data journalists.

The site contains 25 million publicly available datasets1 (including data tables, images, video, audio, and more), even though many of them are information pages about existing datasets that can't be directly accessed electronically. For instance, Plans of Sydney Opera House only displays archive information and not the actual dataset—This series is held at Western Sydney Records Centre—but many others, like the architectural drawings and photographs of a Kipahulu real estate house in Maui, Hawaii, can be downloaded (in this case as a PDF).

This is promising.

FEBRUARY 2, 2020

Through this activity, it is possible to turn a green street red which has an impact in the physical world by navigating cars on another route to avoid being stuck in traffic. —Simon Weckert

JANUARY 28, 2020

We love to think we're in control of what we think and how we think about it, and we are often convinced we can ignore ads. But our brain is easily fooled and can't avoid reading a short sentence or processing an image when put in front of us. In this short essay, I invite you to think differently about what happens in your brain when you're exposed to an ad—which, broadly speaking, can be anything from a TV commercial to a vague recommendation made by a friend.

Listen to Getting Simple. Take this sentence, for instance. It's a command. It's a suggestion to listen to a podcast that I just put in your mind. Even if the Getting Simple podcast didn't exist your mind has to decide whether to listen to it or not.

I learned of an experiment in Thinking, Fast and Slow1—a book by Nobel Prize-winning Daniel Kahneman—in which participants lying in a brain scanner were shown a picture of the eyes of a terrified person for less than 2/100 of a second. Participants were not aware of the picture but their brain was. "One part of their brain evidently knew: the amygdala," says Kahneman. "Images of the brain showed an intense response of the amygdala to a threatening picture that the viewer did not recognize." 2

The media—newspapers, radio, television, even a friend or your favorite blog—expose us to the latest news, trending topics, products, and brands which end up occupying space in our brain. Even when you're not paying attention (and ads don't trigger a purchase or a sign-up) the mere exposure slowly makes what you see and listen feel more familiar.

"Familiarity breeds liking." Daniel Kahneman refers to this phenomenon as the exposure effect. "Words that you have seen before become easier to see again—you can identify them better than other words when they are shown very briefly or masked by noise, and you will be quicker (by a few hundredths of a second) to read them than to read other words." 2

If you hadn't read Getting Simple before, you have now. And the phrase will be easier for your brain to process—and like—next time you read it. That's why Netflix and HBO keep showing you their logo (and distinctive sound) at the beginning of each show. After eight seasons of Game of Thrones, HBO's intro inevitably sounds familiar, and it is this familiarity that links the watching experience throughout HBO shows and episodes. If this happens to you as it does to me, that's the feeling you get when you start watching something on Netflix.

It's foolish to believe you can simply ignore ads. Every mention and suggestion and recommendation put in front of you slightly alters your perception of whatever it is they're talking about. You might just not be aware of it.

  1. I learned about this book from Adam Menges, and I can't recommend you to read it enough. ↩︎

  2. Kahneman, Daniel. Thinking, Fast and Slow. New York: Farrar, Straus and Giroux, 2011. Kindle edition. ↩︎ ↩︎

JANUARY 25, 2020

Just came across a link on Hacker News that reflects the rejection to Google's new design I had earlier this week. Something inside me was begging for Google not to go that route as it seemed extremely odd.

At the moment I didn't know exactly why that reject was. It seems it was because I had been trained to recognize the URL's on top of search results' titles as ads.

Greatly reflected by Craig Mod's words:

There's something strange about the recent design change to google search results, favicons and extra header text: they all look like ads, which is perhaps the point?

JANUARY 24, 2020

A few days ago, I repeated mentions of Soundtrap as a podcast-recording tool for interviews with remote guests. I haven't tried it yet, but here are some of the features that called my attention from their marketing copy.

[T]he only tool that allows you to upload both podcast and transcript directly to Spotify, boosting the discoverability of your podcast.


Transform spoken word into text and edit your recording as you would a text document. Take your workflow to the next level with the game-changing interactive transcript.


Share an interview link to anyone (with an internet connection and a microphone) to join your podcast remotely.

Sounds promising.

JANUARY 23, 2020

$output = preg_replace('!\s+!', ' ', $input);

From StackOverflow.

JANUARY 21, 2020

Ubiquitous internet and unlimited data plans got rid of any limitations for texting, calling, or browsing the internet. Speeds are fast and using all of your monthly gigabytes requires creative thinking. The gist is, you don't need to save data or call minutes for later use in the month.

The scarce resource today is battery. Yes, new phones go for one or two days with a full charge but that doesn't last too long as the duration of lithium-powered batteries slowly fades away with time.

That's what makes these power bricks useful—a portable charger that can recharge your phone a couple times removing the need to save battery. Without it, a drain battery is an opportunity to refrain from using the phone to save battery for something else later in the day, or simply to not use your phone after its battery dies.

The only resource you have left is time and—if you're not careful—your phone might drain it all as well.

JANUARY 15, 2020

In 2020, I'll bring you new episodes dissecting tactics, tools, and habits from insightful guests and from my own experiments to live a more meaningful, creative, and simple life.

Today, you can listen to a conversation with technology whisperer Tatjana Dzambazova recorded among the trees of Mill Valley, California. Tanja inspires and connects people—myself included—as she spreads ideas to make the world a better place.

Enjoy this episode on asking the right questions to avoid wasting talent, thinking different, and the myth of a better life.

Listen to "Tatjana Dzambazova — The Art of Asking The Right Questions"

JANUARY 14, 2020

There's nothing like being authentic to gain people's trust.

But how do you determine how much to uncover?

For me, authenticity is all about learning who I am while sharing my worldview and the things I've learned that might be worth your time.

Tips and tricks and ways of doing and understanding the world.

From how I write or edit a podcast or draw a tree to what I think about electric scooters and rediscovering the past.

JANUARY 9, 2020

I recently pushed a mild re-design of the Getting Simple website. It now has proper home, podcast, and writing pages with the intention of informing the newcomer about what the project is all about.

Both the home and podcast screens feature a Spotify player with the latest episode. There is still some work needed to be done around the writing page — it's hard to navigate now only looking at titles and I'm liking how lesswrong.com and gwern.net show a post preview on hover — and the podcast and article templates.

It's live, so you can Take a look.

JANUARY 7, 2020

We used to think more about what to gift.

A present involved creative thinking: knowing the other and learning about what they liked and cared about.

The mall, the outlet, the online store, and the Google search make it easy to figure out what we want and where to buy it.

The accessibility and convenience of ubiquitous technology and retail stores simplify how we gift today.

But maybe, just maybe, it was that extra effort (that's now fading away) that made the exchange special, more humane.

It's harder than ever to surprise you—and it's all about the surprise.

DECEMBER 31, 2019

In Spain, we have the tradition of eating twelve grapes in the first thirty-six seconds of the new year, with each grape corresponding to one of the upcoming months. This tradition—which has been adopted in other Spanish speaking countries—is believed to provide good luck for the year.

No matter where we are, we'll eat our twelve grapes.

The beginning of the year is one of the most important temporal landmarks—moments in which it's easier for us to start doing a new activity. I'll quit smoking. I'll eat healthier. I'll exercise regularly. You name it. Each person has its own fight. And, even though you can kickoff a new habit any day, any time, it's proven that the push of an important event, such as your birthday or the start of a new year or a week, will make it easier.

As mentioned in The Fresh Start Effect—a paper published at University of Pennsylvania by Hengchen Dai, Katherine Milkman, and Jason Riis—"[T]he popularity of New Year's resolutions suggests that people are more likely to tackle their goals immediately following salient temporal landmarks." That is, we are more likely to achieve our personal goals when using the beginning of the week, month, year, or even a holiday or birthday as a kick-start. Temporal landmarks demarcate the passage of time and allow us to create mental accounting periods that relegate past imperfections to a previous period which, as a result, might motivate aspirational behaviors—"activities that help people achieve their wishes and personal goals." 1

These temporal landmarks—be it the turn of the year, the beginning of a month, or your birthday—can provide new opportunities to start fresh and pursue your goals, by establishing timeframes that separate you from your past failures. 2 You can set your own "temporal landmark" in advance and use it as a "fresh start" to improve different aspects of your life.

  1. Dai, H., Milkman, K. L., & Riis, J. (2014). The Fresh Start Effect: Temporal Landmarks Motivate Aspirational Behavior. Management Science, 60(10), 2563–2582. ↩︎

  2. Dai, H., Milkman, K. L., & Riis, J. (2015). Put Your Imperfections Behind You: Temporal Landmarks Spur Goal Initiation When They Signal New Beginnings. Psychological Science, 26(12), 1927–1936. ↩︎

DECEMBER 24, 2019

Hey, Sammy! Follow me. Jack said.
Where are we going?
We're getting a new gadget that will cut the grass for us.
Oh! Will you be able to spend more time with me then?

As the year comes to an end, I wanted to wish you a Merry Christmas.

I hope you get time to recharge before the beginning of 2020.

DECEMBER 20, 2019

I believe the ultimate goal of writing is to touch others; to make our words resonate with our readers. Today my spoken words are for you.

This episode is part of an experimental series titled Habits in which I share how myself (and others) do certain things and why, hopefully unveiling workflows, techniques, habits, and routines that you can make use of right away. Specifically, this episode focuses on writing and what's helping me write more consistently. I share the software tools and gadgets that I use on a daily basis to journal and write essays, posts, and episodes, and to review and edit my writing.

Listen to "Habits — Writing"

DECEMBER 18, 2019

Crazy. It's already been two years. Back then, Zach Kron (@ZachKron) described his daily job as "Banging digital tools with a stick to make them break." When I left the recording room, I remember telling Zach, You just made my podcast a real thing. And I'm so grateful to him for that.

Listen to "Zach Kron — Putting More Ideas Into The Things We Make"

Zach is now sharing his beautiful hand (and robotic) craft on Instagram at @kronzach.

DECEMBER 17, 2019

There's a subtle difference between the manual and the guide.

The manual is meant to tell you how to use and assemble your new gadget—the very function of every single button; the place where every nut and bolt need to go.

A hand-recorder, for instance, ships with a printed booklet—a manual—that contains detailed instructions on how to use it; LEGO blocks and IKEA furniture ship with meticulous step-by-step instructions on how each of the pieces fit together. Without these detailed instructions, we would probably end up with ingenious, original combinations of the parts, but we might not get to build the shelf or toy we bought at the store.

Unless you're really familiar with hand recorders, it's unlikely you'll discover all of the capabilities your recorder is armed with without studying its manual.

The guide, however, offers advice and guidance along a given process but doesn't provide detailed instructions. No enumerated steps to follow but recommendations and tips and insights to learn from.

Guidebooks guide the tourist around a foreign country, introduce the newbie to a new activity, and educate the amateur with esoteric knowledge.

It's great to follow the manual when the equation requires precision and accuracy. (You don't want your shelf to fall apart!)

In your day to day, though, there's no need to be constrained by exact steps.

Are you following the steps in the manual or using the tips in the guide?

DECEMBER 16, 2019

I had a blast giving a guest lecture at the Harvard Graduate School of Design back in October, invited by Jose Luis Garcia del Castillo. (Watch on YouTube.)

In this guest lecture, Nono Martínez Alonso discusses his work on developing intuitive interfaces for creative communities, and how the collaboration between human and artificial intelligences can enhance the design process like, for example, with suggestive drawing. Recorded on 2019.10.30.

Slides of Intuitive Interfaces talk by Nono Martínez Alonso

Intuitive is an overused term but it simply means that with the average prior knowledge you have you can, more or less, guess the effects of certain actions. In that case, you don't need a lot of trial and error to figure out the logic of the system. […] I don't think it's a deliberate process, but the trivial thing to say is that, "People with similar experience have similar ways of responding to the world and similar ways of interacting with the world." —Panagiotis Michalatos

Previous talks

Follow Nono

DECEMBER 10, 2019

Yesterday, my body temperature got up to 39.7 Celsius degrees. I was shivering with fever and felt like crap.

We have all these plans we want to do, places we want to visit, and projects we want to work on. From Monday to Friday, work is imperative. Yet, a simple fever prevents you from going to work. The slightest sickness can render essential things expendable.

I've spent many hours in bed over in the last two days, and finding the time to write this was challenging. But these are the days that make me appreciate the times in which I feel good even more, when I'm free to choose what to do instead of laying down in bed.

Want to see older publications? Visit the archive.

Listen to Getting Simple .