Thursday, August 24, 2006
Tuesday afternoon my mother called me with a gross and slight horrific story which I am going to share with you now. She lives in a row of 8 little houses in Toronto all connected to each other, 110 years old. For some days or even a week, some of the neighbours have been troubled by a nasty smell, and they were worried that a squirrel or a raccoon had died in their shared attic. Then suddenly on Tuesday two of the houses were infested -- upstairs! -- by worms. And not pink round worms like you would find in your garden. Flat white worms. Eeeeew, right? They called the police. I don't even know the end of the story because she had to leave on a trip (she's teaching a course in Winnipeg) but you know what? It isn't making much on an impact on my life right now.
That's partly because I was headed home to a much fuller house than usual. That same afternoon some neighbours of ours, whose kids are good friends with our kids in that in-and-out-of-each-other's-houses way, took a hard knock. They have rented a tiny shared house to stay while building a new home on land near us, and they lost that rented space in a fire. They also lost, or so it seemed that first afternoon, everything they owned that was not in storage, including all the back-to-school shopping (over $1000) they had just completed. They had no insurance since they were just renting for a few months. Their two children and cat came to our house that day, and have since been joined by a dog and the second cat, who took a while to find. I therefore have four children, two dogs, three cats and a hamster in a 1500 square foot house, and many of the animals can't be in the same room as each other. I spent three hours Tuesday, and Brian spent more like five hours Wednesday, doing things like driving the kids back to the house to look for the cat or to retrieve things, helping the kids run laundry or spray Febreze on things that can't go in the washer, that sort of thing. Now many people have told me that this must be a total disruption and must be driving me to drink. But if anything I am finding it a needed and welcome distraction, and I am actually sleeping better than I have for a week.
And that's because what's really on my mind is my father, in hospital in Halifax.He had major surgery in December, some setbacks in the winter and early spring, but by June was pretty much himself again. However since then he's had some bigger setbacks and has been in and out of the hospital all summer. It's now at the point where the whole family is flying in. My Dad has five kids and we haven't all been in the same room this century so the whole thing is bittersweet. One sister is bringing her infant, another is pregnant. It just doesn't bear thinking about.
And yes, I still have a business. I have clients with mentoring needs, projects going live, new projects starting, Request for Response/Proposal/Services pouring in as the bosses get back from vacation, some very sweet C++ and Vista stuff that I can't wait to tell you about (but will have to) and so much more. I am emailing a lot of those people telling them my sorry tale and that I will talk to them after Labour Day. To my delight they have all said "sure, of course, let's talk then!"
It really is going to be OK, but it's going to be hard work on the way,
Tuesday, August 22, 2006
Blogging is usually a way I talk to people I don't otherwise talk to. Not that friends, family, clients, and staff don't read it -- I know you're there! But there is another group of people I know are reading who I don't normally email, IM, call, see, or send pieces of paper to. And in my life, as in so many lives, things come up, stresses rise, deadlines loom, project work eats all available hours, and the blog starts to suffer.
It starts with missing a few days, then catching up. The "stuff to blog" file is handy here, so when you catch up you clean out the file. Then the number of days you're behind exceeds the number of entries in the file, and besides most of them are just a link and you don't have time to write the three sentences that go with it. So then you don't blog for a while.
When are you likely to start again? When the blog becomes the more efficient way to talk to the people you usually talk to, but don't have time to. Expect the blog to get a little more personal for a while (though there's some technical stuff to clear out of "stuff to blog" as well, or to go dark again. I'll do what I can.
Wednesday, July 12, 2006
Here's a fun demo of facial recognition software. Using the picture of myself I have on MSN messenger, I tried out (http://www.myheritage.com/FP/Company/tryFaceRecognition.php) the My Heritage facial recognition software. It says I look like
Common thread seems to be cheekbones. I don't see them on me but I sure do on those folks.
Want to try?
PS: I tried another picture of me and Kate Winslet, Rose McGowan, and (damn) Andrew Lloyd Webber came up again.
Tuesday, July 11, 2006
So if you want your app to behave well on Vista and have no clue where to start, here's a helpful post from Jeremy Mazner that links to a number of screencasts to get you started. How to tell Vista you need admin privs. How not to need admin privs so much. How to use the power APIs (that's volts and amperes power, not only for smart developers power). How to hook into Vista search.
Download them, watch them, make better Vista apps.
Monday, July 10, 2006
Jesper Johansson is a world-reknowned security guy. His talks are always highly rated and people love to hear him tell them how to be safer than they are now. So when he says "please don't turn off UAC", will you listen?
Yes, it's annoying to be constantly authorizing things, especially when you just clicked the button to do whatever it is that needs to be authorized. Some of that is an artifact: it shows up far more often in the early days of a new install because you're busy configuring and administering the system. Some of that is because permission sets may still need tweaking. Changing the time zone was moved into "doesn't need admin privs" while changing the time was not, for example, and there may be actions that are triggering a UAC prompt that shouldn't be. This is what betas are all about, testing developer choices against the behaviour of real users.
The other reason for a lot of UAC prompting is apps that demand privs they shouldn't need, because their developers can't be bothered to use per-user stores, for example. If that's your app, and you're testing it on Vista, you need to change it so it works well on Vista. Not leave it as is so it works fine on Vista-with-UAC-turned-off. That's just "it works on my machine", and my developers aren't allowed to say that.
Sunday, July 09, 2006
Long long ago, I posted a neat drag and drop trick. Here's another. I regularly find myself in a Windows Explorer window, looking at the files it contains, and wanting a command prompt so I can type some command or another. Today it was regsvr32, but it varies. So what I usually do is open a command prompt, Alt-Tab to the explorer window, highlight the path, Ctrl-C, Alt-Tab back to the command prompt, and then leap through all the command prompt nonsense to paste. Bleah.
Here's something quicker. In the command prompt, type "cd ". Then with your mouse click on the symbol before the path in the explorer window:
Drag it into the command prompt and let go. Nice.
Saturday, July 08, 2006
Conditional breakpoints are cool when you know the value of one variable that is associated with trouble: this only blows up when Xid is 1234. They can also be used to reduce the boredom of single stepping. Say you've got some loop that goes around a few hundred times building up some string or array or something. You don't want to keep going round and round and round... it would be nice to jump ahead to halfway through, for example, and see how things are looking. Now if this is a for loop with a handy named variable, say
for (int i = 0; i<1000; i++)
Then you can use a conditional breakpoint and say "stop when i is 200". Or you could be clever and stop when i % 200 is 0 -- so that's every 200 times. But what if there's no i? What if you're going through a file or a recordset/dataset/resultset and you're going until the end? You don't want to add some fake variable that gets incremented each time through the loop, just so you can set a breakpoint that breaks on certain values of that variable. Instead you want to use the hit count property of the breakpoint. Just right click the red dot and choose Hit Count. There you can set the breakpoint to break whenever it's hit, just the 10th time it's hit, every tenth time (10, 20, 30 etc) or every time after the 10th time Or, of course, whatever number you want instead of 10:
Don't debug the slow way when there are tools to make you so much faster!
Friday, July 07, 2006
Conditional breakpoints were another really important tool in solving a recent "only happens at the big installations" bug in a big and complicated C++ application. We wanted to debug the code with as few rebuilds as possible and we really didn't know how parts of it worked at all. Tracepoints helped us to figure out a lot of it in a short time. We didn't have a decent repro case though, so here's what we did:
- created a script to add an audit table and some triggers that write to it
- created a script to remove those triggers and the table
- created a batch file to run a server in verbose mode, and redirect the output to a text file (remembering DOS commands sure can be helpful... myapp.exe -verbose >logfile.txt was the magic phrase.)
- wrote some instructions for the support guy to grab a backup of the database, run the first script, run the batch file, let it run all night, then in the morning grab another backup of the database, run the second script, and stop the batch file.
Now we ran some queries on the morning version of the database to confirm that at least one X was missing a Y that should have been calculated overnight. We even had the Xid. Thanks to the tracepoint work of the previous day we knew where to be suspicious. A little digging in the trigger output told us whether the problem was "didn't get added" or "got added, but then got deleted". The last step was conditional breakpoints. These let us say "only stop here when you're processing the X with this Xid."
This really saves time when you just need to drill into what's happening in the case that is going wrong. You get to it by right clicking the red dot or diamond and choosing Condition.
© Copyright 2019 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820
| Page rendered at Saturday, December 07, 2019 10:35:03 PM (Eastern Standard Time, UTC-05:00)
On this page....
Pluralsight Free Trial
Click Start a FREE 10-Day trial