51

[Certified CMS Of Doom™ moment]
Ah yes, the good old "generate a huge CSV just to know how many rows there are"

Comments
  • 12
    What if there isn't an empty line in the end

    Well, we didn't care about just getting the count in the first place. So, we might as well introduce a few bugs here and there
  • 8
    @asgs Bro', you're too smart for this code!
  • 2
    geræt
  • 4
    - Globals, in functions
    - assumed line breaks, this guy never worked with a cr/lf
    - assumed headers on csv (-1)
    - assumed csv even contains content besides an empty line
    - wtf is a geraet?

    Someone really likes there null-coalesce, but uses it in a way that's practically pointless anyway 😂
  • 3
    @C0D4 geraet is german for device...
  • 1
    Almost 20k lines, hot damn.
  • 2
  • 4
    @asgs back to grade school for me I guess.
  • 2
    @ars1 I wouldn't be so sure about that...

    There must be no closing tag, h nice we don't know how far this diarrhea stretches.
  • 1
    „But it works“
  • 3
    @preezer Damn right. Why write clean and readable code when it just Works™? The reasoning of a lot of PHP devs...
  • 1
    @preezer

    I can amputate both your legs up to the hip, you can still run and it works, too.

    But guess you wouldn't want that...
  • 1
    @IntrusionCM Localized variable names, especially in network protocols, are terrible. Also British people insisting on the original spelling despite the shortened version being the standard.
  • 2
    @lbfalvy I never said that I liked it :)

    I just played the translator.

    In my opinion american english and e.g. in headers a common vendor prefix, as an example based on company name (stupid example): "X-<CompanyName>-<HeaderName>".
Add Comment