Two reasons provoked this article – my previous article and a recent Twitter post asking, “How do you learn new technologies?”. In the next paragraphs, I will try to explain how I see learning should happen. Please have in mind that what I suggest is not for total beginners currently learning basics as “if statements” and variables. Young developer with great ideas And not that great ones. When you are inexperienced, everything is new to you. Everything is exciting, and you want to try everything. It is a lot easier to jump on the hype train for something new. Always…
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…
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,…
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…
Last week I had to check a slow executing report. It was an SSRS 2016 report. I am not that familiar with the system so I took the task as a challenge. The execution time of the report was around 35 seconds. This time was very unrealistic based on the volume of the used dataset. My first task was to start removing queries one by one (and running the report) so I can catch a bad optimized one. Surprisingly there was no such a query. The queries were not perfectly optimized but not badly written. Also, it was interesting that…
A while ago, an ex-colleague of mine shared with me he had been given a task to refactor an enormous legacy MS SQL stored procedure. It was interesting to me how enthusiastic and happy he was without realizing the upcoming pain… Well, two weeks later the “refactor” was not even close to the final goal and management gave him another task because they had realized that this one is a lost cause. Is he a bad developer? Not at all! Only the approach for that refactoring was wrong. Let us recall what does “refactoring” mean? Refactoring is the change of the internal structures…
If we look into Wikipedia for code refactoring, we are going to see the following: “Code refactoring is the process of restructuring existing computer code—changing the factoring—without changing its external behavior. Refactoring is intended to improve the design, structure, and/or implementation of the software (its non-functional attributes) while preserving the functionality of the software.” Why code refactoring? Why do we care about improving the design, structure, and/or implementation of software? From the project manager’s point of view, the goal is to reduce the cost of support and future development. That is fine, but what makes the regular developer do refactoring?…