Issue #14: DotNet (.NET)
This issue would be about some topics for DotNet (.NET) developers.
Notes:
DateTime Best Practices In .NET C#
Best practices to follow when using DateTime in .NET C#
In almost all the software systems we are working on we need to use DateTime to represent a timestamp for some actions.
However, what I noticed is that sometimes we do some mistakes which could be fatal in some occasions.
Therefore, I decided to write this article to share with you some of the best practices to follow when dealing with DateTime in .NET C#.
In this article we are going to cover the following topics:
Now, you can buckle up and enjoy the trip.
Prototype Design Pattern In .NET C#
Learn about the Prototype Design Pattern in .NET C#
In this article, we will discuss the Prototype Design Pattern in .NET C#
Recommended by LinkedIn
The Prototype Design Pattern is one of the creational design patterns. It is mainly concerned with creating a new object by copying an already existing one without missing any of its encapsulated internal details and at the same time without depending on the class structure.
Wow, a big definition, right? Let me simplify it for you.
When you use any diagram builder software tools, you always look for the feature of copying one of the diagram shapes you had already added.
Using this feature, you expect the following:
All that you expected is actually what the Prototype Design Pattern is about. The diagram shape you are copying or duplicating is actually an object created from a class defined in the software code.
Curse of Recursion in .NET C#
Why and How you should always try to replace Recursion with something else in .NET C#
One of the famous mistakes I come across from time to time while performing code reviews is the excessive uncalled-for usage of Recursion.
I can hear someone asking now:
What is wrong with Recursion?!!
My answer is:
Recursion is not always bad if you know when and how to use it. Sometimes there is some better alternatives which you could be missing.
The main concern about using recursion is that it is too expensive in terms of memory consumption. That’s why you need to be cautious about using it.
You don’t believe me, right? Let me show you an example.
That’s it, hope you find reading this newsletter as interesting as I found writing it 🙂