Wednesday, October 31, 2007

All I want for Christmas is . . .

Gift cards.

I'm telling you, this year it's gonna be gift cards, period.

Every year, I go through the same nonsense with about half a dozen people. They ask me what I want for Christmas. Then there's the whole ridiculous back and forth-- I tell them there's nothing really that I need urgently, they nag me for a list. I give them a list, and they lose it or don't understand how to go about getting it (some of these people just aren't online kind of people, ok?!) and the next thing I know I wind up with a pair of bedroom slippers that resemble elephants . . . that is, if elephants had gray fur and black, beady, rat-like eyes.

It's even worse in reverse. I get a list, do my research with the consumer review websites to get the best model and deal, bust my ass to get people what they told me they want . . . and some of the gifts never get used.

Sigh. It's enough to make me convert to Judiasm some times. Or Jehovah's witness maybe.

So, this year, I'm going to insist on Borders gift cards only. They are only about as ubiquitous as Starbucks, so even the "I don't do online" crowd should be able to get them. End of discussion.

Monday, October 29, 2007

What does it take to get a good night's sleep?

I've got the new bed. I've got the new pillow. I've even got the new sheets.

And I've got a crazy neighbor who apparently likes to rake up leaves at 4:30 in the AM.

Who rakes leaves at 4:30 in the morning? How can you even see to rake leaves at 4:30 in the morning? I thought about going outside to see which one of my neighbors it was, but it dawned on me, someone who is capable of raking leaves at 4:30 in the morning is quite capable of all kinds of crazy.

Wednesday, October 24, 2007

Don't complain; we need the rain

It's been raining for most of the day. Considering that we've been in a nasty drought, this is a good thing. Still, I can't help but feel that the weather is having an impact on my mood.

Or maybe it's the fact that I get invited to meetings, asked for my input, and then am completely ignored?

Or maybe it's the fact that my neighbor promised he would clean up that oil he spilled weeks ago, but never got around to it-- so I've just tracked motor oil into my house and on my carpet?

It's time to focus on the positive.

(crickets chirping)

Um . . . I managed to get ColdFusion communicating with the mySQL server on my iBook finally.

(crickets stop for a moment, resume chirping)

I added alternate stylesheets from the W3C site to this blog, along with some Javascript "style switcher" code, and my blog still validates as XHTML 1.0 Transitional. (I'm hoping I can use the alternate stylesheets as a demonstration to some of my co-workers to persuade them of the benefits of non-presentational HTML and CSS).

(crickets jump away, laughing)

Just keep reminding myself: "We need the rain."

Perfectionism (or "In the land of the blind, the one-eyed man is king")

Recently, one of my friends called me a perfectionist.

(Relax, I wasn't offended-- I just didn't have anything worthwhile enough with which to reply.)

I don't consider myself a perfectionist. I'm sure all my co-workers are probably rolling their eyes and laughing hysterically right now. But seriously, I'm not a perfectionist. I make too many errors and am too prolific at work to be a perfectionist.

I do, however, think that you should make a real honest effort to do things properly as much as humanly possible. In certain fields, like web developing, this isn't an unreasonable expectation. There are tools you can run on your web pages to make sure the code is valid.

It's not my fault if no one else in my area bothers to run their code through a validator-- or still uses nested tables to control their layouts because they can't be bothered to learn about div tags and CSS.

Sunday, October 21, 2007

Closed Captioning brought to you by . . .

Ever since I got my DVR, I've become a big fan of BBC America. Doctor Who, Torchwood, etc. What's not to like? The problem is that sometimes I don't quite catch all the words-- after all, they are speaking British. ;)

The BBC America PSA's suggest, in a way that is both helpful and cheeky, using closed caption to help decode the various dialects and accents. It sounds so simple, doesn't it? Invoke the closed caption option on my TV, leaving the audio on, and all's well.

Except, ever since I had to redo the connection between my TV, DVD player and the DVR unit, I've never been able to get the closed captioning on my television to work properly. I think part of the problem is that I've got the audio portion of things routed through my DVD player's Dolby 5.1 speaker system rather than through the TV-- and the other part is that you need to be able to drill down in the TV menu settings to toggle the caption feature, but the "universal" remote doesn't seem to let me get into the TV menu. Or, if it does, I haven't found out how to do it with this particular remote.

The good news is that I have found a pretty slick workaround. One of the caption options on my television is "Activate CC w Mute"-- in other words, whenever the TV gets muted, the closed captioning comes on. There is actually a mute button on my universal remote, and that does "talk" to the TV set. It doesn't actually do anything, because remember that the sound is channeled through my DVD player now. So, now, whenever I hit the mute button on my universal remote, I get closed captioning.

Not too shabby, I guess. Although I have to admit it is a rather a clumsy workaround in terms of the label being misleading and all.

Saturday, October 20, 2007

AJAX? It's complete

Just finished my first real AJAX app. I can't exactly link to it because it's all contained on my iBook, unfortunately. This is the first real exercise I've done after the class, because I'm trying to reinforce what I've picked up.

There's plenty of room for improvement, obviously, but it's at least a fully functional AJAX app and it works! :)

