Sunday, May 06, 2007

There are tons of blog entries like this one explaining how to get intellisense for WPF/e using the February 2007 CTP. The SDK for that release has a file named wpfe.xsd and you drop it into your VS.Net schema folder here:

C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas

I'm using the Silverlight 1.1 alpha bits, and the 1.1 SDK doesn't have a file named wpfe.xsd, so I was baffled for a minute. The Silverlight 1.1 SDK is laid out quite differently and comes in a handy zip file instead of a chunky MSI file like its predecessor.

Perhaps its just too early on a Sunday morning, but it took me a few minutes to realize that (A) the 1.1 SDK does have a file named Silverlight.xsd and (2) dropping Silverlight.xsd into my VS.Net schema folder does the trick. I'm going back to bed.

Sunday, May 06, 2007 8:38:50 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Friday, May 04, 2007

Hey, did you ever have a booger on your nose and walk around for a while before anyone told you about it? Maybe no one told you about it at all?

That's how I feel right now.

For some reason, I had Trackbacks enabled in my blogging software. So idiots all over the Internet were taking pot shots at my blog and adding their links to posts on my site without my explicit knowledge. I had barnacles all over the damn place. Damn!!!!

Shame on me.

I've disabled this cool feature on my site now. Furthermore, I've deleted all of the existing trackback data so the links to unscrupulous websites have been removed. I don't think there are ways to make evil links to my site now, outside of going through the steps to leave a comment. I suppose time will tell if I'm right.

Frankly, I'm surprized the search engines even ranked my site with all of these crap links on it. I ought to have paid more attention to who was reading/linking to my blog when it started getting popular.

I'd disable comments, but (a) I like getting them and (2) Scott Vandehey would say it isn't really a blog then.

Friday, May 04, 2007 10:08:11 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

 I'm gearing up for my week-long excursion to New London, Connecticut in late May for some Windows Communication Foundation training at Carl Franklin's house. This is going to be awesome. Brian Noyse is teaching it. Here's a nifty fact from Brian's profile:

Brian got started with programming to stimulate his brain while flying F-14 Tomcats in the Navy, graduating from Top Gun and U.S. Naval Test Pilot School.

In preparation for the class, I selected WCF Step by Step by John Sharp from MS Press. This is a solid book that nicely augments the podcast with MLB that I've easily listened to over twenty times. Its so cool to pick up new things every time I listen to it on my Treo.

I've been listening to Carl and Richard's podcasts for a while now - literally years I suppose. I heard that Carl is moving his public ILT training over to Mark Dunn's place in Atlanta to make space for more podcast studios. So this sounded like one of the last opportunities to catch a flight to the east coast, albeit the nearby Radisson, for good reason.

Now that its early May and MLB's book is out, I suspect I'll head over to Powell's someday soon pick up a copy of Learning WCF: A Hands On Guide. I have a layover in Chicago and only so much battery life. Have you ever tried to find an outlet at O'Hare to recharge? WTF!?!?!?!

Friday, May 04, 2007 9:19:45 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, April 30, 2007

Yep. I had a feeling. My buddy, Kelly, just called fro MIX07 where they just announced the 1.0 beta and the 1.1 alpha of Silverlight today.

The 1.1 alpha has the sweet C# code inside it. I can't wait to get started. It also has ominous "for developers only" text next to the download link. Who else would come to this page?

Monday, April 30, 2007 12:58:31 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, April 29, 2007

Google Reader I used SharpReader for a long time, then briefly used the RSS Reader in Outlook 2007, after an even briefer stint with IE7's RSS reader client (ack!). I don't categorize myself as superstitious, but was else do you call it when you suspect all those posts and media downloads in Outlook 2007 are slowing down your system and you have no real data to back it up?

I liked the Outlook 2007 reader because I was horrible at opening SharpReader on my laptop. I always had Outlook open. It took a while to launch SharpReader, but it was a great application. Then, I'd open SharpReader on a weekend and be horrified by (a) the number of posts that I was behind, and (2) the amount of information that I could have used during the previous week. I'm always looking to get my compile time down, so right or wrong, I'd close applications left and right to give my Dell Latitude D610 as much horsepower as it can wield during the week.

My buddy, Scott, turned me on to Google Reader. As a big time RSS fan boy and an even bigger nerd than I, his opinion is to be respected.

So this weekend, I imported my OPML file into Google's RSS Reader and away I go. So far, I'm pretty impressed. There's a few things I'd like to do, such as return certain posts to "unread" status as I want to come back to them later and rename some folders, but all in all, I likey.

