Category

Everyday software development

Category

Yesterday I had to explain to a friend (a junior developer) what OAuth (OAuth 2.0) is. As I saw, It is relatively hard for a developer with little experience to grasp the idea behind it. Most of the time, people don’t get the concept behind OAuth 2.0 and OpenID Connect just because they are poorly explained. So in this article, I will try to explain them in the simplest way possible. What is OAuth 2.0? OAuth is an authorization protocol. Please don’t mistake it with an authentication protocol. The sole purpose of OAuth 2.0 is to grant access to resources,…

Stress! The release date is coming. The client is changing the requirements at the last moment. QAs are reporting bugs. Everything breaks. You work long hours, and you still have a ton of work (but meanwhile, you have two meetings you must attend). Sounds familiar, right? So, how do we survive that and keep our sanity? I won’t preach to you how you should meditate, eat healthily, do sports, etc. Of course, these things are essential, but today I want to share my approach with you—my philosophical point of view. Just embrace the stress I know this sounds ludicrous but…

Software development is not about coding. Code is only the way we communicate our intentions to the scrap box under our desk. Software development is about thinking and finding simple solutions to complex problems. We all know this. But also very often we forget it. The wrongest thing you can do is to start coding right after you got a task. It is scary how many people do precisely that. Of course, I don’t mean simple tasks like adding an extra field to a form. In this article, I will share with you how I approach and plan my development…

This one will be short. Yesterday, while I was browsing a programming forum, I came across a statement like this: “… and currently, I am creating some neat abstractions if I need something more in the future…”. This is so wrong! And let me tell you why. Overengineering Overengineering in software development means creating something that is not needed. Something that brings overhead to the development process and inefficiency to the end product. An elementary example of overengineering is if all your applications data can be saved in a 10 line XML file, but you use a SQL database. Predicting…

One way to spot a lack of professionalism is missing unit tests in a project. It is frightening how many dev teams do not write any tests and rely only on manual testing. In the following paragraphs, I will try to convince you about the importance of writing unit tests. What are unit tests? Unit tests are the smallest tests you can write. They tend to test different parts of your code (mainly single methods). Unit tests should be very fast so that you can run them often. It is important to stress that they do not test how different…

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…