free hit counter
August 2004 - Posts - .

.

August 2004 - Posts

DevDays source code now available online!

The source code for DevDays 2004 is now available online at http://msdn.microsoft.com/events/devdays/sessions/default.aspx.

The videos of the sessions given at the Seattle DevDays event have been available at that URL for a while now. Thanks again to all the Seattle (and Portland) presenters!

Debugging an XSLT transform!!!!

A couple of months ago I pounded my head against a wall trying to write a proper XSLT for the home page of my web site. One of the big problems was that I couldn't debug the stupid thing.

Visual Studio 2005 has the ability to step through an XSLT in the debugger, displaying the results as it walks through the XML document in the console window. You'll be able to step through the XSLT, Run, and view input & output.

HURRAY!!!!

This works in Beta 1.

C# 2.0 generic iterators

I was playing around with generic iterators in C# this morning. The 2.0 compiler does so much of the plumbing work for you that it's very easy to define a enumerable generic type. Your class doesn't even have to implement IEnumerable or IEnumerator - the compiler handles that under the covers for you. Your method just has to return IEnumerable. It's so much more succinct now. From my limited testing there doesn't seem to be much of a performance hit.... unless if you're thinking about using recursive iterators. Then you may want to be careful:

Recursive Iterators (aka Perf killers)

Technically this isn't specific to iterators, but its so much easier to do with iterators that I thought I'd mention it. Some languages are smart enough to 'flatten' iterators, such that if an iterator is called inside of another iterator, only one iteration object exists. C# is not one of those languages (at least not yet). Generally if you see any sort of recursion inside an iterator, you're asking for performance problems, simply because each time it recurses, it's going to create a whole new iteration object on the GC heap.

Least privilege & Windows Explorer

[Edit: clarified the wording in the paragraph starting with “Otherwise...“]

As I mentioned the other day, I've started running day-to-day as non-Admin. I used links in Andrew Duthie's blog to grab a couple of command scripts and a cool DLL that displays the context in which you're running (Administrator, Power User, User, etc.) in the Windows Explorer and Internet Explorer toolbars.

I had a problem, though, when I launched Windows Explorer from the Administrator command line. It wouldn't run with Administrator privileges. It would run as a normal User. Internet Explorer didn't have this problem.

Last night I ran into Andrew Duthie who gave me the following tip...

Before you launch Windows Explorer from the command prompt you need to make sure you've checked the checkbox in Windows Explorer, Tools | Folder Options | View | Advanced settings | Launch folder windows in separate process. (That's where it's located in Windows XP, anyway.)

Otherwise when you launch Windows Explorer it will run in the same context as the userID in which you logged into Windows - the one with least privilege. By checking the checkbox, when you launch Windows Explorer from the administrator command window a command window that's running as Administrator, it will run in the Administrator security context.

Windows Explorer setting...

Got COBOL?

Do you live in the Northwest? Does your company use COBOL or do you know someone who does (who lives in the Northwest)?

If you can answer YES to both of those questions, send me an e-mail. (jimblizz AT microsoft LITTLEDOT com)

Anders and C# 2.0

Man, what a good talk (in spite of the two guys behind me who wouldn't be quiet). Anders gave a walk through of some of the new things coming up in C# in the .NET Framework 2.0. He touched on...

- Generics
- Anonymous methods
- Nullable types
- Iterators
- Partial types
- Static classes
- Property accessors
- External aliases
- Inline warning control
- Fixed size buffers

Terminology: Instead of saying "create an instance of" it's "we new up" - as in "So here we new up a List." I've heard Jeffrey Richter use this phrase as well. I like it.

There's an excellent series of interviews with Anders about new stuff coming in C# located here, in which he discusses many of these topics. Very good reading...

 

Unbelieveable...
I'm sitting in a conference room and Anders Hejlsberg is speaking... and these two guys sitting behind me are holding their own conversation. Time to say "Sssssshhhhhh!" (If I never post to my blog again it's because the two guys behind me beat the crap out of me.)
Scoble sighting

A quasi-Nerd Dinner...

I saw Robert Scoble at the Bellevue Rock Bottom Brewery last night. A bunch of Microsofties and Regional Directors are in town to get some deep training about Microsoft stuff. He didn't see me and I didn't say "Hi" and it wasn't in a mall food court and I had already eaten and only had water to drink while I was there... so... um... OK, i guess it wasn't a Nerd Dinner. But there were a bunch of nerds there. And quite a few of them were eating.

Portland .NET User Group meeting on Thursday

Just a reminder about the Portland .NET User Group meeting this coming Thursday evening (8/26).

Tom Howe is going to talk about the business side of developing software. It's a technology-neutral talk, so bring your Java, PHP, Macromedia, and Linux friends. It's a great talk. If you're a contractor, consultant or an ISV, or if you've ever thought about going out on your own, you need to hear this talk.

See http://www.padnug.org for more details.

Spread the word.

Portland, get ready!

I had a chance to watch Rory in his first full MSDN presentation in Tacoma, Washington, yesterday afternoon. Whooh!

He covered...

  • InfoPath SP1 - excellent developer productivity tool for forms-based applications
  • ASP.NET Custom Controls - great way to leverage code across your web site(s) in a manageable way
  • ASP.NET 2.0 sneak preview - a look at some of the new features and why they're important to you

At the end of the show every attendee receives a DVD chocked full of useful bits, such as

  • Visual Studio 2005 Beta 1,
  • The Express versions of VB.NET and C#,
  • The entire Patterns & Practices documentation,
  • And lots more!
  • AND a cool vacuum-packed MSDN t-shirt. Various sizes are available instead of just the standard XXXL. : )

