A Kaleidoscope of Programming Languages: Lisp

When I was a kid, my favorite video game was Ultimate Mortal Kombat 3. When the game loaded, there was a quote:

There is no knowledge that is not power.

Continue reading “A Kaleidoscope of Programming Languages: Lisp”

Git from Scratch – Gittin’ Started

This is an introduction to git. I designed this first for non-coders, and have tried to make it useful for anyone who wants to learn more fundamentals of git. We’ll do everything locally, so feel free to follow along.

Hopefully this introduction will show you how git can be used, and how it fits into things like GitHub.

Continue reading “Git from Scratch – Gittin’ Started”

Common Refactors: Part 1 – Conditionals

In this series, I’ll talk about common refactors I suggest when doing code review in my day to day. I’ll start with conditionals, including severals example refactors. The goal is to help produce code that’s easier to read and understand, and thus, easier to maintain and produces fewer bugs.

These examples will be in TypeScript but the refactors are common patterns and can apply to most languages out there, such as Python, Ruby, Swift, PHP, Java, Go, JavaScript, etc.

Continue reading “Common Refactors: Part 1 – Conditionals”

The Repository and Unit of Work Design Patterns

Most web applications we build benefit from having a separate “data access layer” (DAL) and separating business logic from database interaction.

The main advantages to this are easier testing and maintainability. Because business logic is separated from the actual implementation, you can write code in terms of higher level abstractions, rather than having to worry about specifics.

Continue reading “The Repository and Unit of Work Design Patterns”

My favorite Data Structure: The binary search tree

Ever wondered how computers organize information? Data structures are the building blocks that store and manage data efficiently.

Like filing cabinets for your computer, they decide how you can find, add, or remove information. Understanding data structures is key for developers, as they all have pros and cons, and choosing the right one can make or break your solution!

Continue reading “My favorite Data Structure: The binary search tree”

Rock Solid Business Logic: The Action Pattern

The Action Pattern is a rock solid solution for organizing business logic in an application. It works quite well for medium to large-ish projects. I like the Action Pattern because it introduces few concepts, unlike some more elaborate and complex designs. It’s flexible, scalable and helps me feel more confident in handling complex business logic in my work as a developer. Even though generative AI now plays a bigger role in programming, it does not replace actual software design, and the Action Pattern can be a great tool to have in your toolbox!

Continue reading “Rock Solid Business Logic: The Action Pattern”

Advanced Search and Replace with Vim

I find search and replace to be a remarkably interesting topic, because it touches on so many Vim concepts. As a text editor, one of Vim’s superpower is composability, which enables combining small commands to accomplish complex tasks with search and replace.

Continue reading “Advanced Search and Replace with Vim”

Modern Full-Stack Web Frameworks: When to use What and Why

When it comes to choosing web development technologies, we now have more options than ever. And while that’s a good thing, it also poses a problem. Answering the question, “What is the ideal technology for this new project?” is not as easy as it used to be. In this post, I briefly highlight the most popular full-stack web frameworks, and why you might want to choose each of them.

Continue reading “Modern Full-Stack Web Frameworks: When to use What and Why”

OOP Fundamentals: Quick and Dirty Guide to Testing

There are entire books written on testing. And it surely feels more an art than a science. My approach is similar to Kent Beck’s:

I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence (I suspect this level of confidence is high compared to industry standards, but that could just be hubris). If I don’t typically make a kind of mistake (like setting the wrong variables in a constructor), I don’t test for it. I do tend to make sense of test errors, so I’m extra careful when I have logic with complicated conditionals. When coding on a team, I modify my strategy to carefully test code that we, collectively, tend to get wrong.

https://stackoverflow.com/a/153565/1015566

He goes on to add that different people will have different strategies and, at the end of the day, you just have to do what works best for you and your team. Extremely practical, and the approach I personally follow.

This won’t be a detailed post on every possible topic on tests and testing in Object-oriented Programming (OOP). There are many books about that already. Instead, this article will cover the basics of testing, so you understand how and why we test, and you can adapt it to your own needs.

Continue reading “OOP Fundamentals: Quick and Dirty Guide to Testing”

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”

Writing a Markdown Compiler – Part 2

Hello, and welcome to the second part of the Writing a Markdown Compiler series! In case you’ve need it, here is Part 1, Intro/Tokenizer and Part 3, Code Generation.

In this part we’ll talk about the second step in compiling: Parsing – also known as Syntactic Analysis. This part has a bit more theory, so it might take some time to digest. Sip some coffee, relax, take yout time, and as long as you don’t rush it you’ll find it’s not hard at all. 🙂

Continue reading “Writing a Markdown Compiler – Part 2”

Writing a Markdown Compiler – Part 1

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. There are a lot of concepts to digest before you get going. That’s why lots of devs just give up. We’d like to help with that.

Continue reading “Writing a Markdown Compiler – Part 1”

1 2