Let’s try this again…

As is rather obvious from the contents of the blog, the idea of writing about my experiences on the new job kind of fell through — mostly from a lack of anything of particular interest and insight to say. I think I’ll be posting some technical tidbits now, but probably more links than content.

Anyway, I’ve been thinking about setting up a website when I get serious about sending my work out for publication. As part of that, I talked with my friend Andrew about what would be of interest on such a site apart from the typical bibliographic information. He had a good point that getting the author’s insight into their writing could be a draw. I know that’s been the case for me with Neil Gaiman’s blog, so I thought that’d be a good idea to try on for size.

My thought, then, is to try to write regularly about the process of actually creating a novel. Plenty of people have done it, but more people haven’t. I know I’m always curious what it’s like for my favorite authors — how the work, what they struggled with, even what process they use at the nitty-gritty level.

We’ll see how it goes.

New Job!

In an earlier post, I mentioned a change that was coming up. Well, the cat is out of the bag — I’m changing jobs. This is the first move I’ve made since graduating from college, so it’s been quite a big deal. I’m going to be working for WebMD in down-town Portland. Much closer to my home than my old job out in Beaverton.

Additionally, it’s going to be almost entirely ASP.NET development, as opposed to the MFC/COM/VB6 client application stuff I’ve been doing for the past few years. It will also be an opportunity to grow in my database knowledge, since previously I’ve had only limited exposure to a full database system like SQL Server.

Anyway, not sure exactly what it’ll be like or where it’ll lead, but it should provide some interesting material to write about. I’m planning to jot down my experiences making the transition from desktop to web, with an emphasis on interesting tidbits I learn along the way.

ClearType

Running on Windows XP? Have you turned on ClearType? Don’t know what that is… well, it’s an amazing feature that smooths out that appearance of text on the screen. I heard about it via Channel9, and decided to give it a shot. I’ve recently gotten glasses, and so have been much more acutely aware of what I’m seeing and the strain computer monitors put on your eyes.

At first it looked weird — the fonts just didn’t look right to me. I thought, “I’m never going to get used to this,” but I decided to stick it out. It was a good choice. After about half an hour, I didn’t even notice anymore.

The real turning point came a couple weeks later when I recommended turning ClearType on to my dad. While I was at the page, I decided to toggle it off and see the difference. Night and day. At this point I’m sold.

Anyway, the link: http://www.microsoft.com/typography/ClearType/tuner/Step1.aspx

It’ll prompt to install an ActiveX control… your eyes will thank you if you do!

Tools I can’t live without

In preparation for moving machines (more on that later) here’s a list of the tools that I’m going to setup before I can really get any work done.

Other useful bits

Pretty sweet how I’ll only have to pay for one of them (Beyond Compare… and I’m happy to pay it, I love that app!)

Review : A Song for Arbonne

Recently finished A Song for Arbonne. It had been a while since I’d read a good fantasy novel, so this was actually a treat. Also, I’ve been quite impressed with Guy Gavriel Kay as an author — he’s one of the fantasy authors that I’ve heard rumored before as being a decent writer, but that I hadn’t given the time to yet. I’m glad I did, and it won’t be the last I read of him.

I’m not too keen on book reviews that recount the storyline. Since I’m blogging more about writing than reading, I’m gonna dig into what I learned from the book rather than details of what happens. If you want to know what the book’s about, well, go read it.

The book was recommended to me on the basis of how Kay weaves in the back-story into what’s happening in the present day. After reading it, I have to agree that he does it very effectively. It’s amazing how little actual page-count is needed to build up a whole history in the reader’s mind if it’s done well.

Some points to remember about backstory:

  • If the backstory doesn’t have direct impact on the present story, why are you telling it? This isn’t to say that background doesn’t have a place, but if you can’t explain how the information is necessary it probably isn’t.
  • Less is more. Probably one of the best effects in Song for Arbonne from the backstory is the desire to know more about it. The bits we receive are tantalizing, and rather than dolling out the history in big chunks he builds it up a bit at a time, sucking the reader along the whole way.
  • Emotion is key to engaging backstory… just like any other story. The backstory in Arbonne is charged with all sorts of different emotions — love, desire, hatred. The intensity of the characters’ past is part of what makes it interesting.

Interesting happenings

Had two things happen over the weekend that kind of struck me odd — the kind of little tidbit that I’d love to work into a story somewhere. Nothing earth-shattering, interesting.

We were at a restaurant having brunch on Sunday. The room’s full of chatter, people enjoying themselves, their food and/or waiting for their food. Suddenly, the power went out. Tall windows let in quite a bit of light from outside, but all conversation immediately stopped for at least ten seconds. It was kind of eerie in that interval while everyone sorted out what was going on. Then a waiter called out to the room in a loud voice for everyone to carry on, and that was that. Conversation resumed.

Second occurance was actually this morning as I drove to work. Paused waiting for a light on the St. Johns bridge, I noticed that the car ahead of me was shaking slightly. This isn’t odd for the bridge, but on closer inspection the guy in the driver’s seat was doing a drum-solo like crazy. He would do this while the car was stopped, then pull forward when traffic moved and resume the drumming.

Cutting your favorite scene