Rory will be in Portland on Thursday, 8/25. Go here to register.

You won't want to miss it! Be there, be square, and get the goods!

Spread the word.

Rory's first time!

Just a quick reminder for all you lucky folks in Tacoma, Washington: tomorrow (Tuesday, August 24) is Rory's first full presentation as a Microsoftie. If you live anywhere in the Northwest, you should drive over to attend.

Click here to register.

See you there!

Rory watch...
Rory's going to be in Tacoma, Washington, this Tuesday, followed by Portland, Oregon, on Thursday. It turns out that I have to go to Seattle on Tuesday for the rest of the week, so I won't get to see him in front of the home crowd. But I will be able to stop on the way up to see him in Tacoma. Road trip!!!
XP SP2

Yes, I'm running it.

No it hasn't destroyed (or even hampered) my computer.

My anti-tweeker bike

As I mentioned the other day, a tweeker stole a couple of my bicycles on Friday.

On Saturday we went to Portland to look at some recumbent bikes at Coventry Cycle Works. I'd never ridden a recumbent bike before and didn't really know much about them except that they looked funky.EZ-Sport recumbent bike I'd seen a few on the road here in the Northwest, and the folks who ride them always seem to have a smile on their faces. (Not the anguished, twisted face of people who ride the street racer bikes.) So I wanted to check them out.

Heintz, one of the salesmen at Coventry, was very helpful and talked me through the different styles. He let my son and me take a couple for a test ride through some Portland neighborhoods. Hmmm. Very nice. It was quite a relaxing ride. I can see why the people who ride them are always smiling - it doesn't hurt. Even my son enjoyed it. There's none of the hunched over, wrist breaking position while perched atop a 2-inch wide "saddle" (actually a wedgie creation device) that you get on a typical street bike. I felt like I was sitting in my favorite chair; I felt as though I could have ridden for hours without getting saddle sore or wrist sore. (My legs would have had something else to say, however.)

I would have bought one right then and there. But, alas, recumbent bikes are more expensive than standard upright (hunched over) bikes - even at the "entry" level. I didn't want to spend $500 (for a base model) just to have it wind up as tweeker fodder. And I don't ride often enough to justify the cost even if the neighborhood tweeker doesn't steal it.

So I believe I'm going to go with a low cost, retro bike. I figure that by the time I put a pink basket on the front and those plastic flowing pom-pom-like streamers at the ends of the handle bars, no self-respecting tweaker would come within 10 yards of the thing.

Schwinn Classic
Anyone have some baseball cards and some clothes pins I can borrow?

I learned a new word today...

In keeping in the spirit of vacationing today (even though we returned home to Vancouver yesterday), my son and I went for a bike ride. Lovely weather - nice blue skies, warm sun (almost too warm), nice breeze to help cool things off.

We rode to a sporting goods store to see about getting some new pedals for my bike. It's a mountain bike with clipless pedals, but I haven't done any trail riding in a couple of years. I wanted to pick up a pair of flat platform pedals.

The only ones the store had were meant for hard-core folks: ragged metal spikes on the edges. Just the thing that would shred my shins or calves if my foot slipped off the pedal. No thanks. I'll order something more sane online.

So we headed over to a food mart / gas station to grab an Icee. The gas pumps were crowded, but there wasn't a line inside. We popped inside, filled our cups, paid (no line, no waiting) and walked back outside to... no bikes.

Huh.

We looked around, thinking someone might have moved them. Nope. A guy from the attached car wash came around the corner... "Did you guys lose your bikes?"

Uh, oh.

He saw a couple of guys around the back of the shop, throwing the bikes over the retaining wall and scampering away. "I knew they stole those bikes!"

Yep. A couple of guys and a gal were sitting in a car as we parked our bikes by the front door. My son saw the car - an older Honda, dark blue, in pretty rough shape - and noticed the people inside: a guy without a shirt, another guy with a shirt on, and a gal.

The car wash guy described the two guys who lifted the bikes - the same guys from the car. We walked inside and asked if they had a security tape, hoping it might have caught them in action. The car wash guy and the manager came back in a few minutes... no luck. Crap!

In the meantime, one of the customers drove around the block, looking for the guys on the bikes. No luck. They got away.

Who would have imagined? Broad daylight. Both sides of all 5 pumps were being used. Most of the cars were facing the front of the food mart. The bikes were right beside the front door. And a couple of creeps made off with them!

The car wash guy described the dudes to us and to the manager again - skinny pale guy with no shirt, and the other guy a bit taller and a bit of a tan.

"Ah, tweekers," the manager said.

Huh?

"Tweekers. Crystal meth users. Probably going to run the bikes across the river to a pawn shop."

Crap.

I called my wife and we went driving through an apartment complex nearby, hoping the guys might have dropped the bikes off somewhere after a joy ride. We stopped when we saw some construction workers, asking them if they'd seen a couple of guys ride by on bikes - one tall guy, another one pale & skinny without a shirt.

"Tweekers," he said. They hadn't seen anyone riding by...

Gone in 60 seconds. At least they didn't get a new pair of $15 pedals in the process. (But if they had, I would have only hoped the jerk shredded his legs on the jagged edges as they raced away. I could have tracked them by the drops of blood.) 

So that's the new word for today: "tweekers." Some people call them crystal meth users. I call them assholes.

More Posts Next page »