20 January 2007
Hillary Throws Her Hat In The Ring
Yow!. The right-wing talk-radio newspeakers have all but destroyed any chance of meaningful consideration of Senator Clinton by a huge segment of our population. I'm not sold on the Honorable Senator from the (truly) Great State of New York, but she deserves a fair look.
Rosemary's Perl
*nix like environments are a funny thing. There are different tools (really, languages) for doing different things, and which one you reach for differs by context. One of the things that I never seem to learn is that just about anything I write is going to grow, eventually, and I should just start with SCSH and be done with it. But, no, BASH it is. Anyway, tucked away at the top of a growing file deployment script is
and, later
I have just birthed a little Perl demon baby...
function die () {
echo $@
exit 1
}
and, later
test -d $ns || die "Directory $ns does not exist."
I have just birthed a little Perl demon baby...
18 January 2007
Does bracket alignment matter?
I'm in the throes of trying to get some code out and it looks to be an anti-Massonian proposition. Along with other design and coding duties, I'm promulgating formal coding standards, project architecture, et cetera ad infinitum. One of the things that there seems to be near uniform consensus among our programming group is that brackets should align, in all contexts, thus:
For a while, I was fairly ambivalent about this, but GNU did give me the heebie jeebies:
C++ has put me over the edge in the other direction with namespaces. I simply cannot abide:
Unanimous vote minus one for this. I cannot put my finger on the source of my loathing, and why I find:
soooooo much less offensive, and
now strangely compelling when at one time I didn't give a rat's ass. I never noticed it before, because I always did namespace brackets on the same line, regardless of the other ways we were doing functions and control structures. Even the GNU stuff was shudder and get on with it. Now I care, and I don't know why. Back at it.
if (! brackets_aligned_p)
{
go_apeshit_ballistic();
}
For a while, I was fairly ambivalent about this, but GNU did give me the heebie jeebies:
if (brackets_gnu_aligned_p)
{
all_hail_emacs();
}
C++ has put me over the edge in the other direction with namespaces. I simply cannot abide:
namespace foo
{
namespace bar
{
// your nested namespace code here
class CodeBastard : public CynicalBastard
{
};
} // end namespace bar
// end namespace foo
Unanimous vote minus one for this. I cannot put my finger on the source of my loathing, and why I find:
namespace foo {
namespace bar {
// your nested namespace code here
class CodeBastard : public CynicalBastard
{
};
} // end namespace bar
// end namespace foo
soooooo much less offensive, and
namespace foo {
namespace bar {
// your nested namespace code here
class CodeBastard : public CynicalBastard {
};
} // end namespace bar
// end namespace foo
now strangely compelling when at one time I didn't give a rat's ass. I never noticed it before, because I always did namespace brackets on the same line, regardless of the other ways we were doing functions and control structures. Even the GNU stuff was shudder and get on with it. Now I care, and I don't know why. Back at it.
Labels:
c++,
programming
10 January 2007
Ghostscript with X11 Device on Cygwin
Note to self:
(setq ps-run-x '("/usr/X11R6/bin/gs" <args>)). Something like that. Get all of my emacs stuff back into subversion.
Student of Strategy
Lately, I've been on a student of strategy kick. It's a recurring theme, wherein I dust off The Book of Five Rings and The Art of War and see if they're applicable to anything I have to deal with.
Turns out, they are, and I'll distill it into a bon mot: Tactics without strategy is tomfoolery.
Turns out, they are, and I'll distill it into a bon mot: Tactics without strategy is tomfoolery.
20 December 2006
Surge!
They're surgin'! Oh, ya, you betcha! Three words Blaze of Glory. As of posting the fine video. It's strangely appropriate... sadly.
02 December 2006
The Data Are Not The Map
There's much more to a map than the data used to create it. I'd argue, knowing what to elide is what makes a great cartographer, and those maps with nothing left to remove are the best (and beautiful) maps.
27 October 2006
Nerd Tongue Twister
How many bits would an eight bit byte bite if an eight bit byte could bite?
As of writing a Google search for
As of writing a Google search for
byte-could-bite came up with zilch, leading me to believe that this twist on the venerable woodchuck twister chucks wood.
13 October 2006
Dadgummit! Distracted Again!
Python Challenge. Don't ask how I found it. I guess the Python is there because it's Python hackers who put it together? I don't know... I just found it. I could be the Emacs challenge, because I hit upon one solution accidentially trying to go to the beginning of a string... during a Slime session with CLisp as the inferior lisp...
12 October 2006
Ah Emacs
I love emacs. It never ceases to amaze me. It's the distillation of people-centuries worth of hacker wisdom, and if it doesn't do something you think that it *should*, chances are you just haven't uncovered yet. I was reading a manual entry, which made reference to a file in etc. I was wondering if there was a key binding to open the file at the point. Hitting return answered that question in the affirmative...
C-u 100 M-x all-hail-emacs
C-u 100 M-x all-hail-emacs
11 October 2006
Google Code Search: Yikes!
As of posting, the top three hits for
lang:c kludge are in openssl code! Zoiks! No hits for anything for ocaml, caml, or ml. SCSH come in high for generic scheme searches. Cool beans!
07 October 2006
Interview with Steve Wozniak
This interview with Steve Wozniak is a great read. In this day of the swashbucking privateers of capitalism, this advice seems refreshing:
Wozniak: First of all, try to have the highest of ethics and to be open and truthful about things, not hiding. If you have to hide something for company reasons, at least explain what you're doing. Don't mislead people. Know in your heart that you are a good person with good goals because that will carry over to your own self-confidence and your belief in your engineering abilities. Always seek excellence: make your product better than the average person would.
If you can just quickly whip something out and it's done, maybe it's time, once in a while, to think and think and think, "can I make it better than it is, a little superior?" What it does is not necessarily make the product better in the end, but it brings you closer to the product and your own head understands it better. Your neurons have gone through the code you wrote, or the circuits you designed, have gone through it more times, and it's just a little more solidly in your head and once in a while you'll wake up and say, "Oh my God, I just realized a bug that's in there, something I hadn't thought of."
06 October 2006
Keyboard Shortcuts in Gmail
If you have a gmail account, turn on your keyboard shortcuts right away.
05 October 2006
Word Annoyances
Word, I'm sure, is a fine product for many folks. Commenting and revision tracking is cool enough. However, it has some quirks that drive me bonkers. What's doubly troubling is that I've as of yet been able to find any way to circumvent said behavior by thinking.
I'm in the throes of writing requirements for some software we're going to be pushing out. We've got some boilerplate subsections for features, and it's a hassle to write the titles and set them to their proper formatting, etc. I'm sure that there is a quick and easy method for writing a macro to insert this very stuff, but wouldn't it be easier to just copy-and-paste the boilerplate? You would think so (in the near term).
But no.
For some reason, the numbering on the last subsection would disappear after the copy and paste. If you copy that last section and pasted it after its parent section, you'd get numbers. Moreover, there wasn't any way to get that pasted text (AFAICT) to have the proper number. That is, I could remove the formatting, then reset the formatting and no number. There is no way to meaningfully get at the numbering interface with a few point and clicks. Fug.
The fix was intuitively obvious. I copied the subsection preceding the troublesome bit and pasted it after the same. I renamed the pasted section to that of the troublesome one and deleted Nemesis's text. It worked. Feh.
Don't even get me started on "page setup" going AWOL...
I'm in the throes of writing requirements for some software we're going to be pushing out. We've got some boilerplate subsections for features, and it's a hassle to write the titles and set them to their proper formatting, etc. I'm sure that there is a quick and easy method for writing a macro to insert this very stuff, but wouldn't it be easier to just copy-and-paste the boilerplate? You would think so (in the near term).
But no.
For some reason, the numbering on the last subsection would disappear after the copy and paste. If you copy that last section and pasted it after its parent section, you'd get numbers. Moreover, there wasn't any way to get that pasted text (AFAICT) to have the proper number. That is, I could remove the formatting, then reset the formatting and no number. There is no way to meaningfully get at the numbering interface with a few point and clicks. Fug.
The fix was intuitively obvious. I copied the subsection preceding the troublesome bit and pasted it after the same. I renamed the pasted section to that of the troublesome one and deleted Nemesis's text. It worked. Feh.
Don't even get me started on "page setup" going AWOL...
Subscribe to:
Posts (Atom)