Now, I can open my RSS reader without the cycles of a big application. ( type my new magic word, "gr", in SlickRun and launch my reader anytime I like. Booya!

Sunday, April 29, 2007 9:23:55 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

Silverlight Samples In Action For no particular reason, I decided to make this weekend a Silverlight Cram Session. Two of my fellow developers are on a plane (and perhaps have already started the party) at MIX07.

From everything that's been said in the prior two weeks, I expect some pretty sweet announcments at MIX. My friend, Erik, is also getting ramped up on Silverlight. He presented at Innotech and is giving v2 at the PDX Code Camp.

So, I downloaded the Feb 2007 Silverlight SDK and the Feb 2007 CTP Sample Pack. For some odd reason, I feel that they are already obsolete. However, they served their purpose quite well. The WPF/E Quickstart that comes with the SDK rocks - you should just block out some time and go through it. The author of this content did an spectacular job of explaining new technology in a way that just worked. I can't recall anything that was more well written. Its just brilliant.

I bit it off in 30 minute chunks and devoured the entire Quickstart samples on Saturday afternoon. I started writing each example manually, and then by the middle, I succumbed to the clip-board inheritence methodology.

It's weird to think back to Friday when I had just a conceptual idea of what WPF and Silverlight does from various podcasts on Channel9, Hanselminutes, DotNetRocks and DNRTV. Now, after doing it for several hours, I get it.

Sweet.

This is one of the biggest reasons to love my job; and boy, do I. Good stuff like this gives you the will to come back for more, day after day, week after week.

I'm still in a mode where NotePad2 or VS.Net 2005 is my best friend for XAML. Perhaps I'll shed that kinship and move on to Expressions later. For now, I'll just bask in the glory of learning something new and wondering how I can implement various types of media experiences with lines, rectangles, elipsi (pural?), polygons, polylines, and paths.

Sunday, April 29, 2007 8:58:24 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, April 01, 2007

I was chatting with my pal Kelly at work last week about code snippets. This weekend, I had a pile of dirty dishes to clean, so I fired up my laptop and downloaded the archived DotNetRocks interview with Michael Palermo on code snippets. Before I knew it, the dishes were clean and I had refresher on code snippets!

I took a look at Palermo's site, www.gotcodesnippets.com. I was looking for some snippets I'd could install. I downloaded one that creates a property whose value is stored in the ASP.Net viewstate. I do that technique quite a bit, so it'll be fun to hit ctrl+k+x to run that snippet.

Next, I was interested in writing one by myself, just to see what it was like. I had downloaded the ternary code snippet, but I wasn't to warm and fuzzy about it. The snippet ought to have given me the opportunity to type in the variables using the special code snippet mode before reverting back to standard mode in Visual Studio. So, I grabbed their code, made a few changes and now creates a line of code with a ternary operator in it - just how I like. Here' the snippet that I dropped into my snippet folder.

Folder: \My Documents\Visual Studio 2005\Code Snippets\Visual C#\My Code Snippets

ternary.snippet XML File:

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
   <CodeSnippet Format="1.0.0">
      <Header>
         <Title>Ternary</Title>
         <Shortcut>ter</Shortcut>
         <Description>Custom code snippet for ternary operator</Description>
         <Author>andrewdothay</Author>
         <SnippetTypes>
            <SnippetType>Expansion</SnippetType>
         </SnippetTypes>
      </Header>
      <Snippet>
         <Declarations>
             <Literal>
                 <ID>result</ID>
                 <ToolTip>Replace with the field or property that will recieve the value</ToolTip>
                 <Default>result</Default>
             </Literal>
             <Literal>
                 <ID>expression</ID>
                 <ToolTip>Replace with the expression to compare</ToolTip>
                 <Default>expression</Default>
             </Literal>
             <Literal>
                 <ID>trueValue</ID>
                 <ToolTip>Replace with the value if the expression is true</ToolTip>
                 <Default>trueValue</Default>
             </Literal>
             <Literal>
                 <ID>falseValue</ID>
                 <ToolTip>Replace with the value if the expression is false</ToolTip>
                 <Default>falseValue</Default>
             </Literal>
         </Declarations>
         <Code Language="csharp">
            <![CDATA[ $result$ = ( $expression$ ) ? $trueValue$ : $falseValue$;$end$]]>
         </Code>
      </Snippet>
   </CodeSnippet>
</CodeSnippets>

This snippet uses four variables. The <Code> element contains placeholders for the line that will be emitted by the code snippet. The "$" symbol surrounds the variable so its easily identifiable by the snippet engine. When Visual Studio is in the special mode, I can tab between the variable fields to enter the value, then hit tab+tab to switch back to normal view after I've entered in the customizations. Sweet!

>>>>>>>>>>>>>>>>

I just found this four minute screencast on Channel 9 too! She does an excellent job of showing one up close.

Sunday, April 01, 2007 3:51:09 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

I recently became aware of the "??" operator in C#. I guess it doesn't have a real name like the ternary operator that I've long been a fan of using. I'll call it the WTF operator until I learn a better (more popular) name. Let's take a look at the "What The #$@#%@#" operator in action:

public int PageTabId
{
   get { return Convert.ToInt32(Request.QueryString["PageTabId"] ?? "-1"); }
}

Per the MSDN reference, the WTF operator inspects the value on the left side of the "??". If it's null, the value on the right is returned. If its not null, the value on the left is returned. Its a lot like IsNull in T-SQL. The code example above is just a simple helper property for an ASP.Net page. The property looks for a querystring value. If its there, the value is cast as an integer and returned to the caller. If its not in the querystring, the default integer value of -1 is returned.

I've been using the ternary operator for a while. Here's the same property as above, but uses the ternary operator instead. Its more verbose than WTF, but still one line of code.

public int PageTabId
{
   get 
   { 
      return Request.QueryString["PageTabId"] != null 
         ? Convert.ToInt32( Request.QueryString["PageTabId"] ) : -1; 
   }
}

I love writing WTF all over my code!

Sunday, April 01, 2007 3:29:02 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 

The wife coaches the Knowledge Bowl team at her highschool. She really digs the higher level stuff and enjoys teaching AP math and stats classes. She comes home just completely wiped out some days but I never seen her happier than when she's teaching. She worked at a couple of internet start ups back in the day (in Chicago), has a Masters degree, a whiz at Excel functions, punches you in the belly with SQL queries and knocks your block off with scripting. She never really dug it though (except for the cash). She started teaching a few years ago and never looked back. I'm really proud of her for finding a job she loves.

Last week, her Knowledge Bowl team won the 4A Washington state title!!! She swears she had nothing to do with it, and the kids are just fabulous. I can't tell you how many times my wife has dragged me to bars for trivia night. We used to be regulars at Beulahland for trivia night. Now she has a state title to defend next year. Go wife!!

events | fun
Sunday, April 01, 2007 3:02:09 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 

I watched episodes #1 and #2 of the Developer, Meet Server series on Channel 9. Jason Olson is a phenomenal presenter. There are so many switches to flip in the Vista, Longhorn and WCF stack that it can make your head spin. Jason explains the technology really well so the act of shoving more knowledge in my head is less painless.

The first episode explained how Vista can take advantage of Transactional NTFS (TxF). The concept is really simple but the operating system has to make some incredible leaps to provide this feature. TxF provides full ACID support for writing files to disk. Jason mentions this scenario that benefits from TxF support in the video:

You write a large file to disk and write meta data of the file to SQL Server. This TxF technology can increase your confidence that the database and the document are always in sync.

We've database transactions for a while - seems odd that its taking so long to do this at a file level... easy for me to say I suppose. In the video it sounded like Jason and some pals wrote a managed wrapper that does deep dive into unmanaged code for us. He said that perhaps later on it'll be more tightly integrated into the platform if the community likes it.

The second episode elaborates on TxF by using WCF. A smart client app makes a transactional WCF call to the server. The server uses the TxF service to create a file on the server's hard drive. Later, the client issues a commit and the file is visible to Windows Explorer, you and me.

I wonder what happens to files that never get committed - ala a long running transaction. They have to be taking up file space. Jason says not even Windows Explorer knows about them, but they have to exist somewhere. What if they overflow? Is there a way to clean house? If the poop is invisible, does it still stink?

Sunday, April 01, 2007 2:27:05 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [1]  | 
 Monday, March 05, 2007

I was lucky to learn SQL early in my career. It was in a DB2 environment; in order to call the database, my assembly language program called out to a COBOL program to make the actual database query. Whoo-yah!! 

I transferred my skills to SQL 6.5, SQL 7 and SQL 2000 along the way and gotten pretty good at using the technology; I can hold my own with most database challenges. I've been a little pokey about learning the new features in SQL 2005 - the "use it until you run into a problem" worked well enough for the lightweight stuff I've been working on so far. I've set my sights on bringing my skills up to par with my understanding of the previous products. Geesh! I don't have a SQL Server category on my blog yet; I guess that sums up the past few years.

Today, I'm using a database with *many* stored procedures in it. I only want to view/peek inside my own. So, there's this great feature in SQL Server Management Studio to apply a filter. Once its set, only the stored prcedures matching the given criteria are visible. Right click on the Stored Procedures folder and select the "Filter" item in the context menu. Then, set your filter choices. It rocks!

Monday, March 05, 2007 10:28:20 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Thursday, February 15, 2007

I attended the Software Association of Oregon (SAO) event today. The Development Special Interest Group (DEV SIG) hosted a discussion about Microsoft CardSpace, the open source framework of OpenID, and basic identity management.

Stuart Celarier walked the audience through Kim Cameron's paper called The Laws of Identity that articulate seven desired aspects of a good identity system.

Microsoft CardSpace was formerly named "InfoCard". This is a joint effort to implement the identity metasystem defined by the laws of identity. CardSpace is the "identity selector" for Windows. It needs IE7 and Microsoft .Net Framework 3.0 to operate. It implements the WS-* specifications in this service.

OSIS - Open Source Identity System: This is an open source group that's involved in the identity space.

Stuart also showed a demo of a system he's been working on. It logs a user into Wachovia banking site using CardSpace.  Scott Kveton of JANRAIN presented OpenID to the SAO DEV SIG group. OpenID hopes to solve the problem of having too many usernames and passwords.

  • Single Signon for the web
  • Simple, light-weight
  • Easy to use, easy to deploy
  • Open development process
  • Decentralized

Your OpenID is a URL: http://kveton.myopenid.com/

  • OpenID comes from the blogosphere
  • Biggest problem with identity; namespace
  • OpenID solves this by using DNS
  • Your identity is a destination
  • You have a unique endpoint on the web

Scott Kveton explained how sites enabled with OpenID enable users to authenticate. Visitors type in their OpenID, and the browser redirects to your OpenID provider. The visitor makes the appropriate decision and the browser redirects back the website.

Scott's site is http://scott.kveton.com

Last week Bill Gates announced support for OpenID. AOL announced support for OpenID this morning. More companies are about to make similar announcments. Here's some interesting stats on adoption:

  • 12-15 million users with OpenIDs.
  • 1000+ OpenID enabled sites
  • 10-15 new OpenID enabled sites each day
  • 7% grown each week with new sites

Kveton also brought up "Microformats" - a way to describe data in an HTML format (contact info, social network, calendar). These can be embedded on pages. There are some interesting ways to use OpenID with these technologies:

  • OpenID + iCal
  • OpenID + hCards
  • OpenID + Social Networking (XFN, FOAP or FOAF?)
  • OpenId + Reputation (jyte.com)

OpenID Predictions from Kveton:

  • 7500 sites supporting OpenID
  • 100 million users with OpenID
  • Big players adopt OpenID

OpenID.net has a ton of info.

Scott Hanselman explained how he enabled OpenID on his blog. Hte added two HTML <link> tags to his website. Simon Willison has an OpenID enabled blog. A visitor can click Sign in with OpenID. The OpenID logo lives inside the textbox. Scott entered his OpenID in the textbox on Simon's site. Using a web service, Simon's blog discovered Hanselman's OpenID provider, then it redirected the browser to Scott's OpenID provider.

Scott's website indicates the OpenID provider is www.myopenid.com

The OpenID provider prompts Scott to authenticate. After a successful login, the browser redirects back to Simon's page and recogizes Scott Hanselman. This is how Simon doesn't need to keep track of usernames and passwords for his blog; a huge benefit.

Stuart helped explain the difference between self-insued cards and managed cards: Business Cards from Kinko's versus a card issued from Visa.

Scott Hanselman displayed a different identity selector using Firefox on Windows. The page contains an HTML <object> tag of type "application/x-informationCard". It wasn't as pretty as the CardSpace in IE7 and .Net 3.0, but it had the same behavior.

There was some last minute discusson on "I-Name", an XRI technology (extensible resource identifier). It sounds like its still being baked.

2idi relays comments on Scott's blog. They will issue an I-Name. =kveton is Scott's I-Name. They have an DNS resolver where visitors may enter xri://=scott.hanselman/photo to redirect to his Flickr account.

Thursday, February 15, 2007 4:47:54 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Monday, February 12, 2007

I had listened to all of my normal podcasts last week and over the weekend. So, on the bus ride to work this morning, I downloaded and listened to a couple of random podcasts on my Treo.

Tech Nation Daily had an interesting two minute interview:

Dr. Moira Gunn talks to Beverly Davis, Professor in the School of Technology at Purdue University about Technoism, the need for technological emersion centers.

The interview revealed an interesting statistic: a distribution of households in the United States with Internet access at home:

  • White Households: 46.1%
  • Hispanic Households: 23.6%
  • Black Households: 23.5%

There's an awful lot of potential still out there along with a number of challenges. I wonder what these numbers will be like when I'm 80.

Monday, February 12, 2007 6:59:18 PM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  | 
 Sunday, February 04, 2007

Tasty! Sometimes you do something so delicious that you just have to link to it from your other blog.

fun
Sunday, February 04, 2007 8:55:11 AM (Pacific Standard Time, UTC-08:00)  #    Disclaimer  |  Comments [0]  |