Live data from Hacker News

Confess HN: Share your Immoral Hacks, Codes or Tweaks

news.ycombinator.com

41–50 of 70 posts

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#41

#1 Using a negative index on an array in order to get around a signed 16 bit limitation. Just stuck another blank array of the same size in front of it in the memory map and kept going. For all I know that code is still running :) It was quite hard to convince the compiler that I wanted to keep the never referenced/read array. Stupid mainframes and their limits... #2 In the 386 days you could get a separate co-proces…

I'd love to see a full narrative on #2, that sounds front-page-post worthy. I can't even imagine asynchronously overclocking part of a CPU and still being able to boot the normal OS.

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#42
post #20
post #14

Well, here's one that, erhm a friend of mine, did. dating has moved online, and the key to getting laid is basically to get as many contacts going as you can. It's like a funnel: The more you put in at the top the more comes out at the bottom. The problem of course is that all that initial contact and writing back and forth with potential subjects is somewhat timeconsuming. Enter the magic of webscraping and hacking.…

Some of my Israeli mates here in London tore through the JDate website selection. They would have debriefings on successful strategies and accuracy of photo-to-reality. They took turns and had harsh debates about who was first with the hottest ones. They analysed which girls knew each other so that they could keep disjoint social scenes going at the one time. It was amazing how many they got through. They eventually…

All of them married to the same man?

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#43
This is not a very impressive hack compared to the other submissions here. But still here is my 'hack', if you want to call it that way.

When I was doing my graduate course in Computer Engineering, we had to submit loads of assignments each semester for each paper. "Assignment" means something that we should write by hand (print-outs not allowed) on any arbitrary topic provided by the lecturers. There was no problem solving ability required here, it was just answering questions like "What are the features of Java?", "Explain the layers in the TCP/IP model" etc.

As you can assume, this was a rather boring and useless exercise. In the first two years I made some girls from my class to write the assignments (which I am not interested in) for me in exchange for helping them in the computer lab and projects (which they were not much interested in).

By the end of second year, I found out another way to do this. I wrote a program that wrote the assignment for me. Here is how it worked: I will fetch the data from websites like Wikipedia etc and paste it in the program and the program will make it look like my handwriting. I click print and it will print the result to A4 sized papers and I submitted those.

I scanned my handwriting and separated each character and made it look like natural when paragraphs etc were constructed with this program.

The results were so impressive that later when I told this story and showed an assignment to one of my lecturers, he thought that I was just joking!

This hack even though trivial, saved me a lot of time in college.

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#44
This is a lame hack, but I used to play lots of Red Faction on the LAN with my buddies. They where all better than me and I got tired of it so I hacked the config file and changed the power of most of the common weapons and gave myself a homing rocket launcher that you could basically fire and forget. On the open maps you cold fire it up in the air and maybe 30-40 seconds later it would see somebody and you'd get a kill.

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#45
post #20

Earlier quoted context omitted.

Some of my Israeli mates here in London tore through the JDate website selection. They would have debriefings on successful strategies and accuracy of photo-to-reality. They took turns and had harsh debates about who was first with the hottest ones. They analysed which girls knew each other so that they could keep disjoint social scenes going at the one time. It was amazing how many they got through. They eventually…

All of them married to the same man?

Obviously I mean 'they are all married to women', but your interpretation is much more amusing.

Too much sex with women leads to marriage with men?? LOL

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#46
post #35
post #11

I wanted to adapt someone's command-line-based program into a library, but it wasn't designed as such. The program was strewn with calls to exit(), and on encountering one of these I would just want to return to the function that called into the library rather than exiting the whole program. So I did a setjmp() prior to calling into it, and used the preprocessor to turn exit() into longjmp().

I don't get it. Why not just remove the exit() and have the function return to where it was called, as standard?

Because, presumably, the program wasn't written as one big main() function, and at least one of the exit()s wasn't in main() — hence the use of longjmp() to jump out of all the layers of function calls back to the caller of the `library'.

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#49
post #41

#1 Using a negative index on an array in order to get around a signed 16 bit limitation. Just stuck another blank array of the same size in front of it in the memory map and kept going. For all I know that code is still running :) It was quite hard to convince the compiler that I wanted to keep the never referenced/read array. Stupid mainframes and their limits... #2 In the 386 days you could get a separate co-proces…

I'd love to see a full narrative on #2, that sounds front-page-post worthy. I can't even imagine asynchronously overclocking part of a CPU and still being able to boot the normal OS.

The reason I did it was because I'd been asked by an Amsterdam cultural center (the meervaart) to show the people living near it during a presentation how the situation would change upon expanding the meervaart.

The director (Han Hogeland) had asked me to do the presentation in exchange for - no laughing please - an old French car that I'd wanted to buy of him (Citroen DS).

This made me very motivated to make it work, only my 16 Mhz 386/387 combo really wasn't fast enough to make it work and I didn't have enough dough for a weitek.

So, from desperation this little hack was born. After I found out that it worked (much to my surprise, actually, testing on 20 MHz) I went to a friend who had a computer store and went through several trays of 387's before finding one that would still run at 40 Mhz, and with a large cooling element attached it even stayed reasonably cool (no fan).

The hardest part really was to cut the line on the mb without damage to other lines (this was a multi layer board), eventually I traced the line to a so called 'via' where I could scratch out the connection topside and use the remains of the via to connect the xtal oscillator (in a socket so I could try various frequencies).

The whole thing worked pretty good even if it looked absolutely terrible (imagine an ic socket piggy backed on top of a ttl IC for power and ground, then a wire running to a via next to a severed trace).

It's a pity I didn't make any pictures of the whole thing, I do still have the aerial photographs we bought of the cartographic institution that were digitized to get the layout in to the software, then extrusion by estimated building height created a fairly realistic view of the area.

The shading was quite primitive, framerate about 2-3 frames / second depending on the amount of stuff in the field of view. The graphics board was a 3x5 bits 512x512 pixels affair whose name escapes me atm.

And I got the car :)

Re: Confess HN: Share your Immoral Hacks, Codes or Tweaks

#50
Some years ago, doing high performance dense matrix code in C, I replaced a bunch of modulo calls with a bunch of bit operations. You had to work with matrices that were a power of 2 in rows and columns, but you could pad it out and stuff worked.

A year later I looked at the code and couldn't figure out how it ever worked in the first place . . .

Post reply on HN