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
-
Demolishun34694160dSeriously?! WTF?! Are you human or something?! I am sure there are Vortigons somewhere that would laugh. Humans on the other hand recognize doing stupid shit.
-
TeachMeCode5174160dIf you think you’ve fucked up you’ll be pleased to know how I fucked up-as I was adding typescript to the codebase (it’s early build so not a huge refactoring job) i saw the css wasn’t working properly so I spent hours thinking typescript fucked it up for some reason then realized I forgot to import the css into the react components…..🤪😳😳😳🤯
I’m the worlds stupidest dev -
cho-uc1962159dBut what's the purpose of second function returning null though?
Can't imagine a scenario where this is necessary.
Did you set it for testing/debugging and forgot to remove it? -
lorentz15233158dI was about to berate dynamically typed languages, but then I remembered that I encountered 4 instances of this exact bug last week in C#
-
lorentz15233158d@Lensflare Well, apart from pushing unfinished code, it mostly has to do with being able to return a value outside the set of values explicitly supported by the return type, only it's not because all functions return all types but because null is added to the values supported by reference types.
-
Lensflare17099157d@lorentz right. There was too few context to see if the returned null was legitimate. I assumed that it was just about the forgotten comment :)
-
lorentz15233157d@Lensflare I read it like a return statement that doesn't work so it's temporarily commented out and a placeholder statement added just to get the code to compile so other parts (hopefully required for the return statement) can be developed before finishing the half-done function
Feel free to make fun of me on this one.
> be me.
> Write a function that calls a second function to get a returned value and continue work.
> That second function always returns null no matter what changes are made.
> Spend half hour scratching head.
> That second function has this written at the end
return null;
//return $returnVal;
> fml.
rant