35
0x29A
7y

Story of my life, ngl

Comments
  • 3
    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 🙃
  • 1
    @gitpush in my defence, that code has been untouched since i took over the project :(
  • 0
    @ijava I wish you all the luck left in this world, you will be facing lots of trouble 😩
  • 1
    @gitpush I've had to rewrite most of this project already, it'll be a lot better once i'm finished, could be a while yet.
  • 0
    @jAsE it means 'not gonna lie'
  • 0
    @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
  • 1
    @gitpush Well i'd hope so considering he was fresh out of university, his code isn't too bad imo, he just lacks experience, i mean don't get me wrong i don't have a degree like him, but i just have the expereince he didn't.
  • 0
    @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 😀
  • 1
    @gitpush tell me about it, i started at this company 6 months ago, never used databases, nor EF 6, had to learn it all from scratch, Pluralsight courses helped a shit ton, but now i don't struggle with it too much, and actually enjoy it. ;)

    #DEVLIFE
  • 0
    @ijava yup devlife, remember, with EF, LINQ & Select are your best friends ;)
  • 1
    That 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.
  • 0
    @D--M each to their own :^)
  • 0
    What's the output of @gitblame?
  • 1
    @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.
  • 0
    @D--M calm down friend, i appreciate the advice, no need to get all cunty about it tho, i have added a rule to stylecop tho if that make you happy :*
  • 0
    @D--M https://i.imgur.com/iA1cCFP.png if it makes you feel better my good old pal.
  • 1
    @0x29A
    I'm Australian. I like swearing.
  • 0
    @D--M ah so you just come across as being cuntish, but you actually aren't? :^)
Add Comment