Category: software engineering

May 14, 2020

Open Closed Principle

A system’s design is rigid when a change in requirements leads to a cascade of changes in the software. The open closed principle is the antidote for rigid software designs, when implemented properly it makes the software system flexible. It’s the principle you should know. The principle states that software entities — modules, classes, functions–  should be open for extension but closed for modification. That […]

April 26, 2020

Single Responsibility Principle

I used to understand the single responsibility principle to mean that a module should do one thing. This is not true and unfortunately is a common misunderstanding of the principle which leads to a fragmented codebase with thin classes — that have one or two methods — littering the codebase as we can see in this Stackoverflow question. While researching for this article, I came across the SRP is a […]

April 12, 2020

Adding Middleware To Python Requests

I have been working on the Python SDK for Microsoft Graph for the last month or so and I am having so much fun. The sdk is built on top of the requests library preventing us from re-inventing the wheel. However, we need to extend the requests library with our own use cases. In this article, I show you how we did that using middleware. […]

April 1, 2020

Writing Maintainable Software

In many software projects, developer productivity reduces over time as it becomes difficult to add features. Maintainable software is easy to change and extend. Writing maintainable software requires a mindset shift, from writing software that works to writing software that works and easy to change. Refactoring is a tool for writing maintainable code. It involves moving parts of your program around and renaming others. You […]

April 1, 2020

Meaningful Code Reviews

When I started reviewing code — early in my career — I felt unproductive. It wasn’t clear how I was contributing to the product without writing code. I only did code reviews out of tradition, something you do before merging changes. Since then, my perception of code reviews has evolved from a soul crushing tradition to an opportunity to learn and improve the code quality. […]