Get Mystery Box with random crypto!

Programming Tips 💡

Logo of telegram channel programmingtip — Programming Tips 💡
Topics from channel:
Chatgpt
Csharp
Dotnet
Dotnetcore
Aspnetcore
Ai
Github
Unittest
Macos
Launcher
All tags
Logo of telegram channel programmingtip — Programming Tips 💡
Topics from channel:
Chatgpt
Csharp
Dotnet
Dotnetcore
Aspnetcore
Ai
Github
Unittest
Macos
Launcher
All tags
Channel address: @programmingtip
Categories: Technologies
Language: English
Subscribers: 56.35K
Description from channel

Fun & Useful Programming:
Tips 💡
Articles 📕
Resources 👾
Design Patterns 💎
Software Principles ✅
Contact/Ads: @MoienTajik

Ratings & Reviews

4.00

2 reviews

Reviews can be left only by registered users. All reviews are moderated by admins.

5 stars

1

4 stars

0

3 stars

1

2 stars

0

1 stars

0


The latest Messages

2023-09-07 19:42:14
For those aiming to manage web & mobile apps in their .NET project, discover Bit. Experience seamless integration, PWA, SSR, SEO-friendly, optimized project templates, and a set of standard components. An open-source gem with an MIT license, tailored just for C# .NET enthusiasts.

Love it? Check out their GitHub repo and give them a !

Repository Link
12.7K viewsProgramming Tip Bot, 16:42
Open / Comment
2023-08-31 08:51:52 .NET 8 - Keyed service dependency injection container support

Keyed services are useful when you have an interface/service with multiple implementations that you want to use in your app. What's more, you need to use each of those implementations in different places in your app.

Sample:
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddKeyedSingleton("sms");
builder.Services.AddKeyedSingleton("email");
builder.Services.AddKeyedSingleton("push");


[ Article ] : https://andrewlock.net/exploring-the-dotnet-8-preview-keyed-services-dependency-injection-support


#DotNet #DotNetCore #AspNetCore #CSharp
@ProgrammingTip
13.0K viewsMoien Tajik, edited  05:51
Open / Comment
2023-04-16 19:07:02 Raycast

Raycast is a blazingly fast, totally extendable launcher for MacOS. It lets you use AI (ChatGPT) directly from your launcher, complete tasks, calculate, share common links, and much more.

[ Website ] : https://www.raycast.com


#MacOS #Launcher #RayCast
@ProgrammingTip
30.8K viewsMoien Tajik, 16:07
Open / Comment
2023-04-15 18:58:15 Check out new C# 12 preview features!

Three new features for C# 12 :

- Primary constructors for non-record classes and structs :
public class Student(int id, string name, IEnumerable grades)
{
public Student(int id, string name) : this(id, name, Enumerable.Empty()) { }
public int Id => id;
public string Name { get; set; } = name.Trim();
public decimal GPA => grades.Any() ? grades.Average() : 4.0m;
}


- Using aliases for any type:
using Measurement = (string, int);

public void F(Measurement x)
{ }


- Default values for lambda expression parameters:
var addWithDefault = (int addTo = 2) => addTo + 1;
addWithDefault(); // 3
addWithDefault(5); // 6


[ Article ] : https://devblogs.microsoft.com/dotnet/check-out-csharp-12-preview


#CSharp #DotNet
@ProgrammingTip
27.2K viewsMoien Tajik, 15:58
Open / Comment
2023-04-10 14:13:49 WireMock.NET

WireMock.NET is a .NET library for stubbing and mocking HTTP services. With WireMock.NET, you can define the expected responses for particular requests, and the library will intercept and manage those requests for you.

This allows for easy testing of the code that makes HTTP requests, without having to rely on the actual external service being available and without hacking HttpClient.

Sample code snippet:

