Markus Oberlehner

Blog Page 10

Naming Things: Staying in Line with the System

When multiple people are working together on a project, it is important to define some rules to make sure that everything stays tidy and chaos does not arise. How to name things is one of the areas in which there are always differences in opinion...

Naming Your Unit Tests: It Should vs. Given/When/Then

For the most time, when writing unit tests, I favored the it should ... pattern for naming my tests. But time and time again, I noticed that when following this naming convention, I either had to write very long test cases or omit important information...

Weekly Recap: Atomic Commits, Legacy Code and Evil String Identifiers

Last week I had two insights: sanitizing data as early as possible can make it much easier to reason about your code. And reducing the complexity of your components, the deeper down they are in the component tree can lead to a cleaner architecture...

Vue.js Functional Base Components Powered by CSS Modules

In one of my earlier articles, I wrote about how to use functional Vue.js components so that they inherit attributes such as classes and styles. This way, functional components are perfect for creating simple base components. In this article, we take a look at how we can simplify and generalize the process of creating new functional base components by automatically creating new Vue.js components from CSS files...

Weekly Recap: Data Sanitizing and Reducing Complexity up the Tree

Last week I had two insights: sanitizing data as early as possible can make it much easier to reason about your code. And reducing the complexity of your components, the deeper down they are in the component tree can lead to a cleaner architecture...

Weekly Recap: Single Parameter Object and Craftsmanship vs. Engineering

The last week was, on the one hand, a busy week and, on the other hand, a slow week when it comes to learning new things. One topic that comes up again and again in my daily programming work is the handling of function parameters: Is it a good idea to always use a single object as the only parameter for functions?