|
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 |
|
|
# ¿ Apr 27, 2024 03:33 |
|
Orzo posted:I'm not an IE apologist by any means, but this issue is not as simple as 'they were caught cheating' and it's irresponsible to state that as if it were true. Their dead-code analysis is in theory general-purpose, but is in practice A) incredibly fragile, and B) oddly works very well on SunSpider.
|
# ¿ Dec 8, 2010 18:09 |
|
Hammerite posted:So the planned remedy for this is to
|
# ¿ Dec 18, 2010 16:39 |
|
Sun's tutorial for commandline password masking. Skip to the Making the Code Secure and Reliable section, since their original code used immutable strings to store the entered password. Their "Reliable" code uses a second thread to go back and attempt to overwrite each character as it is entered with an asterisk. This fails if * The user types fast * The thread is running slow * You're at the end of the current line in the terminal * You paste a password (entire password minus last character is revealed) * You press the left arrow key then press delete (entire password minus one character is revealed) It also has an extra asterisk in the prompt.
|
# ¿ Dec 18, 2010 22:49 |
|
Zombywuf posted:The bug is in the double parser that iteratively approximates the correct value which doesn't work at MAX_DOUBLE. Rasmus decides that the problem is "compiler switches". And apparently they didn't think to check "can we improve this number's error any further?" instead of just while(error > 0.05) It's fixed in SVN so I'm wondering what horrifying method they used to "fix" it.
|
# ¿ Jan 5, 2011 02:56 |
|
So is volatile in php magical? I am confused as to how this "fixes" the hang-on-certain-float bug. Edit: Instead of blaming PHP programmers, they are blaming a design flaw in the x87 FPU. Malloc Voidstar fucked around with this message at 04:21 on Jan 5, 2011 |
# ¿ Jan 5, 2011 03:52 |
|
Scaramouche posted:If it was x87's fault wouldn't this... be an issue in other languages? Ditto for compiler switches? That is to say, it isn't a hardware issue. It doesn't happen without x87, but it also wouldn't happen if the PHP devs were competent.
|
# ¿ Jan 5, 2011 20:49 |
|
gastownlabs posted:Minecraft has sold 1 million copies. Making every algorithm O(1) is not more important than shipping. A game with a nearly non-existent physics engine, using 16x16 textures, should be able to run on just about everything.
|
# ¿ Jan 7, 2011 17:43 |
|
ryanmfw posted:Hey, not really defending poo poo coding, just arguing that poo poo coding isn't always about profit. It sucks that your netbook can't play 3D games but neither can mine, suck it up. He can code fast, was inspired by a good idea, and has legions of autistic fans. That's all he has going for him.
|
# ¿ Jan 8, 2011 06:36 |
|
qntm posted:When in history has anybody charged money for an alpha release of something? In fact, when has an alpha release ever been made available to the general public? But it looks like this and is running on their own proprietary engine, so they kind of needed the money. Also they are constantly fixing bugs, whereas Notch will release a game-breaking patch and then go to sleep. (Patches are silent and automatic on launch) Unknown Worlds is essentially doing the same thing Notch is, except they're producing a far more complex game with less money. And doing a much better job of it. Minecraft: Making every thread mentioning it into a Minecraft thread since 2010.
|
# ¿ Jan 8, 2011 15:07 |
|
ErIog posted:You're gonna need to provide a source for this because I'm seeing that Unknown Worlds has received 2 rounds of outside investment plus whatever Zen of Sudoku made plus whatever pre-orders for NS2 make. They've also been working on NS2 for about 3 years at this point. You're comparing 2 very different games at two different stages of development with two very different budgets. Minecraft, on the other hand, has sold one million copies. And is still in alpha. And is still commonly unplayable. And still often has new game-breaking bugs introduced. Notch does no real private testing other than "It mostly works on my computer." (NS2 has builds internally tested by the devs and some players before they are released to all the closed beta members)
|
# ¿ Jan 8, 2011 15:37 |
|
http://thedailywtf.com/Articles/Confessions-The-Shopping-Cart.aspxquote:The project called for a shopping cart and, after reading a 30 minute "getting started" guide on SQL, I created my first database. I figured a Shopping Cart is a logical unit of data, and as such deserving of its own table. And since each Shopper had their own shopping cart, they should also have their own Shopping Cart table.
|
# ¿ Jan 13, 2011 00:49 |
|
Alternatively, consider using the WCF Integration Pack for Enterprise Library. It contains classes that you can use directly to enable storage of and access to the container in WCF applications, and it can be used to automatically populate dependencies in your classes. Forward-thinking documentation.
|
# ¿ Jan 14, 2011 23:17 |
|
Mustach posted:Despite being totally harmless, whenever I see a parenthesized return expression, I feel that it's a very telling instance of bad style. Edit: But return(stuff); is just weird. Malloc Voidstar fucked around with this message at 21:50 on Jan 23, 2011 |
# ¿ Jan 23, 2011 21:47 |
|
NotShadowStar posted:Pretty sure you'd need UAC elevation to do that, since changing the same properties in the Control Panel asks for UAC access.
|
# ¿ Jan 27, 2011 02:18 |
|
Munkeymon posted:explorer doesn't run elevated by default - at least not that I can see? That code was released during the beta and still works on a fully-patched W7 system.
|
# ¿ Jan 27, 2011 15:56 |
|
Wanted to add a stemmer to a small program I'm writing. (A stemmer reduces words to their stem; "writing" becomes "write") Used Apache's modification of the generated Java version of the Snowball Porter2 stemmer. (Snowball code here) It worked fine, but then I decided to look at the Java code and The Snowball->Java compiler apparently writes everything as labeled while(true){} statements or do {} while (false); statements. code:
code:
|
# ¿ Jan 31, 2011 09:08 |
|
Qwertycoatl posted:Treating generated code as anything other than an object file is a horror itself. You're not supposed to read it, so it's fine for a generator to make life easy on itself with stuff like do { ....} while (false) and whatever.
|
# ¿ Jan 31, 2011 10:37 |
|
the comments skip += blksize; //skip = skip + blksize
|
# ¿ Feb 1, 2011 03:15 |
|
pseudorandom name posted:What, four spaces instead of a (8 space, as is right and proper) tab? code:
|
# ¿ Feb 1, 2011 05:31 |
|
no, you fool, don't you remember what happened the last time somebody posted Minecraft code in here?! but anyway code:
|
# ¿ Feb 13, 2011 20:09 |
|
zootm posted:This is apparently a method which can return a varied number (using the Random) or a constant depending on what type of block (allegedly what the class represents) it is. It's sadly not a coding horror. Edit: aw what the gently caress
|
# ¿ Feb 13, 2011 21:00 |
|
Did RIM do the Joel Spolsky thing and use an intern who didn't know Java or the language he was working in in order to write a JVM that bad?
|
# ¿ Feb 15, 2011 21:43 |
|
Scaevolus posted:It's probably a straightforward interpreter, with zero optimization:
|
# ¿ Feb 15, 2011 21:58 |
|
mysql> select aes_encrypt('hello', '') = aes_encrypt('hello', '4re35na2aTaVasAy4re35na2aTaVasAy'); +-------------------------------------------------------------------------------------+ | aes_encrypt('hello', '') = aes_encrypt('hello', '4re35na2aTaVasAy4re35na2aTaVasAy') | +-------------------------------------------------------------------------------------+ | 1 | +-------------------------------------------------------------------------------------+ http://bazaar.launchpad.net/~mysql/mysql-server/mysql-5.5/view/head:/mysys/my_aes.c
|
# ¿ Feb 23, 2011 01:11 |
|
*key is a pointer to the password rkey is an array of length 16 (AES_KEY_LENGTH = 128, /8 = 16. see my_aes.h for the define) rkey is the actual key that will be used to encrypt/decrypt for (ptr= rkey, sptr= key; sptr < key_end; ptr++,sptr++) { if (ptr == rkey_end) ptr= rkey; /* Just loop over tmp_key until we used all key */ *ptr^= (uint8) *sptr; } sptr = the password pointer it first zeroes the realkey, if the given password is 0-length then it's done creating the realkey, the loop doesn't run if not, then it will iterate through the realkey[16] for as many bytes as there are in the password, XORing as it goes. that's this line: *ptr^= (uint8) *sptr;.( ^= is XOR-assignment). if it hits the realkey's end, then it will reset to the beginning of the array. the password index is not changed. did this help (also I'm a Java programmer so my explanation might be totally wrong )
|
# ¿ Feb 24, 2011 14:25 |
|
code:
train php:<? $arg = 'T'; $vehicle = ( ( $arg == 'B' ) ? 'bus' : ( $arg == 'A' ) ? 'airplane' : ( $arg == 'T' ) ? 'train' : ( $arg == 'C' ) ? 'car' : ( $arg == 'H' ) ? 'horse' : 'feet' ); echo $vehicle; ?>
|
# ¿ Mar 3, 2011 11:59 |
|
GrumpyDoctor posted:What's wrong with ternary chaining? but it is useful if the language you are working in doesn't support if-else or switch # Create spatially interpolated bob-clips dbob = clp.bob(0,0.5) edi = (EdiMode=="NNEDI2") ? defined(edeint) ? (border) ? edeint.pointresize(width(o),height(o)+8, 0,-4,-0,height(o)+8.001 ) : edeint : clp.nnedi2(field=-2) \ : (EdiMode=="EEDI2") ? clp.SeparateFields().EEDI2(field=-2, maxd=EEDI2maxd) \ : (EdiMode=="Yadif") ? clp.Yadif(mode=1) \ : dbob
|
# ¿ Mar 3, 2011 22:36 |
|
bobthecheese posted:Most of the problems with php are, as you said, pretty much centred on people not reading the available documentation http://bugs.php.net/bug.php?id=32100 'You don't need finally blocks, just don't handle your exceptions, not a big deal'
|
# ¿ Mar 3, 2011 23:02 |
|
NotShadowStar posted:White people drive like THIS, black people drive like THIS. (php programmers === asian people)
|
# ¿ Mar 7, 2011 16:22 |
|
tef posted:(ie the coding horror is you) for example: https://groups.google.com/group/microsoft.public.win32.programmer.kernel/browse_thread/thread/6326c306e22e05bb/c0fee26e301bbcf2 wherein a programmer decides to use 32-bit Windows process IDs as 16-bit indexes to a flat array and refuses to listen to everybody saying "what, no" quote:Obviously I can't disclose the underlying motivation but suffice to say it has reduced a small CPU intensive bottleneck in an area that is otherwise impossible to address, we are seeing a 50% drop in CPU on an operation that is small but performed frequently in our case.
|
# ¿ Mar 12, 2011 10:54 |
|
I don't think this is really a horror but it's horribly ugly to me so whatever I'm converting the subtitles of TED Talks, which is in this JSON structure: http://www.ted.com/talks/subtitles/id/1032/lang/eng Using Google Gson to deserialize that: code:
|
# ¿ Mar 16, 2011 11:39 |
|
http://jtcfrost.svn.sourceforge.net...in&pathrev=2865 I'd better comment this out in case anyone needs it later! *Commits code to SVN repo*
|
# ¿ Mar 31, 2011 04:21 |
|
I don't like HTML5 because it's a living standard.
|
# ¿ Mar 31, 2011 22:08 |
|
I'm mad about markup
|
# ¿ Apr 2, 2011 01:12 |
|
Mustach posted:Can we all agree that (X)HTML, XML, and the W3C are terrible? also, gently caress Java with its decade old bugs: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4414164
|
# ¿ Apr 4, 2011 13:12 |
|
Otto Skorzeny posted:Also if Perl-Compatible Regular Expressions were anything but a subset of the regexes that Perl supports, something is horribly wrong why would you do that
|
# ¿ Apr 8, 2011 07:11 |
|
code:
|
# ¿ Apr 9, 2011 05:02 |
|
Volte posted:That looks like generated code to me. It's not generated code, it's a partial port of MiniLZO from C.
|
# ¿ Apr 9, 2011 08:15 |
|
|
# ¿ Apr 27, 2024 03:33 |
|
Zombywuf posted:Look at the graph for the part before the Perl one goes crazy. It's orders of magnitude slower for the non pathological case. Also see:
|
# ¿ Apr 13, 2011 14:47 |