Skip to main content

Ralsina.Me — Roberto Alsina's website

Frodo as a Hacker

Just be­cause I am a shame­less nerd, here is, in all it's geek­i­tude, my 2002 es­say about hack­ing and Lord Of The Rings, res­cued from its de­served ob­scu­ri­ty for a few min­utes, with some ex­tra foot­notes...

I Jornada Python en Santa Fe, Argentina

Bilin­gual en­try here:

Yo nací en San­ta Fe. Me gus­ta Python. Hay un even­to de Python en San­ta Fe.

Pien­so asi­s­tir so­la­mente co­mo es­pec­ta­dor, quedarme calla­do y es­cuchar cosas in­tere­santes que di­gan los de­mas.

Sin em­bar­go, si quieren ex­per­i­men­tar un lu­gar donde se pueden com­er 30 platos de pesca­do por 20 pe­sos (y te podes com­er los 30, aunque yo conoz­co so­la­mente una per­sona con la su­fi­ciente for­t­aleza es­tom­acal), mas to­da la cerveza que puedas tomar... bueno, nos ve­mos en San­ta Fe el 3 de ju­nio.

Mas in­for­ma­cion aca


I come from San­ta Fe. I like Python. There is a Python event on San­ta Fe.

I in­tend to at­tend in a strict­ly spec­ta­tor fash­ion. I will lis­ten to oth­er guys telling in­ter­est­ing stuff, and keep qui­et.

How­ev­er, if you want to ex­pe­ri­ence a place where you can eat 30 dif­fer­ent fish dish­es for about 7 dol­lars (and I mean you can eat all 30, al­though I know on­ly one per­son of such su­per­hu­man for­ti­tude), plus all the beer you can drink... well, I will be in San­ta Fe on June 3rd.

More in­for­ma­tion here

There is no excuse: your program should have a man page!

I wrote Lin­ux/U­nix ap­pli­ca­tions for ten years be­fore I wrote my first man page.

I used all the ex­cus­es:

  • My app has in­­ter­ac­­tive help

  • My app is for pri­­vate use

  • Some­one will write it even­­tu­al­­ly

But of course there are on­ly two rea­sons not to write man pages.

  • You think the man pages are ob­­so­lete.

This is what the FSF thinks. So, they give you in­fo pages. And they put, at the bot­tom of each man­page some warn­ing about how that may look like the doc­s, but the re­al docs are the in­fo pages.

Then they don't pro­vide a de­cent in­fo read­er out­side of emac­s. But hey, who cares. On KDE, just use a in­fo: URL.

  • You hate writ­ing man pages.

Which is per­fect­ly un­der­stand­able, since this is how a man page looks like (and yes, I know it's spe­cial­ly ug­ly ex­am­ple):

.de }1
.ds ]X \&\\*(]B\\
.nr )E 0
.if !"\\$1"" .nr )I \\$1n
.}f
.ll \\n(LLu
.in \\n()Ru+\\n(INu+\\n()Iu
.ti \\n(INu
.ie !\\n()Iu+\\n()Ru-\w^G\\*(]X^Gu-3p \{\\*(]X
.br\}
.el \\*(]X\h^G|\\n()Iu+\\n()Ru^G\c
.}f

And it is even pos­si­ble that for some man pages you need to write such a thing.

But for the av­er­age pro­gram? Just take some­thing like tx­t2­man and be hap­py.

I wrote man pages for each of my qmail-spp plug­ins in a few min­utes. Al­though they prob­a­bly are lack­ing in their man-­pa­ge­ness in mat­ters of style, they are ok.

And they are not hard to write at all (full):

NAME

  authchecks

DESCRIPTION

  This plugin is meant to be used on the AUTH command and does two things:

  1. Logs the user (see LOGGING)

  2. If the user is authenticated, it sets QMAILQUEUE "/var/qmail/bin/simscan-nospam",
  which is probably not what you want, but is what I use right now ;-)

And there is no rea­son why your pro­gram, be it KDE-based or not, should not have such a thing.

The fax thing

  • Wrote a whole queu­ing suite for efax. It kin­­da work­s, but not re­al­­ly, be­­cause it's not test­ed at al­l.

  • Rewrote the web app to work with said suite in­­stead of mget­­ty+send­­fax

  • Added sta­­tus and sent pages

  • Im­­ple­­men­t­ed I18N for the web app

Next step: spend­ing some ac­tu­al cents send­ing and re­ceiv­ing fax­es from my home phone line to the guy across the street.

What will hap­pen: I need to do lots of oth­er things, so I will shelve it for a week or so.

Rethinking my fax solution

I de­cid­ed to re­do most of it, be­cause I think I fig­ured out a bet­ter way.

  1. Use efax in­­stead of mget­­ty+send­­fax

Af­ter al­l, efax works with my mo­dem and send­fax does­n't ;-)

  1. Write a gen­er­ic spool­ing thin­ga­­ma­jig for efax (this is easy)

  2. Re­write print­­­fax.­­pl in a sim­­pler way (done)

  3. Sim­­pli­­fy the win­­dows side.

For­get about a Qt ap­p. All that's need­ed is a prog­gie that lis­tens on a port, ac­cepts con­nec­tion­s. The con­nec­tion gives it a URL. It launch­es the de­fault brows­er with that URL.

If any­one read­ing this can write that pro­gram, I would re­al­ly like it. Use VB, use .NET, use Java, I don't care.

  1. Use the web app as the on­­ly in­­ter­­face.

What's miss­ing yet:

  • Writ­ing the queu­ing pro­­gram (should use same for­­mat as mget­­ty+send­­fax's)

  • The win­­dows "clien­t"

  • Mi­nor tweaks to the web app ( ba­si­­cal­­ly a form for the send­ing data)

And that's it.

Oth­er than the win­dows thing, it's about a day's work.


Contents © 2000-2020 Roberto Alsina