and make a cleaner JavaScript code

Photo by Ilya Pavlov on Unsplash

Since programming language is abstract, the best way to understand it is by using an analogy.

JavaScript is no exception.

Today, I want to explain the concept of switch-case as an alternative to if-else in a possible plain using, of course, an analogy.

Case study (pun intended)

Imagine that you have an electrical circuit with different outputs. Each output is inside its respective case with a unique connector shape and equipped with an indicator light that will turn on when in use.

Now, whenever you want to operate a certain case, you must pair it with a perfectly similar connector. Should they are matched…

Lessons learnt by a gamer who has never been absent for 5 consecutive years!

Photo by Macau Photo Agency on Unsplash

I’m not tempted by notifications.

Even if my Facebook has a hundred notifications, I never checked it out.

My Gmail has 500+ unread messages, and I don’t feel any rush to open it.

Quora notifs? Never feel FOMO.

But game? That’s another story.

Back in 2016, I installed and played a mobile game where I can play over 100 characters from Marvel Universe, including Deadpool.

The graphics were so detailed and accurate that it felt like watching a movie.

The game story is amazing and I can level up my rosters to get to the top of the leaderboard.


…plan a better strategy instead

Photo by Kaleidico on Unsplash

We live in a society where we celebrate the winner and punish the loser.

Failed at a game and you’ll be forgotten.

And it applies in every aspect.

In school, you’ll feel bad if not making it to be a highest rank.

In sport competition, the crowd only cheer the champion.

And if we don’t make it, we start to feel bad, we start to doubt ourselves.

Maybe there is something wrong with us.

Maybe we are not good enough, or not smart enough.

Maybe we are not born to win.

And it starts to affect our performance, which leads…

Takeaways from the story behind a book marketing campaign

Photo by Pablo Heimplatz on Unsplash

This is the story about a motivator & marketing expert in Indonesia.

Back in 2008, he wrote a book titled Marketing Revolution.

And there came the tough part prior to the book launch: marketing budget.

The publisher (Gramedia Pustaka Utama) allocated only 200 million IDR (equivalent to $22,000) — surely it wasn’t enough to pay the media advertisement.

Had he gone the conventional way, the book won’t sell well, let alone hit success.

He needed a revolutionary (pun intended) strategy to raise public awareness and make a big name for himself and his book.

Then he came up with an…

Use 1Writer to power it up

Photo by Amin Hasani on Unsplash

The Obsidian powered up with Dropbox has been a blessing to me.

Now I can free my thought on this note-taking app from any computer connected to my Dropbox account, and it synced seamlessly. But hey, I still need another power-up. My last wish for this app is that I can make notes on the go. From my iPhone, that is. And dang, they provide it just for their private member.

Another simple Macro to the rescue!

Photo by Russ Ward on Unsplash
This is the sixth part of Excel VBA Introduction series. 
In case you missed the other part, here they go:
part1 part 2 part 3 part 4 part 5

This story covers about yet another VBA capability in handling Excel.

The code that I’ll share with you is very useful, especially if you want to add another strict protection to your worksheet file.

Combine it with the protect sheet feature (you need to right-click on the sheet, select protect sheet and enter your password), your workbook will be safely protected from those who are trying to modify it.

Here is…

and you’ll feel that your blink is way too slow

Photo by Halanna Halila on Unsplash
This is the fifth part of Excel VBA Introduction series. 
In case you missed the other part, here they go:
part1 part 2 part 3 part 4

This is one of my favorite macro.

But let’s talk about some background story.

One of Excel limitation that I’ve found is that you can unhide the hidden sheets in bulk.

In other word, you must do it manually, one at the time.

Now imagine how long it takes if you have — say, 20 hidden sheets?

See the demo below:

It lies in your perspective

Photo by Brett Jordan on Unsplash

Being proactive means that you are fully aware of the circumstance, thus choosing your own decision against it. You take the responsibility for your life. You choose how to respond to every situation. After all, responsible means “response-able”.

While the opposite is reactive, being driven by feelings from circumstance, and blaming the external factors. They are often controlled by situations since they don’t have the ability to adapt and change their perspective.

Proactive people focus on things they can do something about: health, children, habits, problem at hand.

Reactive people focus on things outside their reach: weather, government, people opinion.

or show only active sheet

Photo by elizabeth lies on Unsplash
This is the fourth part of Excel VBA Introduction series. 
In case you missed the other part, here they go:
part1 part 2 part 3.

When working in Excel, I prefer to clean and uncluttered view.

Sheets view is no exception.

There is a moment where those stack of sheets distracts me to concentrate.

That’s why, I write the VBA code to solve this problem.

The job is simple: show only the active sheet I’m working on.

You can use the same code here:

Sub ShowOnlyActiveSheet()Dim intSheet As IntegerFor intSheet = 1 To Sheets.CountIf Sheets(intSheet).Name <> ActiveSheet.Name…

Pair it with Dropbox

Photo by Mockaroon on Unsplash

If you love taking note, you’ll definitely fall in love with Obsidian.

Designed to be your knowledge base (or a second brain, according to its official homepage), Obsidian will handles your notes (which are plain texts in markdown format) and lets you make connection between those notes.

Since the notes are in markdown files, you don’t have to open the app to create a new note. Just use any editor you like and save it in .md extension.

And because it is markdown (or plain text), the app runs very fast.

Still, there is one catch: it only works with…

Yosef Andreas

An avid reader. I write mainly about the best values a book can deliver to you.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store