|
Pardot posted:But there is, and you know there is Hey some of us don't have your crazy GIGABYTE drives installed. I'm working on a machine with 4GB RAM and only 640MB disk drive.
|
# ¿ Feb 9, 2010 17:22 |
|
|
# ¿ May 21, 2024 03:45 |
|
MrSaxamaphone posted:Hope I get to do some of the WPF stuff we're looking at. WPF is a coding horror.
|
# ¿ Mar 5, 2010 06:04 |
|
Otto Skorzeny posted:You sure about this? Last I heard C and C++ compilers were generally "loving terrible" at tco and trampolining http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf posted:gcc has removed tail recursion for years. icc, suncc and msvc don’t.
|
# ¿ Apr 20, 2010 20:27 |
|
clockwork automaton posted:
This one is my favorite, haha.
|
# ¿ Apr 27, 2010 01:05 |
|
1337JiveTurkey posted:I once had a professor who told me that I had to do one project individually since group projects amounted to having three people watch me do all the work. I always felt like such a retard for asking if I could do group projects by myself, but I sure as hell didn't want to explain, for example, in a Math class why I was writing a C# application to generate the linear equations for the linear programming problem. All of the other groups wrote out all of the combinations by hand (this was a scheduling problem.)
|
# ¿ Apr 28, 2010 07:17 |
|
TagUrIt posted:
Wait wtf, after seeing the loops I missed the real horror of the return line...
|
# ¿ May 14, 2010 15:42 |
|
Jonnty posted:Is there any conceivable reason why you might think that was in any way sensible? Some standard return format or something? When you find 2 lines with horrors in a 3 line function, and notice the third line is a return statement, you kinda just assume it might be horror-free.
|
# ¿ May 14, 2010 16:03 |
|
ColdPie posted:Excuse my stupid question, but is the horror just not using fmod? Not knowing about a poorly-named function doesn't seem like a horror to me, just a lack of familiarity with the standard library which ought to be corrected. I don't think I would blame someone for reimplementing atan2 either, given its name. The while blah doesn't really bother me because it at least makes sense intuitively. This makes me cry though: return toDegrees(toRadians(degrees)); Edit: I just realized that this code doesn't work like fmod. The range of the function is [0, 360] not [0, 360)
|
# ¿ May 14, 2010 19:24 |
|
Avenging Dentist posted:I would. The C standard library is really small. If you don't know C well enough to be able to use documentation when you want a really common function, you don't know it well enough to be getting paid to write code in it. code:
|
# ¿ May 14, 2010 20:15 |
|
mr_jim posted:Have we done names_with_underscores vs. namesWithCamelCase yet? The horror that I see at work all the time is people calling ThisSortOfCasing "camel case with the first letter capitalized".
|
# ¿ May 19, 2010 16:44 |
|
A solution to "database is locked":code:
|
# ¿ Jun 4, 2010 23:06 |
|
Modern Pragmatist posted:
Man I hate that backwards rear end poo poo.
|
# ¿ Jun 11, 2010 16:33 |
|
Flobbster posted:The only time I ever do something like this is when I'm in Java and I want to compare strings. Saying "foo".equals(str) instead of str.equals("foo") makes things a little more concise in the even that str could be null. Yeah, in that case you're just avoiding the horror that is Java string comparison.
|
# ¿ Jun 11, 2010 19:41 |
|
manero posted:How long does this take to run? I don't really understand that moon-language, but it doesn't sound that expensive (obviously it's a coding horror nonetheless) because it's only going to do IssueNumberSequence.create! 200,000 times (and I doubt it's expensive) and 20,000,000,000 comparisons for the find_by_number to work, assuming it's O(n). 20 billion isn't very many times for a computer to do something.
|
# ¿ Jun 22, 2010 02:32 |
|
shrughes posted:Did you just say lg? They never said "lg" when I was in school. We always used lg(x) when it was base 2, log(x) for base 10, and obviously ln(x) for base e. Obviously it doesn't matter for asymptotic analysis like this, but yeah.
|
# ¿ Jun 22, 2010 19:13 |
|
Hammerite posted:
Again, coding horrors thread. Logic need not apply.
|
# ¿ Jun 23, 2010 17:03 |
|
Ryouga Inverse posted:C# 3.5, so we can't have nice things like named and optional parameters. I was going to say that switch statement looks like it belongs in a for loop, but holy poo poo I think that version may actually be worse.
|
# ¿ Jun 29, 2010 18:43 |
|
Zhentar posted:I've been starting to do some iPhone development for work. Today, I looked at the contents of a plist file for the first time. A snippet of it: WTF is the <true/> element for?
|
# ¿ Jul 29, 2010 22:40 |
|
Plorkyeran posted:Is the pattern <key>Key Name</key><datatype>Value</datatype> really that hard to figure out from that sample? It's an incredibly terrible design but it's not that confusing. Oh, I didn't realize that the true went with the one above it. I had miscounted and assumed there were 3 pairs and then a stray true. Yeah, with good whitespace it'd be easy to read/understand.
|
# ¿ Jul 29, 2010 23:14 |
|
Mustach posted:Hmm, there seems to be a case missing… What case is missing? Obviously you can't sort with this, since it returns 0 or 1 instead of -1, 0, 1, but other than that what's wrong?
|
# ¿ Aug 3, 2010 00:39 |
|
shrughes posted:And MD5, or SHA-X, would be the wrong things to use. Back when the stock PHPBB (I think) installations used MD5 with no salt or anything for hashing passwords/session cookies I was administrating an underground hacking forum, and one of our rival forums realized that they can impersonate our users by using the same MD5 hash of that user from their database on our forums and then they'd have access as that user. What'd I do to fix this? MD5(MD5($password)) Also, I started keeping plaintext passwords in the database, too, so that when their members logged in to our forums we just had their password in plaintext, no middleman.
|
# ¿ Aug 4, 2010 01:47 |
|
shrughes posted:What? Where did they find the "MD5 of your password" field? It was stored in your session cookie. Also this might've been IPB not PHPBB. The details are fuzzy.
|
# ¿ Aug 4, 2010 01:59 |
|
Hibame posted:When asked if they are going to fix it. Whenever we submit something that breaks on someone else's machine we always pull this out
|
# ¿ Sep 18, 2010 01:38 |
|
Combat Pretzel posted:I just wrote a short three number wide median algorithm using ?: notation. After I removed the helping parentheses, I got this construct out of it: this is awesome don't let anyone else tell you otherwise
|
# ¿ Oct 1, 2010 00:27 |
|
Janin posted:This isn't true at all, FYI -- good Haskell is roughly comparable to Ruby, better than Python, and much better than Perl. Better than Python? Reading Python is just reading pseudocode that can be interpreted by a computer, too.
|
# ¿ Oct 1, 2010 20:08 |
|
A very bad man posted:Is that the same as being a programming nihilist? I think that gets posted every 16th page.
|
# ¿ Oct 5, 2010 23:14 |
|
HFX posted:This may be that Java accessors modifiers do not behave as they do in most languages. You should also consider Java's age, their resistance to breaking legacy code (and then doing it anyway), and JVM fault designs because of early versions. Honestly, I'd rather have it the Java way instead of making things internal in C# just so that I can access a nested class's private field for special construction without exposing it to the entire namespace.
|
# ¿ Oct 20, 2010 18:56 |
|
Zhentar posted:Having to type an extra character to say what I mean is such a burden. Why can't the compiler just detect what I mean and ignore what I say? What are you even talking about? I don't mean for the class's fields to be available throughout the namespace. Setting a field in a nested class as internal in C# isn't the same as setting it to private in Java...
|
# ¿ Oct 21, 2010 17:00 |
|
king_kilr posted:Pack it up, go home folks, this is the ultimate horror. Yeah, seriously, camel-case functions? *shudder*
|
# ¿ Nov 9, 2010 21:46 |
|
bobthecheese posted:
This line itself is horror gold.
|
# ¿ Nov 10, 2010 00:23 |
|
_aaron posted:No god drat way. This is awesome because it makes debugging so much easier. If you're in a debug build, have it print comments to the debug console so you know what's going on, in English!
|
# ¿ Nov 11, 2010 17:26 |
|
Mustach posted:What the gently caress kind of expensive are you talking about? whoooooosh
|
# ¿ Nov 15, 2010 20:49 |
|
npe posted:
Holy poo poo good game you win.
|
# ¿ Nov 18, 2010 18:03 |
|
npe posted:I love how one of them has data.Length < 7, and one has data.Length < 8. Obviously this is correct, but it means that there was a bit of attention paid to the functions...
|
# ¿ Nov 23, 2010 21:34 |
|
Smugdog Millionaire posted:Coding horror or no? Why wouldn't you do this? (.NET 4.0) I don't know why you're using that Parallel ForEach poo poo. code:
|
# ¿ Nov 24, 2010 21:32 |
|
Smugdog Millionaire posted:... Here's an improved version of yours: code:
|
# ¿ Nov 24, 2010 23:29 |
|
Plorkyeran posted:i.e. when it's not actually for-case? It just happens to be a for loop creating the test data, and it just so happens to be a switch statement that does the validation, so yeah, it's not really for-case.
|
# ¿ Nov 25, 2010 00:02 |
|
Munkeymon posted:Naming your release after the last movie you saw isn't totally unreasonable. I could see it giving a movie buff some context to help pull up associated memories. I really hope you're joking/trolling here.
|
# ¿ Dec 2, 2010 17:42 |
|
Otto Skorzeny posted:Cut some slack Sam, off-by-one errors are one of the two really hard problems in computer science (the other two, of course, being cache invalidation and naming things). As we say where I work: off by one errors really suck when you're working with booleans.
|
# ¿ Dec 3, 2010 18:14 |
|
|
# ¿ May 21, 2024 03:45 |
|
Kamikaze! posted:I like this one in Python: I don't really have a problem with that because I understand it and it isn't something you're likely to do accidentally all the time. It's just a parameter with a default value that happens to be something that you'd store a reference to, so the next time you execute a(something) c is going to be pointing to the same object because it's only instantiated once.
|
# ¿ Jan 3, 2011 21:43 |