Code Whisper
@codewhisperdev
👾 Anonymous engineer, sharing thoughts on code, tech & systems. 🚫 No face, just logic.
.NET 9 introduces the new LINQ method CountBy. It allows for calculating the frequency of a key. This improvement looks nice. What do you think?
LINQ Tip: Use ToList() after filtering, not before. Why? 🔹 First version loads everything into memory before filtering 🔹 Second version filters at source, better for DB or large collections 🔹 Especially important when using EF Core or APIs with IQueryable #charp #dotnet
🔹 What is Queue<T>? Queue<T> is a First-In-First-Out (FIFO) collection in C#. It means the first item you add is the first one to be removed. When to use? - Task scheduling - Print jobs - Message handling - Breadth-first search (BFS) in graphs Example:
SQL Tip: Always monitor and maintain your indexes. Unused or duplicate indexes = slower writes and wasted space. Why? - Clean indexes = faster inserts/updates - Less I/O, better performance 🔍 Use this to find unused indexes in SQL Server
United States 트렌드
- 1. #Survivor49 11.6K posts
- 2. #PresidentialAddress 12.4K posts
- 3. Savannah 16.6K posts
- 4. #AEWDynamite 21.1K posts
- 5. Kristina 4,326 posts
- 6. Venezuela 915K posts
- 7. Cavs 7,167 posts
- 8. Rizo 1,854 posts
- 9. Sophi 1,888 posts
- 10. #SistasOnBET 2,320 posts
- 11. Warrior Dividend 20.6K posts
- 12. Julius Randle 1,537 posts
- 13. Newt 1,514 posts
- 14. Kevin Warren 2,541 posts
- 15. Delaware 5,866 posts
- 16. Bongino 85.9K posts
- 17. Adderall 4,647 posts
- 18. Disturbed 5,958 posts
- 19. Sage 17.3K posts
- 20. Mr. Beast 2,227 posts
Something went wrong.
Something went wrong.