Discover and read the best of Twitter Threads about #csharp

Most recents (23)

🚀 Backend Developer Roadmap for .NET Developers. (2023 Edition)

Follow this thread along for the entire roadmap.

#dotnet #developer #backend Image
Step 0: Know your basics.
Be familiar with OOPS, Brush up your problem solving skills, and learn GIT.
#dotnet #developer #backend Image
Next, get your C# skills right to the latest changes. #dotnet #developer #backend #csharp Image
Read 23 tweets
💡IEnumerable vs IQueryAble in .NET

1) Whatis IEnumerable
2) What is IQueryAble
3) Difference b/w them ⏬

#csharp #dotnet
IEnumerable and IQueryable interfaces are both used to work with collections of data and both support LINQ (Language Integrated Query)
#dotnet
𝐈𝐐𝐮𝐞𝐫𝐲𝐚𝐛𝐥𝐞

✅ IQueryable executes queries on the server side.

✅ It is designed specifically to work with LINQ

✅ It extends IEnumerable, which means it includes all of the functionality of IEnumerable.
#dotnet
Read 7 tweets
💡 Life of Query in EF

𝐒𝐭𝐞𝐩 𝟏 : The LINQ Query is processed by EF Core and build an representation that is processed by database provider, and the result is cached later on so we don't need to process it every time #dotnet

See thread 🧵⏬
𝐒𝐭𝐞𝐩 𝟐 : The result is passed to the db provider and db provider identifies which parts of query can be evaluated in db, these parts are then translated into query language (e.g. SQL) after that translated query is sent to db and db returns results (but not entity instances)
𝐒𝐭𝐞𝐩 𝟑 : For each item we check if it is tracking query EF checks the data in existing change tracker if found relevant entity is returned else new is created, its change tracking get set up and it is returned

For non tracking a new entity is always created and returned.
Read 5 tweets
💡 How to store Password in Database

Three common practices that are used for passwords, but first two has some serious issues.

✔️ Plain text password
✔️ Hashed password
✔️ Hashed password with Salt
✔️What is Salt
✔️How to validated hash password

#dotnet

#csharp #dotnet
1️⃣ Plain Text Password
Saving password in plain text is the worst approach because it is open to everyone who has database access and an easy target for attackers. Its not recommended at all.
2️⃣ Hashed Password
Hashing the plain text password first and then saving it, it seems safe but it isn’t safe again, you can fall for attack in this case as well rainbow attack.
Read 7 tweets
💡 Do and Don't for string in C#

1. Always use
2. Don't use 🔁

✉️If you like my tweets, please join 400+ Software Engineers to receive an actionable tip weekly in your inbox through my Newsletter.(lnkd.in/d69Va5CM)

#csharp #dotnet #dotnetcore
✅Use an overload of the String.Equals method to test whether two strings are equal

✅Use the String.Compare and String.CompareTo methods to sort strings, not to check for equality.
✅Use overloads that explicitly specify the string comparison rules for string operations. Typically, this involves calling a method overload that has a parameter of type StringComparison.
Read 8 tweets
Method Safety and Idempotency

1. HTTP Methods Introduction
2. Method safety with examples
3. Method Idempotency with examples
🧵⏬

#csharp #dotnet #dotnetcore Image
GET is used to retrieve data, POST is used to save, PUT is used to update existing data edit is common example of it, PATCH is lighter version of PUT , it is used to update just a specific information instead of updating all data on server DELETE is used to remove records.
In CRUD operations

C stands for create : POST
R stands for read : GET
U stands for update : PUT/PATCH
D stands for delete : DELETE
Read 9 tweets
¿Quieres crecer como #programador 💻con Cursos de #Harvard GRATIS? Pues aquí te traigo 5⃣ cursos 🔝 que no querrás perderte. HILO 🧵 ⬇️⬇️⬇️ #informatica #tecnologia #programacion
¿No hiciste #IngenieríaInformatica? 🤔 No te preocupes, aquí te dejo un curso de #Harvard gratis de Introducción a las Ciencias de la Computación:

pll.harvard.edu/course/cs50-in… #informatica #tecnologia #programacion
¿Qué quieres mejorar en #desarrolloweb con un curso GRATIS de #Harvard dónde verás #Python 🐍, #JavaScript 💛, #SQL...? Aquí lo tienes:

pll.harvard.edu/course/cs50s-w…

