Wednesday, 01 November 2006
Spotted in the speaker room in South Africa:
Those feet belong to Karen Young, MVP Regional Manager for EMEA:
Alas, the shoes aren't swag. Karen had them done at a street stall in China that was painting roses and anime characters onto shoes. They're one of a kind!
Saturday, 28 October 2006
[backdated with dasBlog]
We didn't have a church ceremony for my father. Instead we gathered at the sailing club. A family friend acted as MC and each of us (the five children and my dad's wife) spoke, read a poem, or played some music. A table nearby was piled with newspaper clippings about his inventions, his trip around the world, and so on, as well as the sextant he used on his trips, his pipes, and so on.
Afterwards we got onto the boat, which is 26 feet long. A gale was forecast for that night, but it was afternoon and we were only 15 minutes from home. We had something to do and we went out and did it. His hat was still floating on the waves when a pulley that holds the tender (small dinghy) up out of the water broke. There followed several exciting minutes while the only two qualified sailors (my brother, who sailed the Atlantic with him 20 years ago, and my sister, who is eight months pregnant) wrestled it out of the remaining pulley, got it tied behind us, and got all the water out of it. When this was all settled we realized we had gone quite a long way and decided to take down the small sail we'd been using and motor back home.
The motor started fine and the prop turned, but it didn't make the boat move. This is the point where Dad would have opened things up and fixed them, had done so even just a few days after abdominal surgery, but none of us could. We tried a few things and then called the Coast Guard.
The ocean is big and even when you're on a cell phone telling them what island you think you are going past, it can take a long time to find you. It was getting darker and windier by the minute. We got a sail up (my brother wore the safety harness he'd worn in the North Atlantic) and actually got into a cove and at anchor by the time they found us. They said we'd lose the boat if we left her there that night, and decided to tow us to a marina. That all went without incident. Afterwards, standing around in our funeral clothes outside someone else's wedding reception, we acknowledged that maybe we hadn't been super smart in what we'd done, but that we'd been fine till the engine broke. That's when the Coast Guard guy said "Boats can be tricky that way." I thought he was going to patronize us, point out they take you onto the ocean or some such, but he went on "they don't like losing their owners." Told us a few tales of boats that sank the day they were sold and the like.
Later, my brother realized the pulley that broke just as we finished our private remembrance was the last thing my father had fixed on that boat. And I realized that when "bloody hell" (my Dad's favourite oath) started, and competence and capability (things my father valued highly, along with brute force) kicked in, the crying stopped. The five of us kids pulled together and rescued ourselves, now that we don't have Dad to rescue us any more. We're going to be OK.
Tuesday, 24 October 2006
[backdated with dasBlog]
OK, I know you really come here for C++ stuff and the occasional picture of autumn leaves, but there are some things I want you to do. First of all, if you're the donating type, and you want to make a donation in my Dad's memory, please don't give it to those "cancer is a word, not a sentence" people. Nothing they did helped him. (Research is fine, just all that cheer-up-it's-not-so-bad stuff bothers me.) He died two days short of the one-year anniversary of his diagnosis, which is actually pretty good for esophageal cancer. The heroes in our minds are the VON. Back in August, had my dad stayed one more day in the hospital I believe he would have died there. Going home gave him many more months and gave us all more time with him and more time to come to grips with what was happening. The VON were what made that possible. Sometimes they came every day, sometimes every other, sometimes two and three times a day. They dealt with his abcess, his draining tube, his pain, his weakness, with all the things that would have otherwise had him in the hospital. They were always polite and respectful and supportive. They didn't bustle around like hospital nurses, bossing everyone and controlling their territory. You can donate to your local VON if you have one, or to the ones who helped Dad at VON of Greater Halifax, 7001 Mumford Road, Tower 1, Suite 300, Halifax NS, Canada B3L 4N9.
Second, if you ever have trouble swallowing, have a terrible acid stomach for which you regularly take antacids, or have a family member who died very quickly of "a growth in the throat" or something similar, go and ask your doctor to test you for Barrett's esophagus. That's about the only hope for prevention of this, the fastest-growing cancer in North America.
Third, no matter how old you are, it wouldn't hurt to talk to your family about your end of life wishes. Whether it's dying at home, what songs to play at the ceremony, or burial-vs-cremation, the decisions are so much easier when you actually know what the person would have wanted.
Monday, 23 October 2006
[back-dated with dasBlog]
While I was in Africa my father's condition worsened and then he slipped away. He died at home, in the bed he'd been using for several months, without pain, knowing he was dying and that it was time to go. He had taken care of the things he needed to take care of: explaining his latest project to his former graduate students so that they can prove his theory and rewrite some text books, explaining the trickier aspects of the boat motor to my sister, giving some instructions to his lawyer. He was content to go at the end.
His obituary was in the Globe. It could easily have been twice as long.
Saturday, 14 October 2006
The code definition window is not just for C++. Here's a C# screen shot:
Doesn't seem to do anything for VB at all though. I just see No definition selected no matter where I click.
Friday, 13 October 2006
Not enough people know about the code definition window in Visual Studio 2005. I see them trying to understand code by getting editor tips on the classes and functions they see in use:
A reasonably clever trick is to use Ctrl+Shift+Space to get parameter tips for the function:
But the tips are transient, they go away when you use your mouse and try to do some work. So most people fall back on good old Go To Definition:
Sure, this isn't transient, but it leaves you sitting in another file and needing to flip back and forth from file to file when you're just trying to understand what a particular function call does. What I like to use in this case is the code definition window. It's on the view menu:
And here's what it gives you:
It also works to show you the code for a function you're calling. Once it's open, just click on the thing you want to see in the code definition window:
Once you get in the habit of just glancing down to the bottom of the screen to get a little more information, you'll wonder how you ever did without it.
Thursday, 12 October 2006
Here's an article on static code analyis that makes some nice points. I love the title: I’m not in denial, I’m in a hurry. It can be tough, at the end of a project, to find the time for that tidying up that you once thought there'd be time for. Better to get the comparison of what you're doing to best practices as you go along. In fact, every time you build your app. Then you'll know where you stand.
Wednesday, 11 October 2006
One of the things I do for many of my clients is code review. This comes in two flavours. The first is where we all pile into a room with a projector and someone walks us through the code while we ask questions. Sometimes as a result of this the original author has to go away and rewrite bits of the code, but it's just as likely that the outcomes will be everyone understanding how something works, or knowing what there is in someone else's part of the application. The second is less interactive. I read over code and point out bad, dangerous, sloppy, or hard to maintain code. This might be hardcoded error messages in a multilingual application, or non parameterized dynamic SQL, or poor object orientation, or any one of hundreds of other things. Often I point it out not to the author of the code directly, but rather to the author's manager. Or in at least one case, their former manager. (As in, now that we got rid of this person, can you tell just how much mess he left behind?)
Now, if you are thinking of going to Team Systems, let me give you another reason to do so. It can automate a lot of these types of checks. For example, here's a really quite poor little class:
Public Class Company
Private networth As Integer = 0
Public name As String
Private foundingdate As Date
Public Sub New()
When I run static analysis against this, in no time flat it points out:
Running Code Analysis...
C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe /o:"bin\Debug\Information.dll.CodeAnalysisLog.xml" /f:"bin\Debug\Information.dll" /d:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" /r:C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules
MSBUILD : warning : CA1020 : Microsoft.Design : Consider merging the types defined in 'Information' with another namespace.
MSBUILD : warning : CA2209 : Microsoft.Usage : No valid permission requests were found for assembly 'Information'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.
MSBUILD : warning : CA2210 : Microsoft.Design : Sign 'Information' with a strong name key.
MSBUILD : warning : CA1014 : Microsoft.Design : 'Information' should be marked with CLSCompliantAttribute and its value should be true.
C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Information\Information\Class1.vb(6): warning : CA1805 : Microsoft.Performance : Company.New() initializes field networth of type System.Int32 to 0. Remove this initialization as it will be done automatically by the runtime.
MSBUILD : warning : CA1823 : Microsoft.Performance : It appears that field 'Company.foundingdate' is never used or is only ever assigned to. Use this field or remove it.
MSBUILD : warning : CA1051 : Microsoft.Design : Make 'name' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it.
MSBUILD : warning : CA1823 : Microsoft.Performance : It appears that field 'Company.networth' is never used or is only ever assigned to. Use this field or remove it.
Code Analysis Complete -- 0 error(s), 8 warning(s)
Done building project "Information.vbproj".
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Meaningless initializations, unused variables, public member variables... they get found. It's a great start.
© Copyright 2018 Kate Gregory
Theme design by Bryan Bell
newtelligence dasBlog 2.3.9074.18820
| Page rendered at Tuesday, 23 October 2018 04:21:12 (Eastern Daylight Time, UTC-04:00)
On this page....
Pluralsight Free Trial
Click Start a FREE 10-Day trial