Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
asgs109671yWhat 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
@asgs Bro', you're too smart for this code!
C0D4708131y- 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 😂
@C0D4 geraet is german for device...
ars129211yAlmost 20k lines, hot damn.
@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.
preezer1251y„But it works“
@preezer Damn right. Why write clean and readable code when it just Works™? The reasoning of a lot of PHP devs...
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...
@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.
@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>".
[Certified CMS Of Doom™ moment]
Ah yes, the good old "generate a huge CSV just to know how many rows there are"