I don’t think I ever gave much credence to it, but I’ve definitely read before in multiple places that sometimes you have to cut your favorite description, line or scene from your book. I’ve even heard it stated that you ought to cut your favorites. Never really understood that until now.

Dreams of a Shaper has four parts. The first two are present day (1999), the third is a flashback and the concluding part returns to the present day. One of the things that I’ve learned from my critique group is about pacing. With their help, I’ve seen that a fair number of things in the first two parts were unnecessarily slow, dragging the book practically to a halt with details and characters that didn’t really matter. In mind of that, I’ve been looking at the third part again, the flashback, and finally realized that it isn’t going to work.

Now don’t get me wrong — the past is relevant to the story. But do those things require taking an entire quarter of the novel out of its main plotline to establish? For a while I tried to convince myself it did, but with the sneaking suspicion that I was wrong about it, I’ve finally sat down and read through it. As I expected to find, there’s no excuse for the distance it drags the reader away from the mainline of the story.

There are other flashbacks in the book already, smaller scenes that reveal parts of the main character’s past. I’m going to revisit those and see how I can work the third part into the rest of the book.

It hurts to cut it, ’cause I like it. I’m fond of the characters and the situations that show up in the flashback. But they don’t build on the main story so they’ve gotta go. It hurts, but the book will be better for it.

Charting Woes

I spent the bulk of yesterday generating bug trend graphs from our defect tracking software (which will go unnamed… lucky for them). It doesn’t seem like it should take that long — the app even has built-in charting functionality. All I wanted was two simple lines: total open bugs, and bugs developers have resolved that QA hasn’t closed yet. However, as best I and my lead developer could tell, you couldn’t do it with the software’s reporting.

Every trend chart has three built-in lines (which you can hide, but can’t delete entirely). One gives the total open count– this is good, since it’s half of what I wanted. One gives the change in closed bugs, the third change in submitted… not quite there but at least I can hide them. These options provide no means to alter them.

You can add other field trends to the chart, but setting criteria on them has severe limitations. Fields can be unassigned in this software, but you can’t pick field=<> as a trend. Other non-charting portions of the software provide a pretty solid way to query information (with it’s own quirks, but you can typically get what you need there). Why can’t the charting do the same? The one saving grace for it was that you could create the report in a table view, copy-paste the data into Excel, add a few formulas and get the graph I wanted.

I can’t imagine that the developers for this package purposefully thought, “You know, this’ll really infuriate our users… let’s do it that way!” But in the end, they don’t seem to have noticed the frustrating limits they built in.

This puts me in mind of the software I write. How am I making sure that I’m not boxing my users in? How do you make sure that your users aren’t cursing your name every time they try to print a report?

WM_NCACTIVATE and the edit control

I ran into an interesting bug the other day. I noticed that in one of our grids, the edit control that pops up to allow you to modify values was not accepting single mouse-clicks to change where the cursor was. Uh-oh, I thought. I’d recently made a change related to capturing the mouse input, and this seemed like a side-effect I’d missed. So I fired up our bug-tracking software, entered a defect and got down to work.

Then a strange thing happened. The mouse-capture work that seemed likely to have been interfering wasn’t doing anything of the sort — all the clicks were going exactly where they belonged, to the edit control.

Since this edit control had an override for OnLButtonDown(), it was pretty simple to see that the click was getting to the control. It included some code like the following (sans the comment, which I’ve added):

int oldSelStart, oldSelEnd;
int newSelStart, newSelEnd;
GetSel(oldSelStart, oldSelEnd);

// Base class actually moves cursor for the click
CEdit::OnLButtonDown(nFlags, point);

GetSel(newSelStart, newSelEnd);

So the called to CEdit::OnLButtonDown() seemed like it should be changing the cursor position for us. Ran the test on a different grid, which didn’t have the problem, and sure enough, the call to the base-class for that edit control updates the cursor.

What’s the deal? I thought. I started stepping down into the CEdit code, but it’s a really thin wrapper over top of the core EDIT control in Windows, so that didn’t tell me much. After a few minutes, I did something I don’t often have the chance to do: bust over into disassembly view and take a look at what’s really going on.

After a few false starts, I found my way down into the function user32.dll!_ECIsAncestorActive. As I stepped through that function, I noticed that it was returning FALSE.

A little light went on in my head.

The grid that I was working with was part of a window that was docked into a view frame window. I had recently addressed a bug about both the docked window and the view window drawing their caption bars as having focus, rather than just one of them to indicate where the user really was. The fix had been to send an WM_NCACTIVATE to the view frame, causing it to draw as disabled when focus wasn’t in the docked window.

Bingo!

From there it was a simple matter to cause the grid to reactivate its parent frame when we entered an edit control. Once the parent frame was live again, the CEdit::OnLButtonDown() acted as expected, and all was well with the world.

IIS and ASP.NET mappings

During my setup for FlexWiki, I found the following KB link extremely helpful. I had installed Visual Studio prior to enabling IIS, which caused the IIS’s mappings for ASP.NET to get our of whack. Running the steps described sort things beautifully, and I was up and running FlexWiki within half an hour.

Maybe it’ll help someone else out too: http://support.microsoft.com/default.aspx?scid=kb;en-us;306005