Ranjithkumar October 31, 2023 0

Internationalization(i18n) and Localization(L10n) in Web Development

In our increasingly connected world, web developers face the challenge of creating websites and applications that cater to diverse audiences speaking different languages and following various cultural norms. This is where internationalization (i18n) and localization (l10n) come into play, ensuring that your web applications are not just functional but also accessible to a global user base. Internationalization (i18n): The Foundation Internationalization is the process of designing and developing web applications in a way that makes them adaptable for different languages and regions. The goal is to create a flexible foundation that allows for easy localization. Here’s how internationalization is achieved…

Ranjithkumar October 22, 2023 0

Lookup DI services using keys in .NET 8

One of the new features in .NET 8 is the ability to dynamically lookup DI services using keys. This can be a useful way to decouple your code from the concrete implementation of a service. For example, let’s say you have a service that sends notifications. You could have a concrete implementation for each type of notification, such as EmailNotificationService and SmsNotificationService. Here is an example of how to register keyed DI services in ASP.NET Core: In the past, you would have to inject the specific service you needed into your constructor. For example, if you wanted to send an…

Ranjithkumar October 21, 2023 0

New System.Collections.Frozen namespace in .NET 8

The .NET 8 release introduces a new namespace, System.Collections.Frozen, which provides two new immutable collection types: FrozenDictionary<TKey, TValue> and FrozenSet<T> These types are designed for scenarios where collections are created infrequently but are used frequently at runtime. They offer excellent lookup performance and are ideal for cases where a collection is created once, potentially at the startup of an application, and is used throughout the remainder of the life of the application. Benefits of using frozen collections Examples of using frozen collections Example 1: Using FrozenDictionary to store configuration data In this example, the configuration variable is a FrozenDictionary that…

Ranjithkumar October 18, 2023 0

Do not resolve dependencies manually in ASP.NET Core Unit Testing

Dependency Injection (DI) is a core concept in ASP.NET Core, and it’s not just for production code. You should also leverage DI in your unit tests. Instead of manually resolving dependencies, using ServiceCollection to handle this is the recommended way. In this blog post, we’ll delve into why you should avoid manually resolving dependencies in unit testing and how to utilize ServiceCollection for a cleaner and more maintainable testing setup. The Pitfall of Manual Dependency Resolution Before we explore the right way to handle dependencies in unit tests, let’s discuss a common pitfall: manually resolving dependencies. I’ve seen people manually…

Ranjithkumar October 16, 2023 0

Do not throw Exceptions in C#

Exception handling is a crucial aspect of software development, and the concern about its performance implications is valid. In this blog post, we’ll explore the idea of avoiding exceptions to control the flow of code in C# and opting for alternative approaches to achieve the same results more efficiently. We’ll delve into why exceptions can be costly, explain what happens when an exception occurs, and provide C# examples of how to use defaults for better control. The Cost of Exceptions Exceptions are a powerful tool in C#, but they come with a performance cost. When an exception is thrown, the…

Ranjithkumar October 12, 2023 0

Settled Mindset vs. Contextual Mindset: Navigating the Software Engineering Landscape

Introduction In the dynamic world of software engineering, where technologies evolve at lightning speed, the mindset of a developer can greatly impact their success and adaptability. Two prevalent mindsets in this field are the Settled Mindset and the Contextual Mindset. In this blog post, we will explore these two mindsets, provide examples, and discuss their implications in the context of a software engineer’s career journey. Settled Mindset The Settled Mindset, as the name suggests, is characterized by a comfortable and stable approach to software development. Developers with this mindset tend to rely on familiar technologies and methodologies. They prefer sticking…

Ranjithkumar October 11, 2023 0

The Common-Sense Developer: Navigating the Software World with Pragmatism and Bias-Free Thinking

In the ever-evolving world of software development, where innovation and complexity often intertwine, there’s a remarkable quality that sets some developers apart: common sense infused with an unwavering commitment to bias-free thinking. In this blog post, we’ll delve into the essence of a “Common-Sense Developer” and explore the significance of making informed decisions while sidestepping unconscious biases. The Common-Sense Developer and Bias-Free Thinking Awareness of Unconscious Bias The foundation of common-sense development begins with acknowledging the existence of unconscious bias. Common-Sense Developers (CSDs) understand that everyone possesses biases, whether they’re related to technology choices, design preferences, or even coding styles.…

Ranjithkumar October 10, 2023 3

The Versatile Software Engineer: Navigating Core Principles and High-Level Thinking

As I embarked on my developer journey, I vividly recall the initial confusion and feeling overwhelmed by the multitude of implementation details. However, I soon realized that the ideal software engineer possesses the remarkable ability to navigate these challenges. This talent is driven by a profound understanding of core principles and high-level concepts, allowing them to avoid the pitfalls of excessive implementation focus. Rather than becoming mired in the minutiae of code, these engineers focus on comprehending the overarching ideas behind technology stacks. In this blog post, we’ll explore why these perspectives are crucial, drawing from my own experiences, and…