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-29 1:11

Oh shit. I know how this could work.

The client sends out a hash for some arbitrary chuck of data on the network.

The recieving client responds after it has calculated the hash for every arbitrary chunk of data in all shared files. If it finds a match, it sends that first chunk of data. Then it stores which node it got this data from.

The sending client can just spam all nodes on the network until it fill up data for all the hashes it sent out.

Then it can calulate a checksum on this franken file(s) and compare it to the expected checksum.

If the checksum doesn't match, it just respams the network noting not to send requests to the ones it got bad chunks of data from. (which in this case is every node we just got data from since we can't verify if it really was correct.

Now with this second set of chunks it checkes the checksum again. If it doesn't match it will then try every valid combination of the 2 files checking the checksum each time.

If it still isn't valid it creates a 3rd file and so on increasing physical distance of nodes each time.

Eventually, it will get the correct file.

Most of the file will be from people who actually had the actual file, but it possible a couple of the chunks WOULN'T BE FROM THE ORIGINAL FILE.

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