Inline programming

I’ve never seen it called this way but, what the hell, what kind of world would it be if a man wasn’t free to make up his own jargon. So here’s an example of what I like to call inline programming:

fetch('/posts')
  .then((response) => {
    response.json()
      .then((data) => {
        const posts = data.results;
        posts.forEach((post) => {
          if (post.comments.length > 0) {
            renderComments(post.comments);
          }
        });
      });
      .catch((error) => {
        alert('Oh not this again!');
      });
  });
  .catch((error) => {
    if (error.errorCode === 42) {
      alert('Aw, snap! The server is on fire!');
    } else {
      // Log error but don't tell the user (shhh...)
      console.error(error);
    }
  });

Continue reading “Inline programming”

Why “work hard, play hard” is stupid advice

Let’s look at the numbers.

  • There are 168 hours in a week.
  • We work 40 hours (on average).
  • We sleep 49 hours (assuming 7 hours/night).
  • We commute 5 hours (assuming 30 mins each way).
  • We have 74 hours left to do anything else.

Seventy-four hours. This means we have time for ourselves only 3 out of 7 days a week.

That’s 42% of our life.

Continue reading “Why “work hard, play hard” is stupid advice”

On making an impact and changing the world

I’ve recently started reading “So good they can’t ignore you” (Cal Newport) where the central argument is: “follow your passion” is crappy advice, you should get really good at something to get passionate about it.

There’s something else I believe has been misinterpreted for a long long time. To “make an impact”. To “change the world”. This is what most young entrepreneurs will tell you. They want to change the lives of as many people as possible.

Bullshit.

Continue reading “On making an impact and changing the world”