Yos Riady optimize for learning

👋 Hi, I'm Yos.

I'm a 👨🏻‍💻 Software Engineer based in ☀️ Singapore

Here are my recent thoughts...

Recently

Life can be much broader, once you discover one simple fact, and that is that everything around you that you call “life” was made up by people that were no smarter than you. And you can change it, you can influence it, you can build your own things that other people can use. Once you learn that, you’ll never be the same again.

Continue reading →

The Clean Coder

What does it mean to be a true software craftsman?

Here are my highlights from The Clean Coder, a code of conduct for professional programmers.

Continue reading →

GraphQL in an Age of REST

Above is a recorded talk I gave on GraphQL at the GeekCamp.sg conference. Slides are available here.

This blog post is an aspirational transcript for the talk. Keep reading for more!

Continue reading →

Recently

Mind and Hand

If you’re the smartest person in the room, you’re in the wrong room.

Continue reading →

So Good They Can't Ignore You

Passion comes after you put in the hard work to become excellent at something valuable, not before.

Here are my highlights from So Good They Can’t Ignore You, a blueprint for developing compelling careers.

Continue reading →

Entity Component Systems in Elixir

Entity Component System is used in the video game Caves of Qud

Entity-Component-System (ECS) is a distributed and compositional architectural design pattern that is mostly used in game development. It enables flexible decoupling of domain-specific behaviour, which overcomes many of the drawbacks of traditional object-oriented inheritance.

Elixir is a dynamic, functional language built on top of the Erlang VM designed for building scalable and maintainable applications.

In this article, discover how we can use both ECS and Elixir in a novel approach to structure our programs beyond the class based inheritance paradigm.

This is a follow-up article for my Entity Component Systems talk. The source code for my ECS implementation in Elixir is open source on Github.

Continue reading →

Composable APIs with Elixir pipes

Composable APIs with Elixir pipes

A rockstar developer, climbing out of the mess that is your library.

Taking lessons from Plug, Ecto, and Swoosh let’s examine how these libraries create composable and intuitive APIs like so:

# Plug
conn
  |> put_resp_content_type("text/plain")
  |> send_resp(200, "Hello world")

# Ecto
Weather
  |> where(city: "Kraków")
  |> order_by(:temp_lo)
  |> limit(10)
  |> Repo.all

# Swoosh
new
  |> to({user.name, user.email})
  |> from({"Dr B Banner", "hulk.smash@example.com"})
  |> subject("Hello, Avengers!")
  |> html_body("<h1>Hello #{user.name}</h1>")
  |> text_body("Hello #{user.name}\n")
Continue reading →

The Personal MBA

Here are my highlights from The Personal MBA, a fantastic collection of mental models in business and life.

Continue reading →

Publish-Subscribe in Elixir

Publish-Subscribe in Elixir

Publish-Subscribe is a messaging pattern that works as follows: a group of consumers subscribe to events of a given topic and are notified whenever an event of that topic arrives.

When an event is published into a topic channel, the channel delivers a copy of the message to each of the output channels. The advantage of this is we can decouple the consumers from the producers. Neither party need knowledge of each other to communicate.

In other words, pub-sub is a pattern used to communicate messages between different system components without the components knowing anything about each other’s identity.

Let’s look at an implementation of Publish-Subscribe in Elixir. The full source code is provided below.

Continue reading →

Recently

The day you stop practicing is the day you stop improving. Never let yourself be satisfied with how good you are at anything.

Continue reading →