http://qs321.pair.com?node_id=755764


in reply to How has Perl saved you time at your job this week|month|year|decade?

I don't have much opportunity to program much in my own work. But I saved my wife a lot of time in her work this year. She is doing research that involves a (non-computational) linguistic analysis on a large corpus of court transcripts. I wrote just a few little simple scripts to help her workflow. The scripts combined took me at most an hour to put together, and were entirely trivial from my point of view, but she thinks they saved her several days of work. It's nice to feel wanted, and empowering to be able to automate your environment.

Some of the little scripts I recall writing were as follows:

The transcripts were digitized using OCR scans, resulting in pretty strangely formatted text files. Perhaps the simplest thing I wrote was just a utility to strip the tons and tons of extra whitespace, making everything consistent and readable. To be user-friendly, the script opened up a window with Xdialog where it would accept pasted text. Then it would open another dialog with the cleaned-up text, ready for copying. I think it also gave some statistics like word/line counts. This script was not rocket science, but when I saw that my wife was going to mindlessly clean up several hundred pages of text by hand, I had to intervene!

Another script I wrote was to help her classify different phrases according to the categories she was interested in. She had already split up the text into clauses (hard to do automatically). I wrote a script that would take as input (through our little cut & paste interface) a long list of clauses. Then she could enter a list of the categories she was interested in. Then it would present each clause, one at a time, and let her choose the category. At the end, it would output the final categorizations and some statistics. The alternative was that she would have copied and pasted from one word processor window (the list of unclassified clauses) into another, scrolling around to find the right category to paste it into.

I know most of us here probably take for granted being able to do these kinds of things in our sleep (I mean, how hard is it to strip whitespace or count lines?). But even the Perl hacker's simplest technology is indistinguishable from magic to an outsider ;)

blokhead

  • Comment on Re: How has Perl saved you time at your job this week|month|year|decade?

Replies are listed 'Best First'.
Re^2: How has Perl saved you time at your job this week|month|year|decade?
by missingthepoint (Friar) on Apr 07, 2009 at 08:46 UTC
    But even the Perl hacker's simplest technology is indistinguishable from magic to an outsider

    Indeed - I've hacked together various other time-saving things at work which are simple to me, but unimaginable to my boss. That's no negative reflection on him; he's not really a hacker in any language and doesn't know what's possible (or easy).

    ++ for the Arthur C. Clarke reference! (even if unintentional) :)


    undef $lunches{free}