Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I can't look at this code ðŸ˜
Why at the bottom he has context.Customers.ToList(); 😰
Fetching entire customers table with all columns. Goodbye performance, hello OOM 🙃 -
@ijava I wish you all the luck left in this world, you will be facing lots of trouble 😩
-
@ijava if I were you, I'd be totally fine with that as long as I get to rewrite that mess. Eose I'd be suffering from fixing it's issues :/
In that guy's defence, he has clean code -
@ijava exactly he is missing the knowledge, but for a starter to be able to write that, I think he has a bright future, Entity Framework is not an easy thing but once got it it's amazing. Wish you both good luck 😀
-
D--M22687yThat code was painful to read.
There is also a special place in hell for those who use var or auto without good reason... (Hint, its fucking NEVER... Unless its a really long type name using templates and shit)
The above code is not a good reason. -
D--M22687y@0x29A
Normally i would agree... But not in this example.
1. If the String.null function wasn't there, how would I know from a glance or even during peer review what the fuck that is?
2. If you implemented a toString function on the class, then changed what the inital value returned to another type, your adding some retarded conplexity for no reason.
Basically... If you use var... You are _intentionally_ making peer review harder and code more harder to read...
So just don't fucking do it.
Story of my life, ngl
rant