|
Ugg boots posted:I really hope you're joking/trolling here. I should have specified that it's not totally unreasonable for a one-man operation.
|
# ? Dec 2, 2010 19:16 |
|
|
# ? Apr 27, 2024 07:28 |
|
Munkeymon posted:I should have specified that it's not totally unreasonable for a one-man operation. It seems kind of weird and arbitrary, but that's me.
|
# ? Dec 2, 2010 22:41 |
|
Sorry to quote a huge block from page 150, but this made my day. If you skipped that page go back and read it... not that this entire thread isn't full of jems. Dicky B posted:That is truly tragic.
|
# ? Dec 2, 2010 23:34 |
|
I thought you guys might enjoy something I wrote a few years ago that I just remembered:code:
|
# ? Dec 3, 2010 00:35 |
|
Munkeymon posted:I thought you guys might enjoy something I wrote a few years ago that I just remembered: Maybe I'm the real horror here, but I think I agree with the lead dev on this one.
|
# ? Dec 3, 2010 01:58 |
|
GrumpyDoctor posted:Maybe I'm the real horror here, but I think I agree with the lead dev on this one. Agree that it's more concise, or that it's better? (It is one of those things, but not the other.)
|
# ? Dec 3, 2010 02:22 |
|
Hammerite posted:Agree that it's more concise, or that it's better? (It is one of those things, but not the other.) code:
|
# ? Dec 3, 2010 02:55 |
|
Plorkyeran posted:It's not really either. It isn't really any more concise this: best code code:
Kelson fucked around with this message at 08:56 on Dec 3, 2010 |
# ? Dec 3, 2010 04:34 |
|
The real horror are all the non-ironic off-by-one errors people are posting in this thread.
|
# ? Dec 3, 2010 06:40 |
|
shrughes posted:The real horror are all the non-ironic off-by-one errors people are posting in this thread. 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).
|
# ? Dec 3, 2010 07:00 |
|
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). Hoping this was intentional
|
# ? Dec 3, 2010 07:05 |
|
plushpuffin posted:Hoping this was intentional
|
# ? Dec 3, 2010 10:59 |
|
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 |
|
Another detail I remember: the horrible for loop I came up with was also 'better' because it only required one unit test for 100% coverage - fewer test to maintain Edit: \/\/ Each line was touched by at least one test Munkeymon fucked around with this message at 20:31 on Dec 3, 2010 |
# ? Dec 3, 2010 20:08 |
|
That's an interesting definition of "coverage".
|
# ? Dec 3, 2010 20:27 |
|
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 |
|
This is because you didn't hire a modernist.
|
# ? Dec 3, 2010 22:12 |
|
Is it okay if you do that but also use inner classes?
|
# ? Dec 3, 2010 23:03 |
|
Munkeymon posted:Edit: \/\/ Each line was touched by at least one test You just gave me an awesome idea for ensuring I get 100% test coverage on my C programs.
|
# ? Dec 3, 2010 23:28 |
|
Vanadium posted:Is it okay if you do that but also use inner classes? This is what you'd get if you did hire a modernist.
|
# ? Dec 4, 2010 00:40 |
|
Internet Janitor posted:You just gave me an awesome idea for ensuring I get 100% test coverage on my C programs. I think I know what this idea is. What if I told you I've had a legitimate reason to use it in production?
|
# ? Dec 4, 2010 00:41 |
|
Zombywuf posted:I think I know what this idea is. What if I told you I've had a legitimate reason to use it in production? If it's the same idea that I'm thinking of right now then there's just no way I can imagine how that is supposed to work ...
|
# ? Dec 6, 2010 19:12 |
|
Zombywuf posted:I think I know what this idea is. What if I told you I've had a legitimate reason to use it in production?
|
# ? Dec 6, 2010 22:39 |
|
Janin posted:Why would you ever have a legitimate reason to put everything on one line? For ternary operations such as the first couple lines of this method! These are especially useful for converting a boolean parameters to a boolean value: code:
|
# ? Dec 7, 2010 01:02 |
|
Does it count if the language itself is horrifying? http://xplusplus.sourceforge.net/ quote:Superx++ is an object-oriented language that is entirely based on XML's syntactical structure. Superx++ conforms with the XML version 1.0 specification as published on the W3C web site. Programming in XML itself has great potential and Superx++ pushes the envelope! Class test code and its output Array test code and its output I found this from Category:XML-based programming languages.
|
# ? Dec 7, 2010 01:41 |
|
And I thought XSLT was horrible. I want to know what the <cats>5</cats> at the end of that first example does.
|
# ? Dec 7, 2010 02:09 |
|
I like how array declarations, one of the few things here that might naturally map to an XML-style syntax, are just:code:
|
# ? Dec 7, 2010 03:17 |
|
Janin posted:Why would you ever have a legitimate reason to put everything on one line? Short answer: IE. Long answer: When Firefox or Safari detect a long running script they do it by wallclock time, whereas IE does it by statement count, a count that has not changed in a long time. In Javascript, much like C, many ;s can be replaced with ,s, with the only effect being to reduce the count of statements executed in IE. We have had to deploy this to get around IE's retarded long running script detection.
|
# ? Dec 7, 2010 08:59 |
|
Zombywuf posted:Short answer: IE. Ahahahahahahahahahahahaha IE is the greatest thing ever made ever.
|
# ? Dec 7, 2010 10:29 |
|
Cute lil' horror code:
|
# ? Dec 7, 2010 12:17 |
|
Zombywuf posted:Short answer: IE. Holy poo poo - that might be useful here, too. Although I suspect it would only be a little bit harder to simply rewrite a bunch of our lovely JS to just not be as lovely.
|
# ? Dec 7, 2010 15:41 |
|
Zombywuf posted:Short answer: IE. Jesus christ. I write a lot of javascript and I have never encountered this.
|
# ? Dec 7, 2010 15:57 |
|
Zombywuf posted:Short answer: IE. This is the best/worst thing I've read in a long time
|
# ? Dec 7, 2010 16:36 |
|
In web development there aren't really any coding horrors that can outdo IE itself.
|
# ? Dec 7, 2010 18:51 |
|
Monkeyseesaw posted:In web development there aren't really any coding horrors that can outdo IE itself. PHP
|
# ? Dec 8, 2010 00:43 |
|
Vaginal Engineer posted:PHP
|
# ? Dec 8, 2010 01:05 |
|
Janin posted:As much as I hate PHP, measuring execution time by counting semicolons is worse Do we know yet if that behavior is different in IE9? Microsoft seems like they understand that the old versions of IE were abominations with the decisions they've been making with IE9. If IE9 ends up actually being on par with Chrome, Firefox, or Safari then PHP might be all we have left.
|
# ? Dec 8, 2010 01:24 |
|
ErIog posted:If IE9 ends up actually being on par with Chrome, Firefox, or Safari Hahahahahahahahahahahaha
|
# ? Dec 8, 2010 02:07 |
|
ColdPie posted:Hahahahahahahahahahahaha I'm sorry, you'll have to explain this (beyond "lol IE9 beta doesn't support all of CSS3). OT: I present beautiful handwritten SQL for a small Rails app: code:
|
# ? Dec 8, 2010 02:20 |
|
|
# ? Apr 27, 2024 07:28 |
|
Looks like another Java or PHP programmer doesn't understand Rails. I bet that was in a controller too.quote:#{"LIMIT ?" unless limit.nil?} Yep, definitely PHP and a bad PHP developer at that. Hello SQL injection.
|
# ? Dec 8, 2010 03:56 |