|
That piece of code is incredible. At first glance it only looks moderately silly, but the more I stare at it, the more hidden horrors reveal themselves, like the blossoming of an enormous carrion flower.
|
# ? Jul 21, 2009 17:25 |
|
|
# ? May 15, 2024 04:32 |
|
sex offendin Link posted:My favorite part is the extra call to refresh(3) which does literally nothing. /* not implemented yet */
|
# ? Jul 21, 2009 18:08 |
|
huge sesh posted:I've always thought this one was real pretty code:
|
# ? Jul 21, 2009 20:15 |
|
That's awesome, did you do that yourself or use a program?
|
# ? Jul 21, 2009 20:21 |
|
Triple Tech posted:That's awesome, did you do that yourself or use a program? A program would make less clumsy-looking letters.
|
# ? Jul 21, 2009 20:23 |
|
I guess some of you know this already:code:
stolen from xkcd.com *edit* Thibaw fucked around with this message at 23:21 on Jul 21, 2009 |
# ? Jul 21, 2009 23:18 |
|
xkcd jokes get more hilarious with each repost!!
|
# ? Jul 21, 2009 23:20 |
|
Scaevolus posted:xkcd jokes get more hilarious with each repost!! hay guys i just registered have you heard this one? there's 10 types of people, those who know binary and those wh
|
# ? Jul 22, 2009 00:43 |
|
It's his only post. Did he really register just to post a tired xkcd joke in here.
|
# ? Jul 22, 2009 00:45 |
|
C'mon guys, plenty of people make lovely first posts, our job is to educate them so they don't end up like Victor or Chain Chomp
|
# ? Jul 22, 2009 01:02 |
|
ColdPie posted:there's 10 types of people, those who know binary and those wh I will educate all of my liberal arts about base two, lest they remain ignorant and commit suicide.
|
# ? Jul 22, 2009 01:21 |
|
so this xkcd is an internet comic strip, you say
|
# ? Jul 22, 2009 06:23 |
|
xkcd is decent (when it's about programming or other nerd stuff) but people reposting it like it's new kills any humor
|
# ? Jul 22, 2009 08:02 |
|
Veinor posted:xkcd is decent (when it's about programming or other nerd stuff) but people reposting it like it's new kills any humor I wonder if xkcd is lovely today...if only there were a website that would tell me.
|
# ? Jul 22, 2009 09:00 |
|
floWenoL posted:I wonder if xkcd is lovely today...if only there were a website that would tell me.
|
# ? Jul 22, 2009 09:37 |
|
floWenoL posted:I wonder if xkcd is lovely today...if only there were a website that would tell me. http://hasthelargehadroncolliderdestroyedtheworldyet.com/ they actually do a "check", too
|
# ? Jul 22, 2009 13:48 |
|
<!-- if the lhc actually destroys the earth & this page isn't yet updated please email mike@frantic.org to receive a full refund -->
|
# ? Jul 22, 2009 15:12 |
|
The company I work for outsourced some iPhone code to a offshore engineering company. I just got access to it today to look for how they were hitting our APIs, and I find this kind of code sprinkled throughout:code:
code:
|
# ? Jul 22, 2009 23:12 |
|
code:
|
# ? Jul 23, 2009 06:26 |
|
clockwork automaton posted:
Edit: basic logic is way too difficult baquerd fucked around with this message at 06:36 on Jul 23, 2009 |
# ? Jul 23, 2009 06:33 |
|
clockwork automaton posted:
whaaaaat? I mean there's logic, and then there's bad logic, and then there's flat out incorrect logic, and I think this manages to be something else again. Edit: The more I stare at this the less sense it makes. I think might be some sort of art. You're some sort of lecturer or something and a student wrote this for an assignment, right? A student and not someone who got paid for this, this collection of words? Goat Bastard fucked around with this message at 12:35 on Jul 23, 2009 |
# ? Jul 23, 2009 12:25 |
|
Goat Bastard posted:I mean there's logic, and then there's bad logic, and then there's flat out incorrect logic, and I think this manages to be something else again.
|
# ? Jul 23, 2009 12:33 |
|
ultra-inquisitor posted:Well the function does actually work! Which makes it even more boggling because his 'awesome way' comment is wrong, which implies that he wanted it to do something else, but made a mistake and got it right unintentionally. My god so it does, I was so caught up in the beauty of it that I totally missed that. That settles it, the man who wrote this is an artist.
|
# ? Jul 23, 2009 12:37 |
clockwork automaton posted:
There's no way the guy who wrote this didn't know what it was doing.
|
|
# ? Jul 23, 2009 16:55 |
|
"Single Point of Return" rears it's twisted head again. It seems like people that subscribe to it always use convoluted logic.
|
# ? Jul 23, 2009 17:31 |
|
Mustach posted:"Single Point of Return" rears it's twisted head again. It seems like people that subscribe to it always use convoluted logic. quote:I also a big fan of single return functions and I do not give up. In order to combine a single return with early aborting I use the the following trick:
|
# ? Jul 23, 2009 18:52 |
|
RoadCrewWorker posted:Hm, lets google this... Christ, that's terrible even for single-point-of-return advocates. Usually they'll stick with creating extraneous variables for return values. Abusing a loop statement to avoid using a return statement is just awful.
|
# ? Jul 23, 2009 19:12 |
|
mr_jim posted:Christ, that's terrible even for single-point-of-return advocates. Usually they'll stick with creating extraneous variables for return values. Abusing a loop statement to avoid using a return statement is just awful. Honestly I think he'd have been better off in that case just using a goto
|
# ? Jul 23, 2009 19:42 |
|
mr_jim posted:Christ, that's terrible even for single-point-of-return advocates. Usually they'll stick with creating extraneous variables for return values. Abusing a loop statement to avoid using a return statement is just awful. Even if you subscribe to single point of return, that function doesn't make sense, a regular if-block would do.
|
# ? Jul 23, 2009 19:43 |
|
dwazegek posted:Even if you subscribe to single point of return, that function doesn't make sense, a regular if-block would do. That's what I was talking about, actually. code:
|
# ? Jul 23, 2009 19:51 |
|
code:
Edit: wow http://bytes.com/groups/cpp/621474-setting-every-bit-all-members-class-0-a This kind of shortcut had never even occurred to me... Lexical Unit fucked around with this message at 21:15 on Jul 23, 2009 |
# ? Jul 23, 2009 21:09 |
|
Haha, same file:code:
|
# ? Jul 23, 2009 21:19 |
|
Lexical Unit posted:Haha, same file: We both know this particular developer's sins can never be erased.
|
# ? Jul 23, 2009 21:58 |
|
Lexical Unit posted:Haha, same file:
|
# ? Jul 23, 2009 22:08 |
|
dwazegek posted:Even if you subscribe to single point of return, that function doesn't make sense, a regular if-block would do. I don't think so. His example is really simple, but if you were to expand it, you can see where the if block would break down. code:
|
# ? Jul 23, 2009 22:44 |
|
So, I'm sure some of you know that C++'s throw specifiers don't always work too well, even for the no-throw case, e.g. void my_func() throw() {}. Luckily, the C++ standards committee has decided to resolve this, but since it's fairly late in the standardization game, they're worried about adding any new keywords, so they're reusing some old ones:code:
|
# ? Jul 24, 2009 00:04 |
|
Avenging Dentist posted:So, I'm sure some of you know that C++'s throw specifiers don't always work too well, even for the no-throw case, e.g. void my_func() throw() {}. Luckily, the C++ standards committee has decided to resolve this, but since it's fairly late in the standardization game, they're worried about adding any new keywords, so they're reusing some old ones: Obvious troll, the C++ standards committee would never change anything that works as poorly as exception specifiers.
|
# ? Jul 24, 2009 00:12 |
|
Dijkstracula posted:Well, given it's wrong, I should hope it's not used very often! What's wrong with it?
|
# ? Jul 24, 2009 04:02 |
|
Scaevolus posted:What's wrong with it? The sine function generally does not range from -0.0174532778 to 0.0174532778.
|
# ? Jul 24, 2009 04:14 |
|
|
# ? May 15, 2024 04:32 |
|
Scaevolus posted:What's wrong with it? Does k*sin(x) = sin(k*x) for you?
|
# ? Jul 24, 2009 04:16 |