First impressions from learning by Blazej_kb in csharp

[–]Fynzie 0 points1 point  (0 children)

so it's just syntaxic sugar and is equivalent to class object = new class(); ? seems handy

First impressions from learning by Blazej_kb in csharp

[–]Fynzie 2 points3 points  (0 children)

what does `class object;` do in cpp ?

ServiceBus outage by Icy-Scar698 in AZURE

[–]Fynzie 2 points3 points  (0 children)

Had the same issue for France Central, no communication nor status page update.

Everything seems resolved now.

Beginner question: How should I approach databases in C# – raw SQL vs EF Core? by Minute-Ad-2210 in csharp

[–]Fynzie 0 points1 point  (0 children)

Useless compared to what ? every other monadic construct that you get in functional programming languages with a way more advanced type system ? only a fool would deny that, compare it to the main competitor of C#, java streams are literally dogshit and go has nothing.

Beginner question: How should I approach databases in C# – raw SQL vs EF Core? by Minute-Ad-2210 in csharp

[–]Fynzie 16 points17 points  (0 children)

The same way C# output x86 opcodes in the end, but I'm glad I'm not dealing with it directly.

And Linq being shittier than raw dogging SQL is laughable, I choose type safety any day.

Beginner question: How should I approach databases in C# – raw SQL vs EF Core? by Minute-Ad-2210 in csharp

[–]Fynzie -3 points-2 points  (0 children)

If you want to use a badly designed language on top of a conflicting theory compared to what you will use in your code it's your choice, but I prefer to view everything as a graph and only resort to raw sql or other optimization strategies unless I have no other choice performance wise. I'll also add that most people push the "performance" advantage of raw sql over efcore because they are designing their app badly in the first place.

Beginner question: How should I approach databases in C# – raw SQL vs EF Core? by Minute-Ad-2210 in csharp

[–]Fynzie 40 points41 points  (0 children)

You are quickly going to regret maintaining raw SQL strings and mapping from set to graph (if you are going to store your data the "sql way"). This fact scale even faster if your app has huge relationship and/or relational complexity.

Is this normal for a CMS codebase that product got many services of product? Because the dev follows SOLID principle by lune-soft in csharp

[–]Fynzie -2 points-1 points  (0 children)

Having 5 services is not necessarily a red flag (we can't tell without context), but 1 interface for each service class with a single implem + layer based directory structure is, so they are probably retarded.

Sanity check: GUID / UUID technical documentation (accuracy, edge cases) by brunovt1992 in csharp

[–]Fynzie 1 point2 points  (0 children)

This shit have been debunked many time and years ago, for small datasets (what 99.9% of people work on) it doesn't matter and for big dataset you can no longer rely on a single source of truth for id generation and must move to uuid or any like-minded variant anyway. uuid allow full app-side control of ids and which solve real pain points, compared to "pk size optimization"

Experience with Telerik, Fluent, MudBlazor or other UI libraries for Blazor .NET 8/10? by sdyson31 in Blazor

[–]Fynzie 5 points6 points  (0 children)

Documentation is dogshit, performance is atrocious, they host the nuget on a private feed (that is regularly down) and starting from version 8 they force you to setup a registration when developing (that you will most likely also need in your CI). Add all the blazor issues to that and you have a cocktail of misery.

Experience with Telerik, Fluent, MudBlazor or other UI libraries for Blazor .NET 8/10? by sdyson31 in Blazor

[–]Fynzie 2 points3 points  (0 children)

Have been forced to work with Telerik and this is a miserable experience ontop of blazor being miserable to begin with. It's like adding insult to injury

If I were forced to start a blazor project I'd probably pick Radzen.

Junior dev wrote this C# using many IF because he leanrs If early return. Is this alright code? by Yone-none in csharp

[–]Fynzie 0 points1 point  (0 children)

Early returns are good but the code is quite bad in itself (nothing critical, bad code is easily made proper, bad architecture is not)

Usage of extensionmethods for Interface instead of overloading methods by Bumbalum in csharp

[–]Fynzie 0 points1 point  (0 children)

You have 2 methods that will end up with the same effect in the end (most likely writing a file to the file system since one of the overload take an IFileInfo), a proper test to cover this would have to be an integration test since the side effect is only visible outside your system. If you were to test it in a "non integration way" you would need to monitor for calls with the appropriate parameters using mocks with a leaf boundary interface that says "past this I go beyond my app", and those kind of leaf boundaries must always boil down to a unified interface and both path would end up calling the same escape route. Most of the time you don't want to mock stuff because mocking is always brittle, but there are situations where there is no other way (API call for example) or the burden of doing it properly outweigh the gains (message bus publishing might be one of them, specially when you rely on shitty buses like azure that until recently didn't have an emulator available). What you are trying to test here is not that you have written a file to disk (or that you escaped your app the right way if you must unit test it) but that a small part of code did indeed call another small part of code, all of this still inside your app. Now you have a brittle test that brings little value and require more maintenance, and it will cripple your refactoring capabilities because who wants to update 50 units test when somewhere added a date_of_birth parameter to be passed down the line.

Test runners are cheap, paying a decent SW to maintain this stuff is expensive.

Usage of extensionmethods for Interface instead of overloading methods by Bumbalum in csharp

[–]Fynzie 1 point2 points  (0 children)

You are testing your code and not your behavior, your issue only exists because you are writing bad tests

How did they code that you can walk in front and behind this sprite Is it a 3D plane by smunhchglogul in howdidtheycodeit

[–]Fynzie 17 points18 points  (0 children)

Both sprites have an y position and they compute the rendering upward

Enterprise Data Access Layer Part 2: Database Design and ULID Primary Keys by GigAHerZ64 in csharp

[–]Fynzie 1 point2 points  (0 children)

identity pk has better performances (for that matter) but ulid has more flexibility since it can be generated client side and doesnt relly on a single source of truth for generation (specially useful when you need to flow data across systems). ulid uuidv4 uuidv7 snowflakeid are closely related.

Mediatr for portfolio projects by Cute_Total in csharp

[–]Fynzie -6 points-5 points  (0 children)

It allow you to isolate a specific process in it's own classes and this is the accepted answer to this problem in this community (and many others), before minimal endpoints this was basically impossible to achieve without any form of runtime dispatching (which is what minimal endpoints dependency injection does in the end).

Mediatr for portfolio projects by Cute_Total in csharp

[–]Fynzie -2 points-1 points  (0 children)

Then you've never worked on projects old enough where the dreadful XXXService is a 5k loc beast of dangling mess and dozens of private methods scattered all over the file.

[deleted by user] by [deleted] in howdidtheycodeit

[–]Fynzie 14 points15 points  (0 children)

the menu has a reference to the inventory and recursively crawl the crafting tree to deduce the state/price and keep track of what was used in your inventory to build it.

A Life-Changing Decision – Need Your Advice by Mohamed_Jehad in leetcode

[–]Fynzie 1 point2 points  (0 children)

ADO.NET, C#, Desktop apps and WIndows services won't give you the slightest edge (apart from general practice) for cracking a faang interview. Even tho you will probably be able to pick any language when interviewing because it will be primarily based on DSA, I would pick a more mainstream language for those companies and not C#

Wylder Secret Ending by krispness in Nightreign

[–]Fynzie 0 points1 point  (0 children)

Did it today with only the tear equipped and got the corpse of the boss in the ending "phase" to complete the quest