Discocode
-
Continuing the discussion from Do not compare Strings:
@JazzyJosh said:
There's no reason to write
[code]if (string != null && !string.isEmpty())[/code]when you can just write
[code]if (!string.isNullOrEmpty())[/code]
if you don't actually need to differentiate between a null result and an empty result. Of course null and empty aren't the same, but if you don't care, then it doesn't matter.
Basically:
But, under what circumstances is that actually the right thing to do?
raw:
@JazzyJosh said:
There's no reason to write
[code]if (string != null && !string.isEmpty())[/code]when you can just write
[code]if (!string.isNullOrEmpty())[/code]
if you don't actually need to differentiate between a null result and an empty result. Of course null and empty aren't the same, but if you don't care, then it doesn't matter.
Basically:
But, under what circumstances is that actually the right thing to do?
[/code]
-
The actual raw of the post I tried to quote:
[code]
@JazzyJosh said:There's no reason to write
[code]if (string != null && !string.isEmpty())[/code]when you can just write
[code]if (!string.isNullOrEmpty())[/code]
if you don't actually need to differentiate between a null result and an empty result. Of course null and empty aren't the same, but if you don't care, then it doesn't matter.
Basically:
This stuff almost always seems overblown to me. How often is it really important to differentiate between null and an empty string?
But, under what circumstances is that actually the right thing to do?
[/code]The OP was the contents when I clicked Reply as linked topic
-
I would basically not bother with any BBCode other than
[quote]
, tbh. (And that's only because[quote]
has no equivalent Fuckdown/HTML equivalent...)Filed under: AS_DESIGNED, what is 'design'?
-
[quote="tar, post:3, topic:8317"]
I would basically not bother with any BBCode other than, tbh
That's still broken though, the OP raw misses @boomzilla's post.
-
-
[quote="tar, post:3, topic:8317"]
I would basically not bother with any BBCode other than, tbh
That's still broken though, the OP raw misses @boomzilla's post.
[quote="tar, post:3, topic:8317"]
Ahh, you mean this kind of broken quote?I'm still sure that they'll claim that it's by design, despite the fact that no-one would intentionally build a system that behaves like this...
-
Why can't we just use normal
quote
markdown like normal
markdown
quote people?View raw to see how badly even Markdown quotes are done on this forum.
-
Why can't we just use normal
>quoteThere's no way to link the quote to its origin with that syntax, is there? I mean,
<blockquote cite="">
is alleged to do something but as we can see:It does not cite...
And this fails even harder.
"ben_lubar, post:7, topic:8317, full:true" >One of these is my optimistic face ☺☻
And a bonus Discosearch for all you lucky readers:
But...
Filed under: not even sure how we can begin to evaluate what 'expected behaviour' even is, preaching to the choir
-
Since Jeff @CodingHorrorBot'ed my meta.d bug, here's a post showing how he's wrong.
-
@JazzyJosh Is Doing It Wrong™
-
-
Once upon a time, there was an arrant douche named John Gruber who wrote a really shitty Perl script. Many people came upon this script, and decided that it might have promise (if some of the more heinous bugs were fixed, of course.) But Gruber didn't accept anyone's patches, preferring to issue condescending and dismissive posts to anyone who showed any interest in Markdown, and to lazily masturbate instead of improving his 'product'.
Astoundingly, Gruber's superlatively terrible stewardship of his project failed to kill off any interest in it, and soon, like toadstools emerging from a turd, there were hundreds of little Markdown libraries, which all behaved differently, because Gruber's idea of a spec was his original shitty implementation, bugs and all, nobody could agree on what Markdown was supposed to do, or how it was supposed to do it. Also _ is for _underlining_, you idiots!
And that is the story of Markdown.
-
The second bug was also in the markdown library. To prevent double escaping of certain characters, they are run through MD5 after being escaped once, and then the MD5 is undone at the end. Since the MD5 is the same every time, someone figured out that if you just put the MD5 into your comment, it would be unescaped at the end.
This... this is standard practice? The
***\****
bug wasn't a Discobug in it's classical sense, it was just a failure to implement the standard practice properly???
-
-
a failure to implement the standard practice properly???
So standard run of the mill for @discoursebot
-
@JazzyJosh - Last Day Without A Discourse Bug: null