OOP Fundamentals: The Decorator Pattern

The decorator pattern is one of my favorite patterns. It is simple, extensible and powerful. It feels like it follows the essence of object oriented programming beautifully. Sadly though, it is also easy to be misused or misunderstood. So, in this post I will show you the essence of the decorator pattern, illustrated with a few examples.

Continue reading “OOP Fundamentals: The Decorator Pattern”

OOP Fundamentals: The Dependency Inversion Principle

The dependency inversion principle is one of the cornerstones of object-oriented programming. Without it, there is no object-oriented design. It’s that important.

Continue reading “OOP Fundamentals: The Dependency Inversion Principle”

Integrating your dev workflow with WSL

Windows Subsystem for Linux, or WSL for short, is a quite impressive piece of technology, and one of the best moves Microsoft could have made to attract developers. Particularly web developers.

Continue reading “Integrating your dev workflow with WSL”

Composition over Inheritance, with JavaScript examples

If you are into object-oriented programming, you most likely have heard about composition over inheritance. The concept itself is simple: Whenever possible, prefer to compose objects rather than introducing inheritance.

Continue reading “Composition over Inheritance, with JavaScript examples”

Common Code Smells in OOP

Over years of reviewing Ruby code, the same things tend to come up over and over. In this post, I’d like to address some of the most common code smells I find when reviewing OOP code (and Ruby code in particular).

Continue reading “Common Code Smells in OOP”

Modularizing The JavaScript You Already Have

Over time, without structure, things fall apart. So give them structure, a few conventions, and start to make them more maintainable. Let me say more, at least in the context of JavaScript in your applications (or did you think I was talking about gardens or buildings or such? lol.)
Continue reading “Modularizing The JavaScript You Already Have”

A Ruby-ish Xmas

Ruby-ish, rubbish… Get it? Anyways, not like Ruby-ish means bad! Quite the opposite!

It’s the day after Xmas and because Ruby is awesome and delivered 2.6.0, we’ll get to play with some of our new Xmas gifts: Kernel#then, Proc#>> and Proc#<<.

Continue reading “A Ruby-ish Xmas”

ePubber – generating ePub files with Ruby

ePub is a digital book format which is pretty common nowadays. It’s supported natively by Windows and Android and it’s one of the official formats for digital books in the Apple Books store.

In this post I’ll talk about generating ePub files with Ruby and how to painlessly integrate this feature to your application. I’ll be using a Ruby gem I created called ePubber, which I created to help manage ePub content.

Continue reading “ePubber – generating ePub files with Ruby”

Writing a Markdown Compiler – Part 3

Have you ever wanted to make your own programming language? Maybe a template engine? A JSON parser? If you have ever built any of those, you might have noticed it’s not exactly easy to get started. We’d like to help with that.

Welcome to Part 3, the final in this series on Writing a Markdown Compiler!
Continue reading “Writing a Markdown Compiler – Part 3”

1 2