Dying and the value of our work

Bit by bit, we’re inching closer to our deathbeds. While this isn’t meant to bring anyone down, I am trying to elicit an emotional response. Why? Because without evoking emotions, we tend to forget that we all eventually move on.

This way of thinking has many implications, not least for our work. That overused, heavy but oh-so-meaningful thing we like to think about and spend time doing.

If we really care about our work and what it means to people, we owe it to ourselves and the people whom we think our work is for to pause and ponder (before we can’t):

Is the work I’m choosing to do today going to improve someone’s, anyone’s, life now or very soon in the future?

If not, don’t do it. Choose to spend your precious time doing something else that does make someone’s life better. I believe that ultimately all work is done to achieve that singular end of improving lives.

Journalists write to inform and catalyse action. Elon Musk innovates so that future generations can planet-hop and in the meantime, inspire generations of innovators. Programmers create software to relieve society of the banalities of life and help people (re)connect. Street cleaners sweep the floors to allow fellow city folks to live in a hygienic environment.

We may not do what we do because we love it, but the fact that there’s such work to be done should be enough indication that society, collectively, values it. And if society values it, it means people value it, which means individual human beings value it.

Your work, my work, everyone’s work is valuable. But it can be even more valuable, even more impactful and meaningful if we just pause occasionally to remember that we’re dying, and there’s only so little time left to do it. We don’t have many more days to work.

Eggs that take more time

One of my favourite Singaporean foods is the classic eggs and toast breakfast. Two soft-boiled egg heated to just slightly runny, served with soy sauce and a dash of pepper, paired with kaya and butter toasts and a cup of thick local coffee that my parents’ parents drank. It’s perfect.

There used to be only one kind of establishment that served these breakfasts, known affectionately by locals as the hawker center (in English) or kopitiam, in Singlish-Hokkien. The eggs are boiled and fished out of their hot metal tubs by the stall owner, and you’d have to crack open the eggs yourself.

Recently, about 6-8 years ago, a classier kind of establishment has begun springing up all across Singapore and are now dominated by two big chains, Ya Kun and Toast Box. They serve eggs without the shell, and even promise to swap them whenever you requested to! It’s every egg connoisseur’s dream come true.

The price difference between these two places is big enough to create a clear division among Singaporeans though not to any devastating effect. We still enjoy our classic breakfast, be it in a humble hawker or a classy sort-of restaurant. It’s all good.

But recently I found a third in-between place that cracked the eggs and priced somewhere in the middle. I work near this place and have it almost every morning. It’s great, but I started noticing a tinge of unhappiness in the eyes of the person who makes these for me everyday. So I did what every normal person would do – I made a guess.

Here’s what I think is the reason: there’s a misalignment in incentives.

The stall assistant makes these eggs and normally in these settings, he wouldn’t need to crack the eggs. Just serve them up with their shells intact, and the customer is supposed to do the sticky work of pouring the gooey stuff out onto their plate. Now he has to, and that would be fine if he was paid extra to do it. It is, after all, quite annoying to have egg white sticking to your skin and to have to replace eggs with broken yolks.

That’s most likely not the case though. The stall owner keeps the bulk of the midway price hike and pays his workers the same amount. All that work, day in and out, with nothing more to be had. No wonder they’re always serving my breakfast with complimentary sideway glances.

As a consumer, what would I do even if I knew this to be factual? Nothing. Truth be told, I’ll continue to eat the same thing and accept that I’m partially the source of their displeasure.

But what can the stall owner do? Plenty, I think, to align the incentives. This stall owner must be selling his “innovative” breakfast to quite a lot of people to stir up emotions at 8am in the morning, and I think there’s a business case to pay his employees just slightly more than the typical kopitiam does. Happier employees, happier self-fashioned egg connoisseur, more business.

And there you have it, another wild conjecture written in a kopitiam.

Mind the always tired folly

As an adult, I often hang out with friends after work for drinks or a munch. As an adult, I’ve also noticed that it takes time for other adults to be vulnerable in a social setting, before we talk about The Real Stuff, and sometimes just when things start to get interesting someone would announce that he is tired and propose to call it a night. It’s not just the guys either.

