Optimizing SQL queries can be done in many ways, but the current case that I am going to show you is a little bit different. Last week my direct manager asked me to see why a list of data loads very slow. Also, if it was possible, to optimize it. The data set consisted of around 1000 rows. The load time for all rows was about 7 seconds. Even though each row was an elaborate business entity, that did not justify the load time. As every sane developer could see, there was something wrong. We are using Entity Framework, so…
Often we developers are represented as introverts with a big ego. And, most of the time, that representation is accurate. We prefer to lock ourselves in a dark room with a massive amount of coffee and create complex and beautiful systems. That makes us happy but also boosts our ego. Haven’t you felt like a god after completing a challenging task after 12 hours workday? I bet you have. We all have. Being a god (I hope you got the irony here 😊) with not so developed social skills sometimes causes problems in our relationships at work. One such a…
Microservice Patterns is definitely one of the best books on the topic. In addition to the foundations in building microservice architecture, Chris Richardson provides many specific examples. The author also draws attention to topics that are not mandatory in developing this type of architecture but would be useful in specific cases – Domain-Driven Design, Event Sourcing, and CQRS. The examples given are entirely Java-oriented (Java code, as well as libraries for Java). However, this should stop anyone working with another language and platform. The main ideas are well presented and can be implemented with almost any technology stack. The last…
Lazy loading is a very cool design pattern that is not often talked about. Many frameworks implement it without even telling us about it 😊. For example, .NET Entity Framework (all versions) support the pattern. But what is lazy loading? The idea behind the pattern is simple. By using lazy loading, we defer the initialization of objects (heavy ones) until we need them. That’s it. Let’s provide an example. We have a simple HR application. The application supports the tracking of employee records. Each record has standard fields like name, email, date of birth, and image (like a profile picture),…
Yesterday I had to check a reported bug. The error message was “System.ArgumentNullException: ‘Value cannot be null. (Parameter ‘source’)'”. Code is in C#, and as you may think, most of the time, such problems are trivial. Trivial also was the way we could prevent it – to initialize collections. I started debugging the case. Just in 5 minutes, I saw that that problem was really trivial. What was the setting, and what was missing? We have a budget creation. A budget is a single class containing standard budget information (like a year) and a list of budget headings. For simplicity,…
In this article, I will try to explain simply what the SOLID principles are. Are they essential for building quality software, and should we follow them? By all means, principles in life are a good thing. They shape borders and do not let us make otherwise avoidable and stupid mistakes. By definition, principles are fundamental truth or proposition that servers as the foundation for a system of belief or behavior or a chain of reasoning. Yes, you can read it once again 😊. SOLID is an acronym. Each letter in SOLID stands for an object-oriented design principle. Initially, they were…
Let me say it again – Software development is about being effective and efficient. Browsing twitter and other social media I often see how technology is preferred just because is “sexy”. It is new and “cool”. You have to remember that programming languages and platforms are just tools. If you need a hammer you should not use a screwdriver, no matter how new and fancy it is the screwdriver. Some bad examples of software development During my career, I have seen how projects fail because of the wrong tool usage. Real example – a very simple CRUD application but implemented…
Dependency injection questions are very often during a job interview. In the best case, you should be able to answer why do we use DI container, what is Inversion of Control, and to be familiar with some concrete DI container. Before .NET Core, we were used to working with some third-party libraries. I preferred Autofac (and I still use it for many none .NET Core projects). With the .NET Core release, the framework came with an integrated DI container. One of the most asked questions during .NET Core job interview is “What are the scopes of DI container in .NET…
I have spent half of my career having remote work from home. Working from home has many positive sides, but also some problems. I am writing this article now because the topic is more actual than ever. So, let’s see what we lose when we win. Bonding with colleagues Social interactions are very important. Only getting close with your colleagues you can build a strong and well-performing team. Sadly, this is way harder when the work is decentralized. Many tools and applications make us productive in our business processes but don’t do much much in helping us creating strong teams.…
Every year I read at least a dozen books about software development, computer science, etc. In 2019, I read a book I can easily classify as one of the best books written on software development topics. The book is about developing distributed systems in the right way. The full name of the book is “Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems” by Dr. Martin Kleppmann (links are not affiliated links). I liked the book because every topic is presented in-depth but also in a simple way of understanding. The author starts with the very basic…