Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

My first interesting hack

In the pre­vi­ous ar­ti­cle, some­one sug­gest­ed cheat­ing on ex­ams as an in­ter­est­ing ap­pli­ca­tion of telepa­thy.

Which re­mind­ed me of my first in­ter­est­ing hack.

I was in col­lege, back when com­put­er time was al­lo­cat­ed by the hour, and I had no com­put­er, and I was about to take my fi­nal ex­am on lin­ear pro­gram­ming.

For those who are not fa­mil­iar with the term, lin­ear pro­gram­ming is not re­al­ly about pro­gram­ming. It's about solv­ing a spe­cif­ic ind of op­ti­miza­tion prob­lem­s.

And for those who don't know that, don't swaet it, it re­duced, in re­al 1989 life, to ap­ply­ing a pro­gram called LIN­DO to find a lo­cal or glob­al min or max for a func­tion.

Now, we were a poor col­lege, so there were like 10 com­put­er­s. For 5000 stu­dents. And we, in that sub­jec­t, were not al­lowed to use it.

And it did­n't have lin­ear pro­gram­ming soft­ware in it any­way. And it had no com­pil­ers or in­ter­preters (ex­cept qba­sic).

So, we did LIN­DO by hand. On pa­per (the Sim­plex method­).

And it was bor­ing. But we did it. It is pret­ty sim­ple once you get the hang of it. But you have to make hun­dreds of cal­cu­la­tion­s, so we were al­lowed cal­cu­la­tors.

And I had this ba­by.

I had bought it with my sec­ond pay­check as a teach­er as­sis­tan­t. It cost­ed me about the same as a small bike.

Or a TV.

And it had 4KB of ram, an ascii key­board, and 116 pre­loaded pro­grams for com­mon sci­en­tif­ic cal­cu­la­tion.

It was the best cal­cu­la­tor I ev­er had :-)

And it was pro­gram­mable in BA­SIC.

So, the night be­fore the ex­am, as I did a sam­ple drill, I de­cid­ed to im­ple­ment a solver.

But since we had to solve things on pa­per, I had to show in­ter­me­di­ate step­s.

So, in­stead of a pro­gram to solve the prob­lem, I wrote a pro­gram that solved step-by-step as done by hand. Which was about 20x hard­er.

And it did fit and run in the 4KB of ram, and it dis­played the in­ter­me­di­ate re­sults on the 2x32 char screen.

Sad­ly, there was no way to take a pro­gram out of it, so it was lost on the next bat­tery change.

But hey, I think that was nice :-)

kerem / 2006-04-04 13:25:

this article reminded me my old days at school. i had to deal with the simplex method too. i was using a fx-4500 calculator which had its own programming language but very similar to basic.



they were nice days though.

an anonymous coward / 2006-04-04 13:26:

totally cool. I had several later-gen casio calculators. I still have one, but the batteries are way dead.



we used to write down on paper our best programs once we had them working well. I still have these pieces of paper with programs on them shoved into the manual for my calculator! :)



I also had a linear programming class at some point.



what a coincidence.

Juanjo / 2006-04-04 13:48:

Wow! Lindo!

I am taking a Operative Investigation curse this year and I visited the curse web page a few days ago.. adn you know what? Lindo was still there!



Lindo 6.1 - Disco 1/3 1.186 Kb

Lindo 6.1 - Disco 2/3 1.186 Kb

Lindo 6.1 - Disco 3/3 350 Kb



Greets Roberto!

Roberto Alsina / 2006-04-04 13:48:

Hmmm... I am pretty sure Lindo costed money back then :-)


Contents © 2000-2024 Roberto Alsina