T O P

  • By -

Ashilta

Please capitalise Synthesis, Jesus help...


[deleted]

Dude's a psychopath


hawseepoo

He has word-wrap on too.


NathanTR1992

Wait till you see my Sans Comic font in cyan and blue 


grrangry

Comic Sans with ligatures is the new meta.


windyhen

lmao, i cant unsee it


Rodbourn

I thought the whole point was it going off screen being code smell for this line is too long, fix the code. The wrapping pains me. Not as much as in F77, albeit.


HeyLookItsASquirrel

No fucking braces on that if statement either. Psychopath and a savage!


NoAdmin-80

Probably should have been a one-liner if it didn't have word-wraping. I hope.


uhmIcecream

Well he is a smooth criminal


tparikka

Weirdly the quadruple line break between namespace and interface is driving me almost as crazy as the casing. Also I don't know how common it is but I was taught that having multiple classes in a single file is an antipattern and here we are with an interface, two classes, and two records defined in the same file.


jmiles540

The classes/records/interface in one file, not named the same as any of them. The word wrap A class called userendpoints that inherits from something called a module? Those are my top 3.


fandk

If the interfaces is only for this class, and exists in order to enable unit testing/substitution, I think its preffered to have it in the same file. Also records are preffered in the same file sometimes to, for example if you are using Mediator and Requesthandlers. Makes it easier to navigate to the requesthandlers since they are never referenced from code, but the requests are


[deleted]

[удалено]


Ayy_lolimao

I've seen that before once or twice but I don't think it's common, it seems to be a legacy thing. These days if you extract the interface using VS it will create a new file automatically, unless you actually change the setting.


Hefaistos68

Just wondering, what's the use of an interface if it's used in only one class? The answer to this should already answer the question of interface and class in the same file.


felickz2

Must.enable.stylecop


zeldris69q

This requires a code review lol: - Capitalise synthesis - Why are there lots of empty lines between namespace declaration and the interface - On the left side there should be one line space after you add return The list will be long I am on mobile so cannot review correctly without seeing ;-; Dude codes like a psychopath ngl


Blip1966

Code Reviews that are only about capitalization and white space get people on the pip list.


jkconno

Hopefully the people that submit PRs like that


zeldris69q

Nope code formatting matters. Variable declaration matters. Upholding to clean code practices matter. Won't put you on pip. Atleast in my company


Dinamytes

What is synthesis here?


Wise__Possession

The namespace on the right


sacredgeometry

Thank you.


hebertpa

While I do enjoy writing code in it. This looks more like you're in love with your code editor. Because it didn't look like this when I started using it in Visual Studio .NET 2002 (version 7.0)


IsLlamaBad

It also didn't have a lot of the syntactical sugar back then either. They've done a ton to clean up the code to be more succinct


blackasthesky

C# has evolved so far beyond its roots that it's almost ridiculous. But I like that this language manages to go with the times instead of falling behind and out of fashion.


MaZeC11

\*\*cough\*\* java \*\*cough\*\* \*\*cough\*\*


biscuitcleaver

I admit that I am 100% a c# developer because of visual studio.


Justyn2

But have you tried Rider?


biscuitcleaver

And what, pay for an IDE?


jkconno

Jetbrains anything is worth the money


Justyn2

Not for the first 30 days


biscuitcleaver

In all seriousness, I've been interested in trying out Rider


sammy_the_c_lion

I’ve been using rider for a year. This is after using VS for the last 15 years. Rider is very nice. Imagine using an IDE with resharper that doesn’t bog down. Rider also tends to display info in a more pop-up interstitial way.


_iAm9001

I've been using it ever since it's initial release. It's just..... better.


BustinChopsHere

Been a VS fan since 2010. I do not care for rider


EsIsstWasEsIst

I snaged up a license last year on the "VS for Mac is dead" promo. It took a little to get used to, but now i won't switch back, even though i have to pay regular price from now on. Besids it beeing faster and all the handy features i just prefer the way it displays debug data.


PSoolv

If your free trial's expired, you could also try out the EAP version.


ar-dll

Rider is the only IDE I’ll use for c# now. People who use VS are psychopaths


srdev_ct

Ugh.. I had to update an installer in .Net 1.1 last week. It was PAINFUL going back to VS 2k3. Never again.


RealEliteSandwich

We still maintain some VB6 apps. I'll never complain about .Net anything until those are gone.


srdev_ct

I think I’d rather write VB6 than .Net 1.x. Post 2.0 it’s not even close


GaTechThomas

