|
Don't you have some sort of standards wherever you work in which one of you (I'm assuming him, since I hate his style) is blatantly breaking a rule?
|
# ¿ Jun 24, 2010 16:40 |
|
|
# ¿ Apr 24, 2024 08:45 |
|
king_kilr posted:If you think that's a coding horror, your codebase is probably ok. I can think of a totally valid reason for that. The Color class isn't under your control and features general color management things, for your app you want to have a consistant UI, and you're starting with their definitions of what constitutes DARK GREEN, but that might be changed in the future.
|
# ¿ Aug 28, 2010 19:04 |
|
One thing I can think of there is that the SelectionChanged event, if subscribed to, could throw an exception. Even so, I wouldn't be any means call this a 'horror' of coding, just not good practice.
|
# ¿ Sep 7, 2010 23:02 |
|
Daald posted:
"Okay. I've got it! I've successfully parsed the integer, and the value is--" NO! WAIT! You said you were able to parse the integer? "Yes..." Alright, I want you to parse the same integer again, and let me know what you get.
|
# ¿ Oct 6, 2010 03:20 |
|
oneinchhard posted:
|
# ¿ Oct 7, 2010 14:34 |
|
Hah, I wasn't even thinking of SQL injection; I was more focused on the unnecessary use of StringBuilder for that particular set of strings. But for the first one, oneinchhard, yes, I understand why it's wrong. I just don't think it's a 'horror.' In fact, it's completely harmless and could easily have been introduced through a quick refactoring.
|
# ¿ Oct 7, 2010 18:29 |
|
At least you don't have to look at at that abomination combined with some anime quote every time you post.
|
# ¿ Oct 8, 2010 16:59 |
|
Lysandus posted:This might not be a horror for some of you but gently caress.
|
# ¿ Nov 19, 2010 21:51 |
|
The code following an if statement should never be more than one line regardless, so it's a non-issue.
|
# ¿ Nov 20, 2010 00:12 |
|
Yeah, uh, I was joking by the way.
|
# ¿ Nov 20, 2010 03:41 |
|
It's possible that someone just started creating a class that implements some interface (error / notify) but forgot to finish it, and hopefully forgot to even hook it up to anything. Not really that unusual or horrible.
Orzo fucked around with this message at 23:26 on Nov 22, 2010 |
# ¿ Nov 22, 2010 19:05 |
|
Oh. That is horrible then.
|
# ¿ Nov 22, 2010 23:26 |
|
ColdPie posted:Hahahahahahahahahahahaha
|
# ¿ Dec 8, 2010 17:24 |
|
Janin posted:Interestingly, it might in reality be even slower; IE was caught cheating on Sunspider, by special-casing a few particular functions. Inserting things like "if (false) {}" into the code, or changing the order of variable assignment, can cause it to revert to previous (slow) performance.
|
# ¿ Dec 8, 2010 18:05 |
|
Vanadium posted:So it is dead-code analysis that gets broken by dead code? Or maybe you were just making a humorous statement that wasn't meant to be taken seriously, either way I'm just trying to point out how absurd the argument against Microsoft here is.
|
# ¿ Dec 8, 2010 18:30 |
|
Has somebody written some test benchmarks (not just altering the Sunspider one) to see exactly what the optimizer can and can't do?
|
# ¿ Dec 8, 2010 20:04 |
|
Maybe it used to be something else and the parenthesis were left in.
|
# ¿ Jan 23, 2011 21:40 |
|
dwazegek posted:Constructor arguments are for scrubs:
|
# ¿ Jan 28, 2011 15:40 |
|
shrughes posted:You're trolling, right? Or maybe you're just stupid. Orzo fucked around with this message at 23:08 on Mar 7, 2011 |
# ¿ Mar 7, 2011 21:27 |
|
Lysidas posted:This is a good point, but if you're learning introductory programming it isn't really worth it.
|
# ¿ May 19, 2011 18:46 |
|
A A 2 3 5 8 K posted:I had to show a professor once how to use a debugger. This was in the lab for a more coding- than theory-centered course. He was learning C++ along with the rest of the class, he was just a week or so ahead in the book.
|
# ¿ May 20, 2011 01:35 |
|
Beef posted:It's a teaching horror to just start with "Well ignore all this, but start your programs with 'public static void string args.'
|
# ¿ May 20, 2011 14:59 |
|
reminds me of that old 'object calisthenics' thing http://binstock.blogspot.com/2008/04/perfecting-oos-small-classes-and-short.html
|
# ¿ May 21, 2011 02:15 |
|
what are the comments like, is anyone a member?
|
# ¿ May 21, 2011 17:25 |
|
TasteMyHouse posted:I'd like to see his definition of encapsulation for which this statement makes any sense at all.
|
# ¿ May 21, 2011 21:47 |
|
Plorkyeran posted:Anyone who actually uses string.Empty deserves it.
|
# ¿ May 28, 2011 18:54 |
|
Janin posted:yup
|
# ¿ Jun 15, 2011 20:16 |
|
Ensign Expendable posted:
|
# ¿ Jul 7, 2011 03:22 |
|
Factor Mystic posted:This is just someone who's not used to version control
|
# ¿ Jul 7, 2011 15:38 |
|
What? Why would you declare variables at the start of your scope? It adds extra lines and confusion.
|
# ¿ Sep 25, 2011 17:48 |
|
Dicky B posted:Because: angrytech posted:But why? Pretty much every cs class at my university teaches students to declare variables at the beginning of the function(obviously not loop counters and poo poo like that).
|
# ¿ Sep 25, 2011 22:25 |
|
GrumpyDoctor posted:In C++ the declaration will cause the default constructor to be invoked.
|
# ¿ Sep 26, 2011 02:11 |
|
Munkeymon posted:If you need access to an object in the finally block of a try, you have to declare it outside of the try, but you do not have to instantiate it outside the try. code:
|
# ¿ Sep 26, 2011 16:07 |
|
Zombywuf posted:Well, aside from the fact that your goon.getChildField() is unlikely to work there (goon is MySuperClass not MyChildClass), if you have child specific cloning behaviour you should have a virtual clone method on the superclass which would allow:
|
# ¿ Sep 26, 2011 16:33 |
|
code:
|
# ¿ Sep 26, 2011 17:10 |
|
nielsm posted:("C++ doesn't need garbage collection, because it doesn't produce garbage.")
|
# ¿ Sep 26, 2011 18:29 |
|
Haha, worst binary search variable names ever. Also runs a comparer of unknown complexity 3 times per iteration...
|
# ¿ Nov 16, 2011 07:25 |
|
|
# ¿ Apr 24, 2024 08:45 |
|
There's no bug, it's by design...the variable is called 'maybe' because maybe it overflows, maybe it doesn't.
|
# ¿ Nov 16, 2011 20:17 |