#informatica #tecnologia #programacion
Read 7 tweets
OK C# coding challenge from today's discussion. This came up today in the context of "async and concurrency is *HARD* even for very experienced developers". I will share some techniques after seeing some answers. #dotnet #csharp
First version is using a CancellationToken
Using new primitives in .NET 6 this was one of the cleanest I could come up with:
Read 4 tweets
A Thread 🧵

In this video from @nickchapsas, he recommends _not_ throwing exceptions in #csharp and instead using the "Result" type (a monad 🧐) to model failures.

I've been using this approach for several years now and I can say it _works very well_!

I have multiple blog posts and presentations talking about this topic and the topic of modeling failures/optional data in #csharp. These links are mostly in the context of @KenticoXP, the platform @wiredviews uses to build websites for our clients.

(links at the end)
Here are some of my thoughts on why we should use Result vs Exception for modeling failures.

Don't forget 🤔, we use language features to model real world events in code, so we should consider the tools we have available and what their merits/costs are...
Read 10 tweets
C# performance and memory optimization 💡
For a very long time, I used to compare strings in my codebase by doing stringA.ToLower() == stringB.ToLower(). I did not know that I was consuming a lot of memory. A thread 🧵⬇️
#csharp #dotnet
Even if computers are very powerful nowadays, it's recommended to build memory-efficient systems because low memory allocation increases performance of the system. So it's always a good idea to use less memory when possible.
Recently, I've tried to measure two ways of comparing strings:
1⃣ My old way of doing (see the first tweet of the thread)
2⃣ the use of string[.]Compare method.
Read 13 tweets
Vamos brincar. Me pergunte algo sobre #csharp e/ou #dotnet e eu vou tentar responder com um tuite só (se não der, vários).
Coisas objetivas e genéricas, não vale "me ajude com meu projeto".
Vou fazer uma thread com as respostas.
Valendo!
Read 73 tweets
Lets talk about events. We want to write some code that reacts when something happens. This pattern exists in many domains from UI programming to IoT to serverless. What do the programming patterns for this look like today in #dotnet and #csharp?
We create a button (imagine this was referenced by a form or some UI component), then hook up an event handler and write to the console when a button click event happens. This is the one of the most popular and idiomatic event handling paradigms in .NET today.
It's existed for years and years in many different programming languages and domains. There may or may not be data associated with these events.
Read 18 tweets
Let's see🤔

How can you control life cycle of injected elements in ASP..NET Core DI Container?

We have three live cycles:
➡️ Singleton
➡️ Scoped
➡️ Transient

How do they work? Here is the thread 🧵👇 with the demo and code

#dotnet #csharp #devcommunity
Do to the demo, we need to create an interface per life cycle option.

An implementation of that interface will return a unique ID.
New ID means that element was recreated
We need a class that will represent a service layer that will be created in Controller.

We need to do this to see how "Scoped" and "Transient" life cycles are working
Read 6 tweets
All my tweets about C# 10 features in one thread. 🧵

Retweets are appreciated 😊

#dotnet #csharp #coding #devcommunity
Read 15 tweets
Here's an interesting .NET-ism. Async methods capture the execution context on entry and restore them on exit. What does the following print? #dotnet #csharp Image
It prints, Before: 0, After: 10. The async local value bled out of the method call because it was synchronous method that directly returned the task.
This on the other hand will not let the async local value bleed out of the method. Image
Read 4 tweets
I've been tweeting every single day about C#9 features for 20 days.

I've gathered all my tweets in one thread.

Also, I've published all examples from my graphics to GitHub. Feel free to play with code github.com/okyrylchuk/csh…

Retweets are appreciated 😊

#dotnet #csharp
Read 21 tweets
Hoy me gustaría compartir algunas reflexiones fruto de las últimas novedades aparecidas y mis experiencias en cliente con #infrastructureascode en #AWS. Vamos al lío 👇
Siempre me he sentido más atraido hacia el enfoque declarativo por su falsa sensación de control y orden, pero con configuraciones grandes, poder refactorizar el código hacia abstracciones propias y modificar su definición/parametrización con código ha sido determinante
En ese sentido, #cloudformation como tal siempre me ha parecido muy locura y un formato más de bajo nivel que otra cosa. En general siempre trabajo con herramientas que lo generan como #serverlessframework o #amplify
Read 18 tweets
I'm working on a new workshop that will guide students through an array of different data access approaches for OO languages (.NET/C# specifically). I like to start such topics off with principles that apply to the space. Here's what I have so far - am I missing anything obvious?
These are "data access principles" which when I searched I didn't find any handy lists. I'll probably write up a blog post on the topic soon.
Acquire late; release early.

