|
code:
|
# ¿ Aug 8, 2009 20:08 |
|
|
# ¿ May 14, 2024 12:34 |
|
PraxxisParadoX posted:For the past 6 years I've worked with a codebase that "grew" out of oscommerce. The amount of sheer... god, I can't think of a word bad enough to describe it, sickens me. Thankfully I'm moving to a new job at the end of the month >< I just finished writing a wrapper in CodeIgniter around OSC. It's amazing the amount of bullshit global crap you need to provide to run some of this poo poo. It's kind of funny that the part I hate most about php (specifically it's half-assed accidental flexibility) is the exact mechanism I used to make this work.
|
# ¿ Aug 10, 2009 02:06 |
|
No Safe Word posted:Or a four-level nested SQL join with table aliases T, TT, TTT, and TTTT. Sadly such a beast exists, and they exist in numbers hahahaha, at another job: code:
|
# ¿ Aug 11, 2009 16:06 |
|
awesmoe posted:Because 1.5 was only released near the end of 2004 and before that there was no replace all method, iirc replaceAll was in 1.4. At least according to the javadoc.
|
# ¿ Sep 4, 2009 22:11 |
|
Parantumaton posted:Java's String#replaceAll(String, String) is regex based which means there's the overhead of generating internal Pattern object for the actual regex, creating a Matcher object from the said Pattern object and then calling Matcher#replaceAll(String) to get the output. If all you need is simple replacement ("change all 'a':s to 'b':s") which is going to get used a lot in your application then rolling out your own #replaceAll() will actually result in a lot faster throughput than the Java's native regex one. Same applies especially to Pattern#split(String) too. Apache Commons to the rescue. http://commons.apache.org/lang/api-...va.lang.String)
|
# ¿ Sep 5, 2009 17:50 |
|
no wonder I can't find any uses of method getTaxRateUS().code:
|
# ¿ Nov 11, 2009 20:29 |
|
rjmccall posted:Impressive, particularly since that entire thing is just: It gets even worse when you know the context. There's only one method it will ever match.
|
# ¿ Nov 12, 2009 02:08 |
|
Nippashish posted:I think you mean !(!coherent != !true). That has to be programming by permutation. I refuse to believe anyone deliberately writes code like that.
|
# ¿ Jan 25, 2010 14:59 |
|
Zombywuf posted:This is why Python can't have nice things. I think this code is essentially the argument people use against Java getting closures. It's pretty convincing, I have to admit.
|
# ¿ Jan 26, 2010 15:19 |
|
Mustach posted:If someone being dumb is a convincing argument to you, then this thread is an argument against any language getting any feature. Eh, that's going a bit far. I definitely think the population of programmers that "write" Java for a living contains an abundant amount of people that would "[be] dumb" with closures. Looks like Python is getting there too. Popularity brings morons. In droves.
|
# ¿ Jan 26, 2010 18:40 |
|
Otto Skorzeny posted:http://peter.hates-software.com/2004/08/20/6550cefa.html hey it's the elvis operator!
|
# ¿ Feb 23, 2010 15:10 |
|
rt4 posted:People do it because it's really fast and really easy. To me it makes sense, even for a small office. The best tool for the job isn't necessarily just one language.
|
# ¿ Mar 5, 2010 02:29 |
|
Otto Skorzeny posted:For C or Obj-C, clang. For C++, nothing yet. Is icc not any good now? I haven't written C++ in years so I'm dated but it used to be pretty good.
|
# ¿ Mar 14, 2010 04:13 |
|
ColdPie posted:
just for fun I ran this through both java and gcc and neither printed anything.
|
# ¿ Mar 26, 2010 14:11 |
|
Zombywuf posted:The real horror is spaces around braces. I just got access to the source of an extremely expensive product and their coding style is Allman with bracespace.
|
# ¿ Mar 26, 2010 23:49 |
|
nbv4 posted:same goes for javascript what interpreter? I just tried safari, firefox, ie and opera and none of them allowed the comment to interrupt "normal" parsing.
|
# ¿ Mar 27, 2010 22:25 |
|
Hey I've got an idea, let's make our urls seo friendly! OOh what a good idea! But wait, we didn't use the link function for all our href's and I don't wanna go back and edit my poo poo spaghetti code! No I got this, see if we capture all the output and then push it through this: code:
Sounds good to me! I'd hate to have to fix my poo poo! ...Later... WHAT THE gently caress WHY IS THIS THING NOT REWRITING MY FORM ACTION URLS. *looks at seo code* you motherfuckers
|
# ¿ Apr 3, 2010 19:56 |
|
It's not really business logic so much as an implementation detail.
|
# ¿ Apr 15, 2010 23:08 |
|
king_kilr posted:Not a coding horror the way everything else in this thread is, but a friend of mine hates writing functions. I have no idea why, or what caused him to think this way, but he does. He often asks me things like, "Can I do this without writing an extra function?", and I don't get it. Luckily he's still a student, maybe they can beat it out of him. This is the guy who wrote oscommerce's admin/categories.php: code:
Too bad they're all javascript functions, and half those lines are comments. I hate working on that file.
|
# ¿ Apr 16, 2010 21:14 |
|
Dijkstracula posted:just make all identifiers uppercase and disallow underscores, and mandate spaces around '=': problem solved Weak, JCL for life. Significant whitespace and hard to distinguish characters weed out the scrub tier pretty quickly.
|
# ¿ May 19, 2010 18:51 |
|
Lexical Unit posted:Your tax dollars at work folks (if you're American that is). Can I work there? I promise I won't ask retarded questions about hash maps.
|
# ¿ May 21, 2010 21:58 |
|
Ah well, worth a shot. I'm the only one left after the last round of layoffs so there's no one left to ask non-retarded questions.
|
# ¿ May 21, 2010 22:18 |
|
HFX posted:Couldn't he just use a list to do the same thing, thereby forming a tuple? I always end up having a generic class called Pair for just this reason. Usually something like this: http://www.ideograph.com/content/generic-pair-java
|
# ¿ Jun 1, 2010 18:40 |
|
HFX posted:Yep the only problem I'd have with that is storing the time as a double. It would be better to have it as a packed Integer. That reminds me of php's microtime() function. Goddamnit whoever wrote that is a cocksucker.
|
# ¿ Jun 3, 2010 20:30 |
|
Janin posted:I propose a new phrase "ozark bugs", meaning a bunch of errors which combine to mostly work. This is why I stopped fixing things. Subtly broken implementations get broken even more when you fix them.
|
# ¿ Jun 23, 2010 21:14 |
|
adrenaline_junket posted:I know this was from last year, but if its .NET Endeca is your answer Man Endeca is loving expensive, just use Lucene unless you need all that marketing jazz.
|
# ¿ Jul 26, 2010 14:26 |
|
Our e-commerce app allows people to delete their order record information out of the table, just a click of a mouse away and "DELETE FROM ORDER WHERE id=?" gets run. It's not archived anywhere or anything. I just had to piece together a guy's cart from weblogs.
|
# ¿ Aug 2, 2010 21:39 |
|
Janin posted:FGPA You've used this acronym twice, but do you really mean FPGA or is it a new acronym?
|
# ¿ Aug 5, 2010 02:37 |
|
dancavallaro posted:Don't tell that to whoever wrote that code, because he'll wrap every single line in his program with Well you probably should gracefully handle OOM scenarios by reporting it. Although at the point you run out of heap I think the behaviour of the JVM becomes undefined.
|
# ¿ Aug 12, 2010 19:36 |
|
Niche markets tend to have REALLY poo poo programs because the top players are all "organically grown" solutions built by professionals in their fields trying their hand at playing computer programmer. poo poo even low-to-mid sized e-commerce software is like this, I loving hate it.
|
# ¿ Aug 12, 2010 21:17 |
|
ErIog posted:I'd always heard this and known this. I just didn't think it would be quite this bad. I could take a bug here or there. I could take some extra rigidity in the amount of customization allowed within the systems. It ends up being just really baffling stuff like applications developed on platforms they're completely not suited for.
|
# ¿ Aug 12, 2010 21:38 |
|
crazyfish posted:Even worse than that was that I used to work on a project where the coding style required ENTER_FUNCTION() and EXIT_FUNCTION() macros on every method. Even if we wanted to instrument something with these, we could have used an AOP framework and did the whole thing in about 10 lines rather than the horrible code (and logging) diarrhea that ensued. We used to have this nonsense along with making sure we named each class with a public static String MODULE. A good bit of civil disobedience, mixed with claiming control of the SVN repo and strategic layoffs got rid of that horse poo poo real fast.
|
# ¿ Aug 16, 2010 20:39 |
|
tef posted:I wasn't 'allowed' to change it for four months or so. That's the best part. "Listen, you're doing everything totally the wrong way." "I know but we're not going to change it now" "Why not, it'll take me 15 minutes to set up" "Because I said so" "Please retire "
|
# ¿ Aug 22, 2010 21:13 |
|
Wheany posted:Yeah, this. You really should learn them, and they're really not that hard. They have applications other than programming too. Hey baby, s/your pants//g gently caress off, nerd
|
# ¿ Sep 1, 2010 22:12 |
|
Paid by the SLOC?
|
# ¿ Sep 10, 2010 19:16 |
|
code:
Also, processFulfillmentItems is even larger than this and has around 15 exit points. gently caress.
|
# ¿ Sep 22, 2010 20:01 |
|
code:
|
# ¿ Sep 25, 2010 18:26 |
|
b0lt posted:
I think in this case it's not about the properties of == as much as a matter of php taking liberties with what a number is when its native form is a string. Once it encounters a non-digit character, instead of saying "welp this isn't a number, not equal" it apparently says "welp, ran into non-number, the rest of this string doesn't matter".
|
# ¿ Sep 25, 2010 19:46 |
|
Monkeyseesaw posted:This is why regexes themselves are the coding horror. No way. Regular expressions are good tools. The coding horror is people using them to solve every problem relating to string processing they encounter.
|
# ¿ Oct 14, 2010 19:28 |
|
|
# ¿ May 14, 2024 12:34 |
|
Monkeyseesaw posted:I'm being facetious. Regexes are obviously extremely useful but it's remarkable how much trouble people have with them unless you're working with them literally every day. If you were trying to invent a syntax that was scientifically designed to be impossible to remember or keep in your head at once you couldn't do much worse than the standard regex syntax. It's like something invented by an evil robot. APL wins that particular award I think.
|
# ¿ Oct 14, 2010 20:53 |