June 28, 2004 .net

Avalon 3D Hit Testing Demo

The benefit of 3D support in Avalon is not the 3D support itself (we’ve had various ways to do 3D stuff in Windows apps for a while now, including both OpenGL and DirectX). The benefit is the tight integration we get between 3D and 2D elements in Avalon (and we’ll get even closer integration as we move closer to the Longhorn release).

For example, in his Avalon 3D Hit Testing Demo, Daniel Lehenbauer shows how hit testing can move into a ViewPort3D element (the representation of a 3D scene in an Avalon display) into the specific element being clicked. In other words, you can have a Button right next to a ViewPort3D showing a teapot and your app can easily tell which one was clicked. Handling a teapot click is slightly harder than handling a Button click simple because the Button does it’s own hit testing, but the Avalon 3D hit testing supports advanced features like clicking through the handle of the teapot w/o that being classified as a “hit,” all of which Daniel explains nicely in his sample.

June 28, 2004 .net

Using Permutations in .NET

I know this is almost a year old, but the permutations algorithm was my favorite from STL and I’ve had occassion to miss it since moving to .NET, so it was nice to find Dr. James McCaffrey’s Using Permutations in .NET for Improved Systems Security on msdn.com. The security implications are interesting, I suppose, but permutations are useful than that (like if you’re trying to crush librarians…).

June 28, 2004

BillG on Microsoft’s Anti-Spam Efforts

It's pretty cool for to see industry competitors, Microsoft, AOL, Earthlink, etc, to work together against a common foe: spammers. This gives me hope that warring nations will be able to band together when the alien invasion comes. : )
June 27, 2004 fun

Feature Leaked From VS05 Beta 1

Apparently someone has an early copy of Visual Studio 2005 and has stumbled onto the big feature we've been saving for an important keynote.
June 26, 2004 tools

The Good Bits of STL in .NET 2.0

I look at Krzysztof Cwalina’s post on delegated-based APIs in combination with generics and I think of the best parts of STL-like template-based programming without all the STL or templates causing the blinding pain just behind your eyes.
June 26, 2004 fun

The Right Level Of Community Involvement

Earlier this week, BradA asked the community for feedback on the guys that work for him (it’s review season again at Microsoft). Adam had this to say in response:

“I’m waiting for the first blogger to suggest that we should let the development community choose when we go to the bathroom. Is there no internal process that doesn’t benefit from ‘community involvement’?”

When folks complain about too much community involvement, I judge we’re at just the right level. : )

June 26, 2004 spout

A Man, A Plan, A Canal, A Librarian!

A Man, A Plan, A Canal, A Librarian!

Saturday, June 26th, 2004

Can’t come up with a better palindrome than “a man, a plan, a canal, Panama!”? Write a program and come up with one that’s 17,000+ words. I love computers and what people do with them.

The most extreme thing I ever did along these lines is when my airplane was circling an airport for some unknown reason and the United flight attendant announced a contest to keep our minds off the dwindling fuel and the terrorists on the ground (oh, wait, that’s Die Hard…). Anyway, she offered a free bag of peanuts (or something of equal value) to the person that could come up with the most words of 3 or more letters from the letters in the word “united” (Always Be Closing…).

Did I put my Tim Ewald-expanded vocabulary to work? Did I scratch words onto a cocktail napkin as fast as I could think of them?

No. In the limited time I had, I wrote a program that would come up with random combinations of letters in brute force fashion, then dumped the unique ones to a file so that I could use Word’s spell checker to find the real words. I came up with 32. Did I win?

No. A librarian, using her own expanded vocabulary beat me with 34 (I had been running the program to generate 1000 possibilities to speed testing but forgot to flip it back to 10,000 when it came time to run it for real).

Did I stop there? Did I accept defeat gracefully, especially since it’s pretty clear I had cheated in the first place?

No. I went home and learned the STL permutation algorithm and wrote a program that compared against a dictionary from the web to find the 72 words of 3 or more letters in “united” (including asynchronous updates to the UI as possibilities are checked [it takes a little longer, but it’s worth it…]).

Now I carry that program on my laptop wherever I go, just in case I run into that damn librarian again…

P.S. I did get to use my program one more time against my mother playing Scrabble. I got my all-time high Scrabble score ever on that day. She still beat me. Did I mention she’s got a bachelor’s degree in library science? Damn librarians…

June 25, 2004 .net

Longhorn Foghorn: Crazy About Avalon Data Binding

Over the last few weeks, I’ve fallen in love with the power and simplicity of Avalon data binding. In this month’s column, I start a 2 article series by focusing on the basics of data binding in Avalon and tease you with a screen shot of my Longhorn Solitaire application rebuilt using data binding and styles, the details of which I’ll cover in the 2nd part of the series.


← Newer Entries Older Entries →