Part of me wants to go out and celebrate this accomplishment- and the other 99% of me wants to crawl under the sheets and go to sleep.

G'night all.

Everything you "need" to know to create Web 2.0 web sites

I'm sitting here, reviewing in my head all the different pieces and parts of technology that I've used to put together my little Ajax application.
  1. mySQL database (to store and manage the data)
  2. Structured Query Language (to get info out of the database)
  3. Apache (the web server program that responds to client requests for pages)
  4. Mac OS X (or OS for the computer running the database, web server, etc.)
  5. php (so the web server and database can talk to each other)
  6. HTML & CSS (the skeleton of the web page that folks see in their browsers)
  7. Javascript (for the dynamic interaction of AJAX)
That's a long list! Granted, I'm not saying you have to be entirely fluent with every single feature of every piece of technology on that list-- some folks would argue that by getting a proper web host that you can scratch some items, like items 1, 3 and 4, off your list entirely.
However, I believe you'll want a basic sense of familiarity so you can troubleshoot when things are not working properly or get better results when calling your web host for technical support.

AJAX, c'ntd.

Since I spent all of Wed. and Thurs. evenings working on my little Ajax problem, I decided I was going to take the night off and go out for a bit. Naturally, this is when it decided to rain. It didn't just rain, though-- it rained sideways because of the heavy winds.

So, I wound up staying home and eventually got back to the ajax project. The back end piece is all done. I've got the mySQL database set up, with a lame little database table of red wines and associated info in it. I've got php talking to it, so my little web app can query the database and show results. It even sends the results back in XML.

Now that the back end is complete, it was time to focus on the client side of things. I'd been reading good things about some of the extra features of AJAX frameworks (e.g. Prototype and Dojo), so rather than go with the bare bones implementation of AJAX code I got from the class, I decided to download and use the Prototype framework instead. Nothing against Dojo, it's just that more third party tools seemed to use Prototype than Dojo, such as OpenRico.

"Installing" Prototype on my web page (more like including it, actually) was pretty straightforward and easy. I had to modify my thinking a bit from what I learned and did in the actual class (e.g. creating the object "up front" and then passing info along at a later point), but I wound up being able to send my request via Javascript in the background, getting an XML response, and then displaying it in a Javascript alert on the client. I still need to write some Javascript (wines.js) to handle the unique code for this application, but I'm almost done with it. Of course, I've saved the most difficult (for me, that is) part for last-- using Javascript to manipulate the web browser's Document Object Model, aka DOM, for short.

I've always hated working with the DOM. I think a lot of my frustration has been that different browsers had different models, and you had to check each one you looked at to figure out how to work it properly. The good news is that the models have moved closer to being standard, and with the getElementById function in Javascript I no longer have to worry as much about where in the tree a particular element lies.

Friday, October 19, 2007

Is It AJAX yet?

Yes, the AJAX saga continues. ;)

I'd spent the majority of Wednesday night getting php to talk to mySQL, so last night I'd finally get to work on my AJAX material. Or so I thought.

My approach was going to be:
  1. start off with a simple php application (a search form page and a results page).
  2. convert simple php application into an AJAX version.
Turns out, simple is a relative term. I'm tempted to make some generalized statement like, "PHP is harder than ColdFusion," except I think it's more of a case of what one is already familiar with versus working in unknown territory.