We’re all adults here, so I’m going to lay it straight – that’s not cool.

The hours after work are holy for anyone who’s working full time. To get together takes advanced planning and saying “no” to other plans and accepting an expense of energy (that could have been saved so we’d have more to work the next day), and being always tired and taking away the best parts of the night is quite simply unacceptable.

But why is this happening in the first place? What’s making that person in the group always tired?

It’s very unlikely that this is someone who genuinely has tonnes more work to do than the rest of the lot. If he did, he’d probably be hanging out with his other busy friends, not this bunch who appreciates a good chat. The truth is neither the truth nor the reason in these situations.

That leaves us with 2 possible answers:
1. This person doesn’t actually care about you and your group of friends.
2. He/she isn’t keeping balance in his life.

If it’s the first answer, there’s nothing much left to discuss. Let this person slowly fade away from the pack.

If it’s the second though, what can we do?

Every person has the same amount of time each day. How we spend the time determines whether we’ll be beat by the time we finally get to hang out with friends or not.

I know that everybody also has varying degrees of financial independence and family responsibilities (though it’s most likely not that big a difference if you’re friends), but I believe that this fact only partially accounts for someone’s perpetual fatigue. There has to be a specific area in this person’s life that is maintaining, even enlarging the leaky pipe. I believe that for most people (based on observation), it’s the (lack of) state of their minds.

I know because I’ve been there. I’ve been the person who begs for the night to end early so I wouldn’t be exhausted at work the next day before. Every time I manage to muster enough clarity to reflect on the reason, it’s always the same one. I hadn’t been spending my time properly. I’d been mindlessly doing thing after thing, and not doing more things after things. Things up there were in a mess.

Living a good life requires deliberate action. A person will not get better just by being himself. He needs to think of a better version of himself, sketch a plan to become more like that and occasionally put in the work to actually improve. Spending any time in a mindless state in 2017 will not just cause us to stagnate – it’s likely to cause us to regress.

We’d be better off taking what Andy Dufresne in Shawshank Redemption had to learn the hard way and run with it: get busy living, or get busy dying. Close YouTube whenever you’re on it just for entertainment (and recognise it’s the new TV) and get more sleep. Maybe then you’ll not feel quite as tired the next time you’re with your slightly more mindful friends.

Go from good to amazing with storytelling

Today marks the end of the first project for WDI7, the 7th web development course to run at General Assembly Singapore, and boy is my mind dizzy. These guys are amazing.

The strong ones delivered breathtaking games. Those who struggled pulled themselves together and levelled up, and presented projects that exceeded our (and I suspect their own) expectations. I attribute some of that to their extra 2 weeks in December, and a lot of it to their grit and willingness to collaborate. The result was a jaw that could hardly stay up.

There was a particularly poignant moment for me today when one of them showed his game. To create the game–a swap-the-pipes-position-to-transport-some-weird-fluid game–involved a good grasp of JavaScript programming, but what impressed me wasn’t recursive functions or curry-ing. It was his storytelling, and how he used it to wrap around his game.

In a matter of seconds of him explaining the made-up story of us (the player) being inside a cyborg dinosaur, I was sold. He told it like he genuinely believed it, which somehow made it more believable for me. We are playing this game to keep the robot dino operational – the fluid were its mechanic electrolytes or something along those lines. I had a vivid imagination of myself inside the dinosaur pulling levers to keep it and its chicken front limbs upright and moving.

While his project was also technically complex, it didn’t matter that it was. If it had been a simpler game that didn’t require recursion and a clever method to animate moving fluid, it would’ve been just as awesome. To put it as it is – because I’m sold on the story, I’m subconsciously making things up to support it.

As a programmer I’m able to tell (and appreciate) the level of sophistication needed to execute a game. But in this case, once the good story has been told, that part of my mind has gone dim; and the party appears to have moved to the swankier Faculty of Imagination. There, everything is more fun and fun is everything.

To make a good game, tell a good story. It’s the conduit into a person’s emotional playground. Once you’re there, a pretty good game becomes amazing.

Is it worthwhile doing computer science?

