cURL—A Simpler and Faster (and Free) Alternative to Postman

Postman still isn’t opening.

Five minutes after clicking the icon… Nothing. Maybe it’s calling home, checking in with the International Space Station, or just ghosting me. Who knows?

Today I found out about Bruno, a “Git-integrated, fully offline, and open source API client”. A simpler alternative to Postman. I had come across Bruno before but had forgotten about it.

But, there’s an even simpler alternative to Postman and Bruno.

When I want to test a single endpoint, I just:

  1. Go to the Network tab on Chrome,
  2. Right-click on the request I want to test,
  3. Then click on “Copy as cURL (bash)”,
  4. Then paste it into a Terminal, and
  5. Press enter.

cURL is a “command line tool and library for transferring data with URLs”. It comes preinstalled with Git Bash for Windows. And I’m a “terminal Git user,” so I keep a terminal open all the time. Way faster than opening an Electron app.

Here are some cURL examples to send data:

$ curl --json '{"name":"some json here"}' https://example.com`
$ curl -s --json @body.json https://example.com
$ curl -s -i --json @body.json -H "header-name:header-value" https://example.com`
$ curl -d "data to PUT" -X PUT http://example.com/

Here’s the meaning of those options:

  • --json: To POST a json request either as a json string or from a file.
  • -s: Silent mode
  • -i: To include response headers
  • -k: To avoid validating SSL certificates. Handy when an ASP.NET Core project has HTTPS redirection.

Et voilà! No waiting, no upgrades, no paywalled features. cURL is faster and simpler than Postman, which still doesn’t open on my computer. I guess it’s time to upgrade it or simply use a better alternative.

PS: Turns out Postman finally opened… after an upgrade. Unnecessary drama. Arrggg!

Two Years Ago, I Was Sick and Burned Out. But This Powerful Quote Changed It All

In 2023, I felt sick to my stomach.

By the end of the year, I burned out. Then in 2024, I was laid off. Perfect combination, right?

For the first time, I had no idea what to do next.

One day, I called a friend to tell him how I felt and get things off my chest. “You always have a plan,” he told me.

But not that time. I only knew what I didn’t want to do. I didn’t want to go back to where I was: stomach sick, burned out, and without a job.

I felt relieved after that layoff.

But it lasted only weeks before I realized I had no paycheck coming. I checked my expenses and bank account to see how long I could last without a paycheck. Relief quickly turned into desperation. More than once.

The quote that changed everything

By chance or fate, I found this quote:

“If you don’t know what to do with your life, start by working on your health”

That’s from James Altucher, one of my favorite writers. It’s from an interview or one of his books, I can’t remember exactly. I’ve been following his work online since then, by the way.

Since last year, after ditching my to-do lists, my only plan has been to take care of my body, mind, and spirit every day.

Prioritizing our health creates forward momentum. It gives clarity, energy, and purpose.

There are days when I miss working on any of the three parts.

But when I miss a couple of days, I can feel it. Frustration, ruminating thoughts, and low energy start to appear. Again. That’s the warning sign to go back to my healthy habits. My body tells me when it needs to be taken care of.

I still don’t know what to do with my life. Probably, I never will. But working on my health has given me so much peace of mind.

One day at a time

Life doesn’t come with an instruction manual. We have to figure things out. We all are figuring life out as we go. Sometimes it’s easy. Sometimes it’s not. Sometimes we know what we want out of life. Sometimes it’s easier to tell what we don’t want to do.

No matter where you are in life, work on your health. That’s the first step to change.

4 Writing Lessons I've Learned Recently—Two of Them After a Viral Post

#1. Use Fear, Curiosity, and Desire to write attention-grabbing headlines.

Credits to Ron Markley on Medium.

Recently I’ve learned that when we write content, we’re in the business of writing headlines.

A good headline is like a good welcome sign. People will only stop by if they see a good one.

No matter how thoughtful our content is, if the headline doesn’t hook readers, they won’t stop to read it.

#2. When writing stories or fiction, a point in time creates expectations in the readers’ minds.

When we write “It was a sunny summer day when I saw her for the first time…“ readers expect to hear more about what happened.

And if we abruptly shift subjects, it’s like breaking readers’ expectations. Avoid those abrupt shifts. It’s like cutting off a conversation mid-way.

#3. Listicles attract higher engagement on social media.

Listicles work online and offline.

The 10 Commandments, the 95 Theses by Martin Luther, the 48 Laws of Power… All of them are listicles.

Since last year, I’ve been experimenting on LinkedIn. And listicles have worked like a charm.

My most viewed post was something like “12 lessons after 10+ years in Software Engineering (In less than 1 minute)” followed by 10 one-liners and a question to invite people to the comment section. Boom! Over 80,000 views. I felt like an Internet celebrity for a couple of days… Here’s the post, if you’re on LinkedIn, by the way.

When reading listicles, people tend to comment on the item that resonated the most.

#4. One single post can boost your follower count.

You know the Pareto principle, right? 80% of results come from 20% of effort.

Well, 80% of followers and engagement come from 20% of posts. And one viral post can boost your follower count. It has happened to me on LinkedIn and Medium recently.

