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
Root7038939dWow, that is awful.
C0D46169839dI suddenly don't feel bad for
//this will break the fuck out of everything if ran during tests - don't ask, just go with it.
// do this because it's an actual user
Oktokolo132139dThis looks like a legitimate place for one of the most hard-to-write comments ever.
That isn't enough information.
I don't know the language. But:
The combination of expression result caching and reevaluation on change of participating variables is probably not what the average coder expects to happen.
This probably triggers a WTF-is-going-on?! moment in whoever reads that code - including yourself one year from now...
// The always-true check on editing triggers reevaluation of
// the function whenever editing changes:
property var value: if(editing || !editing) function(othervalue)
This still isn't a really good comment, but it at least tries to explain, why the WTF expression is there and what the author expected it to do.
If reevaluation of expressions is rarely used (not a common idiom), you might want to also mention, that change of othervalue also triggers reevaluation...
BrianValente35I'll start implementing this in my apps too.
nmunro15How I've decided to answer the "can you hack" question from here on in... "Can you show me how to hack this a...
nikolatesla13Friend: So you're a programmer? You must be good in hacking WiFis and sht. Me: Uhm.. Friend: Can you hack my...