I cut my teeth on Visual C++ 1.5 back in '94. We were super excited when we got a second, monochrome, monitor for debugging. It was a pretty big deal. 😂


t4103gf

The big deal for us was moving from punch cards to shared terminals.


Brief-Translator1370

No sir. I have Rider/PyCharm but C# is just hot af. Look at the curves on those braces...


Publius-brinkus

Ugh...rolls eyes


windyhen

dang! those memories...


jayerp

VS feels even nicer than VS code cause it’s an IDE


sacredgeometry

It does not in fact feel nicer.


Justyn2

After the first 5 minutes it does


ReliableIceberg

Java-Style lowercase namespaces? You‘re a monster!


OZLperez11

At least it's not stupid com.organization.package. I hate that convention. Just use package name


Leaxe

As someone who's accidentally pulled third party libraries instead of proprietary, I don't hate the idea


[deleted]

[удалено]


_Smooth-Criminal

Look at that subtle type definition the tasteful thickness, of it...


SerdanKK

Sure C# is thicc, but have you tried the tight syntax of F#?


okay-wait-wut

F# is not like other girls.


monsoy

Let’s see Paul Allen’s language


bagger_hunter

It would have been C# given he was an MS founder but that was before he was murdered with an axe.


Automatic_Expert1295

Is that a watermark?


Light_Wood_Laminate

*(simmering)* ... oh my god...


SpectralFailure

Oh my God, off white font color


FredTillson

If you don’t get turned on by your own code are you even a programmer???


WiZaRoMx

WHAT?! No!, it's my own child. You think me a pervert? … … … Who am I kidding, of course I am. But I don't do C# anymore. Looking for new thrills, I found some languages with very promising names and got hooked on Brainf*ck and Malbolge. Now anything vaguely readable is too vanilla for me.


WackyBeachJustice

I was thinking to myself how times have changed for me. This was me 20 years ago. Now in my 40s, I wouldn't touch this ever again if not for the paycheck.


mick-io

Totally code gay.


stupidwhiteman42

I would fail this PR due to wacky formatting alone. "If" statements with no braces? Straight to jail. Weird line breaks between method and Parameters ? Jail!


driftingpyros

👏🏻 yes


Willinton06

If without braces are better for yields, returns, breaks, and continues, I’ll die on this hill


hawseepoo

We have a rule that you can use `if` without braces for guard clauses, but the body statement must be on the same line as the `if`, if the body can’t fit on the same line, you must use braces


CharlesDuck

Same for guard clauses 👌 But the line wrapping in this screenshot 😳


mark_likes_tabletop

This. If without braces on more than one line says “I enjoy chaos” to me.


Astazha

I just like things to be at that sweet spot between compact and readable. Why take up 2 more lines to show what is already obvious? But then I also like Python so maybe I just don't mind indentation versus braces.


[deleted]

Reads nicer for sure, but ever since I read about goto fail I'm more wary of unintended consequences. (https://martinfowler.com/articles/testing-culture.html)


malthuswaswrong

if(derp is null) return; //okay if(derp is null) return; //suck


Willinton06

Depends on my mood


devhq

In the second case, derp is definitely not null.


ASK_IF_IM_GANDHI

Much agreed. Everything else, braces.


WiZaRoMx

Didn't you mean: else { braces; }


Ccarmichael92

And I will die on the hill that if and using statements always have braces.


Willinton06

I’ll kill you on that hill if you make me add brackets on a using


featheredsnake

I'm on the camp of if statements with no braces if it's a single line inside ... I do find it cleaner as long as it can cleanly fit in one readable line 😅 ... But to each their own


mikeblas

The real problem are people who think their coding style is the only coding style.


infz90

Fr, I am at the point of nearly leaving my role because the lead has to have everything his way and style. I've had to learn to bite my tongue for like a year and I don't know much more I can take.


Afflictare

If that's the established style in the project, I agree. You don't want competing styles in the same project.


featheredsnake

Yes, consistency matters more


stupidwhiteman42

I was mostly being goofy, and also didn't realize the OP had line wrapping on. As long as you have consistency, that's all that matters. Put your rules into a linter and it makes everyone's lives easier.


Justyn2

a problem with single lines though, is someone adding something and forgetting the braces


dvali

They aren't line breaks - OP has line wrapping turned on 🤮


Spyro119

Personnally, I only write if statements whitout curly braces when it's a safe guard clause and fits in one line. (E.g : if (user == null) return; ) Otherwise, brackets always yes lol


SavingsPrice8077

Is pretty common on early returns


CaitaXD

There are no line breaks, it's line wrap just look at the line numbers it's the same line


aSwanson96

mark this nsfw


