LOL – someone just said very loudly from across the room “Come on, you piece of shit!”

My dear People. My dear Bagginses and Boffins, and my dear Tooks and Brandybucks, and Grubbs, and Chubbs, and Burrowses, and Hornblowers, and Bolgers, Bracegirdles, Goodbodies, Brockhouses and Proudfoots. Also my good Sackville Bagginses that I welcome back at last to Bag End. Today is my one hundred and eleventh birthday: I am eleventy-one today!” — J. R. R. Tolkien

When I have coffee, I feel much better for a while.  Then I feel nasty and get paranoid.

My Indian coworker lives in India.  (He has a Ph.D in comp. sci. from the University of New Delhi) But he lives in an American-style subdivision, drives an American car, listens to American satellite radio and watches American satellite TV.  There’s a Starbucks down the block from him and he enjoys all kinds of coffee (Indian, Turkish, Greek, American, French Press, espresso, etc.)

Since he’s spent a lot of time in the U.S. for business, he often gripes about what he can’t get when he visits us, Mainly some of the curry and squash dishes he’s used to getting at McDonald’s.  Being Hindu, he’s not about to order a burger.

He says that, like in China, all men in India smoke.  But the cigarettes are different – they’re not fat and white but skinny and dark brown and the tobacco is often flavored with apple, cherry, almond, clove, or cinnamon.  But his wife doesn’t like him smoking in the house so she makes him go out to the garage to smoke.

LOL – I just mailed myself 44 core dumps in unencoded blob form.  I now have 44 messages full of unreadable ASCII runes.

Had I bothered to (a) uuencode or (b) readelf -a && strings, I might have been able to make good use of the info.

(BTW, to grovel over a core dump, I usually use a twofold approach:  do a readelf -a to get the offsets of the relevant data sections and then use a hex editor to jump to those offsets and read any interesting data there.  Since 0.0% of the binaries on any of my production machines have debugging symbols, the core dumps usually yield little more relevant info than a stack trace would.)

I tend to follow the British pronunciation of terms like char, soc, and multi-element names.  Except in UNIX paths where I don’t say the slash.  (/usr/bin is “user bin” to me).  I always say slashes in URLS, though.

Get copy of _Kill_Duck_Before_Serving_.

if (argc > 1 && strcmp(argv[1], "-advice") == 0) {
 printf("Don't Panic!\n");

— Arnold Robbins in the LJ of February ’95, describing RCS

The best descriptive form for what our dev shop does: “Grunting out steaming piles of code.”

Another reason C and C++ are more flexible than Java is that in C and C++, you can create anonymous blocks of code (by surrounding it with curly braces) to push down to a lower scope level when needed. You can also use continue and break statements as if you were in a loop (although the anonymous block construct always breaks at the end instead of continuing like a real loop would). Java doesn’t have these. Anonymous blocks with continue and break are very handy for replacing GOTOs in C.

The Right Way to integrate two similar algorithms is to put the algorithm code in its own procedure and call it with one or more arguments that speicify the mode of operation. C and C++ make this easy with builtin macro expansion. Java does not do macro expansion. The only case where one may actually do the Right Thing is where the algorithm is complete and returns a discrete value in all cases. In addition, using this technique in Java for small algorithms (say, a few lines of code), may actually increase code size since you end up adding more code to handle the arguments that specify the mode of operation. Gripe #2 about Java’s lack of macro expansion is that constructors and static initializer blocks can’t call out to member functions, meaning you end up case and pasting large blocks of code between similar constructors. The answer to the last one is to use private or protected functions since constructors can call out to those. I don’t know if static initializer blocks can call out, though.

It would be cool to recreate SGI/Motif’s drop pockets in Java Swing.


, , , ,

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: