Best of Nick ChapsasFebruary 2025

  1. 1
    Video
    Avatar of nickchapsasNick Chapsas·1y

    Stop Using DateTime in .NET

    In most cases within .NET programming, DateTimeOffset is recommended over DateTime. DateTime only represents a date and time, which can lead to ambiguity if the time zone is unspecified. DateTimeOffset, on the other hand, includes the time zone offset from UTC, making it more precise and suitable for business applications that require client-relevant time zones. Using DateTimeOffset helps avoid errors that could arise from using DateTime with unspecified time zones.

  2. 2
    Video
    Avatar of nickchapsasNick Chapsas·1y

    Don't Use Lorem Ipsum. Use this!

    Using Lorem Ipsum for generating fake text in software development can be problematic as it doesn't look realistic. Instead, developers should use waffle generators, which create customizable and realistic-looking text suitable for any format. To implement this in .NET, install the waffle generator package and use the WaffleEngine class to generate text. The tool also integrates with Bogus for even more flexibility.

  3. 3
    Video
    Avatar of nickchapsasNick Chapsas·1y

    The Most Cursed C# Library

    This tip introduces a creative yet unconventional C# library called 'interpolated pauser'. It allows you to extract variables from a string using a template through reverse string interpolation, making variable extraction simpler without the need for complex regular expressions. The library can be installed via the 'interpolated pauser yid' package.

  4. 4
    Video
    Avatar of nickchapsasNick Chapsas·1y

    Annoy Your C# Colleagues With This

  5. 5
    Video
    Avatar of nickchapsasNick Chapsas·1y

    Solving A Naming Problem in .NET

    C# 12 introduces the 'Alias any type' feature, allowing you to use the 'using' directive to create aliases for any type in your project. This simplifies complex type names, resolves naming conflicts, defines value Tuple types for shared use in assemblies, and enhances code clarity with descriptive names.