|
Dicky B posted:Who won? That was the tail end of the argument. After he said that, I basically gave up and went to make fun of him on the internet.
|
# ? Oct 19, 2011 21:08 |
|
|
# ? Apr 27, 2024 10:28 |
|
w00tz0r posted:That was the tail end of the argument. After he said that, I basically gave up and went to make fun of him on the internet. Feel free to tell him that the internet thinks he's a complete loving idiot.
|
# ? Oct 19, 2011 21:10 |
|
w00tz0r posted:That was my lead. I had a shouting match with him that lasted at least half an hour. If that's the lead I feel sorry for your project.
|
# ? Oct 19, 2011 21:31 |
|
w00tz0r posted:"Forward compatibility is easy, all Microsoft products are completely forward compatible. I can write a program on Windows Vista and have it run on Windows 95. The only thing that broke forwards compatibility is UAC."
|
# ? Oct 19, 2011 22:23 |
|
OriginalPseudonym posted:If that's the lead I feel sorry for your project. gently caress the project, I feel sorry for me.
|
# ? Oct 19, 2011 23:16 |
|
How do you do nested comments in your RDBMS? By storing the nesting in the ID!
|
# ? Oct 20, 2011 02:28 |
|
yaoi prophet posted:How do you do nested comments in your RDBMS? By storing the nesting in the ID! what the gently caress No seriously, who thinks this is a good idea?
|
# ? Oct 20, 2011 03:56 |
|
SlightlyMadman posted:To make this better, be sure you call that function in other parts of the code to determine the units age for completely unrelated reasons, and then later end up changing the warranty eligibility to be based on something completely different, but retain the original function name. $5 says that's already happened and he just hasn't realized it yet.
|
# ? Oct 20, 2011 04:13 |
|
http://ultrose.com/ A minimal blog script with 1500 lines of PHP, HTML, and Javascript in a single file. And that's a selling point. It's like Matt's Script Archive for the 21st century.
|
# ? Oct 20, 2011 04:24 |
|
code:
|
# ? Oct 20, 2011 05:25 |
|
You know what I always thought my blog needed? Completely randomized theming.
|
# ? Oct 20, 2011 05:32 |
|
So I'm working inside of a PHP framework that my boss decided would be a good idea to slap on our site. Somehow he found some PHP framework on GitHub that's *possibly* used by the person who dev'd it, and probably not even him. So on that note, today I learned that the difference between code:
code:
:suicide:
|
# ? Oct 20, 2011 05:34 |
|
Any reasonably modern version of PHP will complain loudly when you call a non-static method statically. If you got no complaints from PHP, your error reporting level isn't high enough for sane development.
|
# ? Oct 20, 2011 06:07 |
|
McGlockenshire posted:Any reasonably modern version of PHP will complain loudly when you call a non-static method statically. If you got no complaints from PHP, your error reporting level isn't high enough for sane development. Given aforementioned framework, it wouldn't surprise me at all if one of his self-rolled library classes had a big "error_reporting(0);" at the top, possibly a couple of times so that "it actually takes". Also, this is in their hand-rolled error logging class.
|
# ? Oct 20, 2011 06:25 |
|
yaoi prophet posted:You know what I always thought my blog needed? Completely randomized theming. And not just randomized, but really randomized. Credit where it's due, though, I would never have thought of using the first third of the MD5 hash of the title, plus the day of the month, modulo the number of themes available, to randomly select a given theme. Would code:
|
# ? Oct 20, 2011 07:44 |
|
Man, it seems like some of you guys have some really horrible jobs.darthbob88 posted:And not just randomized, but really randomized. Credit where it's due, though, I would never have thought of using the first third of the MD5 hash of the title, plus the day of the month, modulo the number of themes available, to randomly select a given theme. Would Everybody's using rand for their random numbers, this would of course lead to every blog having the same randomness. Better to write your own rng!
|
# ? Oct 20, 2011 08:08 |
|
OriginalPseudonym posted:what the gently caress One of the larger art sharing sites on the internet. vvv I got it in a namechange . If people are absolutely dying to know I'll post the name. Opinion Haver fucked around with this message at 09:00 on Oct 20, 2011 |
# ? Oct 20, 2011 08:11 |
|
yaoi prophet posted:One of the larger art sharing sites on the internet. It's not the one that I... ...one second. *checks* Okay, it's not the one I'm working on. Mine is just the one with the 15,000 post variable setting. Edit: Although your name makes me wonder.
|
# ? Oct 20, 2011 08:51 |
|
w00tz0r posted:"Forward compatibility is easy, all Microsoft products are completely forward compatible. I can write a program on Windows Vista and have it run on Windows 95. The only thing that broke forwards compatibility is UAC."
|
# ? Oct 20, 2011 09:04 |
|
yaoi prophet posted:How do you do nested comments in your RDBMS? By storing the nesting in the ID! T-SQL has a hierarchy ID type designed to do exactly this. It's good for subtree selection and insertion, if a little tricky to work with.
|
# ? Oct 20, 2011 11:24 |
|
darthbob88 posted:Would
|
# ? Oct 20, 2011 11:41 |
|
code:
This is the entire file. TasteMyHouse fucked around with this message at 17:56 on Oct 20, 2011 |
# ? Oct 20, 2011 17:37 |
|
What's in globalVariable.h?
|
# ? Oct 20, 2011 18:04 |
|
Regarding Python's def fun(a, b,) thing, function arguments are not the same thing as tuples. From the official grammar. code:
|
# ? Oct 20, 2011 18:43 |
|
Polidoro posted:What's in globalVariable.h? a bunch of nonsense like structs filled with 2d arrays filled with magic numbers -- it's long and I don't want to spend the time anonymizing it.
|
# ? Oct 20, 2011 19:04 |
|
TasteMyHouse posted:what So this is what Dada code looks like.
|
# ? Oct 20, 2011 20:29 |
|
I'm having a lot of fun with this codebase. Did you know that in VC6 you could assign a const char * to a char *?
|
# ? Oct 20, 2011 21:16 |
|
TasteMyHouse posted:I'm having a lot of fun with this codebase. Did you know that in VC6 you could assign a const char * to a char *? I think that's legal C++, because of some weird rules regarding const correctness and strings. Codepad says this code:
|
# ? Oct 20, 2011 21:36 |
|
String literals were originally non-const (because const didn't exist), so there is sort of a lot of code written that tries to assign string literals to char * variables.
|
# ? Oct 20, 2011 21:57 |
|
Sorry, I should've been more clear. This is what the code I was looking at did:code:
code:
e2: ah, GNU strchr always returns a char *, not a const char *. is this standard? Now I don't know who to trust TasteMyHouse fucked around with this message at 22:17 on Oct 20, 2011 |
# ? Oct 20, 2011 22:13 |
|
TasteMyHouse posted:e2: ah, GNU strchr always returns a char *, not a const char *. is this standard? Now I don't know who to trust POSIX and the C99 standard both specify that strchr has signature char * strchr(const char *, int). So GNU strchr is conformant in this case.
|
# ? Oct 20, 2011 22:40 |
|
tractor fanatic posted:I think that's legal C++, because of some weird rules regarding const correctness and strings. Codepad says this For backward compatibility, C++03 has a deprecated implicit conversion which discards the const when the source is a string literal. C++11 removes this. The strchr signature is a wart that is basically required by a lack of expressivity in the C type system.
|
# ? Oct 21, 2011 03:49 |
|
I think we can agree that what they did there was really bad right? I was kind of pissed at it
|
# ? Oct 21, 2011 03:58 |
|
Yes. Modifying a const something, even if you change it back before the end of the method, is pretty bad. Someone could be looking at it on another thread, or the thing you're given could be in non-writable memory for all you know.
|
# ? Oct 21, 2011 04:37 |
|
TasteMyHouse posted:I think we can agree that what they did there was really bad right? I was kind of pissed at it There is a camp that claims that modifying const objects should be okay as long as you put them back the way you found them. It's not completely irrational, but it's obviously something to be very careful about, and it's still not a great idea.
|
# ? Oct 21, 2011 04:39 |
|
rjmccall posted:There is a camp that claims that modifying const objects should be okay as long as you put them back the way you found them. It's not completely irrational, but it's obviously something to be very careful about, and it's still not a great idea.
|
# ? Oct 21, 2011 11:32 |
|
rjmccall posted:There is a camp that claims that modifying const objects should be okay as long as you put them back the way you found them. It's not completely irrational, but it's obviously something to be very careful about, and it's still not a great idea. Why would someone make something const if the value isn't constant? What purpose could that possibly serve? Seems pretty stupid to me.
|
# ? Oct 21, 2011 17:11 |
|
Optimus Prime Ribs posted:Why would someone make something const if the value isn't constant? That is, I think, rjmccall's point about the alternative interpretation of const: instead of saying "you can't/I won't touch this", you're saying "make sure I can't tell the difference when you're done with this" (return value) or "I'll make sure this looks the same when I'm done" (parameter). So it appears constant to outside observers, but isn't required to be the exact same bits in the exact same location. And yeah, it sounds kinda stupid to me too. But I can see the distinction.
|
# ? Oct 21, 2011 17:21 |
|
Optimus Prime Ribs posted:Why would someone make something const if the value isn't constant? It would allow you to modify the memory storing the object, as long as you can reverse the changes, rather than making a copy of the memory and mutating the copy. This could lead to some memory savings in some cases. Of course, this isn't the meaning of the const keyword and using it as such could lead to problems in certain situations (multithreaded/read-only memory).
|
# ? Oct 21, 2011 18:38 |
|
|
# ? Apr 27, 2024 10:28 |
|
Don't forget that string literals used to be writable.
|
# ? Oct 21, 2011 18:40 |