I ran the following program:
%
/usr/bin/perl /usr/share/dict/words
Semicolon seems to be missing at/usr/share/dict/words line 56367.
Semicolon seems to be missing at/usr/share/dict/words line 58414.
Semicolon seems to be missing at/usr/share/dict/words line 72599.
Semicolon seems to be missing at/usr/share/dict/words line 104537.
Bareword found where operator expected at/usr/share/dict/words line 109459, near "Maarten"
(Might be a runaway multi-line MM string starting on line 109455)
Semicolon seems to be missing at/usr/share/dict/words line 124219.
Semicolon seems to be missing at/usr/share/dict/words line 136839.
Bareword found where operator expected at/usr/share/dict/words line 161158, near "qere"
(Might be a runaway multi-line qq string starting on line 161157)
Semicolon seems to be missing at/usr/share/dict/words line 167505.
Bareword found where operator expected at/usr/share/dict/words line 171985, near "sab"
(Might be a runaway multi-line ss string starting on line 171980)
syntax error at/usr/share/dict/words line 4650, near "Alaric
alarm
"
No such class Mya at/usr/share/dict/words line 121337, near "muzzy
Mwa
my
Mya"
"no" not allowed in expression at/usr/share/dict/words line 124778, at end of line
No such class Ouranos at/usr/share/dict/words line 133287, near "ouphe
ouphish
our
Ouranos"
Illegal declaration of subroutine main::subabbot at/usr/share/dict/words line 191503.
.. and wondered why I was getting such perplexing errors. Then I realised that I had omitted the name of the script, and was thus executing the word list file.
This reminds me of the time at school when I tried to compile a COBOL program with a Pascal compiler. I got a thick stack of fan-fold back from the computer room. Page after page of errors. It did nearly manage to parse one line correctly, when it got to
PROCEDURE DIVISION
... but apart from that it recorded several thousand syntax errors. I like it when programs march on stubbornly in the face of impossible odds. It makes me feel smarter than them.
Clearing out my inbox from the Christmas break, I ran across some virus backscatter with a most entertaining subject:
MailMarshal suspects that this message contains worms
I'm wondering if I should crush a couple of worm tablets and sprinkle the powder onto my keyboard. You just never know.
It's time for my biannual journal entry!
Well heh, this makes me laugh. Seems like Xah Lee is now trolling the Pythoneers. I don't know if XL still trolls in Perl newsgroups...
I suppose this is a sign of a language's maturity. Godzilla come back! All is forgiven!
We were clowning around of the French Perl Mongers mailing list the other day. Someone moaned about the latest Python snipe (actually I think I saw this some time ago, but anyway): Perl Coder.
So in the spirit of that and a tweak from rafael I came up with:
perl -i -e 's/^\s+//' *.py
Compact and devastating. Well, I thought it was funny
Big problem: which queue to choose? Having learnt about Queuing Theory at school, and knowing that single queue-multiple consumer is as efficient as it gets, it's always an agonizing decision. You have to balance a number of factors: how many people in the queue, how many items do people want to buy, do they look impatient or vagued out. It's better to be behind a person buying 10 of one thing, than one item of ten different things. And, although it pains me to admit it, old people are Bad News. Statistically, you'll waste 30 seconds to five minutes with them in front of you.
So I was pondering this the other day, and reflecting on my worldview, how I tend to algorithmatise things (figuring out the shortest path between the four shops I need to go to, establishing contigency plans in case a shop doesn't have a product I need, that sort of stuff. When house-cleaning I try to keep my hands full. I hate going into room A to fetch something for room B, and realising there was something in room B which should be tidied away in room A). Geeking out, basically.
And as I stood there ruminating on this, I was idly watching the woman at the front of the line, and became more and more alarmed. She was just stacking up the products that the cashier swiped...but not putting them into bags. I couldn't figure out what she was doing, but figured it was bad news for me. And on and on it went, until the cashier had checked out every last item. Then she handed over her credit card, had it swiped, punched in her pin, and only once she had received her docket did she begin to bag up the stuff she'd bought. And I thought "You f5cking moron: can't you deal with asynchronous events?" Because the cashier couldn't start checking out the items of the next person until she'd cleared the decks. Which took a non-trivial amount of time, during which no other work could be done.
Meantime I note that the people who were at the ends of the other queues are now close to being served, and I've still got two people in front of me. But I'm in too deep at this point to bear the cost of cutting my losses and requeuing on another line.
The next person went through without a hitch: a few items, had cash ready, out straight away.
Then the person in front of me went through. Seemed to be okay: started bagging up the goods as soon as they came through, but she had a fair number of things to buy. Then it turns out that she has a Method. All the fruit goes together, the stuff that requires Refrigeration goes together, tins kept apart from packets and so on. And the cashier is done quickly and announces the price. But does she do anything? Noooooooooo! She just keeps putting stuff in bags. And the cashier, who is polite (the Customer is always Right and all that) says nothing.
At this point I just take a deep breath and resign myself. The people who were at the ends of the other queues are all long since gone. At times like this I can't help thinking that a lot of what we learn in Computer Science is applicable to the Real World. And one of the cardinal sins is stalling the pipeline. When you have people queued up to do something, you want to get in and get out as fast as possible, just like an instruction on a CPU. Because wait states are just time lost. Gone, never to come back.
I really, really hate when that happens.
Here is a list of Do's and Don'ts for enlightened program development.
Man I hate when that happens.
For Christmas, I got a kidney stone. Eeeeeeew, it really hurt, like, the pain was so bad that I was vomiting spontaneously. Not fun.
But then I got better and back to work, with an inbox a mile look. Various things at work were broken and I had to get them up to speed. In the past 10 days I have