This applies to any shared, external resource, such as a database connection. It's a low level principle that most modern developers don't even think about, but I think it's still worth mentioning.
Read 13 tweets
Let's end the debate once and for all

Pick your favorite Back End language. ❓🧑🏾‍💻

If "other" vote in comments
#100DaysOfCode #BlackTechTwitter #python #csharp #javascript #java #programming #programming
( ☝️🏾☝️🏾☝️🏾as promised, the sequel, the showdown)
Part 1 was here:
I WISH there were enough options to fit all the
go, kotlin, clojure, ruby, php folks 🤷🏾‍♂️ i see yall too!!
Read 4 tweets
🚨@stratisplatform #GlobalCryptoNetwork - March 2020🚨

Total nodes: 6,701
New nodes: 474
New: Estonia 🇪🇪, Sri Lanka 🇱🇰, Reúnion,
Countries: 91

If you are not a shade of blue on this map, you are missing out on the 4th Industrial Revolution!
Europe $STRAT:
- Russia has surpassed Netherlands!😳
- Welcome Estonia 🇪🇪
- Croatia will surpass Poland in 2 months
- Italy will surpass Switzerland next month and Spain in 2 months
- Greece has highest growth this month and right behind Italy!👏
Middle East $STRAT:
- Both Turkey and Saudi Arabia added 3 nodes each
- Both Iran and Pakistan added 2 nodes each
- Both Bahrain and Cyprus added 1 node each
- While Bahrain is the leader, Turkey is running bleeding edge version on 3.0.7.0 and 3.0.6.0.
Read 13 tweets
بيل واجنر Bill Wagner
واحد من اللي وضعوا معايير لغة سي شارب
ECMA C# Standards

في الفيديو المرفق مع التويته
بيستعرض فيه عضلات اللغه بعد الاصدار 8.0

وبيعمل ب tuples شغل عالي جداً ، بالنسبه لاي حد شغال دوت نت الكلام ده عظيييم جداً واذا اتقنه هيفرق بشكل مش طبيعي

يتبع....
#Csharp
سطور كود كتير جدا كنت بتكتبها بيعرفك ازاي ال tuples تخليك تستغنى عنها ويبقى الكود بتاعك more clean, more readable

كل ده كوم وما يسمى Pattern matching كوم تاني
عن طريق switch statement بسيطه تقدر تعمل decision table ويغنيك عن nested if اللي كنت بتعاني منها ومن فهم الكود

يتبع..
Read 4 tweets
October @stratisplatform node map is surprising and possibly a bit 👻.

TLDR:
1) 2,586 nodes 🔥🔥 🔥
2) #Brazil 🇧🇷 is highest growth - 1025%!
3) #China 🇨🇳 say “Hi!” with one #Csharp node.
4) New countries - 🇭🇺 🇮🇷 🇱🇦 🇨🇳 🇹🇼
Germany 🇩🇪 continue to dominate Europe in this #DigitalTransformation. Hungary is new. While smaller countries like Portugal, Greece, Bulgaria, Croatia, Ireland, Malta, and Spain continues their explosive growth! Please join $stratis #hackathon @devpost @EUBlockchain
Middle East has a slight uptick. Bahrain 🇧🇭, Turkey 🇹🇷, and Saudi Arabia 🇸🇦 maintain their lead and continue their growth. Iran is new. I suspect we will hear some news from #Bahrain and #Turkey in 2020. Please join $stratis #hackathon @devpost
Read 9 tweets
Wow, these results are sobering. In an effort to turn them around, I’m going to attempt a Twitter #monadtutorial. I realize this has probably been done before, but here goes anyway... 1/
This will not be Haskell-focused. Haskell was my first introduction to monads back in 1999, and it just confused the heck out of me. Instead I’ll use examples from #csharp and #fsharp, since they’re what I know best. 2/
First, ignore category theory jargon. Unless you’re doing actual math (or Haskell), “Monad” as a concept is far less important than its practical applications. So let’s start with what monads are good for, before getting into what they are. 3/
Read 28 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!