[NuGet]: Polly

This is a Nuget that I use in all projects when I am making HTTP calls..

Link: https://www.nuget.org/packages/polly

Site: https://github.com/App-vNext/Polly

What it does:  Implements all kind of policies for retrying – see https://github.com/App-vNext/Polly/wiki/Transient-fault-handling-and-proactive-resilience-engineering

Usage: – copied from https://docs.microsoft.com/en-us/dotnet/architecture/microservices/implement-resilient-applications/implement-http-call-retries-exponential-backoff-polly

static IAsyncPolicy<HttpResponseMessage> GetRetryPolicy()
{
     return HttpPolicyExtensions
         .HandleTransientHttpError()
         .OrResult(msg => msg.StatusCode == System.Net.HttpStatusCode.NotFound)
         .WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2,
                                                                     retryAttempt)));
}

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)

[Nuget]:NPOI

This is a Nuget that I use in almost every .NET Core project to export files in an Excel format without excel on the PC.

Link: https://www.nuget.org/packages/npoi

Site: https://github.com/nissl-lab/npoi

What it does:  Create real Excel files – not just CSV

Usage:

var wb = new XSSFWorkbook();
var sheet = wb.CreateSheet(“Contractors”);
for (int i = 0; i < allContractors.Count; i++)
{
var contractor = allContractors[i];
IRow row = sheet.CreateRow(i);
for (int j = 0; j < contractor.Length; j++)
{
var cell = row.CreateCell(j);
cell.SetCellValue(contractor[j].ToString());
}
}
wb.Write(File.OpenWrite(“Contractors.xlsx”));

[NuGet]:Scriban

This is a Nuget that I use in almost every .NET Core project to get the error details ( 500)

Link: https://www.nuget.org/packages/Scriban/

Site: https://github.com/scriban/scriban

What it does:  Like Razor –  a template intepreter

Usage:

var template = Template.Parse(@"
<ul id='products'>
  {{ for product in products }}
    <li>
      <h2>{{ product.name }}</h2>
           Price: {{ product.price }}
           {{ product.description | string.truncate 15 }}
    </li>
  {{ end }}
</ul>
");
var result = template.Render(new { Products = this.ProductList });

[ADCES] How to Fail Big at Being a Tech Lead & GPU programming using CUDA

Details

Prezentare 1: How to Fail Big at Being a Tech Lead
Prezentatori: Bogdan Sucaciu , https://bsucaciu.com/
Mihaela-Roxana Ghidersa, https://www.linkedin.com/in/ghidersam/
Descriere:
Although leadership skills have been analyzed for so long, there is something in the way we choose and raise our technical leads that defy all laws. We often think that the brightest and most creative person in the team will eventually become a technical lead, which actually happens in most cases. The exciting part, though, the process of becoming a technical lead starts when we actually take over the role. What seemed to be a gratification for excellent results can become a long list of failures if you don’t really, really prepare for the challenge. Luckily we can learn from each other’s mistakes, so join us to touch some hot spots in the technical leadership journey.

Prezentare 2 : GPU programming using CUDA
Prezentator: Ciprian Apetrei , Ubisoft , https://www.linkedin.com/in/ciprian-apetrei-4472324b
Descriere: In the last few years GPU programming usage has gone beyond just games but writing GPU algorithms is still regarded as a more esoteric pursuit because it requires knowledge about parallel algorithms. We will try to go through some simple code examples that illustrate the mentality difference between parallel and synchronous programming and explain some ways to optimize the code and avoid some pitfalls that affect performance.

Link: https://www.meetup.com/Bucharest-A-D-C-E-S-Meetup/events/282674084/

[NuGet]:Hellang.Middleware.ProblemDetails

This is a Nuget that I use in almost every .NET Core project to get the error details ( 500)

Link: https://www.nuget.org/packages/Hellang.Middleware.ProblemDetails/

Site: https://github.com/khellang/Middleware

What it does:  Gives detailed error when encountering a 500 HTTP Code.

Usage:

services.AddProblemDetails(c=>
             {
                 c.IncludeExceptionDetails = (context, ex) => true;               
             });

app.UseProblemDetails();

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.