|
Copy pasting and random changing of code to make the log statements look right
|
# ? May 27, 2016 13:52 |
|
|
# ? Jun 8, 2024 08:29 |
|
What does that do? Seems like it would throw a runtime exception.
|
# ? May 27, 2016 14:35 |
|
If its javascript (betting it is) and foo is a String, It's the same as doing:code:
|
# ? May 27, 2016 15:02 |
|
Dr. Stab posted:What does that do? Seems like it would throw a runtime exception. But you can't have multiple nulls in a null-terminated string so
|
# ? May 27, 2016 15:06 |
|
(source)
|
# ? May 27, 2016 18:35 |
|
That's even less coherent than the usual xkcd. Is Randall developing a brain tumor or something? Maybe Charles Boyce is ghostwriting for him?
|
# ? May 27, 2016 18:50 |
|
Internet Janitor posted:That's even less coherent than the usual xkcd. Is Randall developing a brain tumor or something? Maybe Charles Boyce is ghostwriting for him? I dunno, the creeping horror when I tried to read the code was pretty good. Not his best work, certainly, but I got my $0.00 out of it.
|
# ? May 27, 2016 18:55 |
|
Internet Janitor posted:That's even less coherent than the usual xkcd. Is Randall developing a brain tumor or something? Maybe Charles Boyce is ghostwriting for him? He's been parroting in-jokes from his IRC channel for years.
|
# ? May 27, 2016 20:02 |
|
My guess after reading the tooltip on his website is he used content-aware fill on a code screenshot and phoned in that day's comic
|
# ? May 27, 2016 20:15 |
|
quote:Prefer the least indented scope possible.
|
# ? May 27, 2016 20:40 |
|
Yeah, who needs legibility when you can save two presses of the enter key!
|
# ? May 27, 2016 20:43 |
|
Yes it's always better to jam as much logic as possible into one line. This makes it more legible since indentation is bad.
|
# ? May 27, 2016 20:47 |
|
I would replace that code with:code:
|
# ? May 27, 2016 20:59 |
|
xzzy posted:Yeah, who needs legibility when you can save two presses of the enter key! The lines are only equivalent in function if x is never changed within the for loop, so the code snippets are not equivalent.
|
# ? May 27, 2016 21:08 |
|
Dr. Stab posted:Yes it's always better to jam as much logic as possible into one line. This makes it more legible since indentation is bad. I blame K&R.
|
# ? May 27, 2016 22:38 |
|
PT6A posted:The lines are only equivalent in function if x is never changed within the for loop, so the code snippets are not equivalent. You're right. I fixed it. code:
|
# ? May 27, 2016 23:24 |
|
NihilCredo posted:You're right. I fixed it. Ahem: code:
|
# ? May 27, 2016 23:47 |
|
code:
|
# ? May 28, 2016 00:06 |
|
IT BEGINS posted:
code:
|
# ? May 28, 2016 01:08 |
|
No, sorry, the 20 * !!x is sublime in its compact insanity. I have intentionally and thoughtfully written the sequence * !! in code you have probably run.
|
# ? May 28, 2016 01:28 |
|
I think you mean code:
|
# ? May 28, 2016 01:29 |
|
Whoa, let's not take this too far now. Even the most heretical programmer isn't going to gently caress around with conventions that have been handed down from our forefathers who toiled in the FORTRAN mines all those decades ago. It's i, j and k.
|
# ? May 28, 2016 03:12 |
|
PT6A posted:
'i' is a magic name.
|
# ? May 28, 2016 03:56 |
|
Subjunctive posted:No, sorry, the 20 * !!x is sublime in its compact insanity. JavaScript or C
|
# ? May 28, 2016 06:06 |
|
FamDav posted:JavaScript or C
|
# ? May 28, 2016 06:52 |
|
FamDav posted:JavaScript or C Yep.
|
# ? May 28, 2016 14:24 |
|
PT6A posted:Welp, apparently I'm the coding horror. Don't worry, plenty of reasons to use layout-only views. It's not "inelegant" if you think of it as defining variables in a program written in autolayout constraints. It would be better if autolayout had actual variables but, eh. You do what you gotta do Subjunctive posted:No, sorry, the 20 * !!x is sublime in its compact insanity. Once you learn about !!, it's hard to justify not using it
|
# ? May 30, 2016 09:52 |
|
!! and --> are the two compound operators I use regularly. They're both good imo.
|
# ? May 30, 2016 13:07 |
|
Soricidus posted:!! and --> are the two compound operators I use regularly. They're both good imo. What does that second one do?
|
# ? May 30, 2016 16:17 |
|
KernelSlanders posted:What does that second one do? code:
code:
|
# ? May 30, 2016 16:19 |
|
KernelSlanders posted:What does that second one do? code:
|
# ? May 30, 2016 16:20 |
|
Subjunctive posted:
Yup, that's pretty horrible.
|
# ? May 30, 2016 20:12 |
|
KernelSlanders posted:Yup, that's pretty horrible. If there were a God, that would simply not compile.
|
# ? May 30, 2016 20:20 |
|
Actually, it's good and cool and I use it without irony in production code.
|
# ? May 30, 2016 20:35 |
|
Honestly, since installing Visual Studio 2015 I can't live without the tadpole operator.
|
# ? May 30, 2016 20:52 |
|
Absurd Alhazred posted:If there were a God, that would simply not compile. I'm sorry would you prefer that C/C++ had SYNTACTIC WHITESPACE
|
# ? May 30, 2016 21:04 |
|
KernelSlanders posted:Yup, that's pretty horrible. It's actually extremely cool, and good.
|
# ? May 30, 2016 21:06 |
|
quiggy posted:I'm sorry would you prefer that C/C++ had SYNTACTIC WHITESPACE Honestly, I think postfix ++/-- should be depreciated. It was a terrible idea when first introduced in C and has never become a better idea since.
|
# ? May 30, 2016 21:08 |
quiggy posted:I'm sorry would you prefer that C/C++ had SYNTACTIC WHITESPACE Remember when vector<pair<int,int>> was bad and vector<pair<int,int> > was fine?
|
|
# ? May 30, 2016 21:09 |
|
|
# ? Jun 8, 2024 08:29 |
|
nielsm posted:Remember when vector<pair<int,int>> was bad and vector<pair<int,int> > was fine? Yes. Happily at the time I worked on code that only had to compile under MSVC and it had the first form as an extension.
|
# ? May 30, 2016 21:27 |