US Open tennis star, 18, left creeped out by man trying to get her attention in latest bizarre fan behavior
Melvyn Bragg Steps Down From BBC Radio 4's In Our Time After 26 Years
Read more of this story at Slashdot.
New KFC set to open at Basildon shopping centre
The Essex Tesco store set for trial of avocado scanners to read ripeness of fruit
Sickening punishment used on children before they escaped from 'dungeon' in house of horrors
Traffic delays on A12 due to obstruction on road
Coded Smorgasbord: Basically, a Smorgasbord
It's that time to take a look at a few short snippets.
Boolean values can hold true or false. But is that truly self documenting? I think we need clearer variable names for this. Certainly, the snippet Nonymous found thinks so:
boolean isTrue = false;Well, at least I'll know if it's true or not. I'm not sure what "it" is in this scenario, but I'm sure that's the least important part of all of this.
If you've worked in C#, you're aware that it offers both a string type, and a String type- they're the same thing. So Colin's co-worker isn't wrong for writing code this way, but they're also wrong for writing code this way.
writer.WriteLine(string.Empty); writer.WriteLine(String.Empty);Billie sends us this short bit of Java, which ensures that nulls are properly handled:
if (val == null) { return null; } return val;It's very important that, if val is null, we don't just return the contents of val, we should return null instead. Y'know, so no one is surprised by an unexpected null. Wait a second…
Finally, Jon finds this comment in the codebase. The code is elided, but I Jon has helpfully summarized it.
// Basically, … several thousand lines of dense code containing no further commentsHonestly, I'm not sure if that comment is a statement of surrender or just an ironic joke. Either way, I get it.
.comment { border: none; } [Advertisement] Plan Your .NET 9 Migration with ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!