|
code:
I remember a long time ago seeing something similar on theDailyWTF... code:
|
# ¿ Mar 21, 2008 21:20 |
|
|
# ¿ Apr 27, 2024 16:36 |
|
This isn't as bad as some of the trainwrecks in here, but it made me scratch my head for a minute.code:
I swear my coworkers aren't idiots. I think this is just a case of coding something out and then not really looking it over once you're done with it.
|
# ¿ Mar 26, 2008 18:08 |
|
Victor posted:
|
# ¿ Mar 26, 2008 19:08 |
|
Lexical Unit posted:Sometimes I'll do this like if I'm returning a the boolean value of an expression or using ?: or something, just to bring attention to it. So like return (foo ? "foo" : "not foo"); or return (a && (b || c));. I don't know, it also looks somehow cleaner to my mind. VV
|
# ¿ Apr 3, 2008 17:40 |
|
Yeah, you're probably an idiot, because won't s.IsNullOrEmpty() throw an exception is s is null? edit: Well gently caress me, this is totally incorrect. I just tested it out quick, and this does not throw an exception at all. I'll leave it up in case anyone wants to laugh at me . _aaron fucked around with this message at 18:54 on Apr 7, 2008 |
# ¿ Apr 7, 2008 18:43 |
|
yaoi prophet posted:poo poo, if I can get a few people to sleepily stare at my code for a few seconds during a code review, that's a good day.
|
# ¿ Apr 10, 2008 03:39 |
|
No space before the comma? Clearly this person doesn't know how to properly use white space.
|
# ¿ Apr 12, 2008 19:47 |
|
Jethro posted:Maybe they don't trust the collection.getDetails().size() method? What the hell indeed...
|
# ¿ Apr 19, 2008 19:45 |
|
JoeNotCharles posted:Can't speak for Java, but in C++ length() would almost certainly be simple enough to inline. That's not the whole story, though, since I don't believe inlining works when length() is in a shared library, which it probably is. (I think you can get inlining to work across library boundaries, but you have to do extra work? I dunno, I should read up on this.) code:
|
# ¿ May 6, 2008 16:35 |
|
Zombywuf posted:Words fail me. code:
|
# ¿ Jul 31, 2008 17:46 |
|
Karanth posted:
|
# ¿ Sep 4, 2008 20:17 |
|
A Hotel object should not be dependent on where the registration data comes from, it just needs to know what's required for registration to happen (which is a name and room number, as shown in 'your' method signature). But yeah, there's a difference between production level code and a school assignment. In reality, some other object would be getting user input and structuring it in such a way that it makes sense for the Hotel object. I would say that doing the input processing in main (or some other method that is NOT part of the Hotel object) would be preferred here.
|
# ¿ Apr 16, 2010 04:22 |
|
pseudorandom name posted:It's doing that for every language right now, although that's probably just it being broken in Firefox.
|
# ¿ Jun 10, 2010 05:03 |
|
PhonyMcRingRing posted:BlogEngine.NET's javascript library is littered with this kind of crap. I'm sure glad they managed to parse that date three times. I don't really have a horror, but I'm tired of seeing SVN check-ins where the diff is nothing but extra blank lines. No, we didn't really need three blank lines between the end of the else statement and the end of the method.
|
# ¿ Oct 9, 2010 05:05 |
|
ColdPie posted:What's the commit message?
|
# ¿ Oct 9, 2010 15:53 |
|
Internet Janitor posted:Oh man I just had a great idea! Instead of using confusing syntax like /**/ and // to add my comments, I could just create a class for commenting:
|
# ¿ Nov 11, 2010 15:42 |
|
evensevenone posted:it's the end of the quarter, and I already wrote transpose, so why waste time?
|
# ¿ Nov 28, 2010 05:58 |
|
npe posted:I've also seen "Bug: Square Peg does not fit into Round Hole", which exists solely so that tickets can be closed as a duplicate of it....
|
# ¿ Dec 8, 2010 15:21 |
|
Hammerite posted:I'd like to be able to disagree, but I looked over Alexei's example and couldn't deduce the rules it uses to evaluate that expression to "horse". Still, if I were at all unsure about the precedence, I'd just slap a few pairs of brackets in so as to make it clear what should happen, so I don't really see the problem.
|
# ¿ Mar 3, 2011 15:30 |
|
VerySolidSnake posted:Ever since I stopped accommodating IE6 I haven't used a single hack. CSS is great and simple if you know what your doing. If you still think tables are a good idea you really need to pick up a new book on website development.
|
# ¿ Jul 26, 2011 04:59 |
|
Here's google's cached version: http://webcache.googleusercontent.c...any-suggestions
|
# ¿ Feb 9, 2013 20:35 |
|
Mr. Crow posted:The true coding horror: I'm being bitched at for not 'creating a design' for a task that took <30 minutes to implement and fully test. I've seen a few of your posts in this thread (and maybe others?), and I swear you work at my old job. This process (and, in particular, Enterprise Archtitect) sounds very familiar. Dayton, Ohio?
|
# ¿ Nov 5, 2013 03:34 |
|
Illusive gently caress Man posted:i just loving hate all the code this guy writes. loving full of
|
# ¿ Nov 13, 2014 22:08 |
|
Soricidus posted:This is true, but only because the option exists to build an app with an Excel user interface driven by VBA. I had an "internship" working for an insurance company for a couple summers during college. Their employee time-tracking system (ugh) was an in-house Access application driven by VBA. It was not fun to work on.
|
# ¿ Nov 20, 2014 06:37 |
|
WHERE MY HAT IS AT posted:
|
# ¿ Dec 31, 2014 23:00 |
|
Steve French posted:Or maybe you choose not to implement your code only considering the narrow circumstances of one test at a time, and you realize from the get go that an if statement for every combination of inputs is loving stupid, and avoid wasting your time. What if you're writing something that you don't fully understand when you sit down to write the method? Well, you know about cases A and B, so write tests for those, then write code to make them pass. Maybe in doing this, you think of another case C that you hadn't thought about before. Well, write a test case for it, and write code to make that test case pass. But wait, handling case C as an extension of what you've already written might be messy. So now you refactor. And you're confident that this new refactored code still works for the old A and B cases as well as the new C case that prompted the refactoring. Which part are you having trouble with here? The use of addition as an example, or the idea that you would ever write a method without a full understanding of all of it's edge and corner cases up front? If it's the former, then I agree; addition is not a great example here. If it's the latter, then we have had very fundamentally different experiences as software developers.
|
# ¿ Dec 31, 2014 23:55 |
|
|
# ¿ Apr 27, 2024 16:36 |
|
Steve French posted:To be more specific, I'm referring to the idea of intentionally writing and repeatedly revising an incomplete/incorrect implementation of a method to pass successive tests, rather than starting with a best effort of code and tests (regardless of which is written first), and then tweaking the code/tests and adding more tests as necessary to handle unforeseen edge cases. _aaron fucked around with this message at 01:05 on Jan 1, 2015 |
# ¿ Jan 1, 2015 00:57 |