DateTime Fundamentals in .NET and SQL Server

My new video course “Date and Time Fundamentals in .NET and SQL Server” is released!
Take it right now just for 10$!

DateTime

Build a solid foundation of working with Date and Time with this course

Almost all the software works with date and time in one form or another. Some programs, of course, need to work with date and time more than other. However, date and time hide many pitfalls even in very simple scenarios. We all know that security and logging are regular aspects of almost any program. There is a wise phrase that sounds like: “Developers recall about security when it is too late.” The same can be said about date and time. Most developers don’t even imagine how many bugs are hiding behind the simple face of date and time. Those bugs are sitting in programs and waiting for their moment to blow up your production code causing very unfortunate repercussions. That’s why working with date and time is the full-fledged and very important aspect of software development.
Have you watched magnificent enlightening TV Shows by BBC? This course in some parts is like those BBC shows, because you’ll learn many interesting surprising facts. Besides, being familiar with peculiarities of working with date and time, you can write much more reliable and maintainable applications.

Continue reading

Single Responsibility Principle – SRP

This entry is part 3 of 3 in the series SOLID

SRP Definition

In this article, we will look at what is single responsibility principle and look at some simple examples in C# which demonstrate the single responsibility principle and how to adhere to the SRP.
Single Responsibility Principles or SRP in short states that every object should have a single responsibility, and that responsibility should be entirely encapsulated by the class. This is the definition taken from Wikipedia. It’s very hard to understand what does it mean. For example, the first two questions which come to my mind are:

  • how to define those responsibilities?
  • how to calculate the number of responsibilities of a certain class?

Continue reading

Software Architecture: Meta and SOLID Principles in C#

This entry is part 1 of 3 in the series SOLID

Learn how to develop maintainable software systems applying Meta and SOLID Principles.

Teaching Approach

No fluff, no ranting, no beating the air. I esteem your time. The course material is succinct, yet comprehensive. All important concepts are covered. Particularly important topics are covered in-depth. For absolute beginners, I offer my help on Skype absolutely free, if requested.

Take this course, and you will be satisfied!

SOLID is an acronym which stands for SRP, OCP, LSP, ISP and DIP. These five acronyms in their turn stand for:

  • Single Responsibility Principle
  • Open/Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

In this course, you’ll learn how to apply meta and SOLID principles so that your application will live a long healthy life. It means you are going to learn how to write code of the high quality: readable, understandable and reliable.

Continue reading

What’s New in C# 6, C# 7 and Visual Studio 2017

C# is one of the most powerful languages in the modern world of programming. It has one of the most powerful type systems. There was a battle for some time between Java and C# and now we can say for sure that C# won that battle from the language features point of view.

C# 6 is already released and fully available with Visual Studio 2015. C# 7 is under development still, but many announced features are already implemented and we can play with them in Visual Studio 2017 which is currently (when I’m writing this) itself under development (release candidate is available).

Continue reading

Handling Errors and Exceptions in C#. Part 3

This is the third and most comprehensive part about handling errors and exceptions in C#. Here are the first and the second part. Also, you can take a look at the blog post about global exceptions handling in WPF applications.

Errors Handling and many other topics you’ll find in my new video course “API in C#: The Best Practices of Design and Implementation”. Take it with 60% discount! Also, nothing can stop you from reading further)))

The problem of errors handling is really an old one. Despite that, I feel a lack of sources which aggregate the information and reveal all the problems relate to exceptions.
The first question which immediately comes to mind is “Why we need to understand how to properly handle errors?” There are at least two reasons:

  • Do not piss out the users. I know too many applications which fail without even telling the user what went wrong;
  • There is a category of applications which are very errors-sensitive. These are the applications which deal with huge financial

You can open any book on C# and see that for handling (or representing) any unfortunate situations such as validation fails, the critical system fails authors suggest to use exceptions.
The topic is a little bit holy war because there are no silver bullets, but it doesn’t mean that we don’t want to understand the problems which accompany exceptions using.
Several years ago, I asked Uncle Bob about the problems of using exceptions and he replied:

Continue reading

Abstract Class VS Interface in C#

You can open any C# tutorial and you’ll find some information about abstract classes and interfaces. Most likely, you’ll not find any information about what is the difference between abstract class and interface.
This theme was discussed earlier on the Internet several times but I want to consolidate all the most important thoughts regarding the problem of choosing between an abstract class and interface in this post.
Continue reading

Designing and Implementing API in C#

Nowadays I’m writing my new programming video course. I chose an interesting topic for the next course: “Designing and Implementing API in C#”.

How to design API? In this course, you’ll learn how to design and implement types in C# so that the other developers won’t hate you when using one of the types developed by you. It means you are going to learn how to write code of the high quality: readable, understandable and reliable.

Improve your knowledge in object-oriented programming in the context of clean coding and building types of high quality.

  • Understand the characteristics of a well designed type
  • Grasp the principles of the convenient API development
  • Write clean code, get rid of unpleasant smells
  • Learn about what exceptions are intended for and how to throw and catch them properly
  • Protect your types from the incorrect usage making them properly encapsulated

And this is far from the full list of topics we will cover in this course.
Continue reading