It took all night, but I finally have a simple php application. The first page has a drop down list of various red wines-- dynamically generated from a query in my database, thank you very much. The user selects one of the wines from the drop down list and hits the submit button, and then they are taken to the "results" page where they can see all the relevant info about the wine they've chosen (temperature, body, taste, etc.)

This morning, I just happened to wake up early and I decided to take a stab at converting the app over to AJAX. I wound up saving copies of my pages before I did any work, just in case I screwed up something. I managed to strip the HTML out of the results page, and converted it so it returns only the bare minimum response in valid XML. I'm on my way-- but, of course, the alarm clock just went off, so I've run out of time to work on this for now.

It's not the darn AJAX itself that's taking so long, it's all the prep work leading up to working on it. It's mildly frustrating, but I guess I'm learning some things out of this.

Wednesday, October 17, 2007

mySQL, php, and agony

I recently completed an AJAX course. Naturally, I wanted to come home and try out the things I had learned, to reinforce them.

Oh. My. God.

I already had mySQL (a database system) installed on my iBook from months ago, and php (a web programming language that specializes in connecting databases and web pages) was also installed a long time ago . . . but I'd never tried to actually connect them before.

When I was 8, I rode a tobaggon down a steep hill and slammed sideways into a tree. It was one of the more painful experiences of my life.

Wrestling with my php code and getting it to successfully communicating with the mySQL database was slightly less painful than that, but it lasted much longer.

I googled every error message I received. I tried ext/mysql and ext/mysqli. I recreated my database user. After spending nearly the entire evening trying and failing, I discovered that apparently if the root user in mySQL has a password, it will not allow the connection to work. It made no sense, but I cleared the password, and sure enough, it worked.

Too bad it's bed time and too late for me to do any of the actual Ajax material I learned. :(

Tuesday, October 9, 2007

Live Docs are great

This morning, I was trying to export a series of Fireworks graphics as a Flash swf file. It should have been straight-forward, but for some crazy reason the documentation didn't match what I was seeing in the dialog box.

It turns out that Step #1 was totally wrong, and had me looking in the entirely wrong menu!

Fortunately, the product documentation is also replicated on the web site; it also allows customers to comment on the documentation's accuracy. That's how I found out I needed to look at File -> Save As instead of File -> Export.

Monday, October 8, 2007

Sunday, October 7, 2007

Poem fragment ISO a title

everybody keeps a list
of promises kept or broken;
we use it to judge others
while forgetting vows we've spoken.

Tuesday, October 2, 2007

What a difference 365 days makes. (NOT???)

It's been a surreal day.

I'm rapidly approaching my one year anniversary in the new job. All in all, I think it has been a positive change. More money, nice people to work with and for, and fewer "no win" situations to get mired down.

The funny part is that I've just been asked to sit on a committee to address a problem that I tried to raise almost precisely one year ago. At the time, I was pretty much told (albeit politely) to go away and be quiet. Now, all of the sudden, it's a major priority.

Now, I could be a dick about this-- say I told you so, gloat about how great a prognosticator I am for seeing this a year ahead of anyone else, act like a diva and refuse to help, etc. But that would be stupid, childish and unprofessional. Don't get me wrong, there's a small piece of my ego that would enjoy that, but the amount of time and energy required for that sort of self-indulgent pettiness and vindictiveness is so draining. I'd rather spend that time and energy on something like building a Linux server with a RAID array and a backup package like Amanda for my home network. (O'Reilly has an excellent book on Backup & Recovery that I've been perusing for the past few days, in case that seemed rather random.)

The sad and surprising part, however, is that I used to care passionately about this particular issue. I stayed up late nights, figuring out technological solutions to this particular problem. I even worked out alternative architectures to address objections that I anticipated.

Now, when I am theoretically in a position to actually advocate for the change I suggested a year ago, I find my overwhelming emotion is-- apathy. I have no idea where my notes from a year ago are, and I feel no overwhelming sense of urgency to find them. It is extremely unlikely that I will be allowed to do the coding for this particular solution, and even if I did, it's not like I have access to the kind of server and technology I would need in order to make this a reality.

This should bother me. Or maybe it really shouldn't.