How about writing JSON by hand in Java instead of using a library? Why would anybody do this to themselves
|
|
# ? Dec 9, 2009 19:49 |
|
|
# ? Apr 28, 2024 04:24 |
|
ultra-inquisitor posted:Wouldn't No. You can't delete a const pointer. You'd have to cast away the const-ness first. Besides that, as Vanadium said: if I've got a const reference returned to me, I'm assuming that I don't need to manage it.
|
# ? Dec 9, 2009 20:30 |
|
Grazing Occultation posted:No. You can't delete a const pointer. You'd have to cast away the const-ness first. Mustach fucked around with this message at 22:48 on Dec 9, 2009 |
# ? Dec 9, 2009 22:29 |
|
Grazing Occultation posted:Besides that, as Vanadium said: if I've got a const reference returned to me, I'm assuming that I don't need to manage it.
|
# ? Dec 10, 2009 00:34 |
|
code:
|
# ? Dec 10, 2009 01:43 |
|
I'm stuck at work diagnosing some build error that only happens on my system in a perl script somewhere under seven layers of antcall with some gratuitous javascript tossed in the middle. edit: I forgot about the little bit which runs some taglet parser over an autogenerated buildfile. 1337JiveTurkey fucked around with this message at 03:44 on Dec 10, 2009 |
# ? Dec 10, 2009 03:12 |
|
Lexical Unit posted:
This is a little gem of a horror
|
# ? Dec 10, 2009 14:26 |
|
Fib posted:This is a little gem of a horror Your tax dollars buy only the best.
|
# ? Dec 10, 2009 17:38 |
|
Mustach posted:Not true. See 5.3.5.2. (I'm assuming that you mean pointer-to-const, not const pointer [which would still be a valid delete target]) Hmmm. It seems you're right but I could've sworn otherwise.
|
# ? Dec 10, 2009 18:24 |
|
My own horror from today. I've got a Dictionary<Tuple<int, int>, CustomObject> which is used to represent a cell on a grid and the custom object that that cell is in charge of displaying a value from. Hurr, I had never heard of Point before, I guess. Duh.
|
# ? Dec 11, 2009 17:42 |
|
Not really a coding horror but it's about codinghorror.com:quote:ugh, server failure at CrystalTech. And apparently their normal backup process silently fails at backing up VM images.
|
# ? Dec 11, 2009 22:14 |
|
Failure to insure that your backup solution is actually working (by making a restore on a temporary server and verifying that everything made it intact) doesn't really qualify as a coding horror. Any backup software that silently fails is a coding horror though. That is the least appropriate place for a silent failure condition.
|
# ? Dec 11, 2009 22:27 |
|
CanSpice posted:Not really a coding horror but it's about codinghorror.com: That he wasn't doing backups? (No, backups on *the same server* aren't backups).
|
# ? Dec 11, 2009 22:40 |
|
Dietrich posted:My own horror from today. I had a moment like this the other day. I did an elaborate section of code to loop through an array, checking at every step if it was out of bounds, and resetting it to 0... with an if statement. About a day after I submitted the code (it was an assignment) I realized that I could have reduced my code by half, and made it much more readable, by simply using modulo.
|
# ? Dec 11, 2009 22:55 |
|
CanSpice posted:Not really a coding horror but it's about codinghorror.com: http://74.125.95.132/search?q=cache...lient=firefox-a
|
# ? Dec 11, 2009 23:06 |
|
king_kilr posted:[url]http://74.125.95.132/search?q=cache:2HHNAk2SB6EJ:https://www.codinghorror.com/blog/archives/001045.html+site:codinghorror.com+backup&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a[/url] quote:If you're using Linux, it's something a lot like that. If you're using Windows, go f*ck yourself.
|
# ? Dec 11, 2009 23:08 |
Dijkstracula posted:what a superburn, such sublime ownage coming out of Atwood in that post you're a retard, he was quoting jwz, who *does* unequivocally own
|
|
# ? Dec 11, 2009 23:10 |
|
Panic! at the Fist Jab posted:you're a retard, he was quoting jwz, who *does* unequivocally own It's not like it takes any special skill to come up with something like that.
|
# ? Dec 11, 2009 23:15 |
|
king_kilr posted:[url]http://74.125.95.132/search?q=cache:2HHNAk2SB6EJ:https://www.codinghorror.com/blog/archives/001045.html+site:codinghorror.com+backup&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a[/url] I love this comment: Coding Horror commenter posted:My backup strategy? I post my important data in base64-encoded little chunks in the comments on the blogs of people who actually take the necessary steps to backup their data.
|
# ? Dec 12, 2009 01:31 |
|
jandrese posted:Failure to insure that your backup solution is actually working (by making a restore on a temporary server and verifying that everything made it intact) doesn't really qualify as a coding horror. Any backup software that silently fails is a coding horror though. That is the least appropriate place for a silent failure condition.
|
# ? Dec 12, 2009 02:25 |
|
Sadly, silent failure appears to be a very common feature in backup software. That's why it's so important that when you decide to change backup software that you go and test it first to discover exactly what happens when the backup fails and how the restore feature actually works (not what the manual says).
|
# ? Dec 12, 2009 02:52 |
|
Dijkstracula posted:what a superburn, such sublime ownage coming out of Atwood in that post Zhentar posted:I love this comment:
|
# ? Dec 12, 2009 03:08 |
|
CanSpice posted:Not really a coding horror but it's about codinghorror.com: It's the internet self-correcting itself.
|
# ? Dec 12, 2009 06:10 |
|
CanSpice posted:Not really a coding horror but it's about codinghorror.com: The fact that he was backuping his data on a VM image?
|
# ? Dec 12, 2009 14:49 |
|
It's like a coding horror clown car. Just when you think you've seen them all, another one pops right out.
|
# ? Dec 12, 2009 18:47 |
|
building an XPath querycode:
geeves fucked around with this message at 03:23 on Dec 16, 2009 |
# ? Dec 16, 2009 03:19 |
|
code:
code:
|
# ? Dec 17, 2009 18:12 |
|
Presto posted:
Imagine what will happen if the value of 15 changes! Obviously, you have some future-proofing to do.
|
# ? Dec 17, 2009 19:34 |
|
TheSpook posted:Imagine what will happen if the value of 15 changes! Obviously, you have some future-proofing to do. And what if the definition of ++ changes? Better change everything to use a plusplus() function!
|
# ? Dec 17, 2009 19:50 |
|
Presto posted:
This thread just came full circle.
|
# ? Dec 17, 2009 21:59 |
|
floWenoL posted:I love it when people try to post coding "horrors" and it backfires. Am I the only person that stores the (PI/180) or (180/PI) part beforehand as a macro, define, variable, or whatever? I know that a nonretarded compiler should convert it into a multiplication operation, but I'm so used to avoiding unnecessary division at all costs that it's just a habit. Also, I agree that a degreesToRadians() et al. function is a necessity if you're doing any graphics work. Maybe change it to degToRad() or something shorter, but the code quickly becomes unreadable if you don't do it. As for pi, I always have to have pi, 2*pi, and pi/2 defined. I deal with shitloads of cosines/dot products and vector calculus so it's a necessity.
|
# ? Dec 17, 2009 23:50 |
|
king_kilr posted:[url]http://74.125.95.132/search?q=cache:2HHNAk2SB6EJ:https://www.codinghorror.com/blog/archives/001045.html+site:codinghorror.com+backup&cd=1&hl=en&ct=clnk&gl=us&client=firefox-a[/url] My favorite part of this is where he demonstrates that he doesn't understand what a filesystem is: fatwood posted:Acronis does a lot of things, but most of all it's drive imaging software, a fancy GUI over the rsync command.
|
# ? Dec 17, 2009 23:51 |
|
Goreld posted:Am I the only person that stores the (PI/180) or (180/PI) part beforehand as a macro, define, variable, or whatever? I know that a nonretarded compiler should convert it into a multiplication operation, but I'm so used to avoiding unnecessary division at all costs that it's just a habit. Probably not, but that doesn't justify superstitious programming.
|
# ? Dec 18, 2009 00:13 |
|
mr_jim posted:This thread just came full circle. Forgot about this part too: double dzero = (double)0.0;
|
# ? Dec 18, 2009 01:40 |
|
Janin posted:Please post more details about insane Japanese software, because this post right here is incredible.
|
# ? Dec 18, 2009 22:36 |
|
How big was the file?
|
# ? Dec 18, 2009 23:44 |
|
minato posted:I was asked to migrate a Japanese webapp from Sun to Linux. The webapp supported authentication, downloads, forums, and a support tracking system. They gave me access to the directory where all the code was kept, and I thought there was a mistake because there was only one file in it, a large Perl file. But there was no mistake. That single gigantic Perl file did everything. There were no other Perl files, HTML pages or templates. Every URL in the site would load that file and query parameters would tell it what to render. Oh man, I've been there except instead of a Perl script, it was a single Java servlet class that rendered every page based on query parameters, using huge blocks of System.out.println calls to dump the HTML. First thing I did was throw that code out and replace it with a handful of JSP pages. edit: This was the same project that had another Java application as the server back-end (the servlet was a student front-end), and used a message-passing scheme where each message was a different class that contained the message parameters. That's great, but instead of having an abstract base class for all the message types and having the message class implement its "do it" logic in a virtual method, there was a four-page long if/else if statement that did an instanceof test for each message type. Flobbster fucked around with this message at 00:01 on Dec 19, 2009 |
# ? Dec 18, 2009 23:58 |
|
Anyone here ever parsed psycinfo or scopus records (some medical bibliography format). I'm dealing with a code base for parsing them out, and it's a fracking clusterfuck. It's actually open source
|
# ? Dec 19, 2009 00:31 |
|
MEAT TREAT posted:How big was the file? I don't remember exactly, but it was huge, over 1MB. Another Japanese coding horror. A long while ago there was a 3D file format designed for games. Each component of the file had a type (3D mesh, texture, animation data, etc) and each type had various bitfields that described attributes of that component ("flat/gouraud/textured shading", "anti-aliased", "has normal", etc) and these were meant to be used to indicate which "driver method" to use to handle that component. But the way the libraries were set up, each combination of bit fields had to have its own driver method. So if you had a 3D mesh that was anti-aliased and another that wasn't, you couldn't just use a single driver method for both where you'd check the bitfield and flip the anti-aliasing on. You had to write two separate drivers. Multiply this by the many different bitfields and it meant that potentially it would be necessary to write 2^32 drivers. So dumb.
|
# ? Dec 19, 2009 04:24 |
|
|
# ? Apr 28, 2024 04:24 |
|
Goreld posted:Am I the only person that stores the (PI/180) or (180/PI) part beforehand as a macro, define, variable, or whatever? I know that a nonretarded compiler should convert it into a multiplication operation, but I'm so used to avoiding unnecessary division at all costs that it's just a habit. A nonretarded compiler would store that as a constant, actually. So yeah. Don't . At least not for that reason.
|
# ? Dec 19, 2009 19:08 |