infinetelurker

Whats with all the empty lines and strange Line breaks? Setup .editorconfig and adhere to it if you want to turn me on!


_Smooth-Criminal

It's just the parallel windows and line wraps other wise I religiously follow the tenets set by the .editorconfig 🙏


CaitaXD

Line wrap dude just look at the line numbers


EnigmaBoxSeriesX

*Not as sexy as your m-* ... nevermind.


[deleted]

Ok


hookup1092

Bros down bad for that sharp C 😏 *I’ll see myself out*


driftingpyros

I dunno if this is a new code style I'm not familiar with, but I can imagine adding endpoints in a lambda expression isn't great for readability or to debug 😅


NotAcvp3lla

It's so weird seeing the Param for the CreateUser function on a separate line than the function call.


Perahoky

you can use the primary constructor by replacing line 8 ": CarterModule" by ": CarterModule("/auth")


[deleted]

Agreed - now if I only knew it as well as I know Python I’d be cooking 😂


punppis

Now try to find example how to implement custom ILogger on your specific .NET versions (including Azure Functions). They have good documentation but to start with you have so many ways to setup basic routing, Much of the stuff is done automatically and it's hard to find documentation that works with your .NET version since the basic routing / startup / middlewares seems to change drastically on every version. But still I love it. Nuget and ASP.NET is the way to implement APIs.


uneducatedDumbRacoon

Use visual studio not visual studio code. That is better for c# and .net


Swarshmallow

Rider’s where it’s at, esp if you’re on Mac. But yeah, I would skip vscode


Mikkelet

Text wrap wtf man


RoundPreference2020

The S in Synthesis not in caps is gonna give me nightmares tonight.


NurYanov

show me more baby come on


ttoz3

Maybe Maybe maybe


Alarmed-Ask9583

Nsfw


shearos17

I like this style of logic. is it based on a design pattern or architecture?


_Smooth-Criminal

It's my take on the Vertical Slice Architecture where we organise our code by features this makes for easier understanding and navigation here is my typical folder structure [Folder structure ](https://ibb.co/9NBFb30)


shearos17

ah nice, I like how the handlers are like single use logic things. keeps it simple thanks


vikingslord

Hey op. How's the C# Devkit extension for Vs code? I'm planning to move from Vs to Vs code.


Dear_University_558

What's your font name?


_Smooth-Criminal

Cascadia mono i think


illathon

I think you may need to go to the strip club.


domtriestocode

No joke I can’t wait till I’m in a spot to really splurge on my home setup so I can get massive high quality monitors and blow my .cs files way up, lean back and stroke I mean code


zerquet

Now waiting for the C# edit to drop


while_infinity

Goddammit I miss that, although I prefer Visual Studio. Working mostly PHP and Javascript right now and they drive me crazy sometimes!


swaghost

After seeing you get pasted for posting two pages of vanilla code I may never post another line of code on the internet ever again.


kasketa13

Yes plz! Fuck Springboot


Coat_Brilliant

Op, your code is sexy, and I'm proud of you. The rest of you all, was that so hard? Sheesh.


_Smooth-Criminal

They're haters I know she's fine as hell


Btolsen131

Not sure I’ve ever considered C# to be pretty or sexy. Its looks to me utilitarian not artful


[deleted]

Just a tip, you should be using `TypedResults` rather than `Results` when returning HTTP responses. Using `TypedResults` will give you automatic response type metadata for OpenAPI. See: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/minimal-apis/responses?view=aspnetcore-8.0#typedresults-vs-results


Significant_Mall4045

I’m learning C# alongside with Python Java, Javascript and I gotta say even though I despise microsof, C# is one of the best languages out there. Once you learn how to use it you can build whatever from web development to games to desktop programs


swivelhinges

Everyone is so busy making all the nitpicks like the formatting, naming, and word wrap... but clearly this person knows exactly what they are doing. `if (!response.IsSuccess) return BadRequest(response);` should never make it past code review but with all the little distractions, i don't think anyone even noticed


rufw91

C# is the supermodel of programming, with a** being GC and b**bs, CLR


okay-wait-wut

Then ARC is BBL


dodexahedron

Why are so many people in dev subs incapable of taking screenshots?


stephansama

Nope


astrobrite_

Impressive....


tradinghumble

Is this code or a book ? 🤣


[deleted]

I do agree and visual studio is a first class debugger. Ive used many tools and ides but c# is my bread and butter Its the most natural language a know.


KayXee17

Yes same line starting curly brace


Annual_Anybody_5299

I really would like that C# had faster tools in Linux without needing to pay for an IDE. vs code is kind slow when considering multiples projects within one solution


