Tag Best Practices

OCP vs YAGNI

In this post, I want to cover the topic of OCP vs YAGNI - contradictions between the Open/Closed Principle and the You aren’t gonna need it one. OCP Let’s start with a refresher for what OCP is. The Open/Closed principle states that: Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. It was first introduced by Bertrand Meyer in his canonical Object-Oriented Software Construction book.

Database Delivery Best Practices Pluralsight course

My new course Database Delivery Best Practices for Pluralsight went live. Database Delivery Best Practices Database delivery is still something many programmers struggle with. It’s not always clear how to deal with the database schema differences in different environments, how to resolve merge conflicts that inevitably arise when more than one programmer works with the DB, how to make sure you don’t break the other teams' applications when you refactor the database structure and so on.

Trying to impress people with your code

In this post, I’d like to write about the personal traits we all possess. Namely, I want to talk about being proud of your code and trying to impress people with it.

Reference data as code

In this article, I’d like to write about a powerful technique that can potentially save you a lot of work and make your code much more concise: representing reference data as code.

Early exit is a tail call optimization of procedural languages

A couple of days ago, a nice analogy came to mind which I thought would be an interesting one to share: early exit is essentially a tail call optimization of procedural languages. Let’s see how it is so.

Domain-centric vs data-centric approaches to software development

In this post, I’d like to make a comparison of two approaches that prevail in the world of (mostly enterprise) software development: domain-centric and data-centric. If you read my last post (or any other post, quite frankly), you might have noticed I personally gravitate towards the domain-centric approach. Although this article is intended to be an impartial one, keep in mind that my bias can leak out. Domain-centric vs data-centric approaches The main difference between the two approaches is in the way people adhering to them treat software.

Is SQL a good place for business logic?

<TL;DR> No, it isn’t. While SQL is a Turing-complete language and we can use it to encode any business logic we want, placing business (domain) logic into SQL leads to a less maintainable solution comparing to one that uses an OO or functional language. Because of that, I advocate to limit the use of SQL to read-only queries (which can potentially contain business logic, that’s fine) and simple CRUD statements where possible.

Most valuable software development principles

I’d like to wrap up the "Most valuable software development principles" article series with this post.

Making implicit assumptions explicit

Another software development principle I advocate you follow is making implicit assumptions explicit in your code. Let’s see what that means.

Fail Fast principle

The fail fast principle is underlying for many other software development practices. It comes out so often that it’s hard to cover all its appearances in a single article. Nevertheless, that is exactly what I’m going to do here :)