Earlier today we had a guest speaker come in to speak to us (the Web Development Immersive class) broadly about computer science, algorithms and data structures and things like that. He also shared his experience at General Assembly Singapore, which was a bit over 4 months prior. That got me thinking about the time tradeoff.

Is it worth the time to do a CS degree?

The quick answer is it depends. I’m not interested here to compare computer science with another bachelor’s degree to try and value one more. So in that case, the answer is I don’t know.

But let’s compare doing a computer science degree and not doing a computer science degree, but instead, spending that time as a computer science practitioner, as a developer. This is the question reframed:

At the end of 3 years of (A) doing a computer science degree, and (B) working as a developer, which choice puts you in a better position to be an engineer?

The obvious answer you’re probably trying to yell through the screen right now is B, of course! Engineers build things, and the only way you get better as an engineer is if you gain experience building things, the argument goes. I agree. But that leaves us with another curious question:

Why bother learning CS at all?

If the point is to be able to build software faster, more beautifully and with less bugs, we’re better off spending the time writing code. CS offers nothing but theory.

So… are there roles that companies prefer to fill with CS majors with less experience? Probably not. Google and Uber to known to hire based on ability to create good software, not the origin of your CS degree. Startups even more so, for practical reasons. Same for dev houses and big consultancies like ThoughtWorks and Pivotal Labs.

So why bother with a CS degree when it’s less useful in helping you find a good software job? They can’t all be going into academia. If they did, then ok. That’s one place I imagine CS is valuable.

But then there’s the art of computers in CS. Yes, I know it’s called computer science, but what I mean by “art” is the philosophy of computing and the foundations that everything this digital life we’ve quickly acclimatised to is built on. If your goal is to really understand what you’re doing when writing code, how memory is allocated for the new variable you’ve declared, perhaps so that you can appreciate your work and that of other scientists and programmers more, then it may be worth it sacrificing dev experience to learn CS.

Other than that, I still believe it’s a much better idea to attend a 3/4/5 months bootcamp and start being a practitioner as soon as possible. That’s the beaten path to becoming a good software engineer.

Cheatsheet for working with 2D arrays in JavaScript

Arrays are basic data structures present in all programming languages I’ve been worked with so far: JavaScript, Ruby, Python, PHP. It’s easy enough to understand normal arrays but I’ve found that introducing an extra layer (ie. a second dimension) makes it exponentially harder to work with. This cheatsheet is a growing list of tips and tricks for using 2D arrays in JavaScript. The idea is portable to other languages, since the ideas are universal.

Rule #1: Always use a 1D array if you can help it

We can represent a grid, say a tic tac toe board, using a single array:

But I’ve seen people opt for a 2D array instead:

I wonder, why would anyone do that, especially for a small 3×3 grid? I couldn’t come up with a good, sensible answer. Accessing the 2D array is pain compared to the 1D array using iterators:

What about when the array is much larger? Say, 10×10? Let’s also use a for loop to generate them so we don’t have to manually generate the array (because we’re lazy!):

With the 2D array, we’re basically splitting a grid into columns and rows. So if we were to iterate through every single element, we’d have a for loop nested inside another for loop, which means we’ll go row by row, and within each row, we’ll go from column 1 to the last column. To this rhythm…

R1 C1 >> R1 C2 >> R1 C3 >> … >> R1 C10
R2 C1 >> R2 C2 >> R2 C3 >> … >> R2 C10

R10 C1 >> R10 C2 >> R10 C3 >> … >> R10 C10

Now would it make more sense to use a 2D array? Will it provide greater versatility down the road when we want to manipulate the array?

2D array is good for accessing an element based on a specific coordinate

2D arrays would indeed be superior to 1D arrays if we could access an element based on a specific coordinate, like R3 C6. Do they give us that flexibility?

Yes. R3 C6? That’s as simple as calling grid[2][5]! We now have access to the value 26. That was much easier than using a 1D array, which would require us to first do some calculations before being able to pinpoint the value of a specific element that corresponds to the third row fifth column.

What happens if we need to programmatically change values of the elements surrounding a specific element?

I’ll explore this in tomorrow’s update of this article!

How to think about marketing

You find yourself suddenly with the heavy responsibility of coming up with a marketing strategy for a tech company with a product you actually believe is going to be great for e-commerce businesses. What do you do?

