Apparently I'm not the only one with brace issues, but now they've come back to bite me.

A while ago I was showing Berta some code I had written. I forget what it was. Anyway, she commented as she had int he past that she didn't like my style of indentation and brace use. Some will be surprised/enlightened to find out that this is one of the few things that Berta and I ever argue about. Anyway, she was convinced that her way was good, and I liked my way and that was that. Well, in a sudden urge to get myself in line with what seemed like the rest of the world (for no particular reason... ahem), I decided to switch everything over to the way that Berta did it, and now I'm thinking to regret it.

For the record, my original style of coding is called K&R, after book authors Kernighan & Ritchie who publish in this style. It looks like this:

if (test) {   do_something(); }

Berta's style is called Allman, and is named for similar reasons. It also looks identical to the code produced by my C++ teacher at WCU:
if (test) {   do_something(); }

Now, if you're not a programmer, you don't see the difference other than where a brace (not a curly bracket, a brace) is positioned. But the difference in readability in more complex code is profound, I assure you.

Anyhow, I switched over to Allman, and now I find myself writing code in PHP for WordPress. It turns out that there is a published standard for code written in PHP (like there is in many languages, just not the ones with the most controversy) and it is... K&R.

K&R is used throughout the PHP world. It is used by the PEAR authors, whose code is routinely folded into the core of php as libraries. It is used by the WordPress authors. Everybody uses it, even I used to - but now I'm not.

So I've written about 50k of code in Allman, and just learned that K&R is the standard. Not to mention that I submitted a bunch of stuff for inclusion in CVS that now may be rejected because I listened to Berta's crazy-talk. I told you this method was good. <sigh>

If anyone has a tool that'll convert my non-standard code from Allman to K&R so I can fall back into my good habits, please let me know.

I got a Gmail account today. Everybody else has one, so why shouldn't I? Of course, picking a name that hasn't already been taken was a challenge. The "ringmaster" account was taken, and I really don't care to use my real name as an email address. I spent some time putting in some names that I've used for email in the past, along with some new ones.

  • "Reorx"- My XBox gamertag, but too short.
  • "Charon"-From my BBS days, but taken.
  • "s247lo"-From my BBS days, but impossible for anyone else to remember.
  • "Kushiel"-Not taken, but the mythology is too small.
  • "dissonance"-Not taken, but hard to hear the spelling when spoken.

In the end, I chose something clever for my epithet. I'm sure that with a little thought you can guess what it is, since it's probably the most clever word in this post that I could have used.

This Gmail address won't replace the normal email accounts. I'm not exactly sure why I wanted one. Maybe for info highway cred? You have to admit, the email address is cool.

I started up Babylon this morning to get the definition of a word, and it displayed this huge advertisement for the newest version, 5.0. But my question is, Why Upgrade?

Babylon is a very cool tool. I use it all the time. With Babylon running in the tray, you hold down the control key and right-click on any word on the screen. Any word, even in window title bars or graphics. Babylon uses some kind of OCR algorithm to read the word, then fetches the definition from its dictionary.

Well, it's nice to have some translation features, but they are really not that handy. What I really want it to do is four things:

  1. Look up the definition of a word in a dictionary and display it
  2. Quickly tell me whether the word is spelled correctly.
  3. Search for the word in alternative reference resources (like the jargon file) and provide those definitions
  4. Show links (and URLs) to the first few Google results for the word

The first feature can be provided quite nicely through a public resource like Wikipedia. Since I'm always online when the computer is on, there is no reason not to use Wikipedia (or even some other online resource, like Google via the define:word operator, or dictionary.com) to give me definitions.

The second feature can be embedded with a dictionary file. The fact that Babylon takes so. freaking. long. to return a spelling result really bugs me.

The third feature should be set by the user, but with some pre-defined glossaries available. The Jargon file is a good resource. Communities with a special lexicon can create their own glossary for their special terms and publish is, just like Babylon does. Except this should work faster.

The fourth feature is something Babylon does, but poorly, much like all of its other features. It should display the search results inline by default, along with the URL and a link to the Google cache. A link at the bottom (after maybe four Google entries) should link to the full Google page of search results.

The fact that they want $59 for a new lifetime subscription is obviously irritating me. This software should be freeware. If anyone out there knows of an OCR VCL package for Delphi, sling it my way and we'll talk about an open-source Babylon. The OCR part is the only thing preventing me from having done this ages ago.

It's got to be the stupidest name I've heard for a thing, but I've finally broken down and installed one.

Basically, a Wiki is a piece of software that allows you to create and edit web pages in a most free-form manner. In fact, the design was intended such that anyone could come along and make changes to any page that they wanted and add any page that they thought was needed.

At first this idea might sound crazy, but it turns out that it's very good for creating collaborative documentation online. For example, one of the best resources on the net right now is the Wikipedia, which is a fantastic complete user-written encyclopedia. Amazing.

Anyhow, I'm drafting my astronomy book in this newly installed Wiki. As soon as I craft a good measure of what I'm thinking of as "the introduction", I'll post a link and you can review it. I may even open the Wiki and let you edit it live, online!

The server was hacked sometime early this morning. I'm not sure exactly when, but I think it was between 8 and 9 am EDT. The only thing changed was teh blog breakdown page. I'm not sure if it was deliberate or an unfortunately unprevented accident.

I have since disabled WebDAV for the whole server, and enabled the integrated Windows 2003 firewall. I don't know if this will prevent the problem because I'm still not quite sure what caused it.

This post is password-protected so that nobody can read it and get the idea to start messing around trying to deliberately hack the server, just in case this was somehow accidental and I haven't effectively plugged the hole.