Category: programming

2024 Tech Stack

Programming

  • .NET / CSharp
  • Javascript / TypeScript
  • HTML ( ?  not sure , though )

Operating Systems

  • Windows 11
  • MacOS a great choice for managers. However, it might require some extra effort for .NET developers.

Browsers

I use two browsers:

  • Chrome: Perfect for extensions and daily browsing
  • Edge: Offers faster browsing experience and is ideal for demanding tasks

Integrated Development Environment (IDE)

I rely on the following IDEs:

  • Visual Studio (C#)
  • VSCode (for all other programming languages)

Social Media

I maintain professional online presence through:

Hosting and Source Control

I use the following platforms to host my projects and track changes:

  • GitHub: Central hub for all my code repositories
  • Azure: Offers a range of cloud-based services, including hosting and management tools.

Learning Resources

I’m committed to lifelong learning through:

  • O’Reilly publications: A trusted source for in-depth knowledge sharing on technology topics.

Activities 2024 -projects

Compare EFCore providers : http://msprogrammer.serviciipeweb.ro/category/ef/

Inventory of > 70 Roslyn Code Generator at https://github.com/ignatandrei/rscg_examples

Created a free book about how are the Design Patterns used inside the .NET Patterns | Design Patterns used in .NET (C#) 

Created a .NET Tool, https://github.com/ignatandrei/PackageAnalyzer/ , that analyze the Visual Studio Solution

Created a ASP.NET Core Nuget package that lists various settings of the system https://github.com/ignatandrei/NetCoreUsefullEndpoints

Created a .NET Tool to watch simultaneously test and console https://github.com/ignatandrei/watch2/

Presentation about .NET at https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/

Github Repos

See what .NET software is doing :

https://github.com/ignatandrei/RSCG_WhatIAmDoing

Export diagram from classes

https://github.com/ignatandrei/RSCG_ExportDiagram

Adding Linq by string with a Roslyn Code Generator: https://github.com/ignatandrei/rscg_queryables

Generator of unique names for .NET assemblies : https://github.com/ignatandrei/NameGenerator

Adding IFormattable for each class: https://github.com/ignatandrei/RSCG_IFormattable

query ContributionGraph {
   user(login: "ignatandrei") {
     contributionsCollection(
       from: "2024-01-01T00:00:00+00:00"
       to: "2024-12-31T00:00:00+00:00"
     ) {
       commitContributionsByRepository(maxRepositories:100){
         repository{
           nameWithOwner
           url
           updatedAt
         }
       }    
     }
   }

}

Services.Add => 2 NuGet

If you make a NuGet package for ASP.NET Core  and you make an extension method that calls

Services.AddWhatever

in order to add a Sngleton / Scoped / Transient a

IWhatever =>  Whatever

implementation , please add IWhatever in a separate Nuget .

Why ? Because not all ASP>NET Core projects are made of a single project – and , if someone needs constructor injection with IWhatever in his Business Logic , he must not be forced to add the whole asp.net dependencies for just a IWhatever interface

 

Example: The https://www.nuget.org/packages/Lib.AspNetCore.ServerTiming/   –   it depends upon Microsoft.AspNetCore.Http . But I want just  IServerTiming in a business logic. I do not need also the dependency of  IApplicationBuilder .

( and yes, I have started an issue: https://github.com/tpeczek/Lib.AspNetCore.ServerTiming/issues/19 )

Dependent Framework Versioning

There are multiple ways to version a software . I have used SemanticVersioning ( https://semver.org/ ) and Calendar Versioning (  https://calver.org/ )

Of course , there are others  – please read https://en.wikipedia.org/wiki/Software_versioning   – interesting versioning based on e or PI .

However , I want to propose a new standard :

Dependent Framework Versioning

The major version of a  package is the same of the major version of the framework that is installed on . For the others , can be calver or semver or any other – depending on your choice.

For example , I have made a BlocklyAutomation  package for .NET Core 3 – and it is versioned like

For .NET Core 3  –  https://www.nuget.org/packages/NetCore2Blockly/3.2022.224.16

For .NET Core 5https://www.nuget.org/packages/NetCore2Blockly/5.2022.210.2007

Why is this ? To be easy identified by the users of the package. If I have one user that have an app  on .NET Core 3 and other on .NET Core 5, how can they identify easy what is the latest version for this package  ? With this approach , this can be done just looking on the major version corresponding with the framework version (and yes, I use calver versioning for the rest – yyyy.Md.Hm)

The component programmer

In our days  there are a few occasions when you wrote all the code. I will give 2 examples:

1. Sorting an array

In the late 90 I will do a Quick sort implementation . In our days, the .NET the Array Sort https://docs.microsoft.com/en-us/dotnet/api/system.array.sort?view=net-5.0 has many overloads – pick your poison

2. Make a persistent searchable chat between users of the application

In the 90 I will do an implementation with some network file and/or opening a communication channel ( or, if I were picky , with a database) . Now I have so many options to do the job straight away: databases( SqlServer , Mongo ), communications ( RabbitMQ , SignalR, GRPC ) , languages ( .NET Core for me  ),  architecture ( communicating from one client directly via REST  / GRPC  / WCF /  ) , testing ( MSTEST, XUnit, NUnit…) , compiling and deploying ( GitHub Actions, Azure Devops …). And I do not want to comment about the vast amount of components on Nuget  / Npm .

So in our days counts not only knowing a language and how to do algorithms  , but also knowing a large amount of components that can make your work easy to implement.

Note: For sure, there are also programmers that works to the Google/Bing Search Engine. That are working to innovation at ML  / AI . But I think that the most majority of programmers work for some kind of business – and they are much more productive if they are not a DIY/NIH programmers )

CORS and Programmer Types

There are many types of programmers  – and I would think that I can give an example about how they think differently. 

My example will be with CORS  – that means, accepting requests  from other site(s) . In ASP.NET  , there is a simple way to accept anything ( see tutorial at https://docs.microsoft.com/en-us/aspnet/core/security/cors?view=aspnetcore-5.0 )

.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()

And this will be , usually, enough. But , later on, you want to know WHO calls your API – so you add

.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod().AllowCredentials()

And you think that it is ok – but, at running, an error occurs.

The CORS protocol does not allow specifying a wildcard (any) origin and credentials at the same time. Configure the CORS policy by listing individual origins if credentials needs to be supported.

What do you do  ?  Depending on your answer , you are a different kind of programmer. Think – and read below ( or add to the comments )

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

1. The Search Programmer

This will google/bing  the error and find ( eventually – or not !  ) https://jasonwatmore.com/post/2020/05/20/aspnet-core-api-allow-cors-requests-from-any-origin-and-with-credentials   . He can fall back to 3 type.

2. The DIY /NIH  Programmer

This will study the CORS protocol for many days . Then he will make his code to solve the problem.

3.. The Framework / Documentation  Programmer

This will think – there have to be a way- the people that have made the framework will be better. So he will read all the functions and he will see https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.cors.infrastructure.corspolicybuilder.setisoriginallowed?view=aspnetcore-5.0 .  He can fall back to 1 type if he cannot find an answer.

What kind of programmer are you ? ( I am the 3rd kind )

You should learn a framework–advice to starting programmers

There are many posts about getting to learn programming. And, of course, all starts with the simple instructions: + , –, % … Then things get somehow more complicated learning modular programming ( or functional, if you do not use global variables …)

After this, you start learning about classes and instances ( Plato is the master here) and overriding and deriving … And maybe some Design Patterns( please, do not talk about Singleton…)

Maybe you learn a bit about Sql( Tables and Views and StoredProcedures) and NoSql …

And after that, you have the basics to write code in any kind of language . But, when you want to start a new application

  1. How you start it  ?
  2. What are the deliverables ?
  3. How to make the Graphical User Interface ?
  4. How to make components ?
  5. and so on …

That’s what a  framework brings to the table: a clear way /  path to do applications. In my case I am talking about .NET Core / C# n(Console applications, Web Applications, Forms application ) . Also, you may want to separate Front End from Backend – Angular or Vue or … could help with that ( and .NET remains just an WebAPI layer) . A framyework ( or 2  – Front End and BackEnd) will teach you how to make possible an application without hassle.

Yes, it is true that the framework is constraining a lot- you do things the framework way, not your way . So what ? You want to get your first application done. The framework is showing you the path – you can walk under it. And you know that, if you do not walk the path, then “hic sunt leones” . You know also that the framework protect you from the problems.

So my advice to young programmers: Learn a framework . Then you could do your first application. And the second. Then you could you start questioning some of the decision of the framework that might not suit your application.

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.