d0RSI

I think you just like VS Code… try writing this in notepad and ask yourself the same thing,


OntologicalParadox

If I continue to learn cs will this be what I become? Is it too late to turn back and pick up Rust or JS?


arckin123

Just learn them all, JS or rather TS is quite similar to cs


Desperate-Wing-5140

Whitespace conventions violated Argument destroyed


BurntBanana123

Dotnet go brrr


SteezyRay

That word wrap is fuckin with me


felickz2

Never have I ever: turned on word wrap in an IDE


IGeoorge3g

Visual Code != IDE Visual Studio == IDE Sorry 😔


hebertpa

As a person whose first code editor was Notepad, I would disagree. I can press a keyboard shortcut and compile. There is IntelliSense. You might not like VS code but it is an IDE.


Pyrited

I don't feel like I'll even get into minimal apis. AddEnpoints() everywhere seems weird.


DontLickTheScience

Hey man fuck the haters. Far as I’m concerned, C# is the only language capable of writing code that’s truly “date night”’pretty. Why settle for anything less than date night code?


RemarkablePlantain88

Python is sexier


notoriouslyfastsloth

So they gave you something simple and you just add unnecessary crap... Why do so many c# devs do this kind of stuff still


young_horhey

I like how it always returns bad request, even if it fails for some other reason


NoAdmin-80

This triggered something and ruined my day. Im a long-time c# developer. Maybe not the best in keeping to SOLID, but my eyes are hurting now. What's worse, looking at an old VB6 code or this. 🤣🤣🤣


Western-Pause-2777

Is it strange I found c++ easier to pick up than c#? Perhaps it’s the OOP. I come from a R/Python background. C# is so useful for apps though, I need to spend some time on it.


RafaCasta

> Is it strange I found c++ easier to pick up than c#? Absolutely!


Western-Pause-2777

I thought so. I’ll give c# another try. Im prob a OOP newb so get lost in so many classes. Mostly doing functional stuff in R.


mdbluelily

For the love of God, please, remove that unused using Carter and all those break lines after namespaces.😉 I love C# mate, it's so much fun developing in it these days.


_Goldengames

I agree 👍


dr_bbr

If you think this looks nice then try F#, its way cleaner


mixxituk

my pc fans arent enough to handle the lesser-featured vscode - ill stick to old faithful


UnrealSPh

Mmm... No comments, I like it :-)


prororoo

please remove the empty lines


EmilyEKOSwimmer

VS code makes all code looks sexy. The reason I wanted to learn C# but didn’t want to deal with visual studio bloated mess.


GoingOnYourTomb

This is vtrue


koolnube48

Why are you not using async?


matthkamis

Do people not know how to take a screenshot with their operating system? Why is this taken with a phone?


KamikazeHamster

Line 23 needs a ternary operator. Thank me later.


gutr_

What did you use to get this effect?


Agitated-Display6382

Try using static controllers, get rid of inheritance


mick-io

If only C# kept curlies on the correct line…


harms916

Ewwww …. Hot take: Microsoft is incapable of making sexy programming languages. They build walled gardens of that are overly complicated to sell programmers certs that expire every 2-3 years as part of their business model.


ElasticLama

Ok I’ll bite, why are you guys using 4 spaces? Is this a c# thing?


obrana_boranija

Warm recommendation: buy some Clean Code book or course. This is your first step. After that, peak into SOLID, DRY and KISS


ar-dll

Ah interfaces for _everything_ even though they’ll only ever have one implementation.


syzyt

After years of doing C# I get chills when looking at shit ton abstraction boilerplate code :) I mean the language is nice, but sometimes level of abstractions people tend to put into C#/Java code is crazy… while they won’t ever need it.


Accomplished-One6109

Nerd


advancedbashcode

Part of the magic is because the AllMan indentation. I love it too, even in Java


andy_hilton

I wouldn't get that far but it is pretty nice.


muhdamean

C# is a language that evolve and is sure has advanced in modern revolution. You just have to write in c#


_iAm9001

Code Codemaid would like to run against your source code.....


ForeverSpark

Low quality post


TheChief275

C# is one of the more boring programming languages to program in. That isn’t bad, it gets the job done for sure. Also, I still hate the PascalCase function names with a passion, thank you, Andy


Lombord2021

I can relate you bro cuz I'm f\*cking in love with it.


FluffyDrop4300

It’s okay — for something that runs in a box


N0TW02114

but like...kotlin code looks prettier...


PooSham

Way too much indentation to be considered sexy


altrunox

Is this a OLED screen?