[Test]
public async Task sample_WireMock_usage()
{
// Setup WireMock.Net server
using var wireMock = WireMockServer.StartWithAdminInterface(port: 1080, ssl: false);

// Setup WebApplicationFactory
await using var appFactory = new WebApplicationFactory().WithWebHostBuilder(builder =>
{
builder.ConfigureAppConfiguration(configurationBuilder =>
{
// Override downstream service addresses pointing to WireMock address
configurationBuilder.AddInMemoryCollection(new Dictionary
{
["ExternalServices:WeatherService"] = "http://localhost:1080"
});
});
});

// Prepare stub for outgoing request
wireMock
.Given(
Request.Create()
.WithPath("/api/v1.0/weather")
.WithParam("lat", "10.99")
.WithParam("lon", "44.34")
.UsingGet()
)
.RespondWith(
Response.Create()
.WithStatusCode(200)
.WithHeader("Content-Type", "application/json; charset=utf-8")
.WithBodyAsJson(new
{
temp = 298.48,
feels_like = 298.74,
temp_min = 297.56,
temp_max = 300.05,
pressure = 1015,
humidity = 64
})
);

// Automate tested app
}


[ Blog ] : https://cezarypiatek.github.io/post/mocking-outgoing-http-requests-p1


#UnitTest #DotNet #CSharp
@ProgrammingTip
21.6K viewsMoien Tajik, 11:13
Open / Comment
2023-03-23 10:51:20 GitHub Copilot X: The AI-powered developer experience

GitHub Copilot is evolving to bring chat and voice interfaces, support pull requests, answer questions on docs, and adopt OpenAI’s GPT-4 for a more personalized developer experience.


[ Article ] : https://kutt.it/CopilotX


#GitHub #AI #ChatGPT
@ProgrammingTip
25.2K viewsMoien Tajik, 07:51
Open / Comment
2023-03-02 14:08:42 ASP.NET Core Developer Roadmap in 2023

Roadmap to becoming an ASP.NET Core developer in 2023

[ GitHub ] : https://github.com/MoienTajik/AspNetCore-Developer-Roadmap


#AspNetCore #DotNet #DotNetCore #CSharp
@ProgrammingTip
29.3K viewsMoien Tajik, 11:08
Open / Comment
2023-02-27 10:57:58 WebChatGPT

This browser extension adds web access capability to ChatGPT. Get much more relevant and up-to-date answers from the chatbot!


[ GitHub ] : github.com/qunash/chatgpt-advanced


#ChatGPT
@ProgrammingTip
29.5K viewsMoien Tajik, edited  07:57
Open / Comment
2022-07-25 05:51:59 ChilliCream GraphQL Platform

The ChilliCream GraphQL Platform, at its core, is a new way to create powerful Backends. HotChocolate, .NET GraphQL server, connects any service or data source and creates a cohesive service to offer your consumers a unified API.

Hot Chocolate: GraphQL server to create GraphQL endpoints and merge schemas.

Banana Cake Pop: GraphQL IDE to explore, request and analyze any GraphQL endpoint.

Strawberry Shake: GraphQL client to fetch data from any GraphQL endpoint.

Green Donut: DataLoader to solve the N+1 problem.


[ GitHub ] : github.com/ChilliCream/hotchocolate


#GraphQL #DotNet #AspNetCore
@ProgrammingTip
12.0K viewsMoien Tajik, 02:51
Open / Comment
2022-07-18 11:24:10 Diagrams - Diagram as Code for prototyping cloud system architectures

Diagrams lets you draw the cloud system architecture in Python code. It was born for prototyping a new system architecture design without any design tools.

You can also describe or visualize the existing system architecture as well. Diagrams currently supports main major providers including: AWS, Azure, GCP, Kubernetes, Alibaba Cloud, Oracle Cloud etc ...

It also supports On-Premise nodes, SaaS and major Programming frameworks and languages.


[ GitHub ] : github.com/mingrammer/diagrams


#Diagram #Architecture #DiagramAsCode
@ProgrammingTip
14.2K viewsMoien Tajik, 08:24
Open / Comment