Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[Fucking stupid] Bad programming ideas [WTF]

Name: Anonymous 2008-04-28 16:29

Here's a thread where you can post retarded software/programming related ideas you read or saw on the internets. Retarded code from ENTERPRISE is fine too, but please don't turn this into “Retards writing Java” thread. You can think of it as /prog/'s own DailyWTF, only with less Java programmers and people laughing at stuff that they really don't understand. I'll start with a post from /a/:

I have been thinking about a P2P client which requests bytes from people who may not necessarily have the file they're downloading, but they have those specific bytes (which may be from another file), and the P2P client is designed to request the closed peer with those bytes, despite not having the file. So, it wouldn't matter if a torrent was dead, you'd just have to search other peers for those specific bytes.

It would have to be some sort of index of hashes of those bytes which would determine who sent them...


Name: Anonymous 2008-04-30 21:12

>>47,48,49
I wouldn't use a hash algorithm designed for encryption. They are good for checksuming, though.

What we need is nearer to compression. A quick idea[1] i'm thinking: divide the file in 1KB blocks, and hash each one in 8 bits. Every few bytes, a short checksum is added. The decompressor would have many possibilities per block, but most should be discarded by the partial checksums. At the end, it checks every possible block combination againist a global, reliable hash, like SHA-1. The whole thing may be compressed recursively if it's >1kb, and block sizes may vary, but that would require a container format.

[1]: still insane.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List