|
A guy I work with will take code like this:code:
code:
He also hates to use functions because "it makes the code too hard to follow."
|
# ¿ Jun 24, 2010 16:05 |
|
|
# ¿ Apr 24, 2024 08:20 |
|
He's gotten better at not doing that over the years, but he'll still complain about functions being hard to follow. He's actually pretty smart when it comes to some of the weird poo poo we need to figure out. Here is another gem I found in some old networking code we have: code:
|
# ¿ Jun 24, 2010 20:49 |
|
Orzo posted: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? I'm my department yes, but he is in another department and they put up with it.
|
# ¿ Jun 24, 2010 20:51 |
|
Jonnty posted:Presumably they were going to add a way of changing useHTTPS later? That's not a colossal horror if so. I would hope, but by the time I inherited the code it was already 2 years old and the original programmer was long gone. I ended up rewriting most of the networking library anyway.
|
# ¿ Jun 24, 2010 20:57 |
|
We got a new guy who's interning here until he finishes his degree. When he was sent to my department I asked him what his java experience was and he replied "Pretty extensive. I've have had 4 classes now on Java." After the usual training B.S. I let him start fixing some bugs and gave him an easy one to start with. I even told him how to fix it by extending ClassA and override MethodA, etc. Six hours later he commits the changes which included copy and pasting ClassA to a new file calling it ClassB and changing some code in MethodA because he couldn't figure out he needed to remove "final" from ClassA. Apparently they save the final keyword for the 5th java class.
|
# ¿ Jul 1, 2010 16:01 |
|
Painless posted:The way you describe it, your way of "fixing" things sounds like a coding horror in itself. Class A has a bug, so fix it by quietly removing 'final' and extending with a class that has the bug fixed? It wasn't a bug in the sense that there was a flaw in ClassA. I just call everything in our issue tracker a bug.
|
# ¿ Jul 1, 2010 16:19 |
|
Touché.
|
# ¿ Jul 1, 2010 18:26 |
|
WangNinja posted:
My sql isn't that great, but it looks to me like every question and answer has its own column, which physically made me lol.
|
# ¿ Jul 9, 2010 18:23 |
|
I found this today and it's not even that bad but it struck me as so funny I started cracking up at my desk.code:
|
# ¿ Jul 30, 2010 14:23 |
|
Found this one today.code:
|
# ¿ Aug 12, 2010 15:43 |
|
I saw this today and just stared in wonder.code:
|
# ¿ Aug 27, 2010 16:38 |
|
Nevett posted:This is in C#, in an ASP.NET project I've inherited. Run this thread through there and see how long it takes.
|
# ¿ Aug 31, 2010 15:24 |
|
code:
|
# ¿ Sep 27, 2010 14:44 |
|
Hammerite posted:I think this could be defensible, depending on what exactly it's being used to do. Similar to how while (true) {...} can be a useful control structure. I challenge thee to provide an example.
|
# ¿ Sep 27, 2010 21:08 |
|
Exceptions are great until they are thrown 14 calls back with no indications of which method threw it.
|
# ¿ Sep 28, 2010 13:46 |
|
NotShadowStar posted:What crazytown language doesn't vomit a stack dump when you get an uncaught exception? RIMs bastard java they put on Blackberrys.
|
# ¿ Sep 28, 2010 14:04 |
|
Internet Janitor posted:Fun fact: in "RIM Java", static initialization on final variables can be fired every time the classloader of a subclass is executed. Try this with strings and watch your memory footprint EXPLODE INTO WONDERLAND!
|
# ¿ Sep 29, 2010 19:37 |
|
This isn't so much a horror, as it just bugs me.code:
code:
enough?
|
# ¿ Oct 14, 2010 20:15 |
|
Just came across this comment:code:
|
# ¿ Oct 18, 2010 18:42 |
|
This might not be a horror for some of you but gently caress.code:
|
# ¿ Nov 19, 2010 21:11 |
|
Orzo posted:This is a preference and probably the furthest thing from a horror I can think of. Follow your team's guidelines when it comes to this one. Our department made it a guideline long ago because we all hate it. I was reminded of it today while looking though a library from another department.
|
# ¿ Nov 19, 2010 21:57 |
|
Here's a riddle for you. Q: What do you get when you have a graphic designer who's never coded before create an application? A: One 5000 line class that contains the entire app.
|
# ¿ Dec 3, 2010 22:07 |
|
code:
|
# ¿ Dec 17, 2010 20:26 |
|
code:
|
# ¿ Jan 18, 2011 14:32 |
|
Internet Janitor posted:Lysandus: Placeholder for validation logic? Please? It's existed for three versions of the software and there are no comments around it indicating it might be. NotShadowStar posted:Probably a typo or slip of the brain. Likely meant 'return _itemID' or some such. Here's the best part. The only place it's used. code:
|
# ¿ Jan 18, 2011 17:07 |
|
I'm digging through a connection class for one of our internal apps and there is no handling for HTTP 401 responses from the server. And by no handling I mean the entire app crashes if the server returns a 401.
|
# ¿ Jan 20, 2011 16:08 |
|
quote:When you define static fields (also called class fields) of type String, you can increase application speed by using static variables (not final) instead of constants (final). The opposite is true for primitive data types, such as int. http://docs.blackberry.com/en/developers/deliverables/5716/Using_static_vars_for_strings_447038_11.jsp
|
# ¿ Feb 15, 2011 21:14 |
|
Ugg boots posted:Oh god, this is a Blackberry JVM implementation only thing, right? Thankfully yes.
|
# ¿ Feb 15, 2011 21:47 |
|
code:
|
# ¿ Mar 25, 2011 13:38 |
|
Edison was a dick posted:Well it might do something if data changes, which could happen if it's volatile. It's not. data is passed into the method and _data is the passed in data but global. Later on the method _data = data; anyway based some some other criteria.
|
# ¿ Mar 25, 2011 16:27 |
|
Bad naming usually pisses me off, but this was a good laugh.code:
|
# ¿ Mar 25, 2011 19:34 |
|
I found this today.code:
|
# ¿ Jul 6, 2011 21:28 |
|
This is the best part. People around me were poking their heads out of their cubes to see why I was laughing so hard.code:
|
# ¿ Jul 7, 2011 13:12 |
|
toiletbrush posted:Just a tiny one, displaying a DateTime in a razor view... So he took a date, made it a string, parsed a date from that string and turned that date into a string... That's some inception horror there.
|
# ¿ Jul 15, 2011 21:58 |
|
code:
|
# ¿ Aug 5, 2011 21:19 |
|
Hughlander posted:This is mild for the thread but I need to vent since the person who wrote this left the company right before shipping and left me to take over their systems... I see your bid and raise you! code:
|
# ¿ Sep 13, 2011 20:48 |
|
code:
|
# ¿ Jan 27, 2012 22:12 |
|
|
# ¿ Apr 24, 2024 08:20 |
|
Ok, which of you did this. Fizz Buzz Enterprise Edition
|
# ¿ May 20, 2013 14:39 |