You panic a little, just enough to get your creative juices squirting all over the place and you get to work. And you start to do what you think any actual marketing executive worth his salary will do. You draw the line in the sand, demarcating who is and isn’t your customer, split down to customer personas and so on.

There’s Joan the ex-blogshop entrepreneur turned Shopify success story who is just beginning to dig into data analytics. She’s 32 and has been in this industry for over 3 years. She’s passionate about trying new ways to do less work and gain better results, and loves it when she finds that thing that gives her an edge over her boutique e-commerce competitors. Or Joshua the middle-aged marketing executive at a medium sized e-retailer who is looking for his next big proposal that will 2X or 3X his company’s revenue over the coming year and land him a promotion. Or Haley the marketer at a tech startup with a product she actually believes will be good for e-commerce businesses out there…

All of a sudden, after investing a week researching and drafting a kickass proposal that you were sure was going to impress, it dawns on you that you might be doing it wrong. It’s not so much that it is wrong as it is disadvantageously misleading. These ex-blogshop entrepreneurs and marketing executives and decision-makers are not all that. From first principles, they’re people. They are just like you.

A marketer can loathe the idea of shopping as much as a entrepreneur can appreciate a stable corporate career. She can also be a mum or a sister or a rock climber, and when she’s the climbing she prefers to listen to classical music and go barefooted. She might even have a minor in data science.

The point is this: each of us are much more than the labels marketers think they cleverly brand us with. And if we devise a plan based on these labels alone, we’ll be missing a large part of the picture, to the detriment of the company, and even for the person who wants to be your customer.

In rough order, each of us are probably human first, family second, friend third, happiness-seeker fourth and perhaps professional fifth. So as a human trying to tell other humans about something good and valuable, it would be wise to at least try and think of him or her as a hairy ball of scrunched up identities than a single, neat, classifiable strand. It’s one human to another human.

This is why I believe a not-bad product can sell better than a high quality product if its marketers creates a story that is more appealing to its customers, be it an honest reflection or carefully constructed facade. People are much more. On that note, it’s worth re-interpreting B2B businesses as having customers that are no different from B2C businesses, since both businesses are in the business of appealing to humans.

Of course, it’s much easier said than done. Categories exist to help us make sense of vast data sets (interests, desires, personalities, beliefs, etc). But I find it is useful to remember that we’re ultimately trying to sell to another human being – not some imaginary type of customer. Even if it’s only to remind myself that there are more than a few ways to appeal.

Publish, even if you think no one is reading

As crowded as the internet is in 2017, anything well thought out and clearly written will be read, as long as it is discoverable.

Every writer should write with that confidence in mind, and let that confidence spur you to write even more. At some point, it becomes a self-fulfilling prophecy: the more you write, the more you think, and the greater the chances of you writing something well thought out and clearly written.

reelfix has a blog post that illustrates this very well. Haven’t heard of reelfix? Well, neither have I to be honest, until today. Every time after an interesting TV show or movie, I go to Reddit and read what everybody else thought about it. After watching the first episode of Sherlock season 4 tonight, I found many people talking about “The Moffat Effect” and had to dig one tab deeper.

It turns out that someone wrote about it in a blog post published on a WordPress blog, and it’s become a thing, used to refer to the rare ability to modernise a classic without losing too much of its original author’s flavour. The author of the post isn’t known since the post was published under the Gravatar of reelfix, but his/her analysis is clear and the writing so on point that it’s been picked up by the peoples of the Internet. Like they’re known for giving credit when it’s due, digging up esoteric terms coined by other random Internetizens.

This is a great example that anything well thought out and clearly written will be read, as long as it is discoverable. What isn’t discoverable in 2017, with our obsession with scrolling on the bowl, in the line and even in the sack? The best part? You don’t even need a custom domain; something like https://reelfix.wordpress.com is good enough.

So don’t let the obscurity of your writing stop you from your writing. I’ll even package it in New Year’s speak if it helps you be open to the idea. “This new year, think and write more. If it’s good, they will come. Because your thoughts and writing are (probably) better than you think.”

And if they don’t, well, cry yourself a river. Then maybe write about that.