Someone who professes their love for Microservices probably hasn’t done it correctly. One who finds it mildly inconvenient is probably doing something not completely wrong. One who hates it intensely is probably a Devops Engineer.

When writing Microservices, it is easy to forget its inherent distributed and fragile nature, especially if an entire team is working on just a single service. We need to be aware of the implicit network cost and failure, and embraces it fully.

An ideal microservice does only 1 thing. It has no dependency to other services, like a hunter in a dark forest, it makes…


How do you differentiate a List of Integer from a List of String at run time?

If you’re writing application code, the need for Reified Generics usually signal code smell, you should probably refactor your way out of it. Code-generation-heavy libraries however, depends their lives on it. Good news is that there is a hack to achieve it.

The application of Reified Generics is most visible to us when dealing with object serialisation, e.g. How do you parse a JSON array into a list of User, vice versa. …


In this post, we will explore one of the most complex concept in Java through First Principles. To risk a little bit of oversimplification, First Principle is a way of learning by breaking down a complex problem into its most fundamental form. At this level of reasoning, the only constraint is the limit of the language specification itself, rid of all external assumptions. It is a bottom-up approach of solving a problem by inspecting the form, instead of the behaviour of the element.

A non-FP way of learning is when you learn by applying assumptions. Sometimes the assumption manifests itself…


As a Software Engineer, we should strive to understand the fundamental of the things that don’t work, and more importantly, be conscious about the things that work. That requires us to practice mindfulness when writing code. There is this fear of pursuing more because it makes us conscious of our ignorance, further aggravate the Impostor Syndrome. And the antidote to that is simply to pursue it.

This series is about discovering concepts through things that we’ve already known, dig deeper into the abyss to find things that we don’t know, and attempt to confront them.

Today, we’re exploring the basic…


Photo by Ant Rozetsky on Unsplash

It is important to understand that Java generics is not true generics, it offers only syntactical support to take advantage of compile time safety check. All generics gets compiled to non-generic code during byte code generation.

Before Generics…

In the beginning, Java doesn’t support generics, and this is how you would manipulate a List:

List myList = new ArrayList();
myList.add(“filthy frank”):
String str = (String) myList.get(0); // "filthy frank"
Integer i = (Integer) myList.get(0); // error: ClassCastException

Lots of casting, not very type-safe huh, must be pretty common to get a ClassCastException™️.

When JCP introduced generics in Java 5, they have to…


Photo by Guillermo Ferla on Unsplash

Suppose you were designing a Planet Explorers that routinely travel across the planets in the Solar System to discover life form. However, the method of exploring is different on each planet, due to the difference in atmosphere and surface composition.

Let’s model 3 planets for simplicity.

Then, we implement the method of exploration on each planet.

Now, let’s deploy our explorer to the planets!

The output

Cannot explore life on an unknown planet...
Cannot explore life on an unknown planet...
Cannot explore life on an unknown planet...

Oops, seems like there isn’t enough information for the compiler…


Photo by Carl Heyerdahl on Unsplash

This is an opinionated guide on pimping your IntelliJ for maximum productivity.

3 🔑 to productivity in IntelliJ

  • Keep your hands on the keyboard
  • Remove all visual distractions
  • Learn all the essential shortcuts

Theme

Find a theme that you like, a theme that is engaging to you, and keeps you coming back. You may want to switch theme often enough to keep things fresh and interesting, I change theme once a few months.

Recommended dark theme:
1. Gradianto
2. One Dark
3. Ladies Night
4. Darcula (Built-in)

Mac System Preferences

Turn off conflicting shortcuts

Uncheck Input Sources shortcuts in System Preferences, they are in conflict with some very…

Darren Wegdwood

Tired Meme Reviewer

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