How To Find All 3-Digit Numbers In A Binary Tree

This is an exercise I failed to solve in a past interview a long time ago, in a galaxy far, far away. I ran out of time and didn’t finish it.

Off the top of my head, the exercise was something like this:

Find all 3-digit numbers you can create by visiting a binary tree. To create a 3-digit number, given a node, visit either the left or right subtree, and concatenate the value you find in three nodes.

The next tree has 4 3-digit numbers.

        1
       / \
      /   \
     2     7
    / \   /
   5   9 4
  /
 3

They are 125, 129, 253, and 174. No, 127 is not a valid number here. We should visit one subtree at a time.

To finally close the open-loop in my mind, here’s my solution.

Let’s solve the simplest scenario first

If we have a tree with only the root node and the left subtree only with leaves, we could write a function to “walk” that simple tree like this,

List<int> Walk(int root, Tree subTree)
{
    if (subTree == null) return [];

    var candidate = root * 100 + subTree.Value * 10;

    List<int> result = [];
    if (subTree.Left != null) result.Add(candidate + subTree.Left.Value);
    if (subTree.Right != null) result.Add(candidate + subTree.Right.Value);
    return result;
}

Here root is the value of the root node and subTree is either the left or right subtree of our root node.

If we call Walk() with our example tree,

        1
       / .
      /   .
     2     .
    / \   .
   5   9 .

The root is 1, the node in the left subtree is 2, and the node in the left subtree again is 5, then the 3-digit number is calculated as 1*100 + 2*10 + 5.

Walk() passing only the root node and the left subtree of our sample tree returns,

//        1
//       / .
//      /   .
//     2     .
//    / \   .
//   5   9 .

Walk(1, new Tree(2,
            new Tree(5, null, null),
            new Tree(6, null, null)));
// List<int>(2) { 125, 129 }

That will only work for a simple tree.

Let’s cover more complex trees

With Walk(), we only find numbers by visiting one node in a simple tree, so let’s use recursion to visit all other nodes.

Here’s a recursive function Digits() that uses Walk(),

List<int> Digits(Tree aTree)
{
    if (aTree == null) return [];
	
    return Walk(aTree.Value, aTree.Left)
           // ^^^
           // We visit the left subtree from the root
              .Concat(Walk(aTree.Value, aTree.Right))
              //      ^^^^
              // We visit the right subtree from the root
			  
              .Concat(Digits(aTree.Left))
              //      ^^^^^
              // Find digits on the left subtree
              .Concat(Digits(aTree.Right))
              //      ^^^^^
              // Find digits on the right subtree
              .ToList();
}

Digits() starts visiting the left and right subtrees from the root node. Then, it recursively calls itself for the left and right subtrees and concatenates all the intermediary lists.

All the pieces in one single place

Here’s my complete solution,

record Tree(int Value, Tree Left, Tree Right);

List<int> Walk(int root, Tree subTree)
{
    if (subTree == null) return [];

    var candidate = root * 100 + subTree.Value * 10;

    List<int> result = [];
    if (subTree.Left != null) result.Add(candidate + subTree.Left.Value);
    if (subTree.Right != null) result.Add(candidate + subTree.Right.Value);
    return result;
}

List<int> Digits(Tree aTree)
{
    if (aTree == null) return [];
	
    return Walk(aTree.Value, aTree.Left)
              .Concat(Walk(aTree.Value, aTree.Right))
			  
              .Concat(Digits(aTree.Left))
              .Concat(Digits(aTree.Right))
              .ToList();
}

var tree1 =
    new Tree(1,
        new Tree(2,
            new Tree(5,
                new Tree(3, null, null),
                null),
            new Tree(9, null, null)),
        new Tree(7,
            new Tree(4, null, null),
            null));
Digits(tree1)
// List<int>(4) { 125, 129, 174, 253 }

Et voilà!

I know it’s too late. Months have passed since then, but I wanted to solve it anyway. Don’t ask me what company asked me to solve that. I can’t remember. Wink, wink!

For other interviewing exercises, check how to evaluate a postfix expression, how to solve the two-sum problem, and how to shift the elements of an array.

Sell Something or Be Ready to Sell Your Time

Selling feels dirty to far too many people.

Maybe that’s because we have the wrong impression of selling as tricking people into buying something they don’t need with pushy lines or sales tactics. “I’m making an exception for you. Hurry up! If my boss finds out about this, I’m fired.”

The truth is we’re selling all the time, even without realizing it.

Isra Bravo, the best copywriter of Spain, taught me that we’ve been selling since we’re kids. We sell ourselves to get our parents’ attention. And as adults, we continue selling: when looking for a job or for a romantic partner.

The other day, a salesy DM made me change my perspective on selling: from pushy sales tactics to genuine help.

If we aren’t ashamed of helping, we shouldn’t be afraid of selling.

These days, jobs are uncertain and layoffs are always around the corner. Either you sell something (a book, course, template, coaching) and free yourself, or you sell 8 hours or more of your time and become a slave.

Remember, “whoever sits in a cubicle is replaceable.” (Choose Yourself by James Altucher) Sell something or sell your time forever.