Scott Hanselman

How Geeks become Do-It-Yourselfers and Tile their Kitchen

September 30, '06 Comments [24] Posted in Musings
Sponsored By

Josh and Scott Baby PicturesPerhaps you'll see yourself, Dear Reader, in this story.

My family is Handy. Well, let me qualify that. The {set of all people in my family who are not me is Handy}. That's "Handy" with a Capital-H.

My dad, was a Firefighter for thirty years, and my brother

(pictured in a headlock and covered in baking soda at right. He's the short one. Of course, now he's a Triathalon-running-biking-swimming 6'2" ninja, but at the time of this picture I could beat his *ss. Didn't last long, needless to say.)

is also a Firefighter. They are both handy. Josh and his wife also run Starry Nights Stables filled with all sorts of Handy things that they build themselves like horse runs from scratch. 

I, on the other hand, hire a guy to mow my lawn. You get the idea.

Seemed like I'd be the non-Handy Hanselman and I'd resigned myself to the situation. Recently we decided to remodel our kitchen. We'd had a bunch of tiles just fall completely off the counter, messed up cabinets, scratched walls, yada yada yada. Seemed time to do something about it.

We tend to research things a lot before we take action so we started at the library. We got books on tile, on counters, on painting, etc. We went to Lowe's and The Home Despot. I had little confidence in my ability to make this happen, but Josh and Dad said they'd be happy to help. They came up a few weekends (they live 90 minutes away) and helped tear out the old counter and level the cabinets for the new one.

When it came time to decide about the "backsplash" - the tile that's up against the wall, connected to the counter in case there's any confusion ;) - I figured I'd hire a guy. Josh and Dad had really worked hard but I didn't want them to keep driving up to help. Both assured me that I helped them in substantive ways, but for some reason occasionally running Windows Update or installing SpyBot didn't seem to be a fair exchange for tearing up a kitchen. (Yes, I know they are family and family helps folks without the need for payback, but you're missing the point. You have no focus!)

Mo said that if we did the tile ourselves that there'd be a Sense of Accomplishment.™ I figured that we could buy a Sense of Accomplishment™ while sitting on the couch. But, her wisdom prevailed and I declared that I'd be doing the tile myself. We smiled with a feeling of pending accomplishment. This will go well, right? 

Aside: Once three years ago I tried to change out the Water Filter on the Refrigerator and hooked it up backwards. The resulting explosion of carbon dust from the filter is currently hovering over Fiji moving in a South-South-Westerly direction.

Realizing that I am in fact, not Handy, I decided that I'd need to supplement my skills with Tools. This, Dear Reader, is how the Geek becomes a Do-It-Yourselfer. One word people - lasers. But, I'm getting ahead of myself.

Here's how Geeks do Tile.

  • CIMG5816Go to a Tile store and borrow their board of Tile. This is a big wood board covered in Tile.
  • Scan said Tile board. Scan it into PhotoShop. Create a 1:1 scale model of the Tile design and print it out on your Inkjet printer.
    • There's nothing like fake inkjet tile taped to your kitchen wall to give you a clear idea of what the final design is going to look like.
    • Aside: "Random" is hard. I ended up coming up with a pattern for this tile that would look random for a moment, then looked like a pattern later without falling into a checkerboard or moire thing. It also made efficient use of the colors of tile we had. But making it look Random was tricky.
  • Measure like ten times. Seriously. We were using 2" tile that turned out to be actually 1 7/8" so a little thought had to go into it.
  • I estimated I'd need 386 tiles. Apparently they don't sell 2" tiles all onesy-twosy like that, so don't go to a Tile Store and declare "I require 386 two-inch tiles."
  • We ended up buying 12" squares with 36 tiles each and had a few left over.
  • When the tiles show up, lay it ALL out exactly as it should be. Sticking tiles on the wall isn't the time to decide how it ought to look.
  • Get a freakin' laser. Chalk lines? Pencils? For Handy People, I say. Geeks use Lasers. I'd say it made it so much easier, but since this was the first time I'd done tile, I don't have another frame of reference. Still, pencils? Please.
    CIMG5815
  • Did I mention lay it all out ahead of time? Do that. I also put little pieces of paper every 5 tiles so I could tell where 10 inches would be.
  • Decide if you can do the whole thing without cutting a tile. One wall was 81" so I'd need to either use 40 tiles and cut one, or make up the space over the whole span. I was able to add the 1" by making the 1/8" grout an extra 1/40" wider between each tile. You really don't want to show up at the other side of the wall unprepared. :)
  • Spacers - use a metric crapload of them. I used something like 1250 little plastic spacers to make the grout lines just so. Love 'em.
  • Thinset is the cementy glue that you use to make the tile stick. Don't mix it yourself, get the premixed stuff.
  • When you put the tiles on, twist them slightly as you push to get the maximum amount of the Thinset on the back of the thing. Use the Grout Float - that I called the "pressy rubber thing" before I learned it was a Grout Float - to push against the tiles and apply even pressure over the whole field.
    CIMG5817

I'm very happy to announce we now have a Sense of Accomplishment™ and that I have joined the ranks of Handy Hanselmen who are Do-It-Yourselfers.

P.S. I promise I won't even think about the opportunity cost of this whole operation.

P.P.S. OK, maybe a little.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Set up your system to use Microsoft's public Symbol Server

September 30, '06 Comments [1] Posted in Programming
Sponsored By

Symbolserver1If you're always futzing around with Process Explorer or trying to load your DLLs into someone else's memory space (like Explorer.exe), you're running WinDBG (or you want to) on Vista memory dumps, then you'll want to hook up to Microsoft's public Symbol Server for the PDBs for Microsoft's various and sundry processes.

Here's a good "Getting Started" article at MSDN as well as this one on How to use a Symbol Server.

Basically all you have to do is right-click My Computer, then click Properties. Select the Advanced tab and click the Environment Variables button. Set a variable called _NT_SYMBOL_PATH to something like:

SRV*c:\symbols*http://msdl.microsoft.com/download/symbols

...and you'll automatically get the PDBs downloaded directly from Microsoft while debugging. Be aware that there's often a long pause the first time the big ones come down. After that, it's speedy.

As long as the Symsrv.dll file is in your C:\Program Files\<Visual Studio>\Common7\IDE folder - it's put there by installing Debugging Tools for Windows - you'll get the symbols in VS.NET. Here's a video explaining how.

Sysinternals' Process Explorer has a dialog box where you can configure Symbols as well that it'll use to resolve function names while you're in the very useful Threads tab of a process' properties.

Symbolprocexp

Gets you actual function names and stack locations that are meaningful in Process Explorer:

Symbolprocexp2

You can also set up a Symbol Server at your company (we have one here at Corillian, but it's not well-advertised internally - yet). Here's a screenshot of part of my C:\symbols folder after debugging. Notice that I've set the folder with the Compressed attribute. That's useful because PDBs will typically squish at least in half.

Symbolpath

If you really want to go bonkers, you can also setup a Source Server that will automatically retrieve the files needed to debug at the source level. Here's a great article from this August explaining what's involved in setting up your own Source Server.

This is one of those things you should just setup and forget and you'll be happy when it's already ready for you when you need it.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

The Importance of being UTF-8

September 29, '06 Comments [7] Posted in ASP.NET | Internationalization
Sponsored By

Kevin Hammond at http://www.casadehambone.com/ wanted the title of his blog to be "Casa dé Hambone" - note the é. He's running DasBlog and saw "Casa d Hambone" - note the missing é.

I knew/know that this works fine in DasBlog because it's been internationalized since Day 1 - we've got 14 languages out of the box. He sent me his site.config file (that's where DasBlog stores its configuration) and I opened it in Notepad2.

Notice in the screenshot that this file is saved as ANSI/ASCII. This file was probably manually edited with a non-clever editor.

Utf81

However, if you do a straight convert, of course, you'll lose data (and Notepad2 warns you of this fact). Notice what happens when I do a convert via File|Encoding:

Utf82

This is one situation where the Windows Clipboard works great and can save you a hassle. I selected all , copied to the clipboard, changed the encoding, then pasted.

Utf83

Now we're cool. ASP.NET and .NET in general will almost always "do the right thing" if you're using UTF-8. You can certainly specify alternate encodings if you like when you're opening a file via code. We use the StreamReader internally and the docs say:

StreamReader defaults to UTF-8 encoding unless specified otherwise, instead of defaulting to the ANSI code page for the current system. UTF-8 handles Unicode characters correctly and provides consistent results on localized versions of the operating system.

Joel's got a good article I've pointed to before about Internationalization. I've also got some posts in my Internationalization/i18n category.

Changing to UTF-8 fixed Kevin's problem.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Windows Vista, Junctions and moving My Documents to another drive.

September 29, '06 Comments [4] Posted in Musings
Sponsored By

I've blogged about Junctions (Reparse Points or "Hard Links") before, as has Travis with his Junction Shell Extension. Junctions are great for organizing your code because you can start using relative paths again, even when your project structure doesn't lend itself to relative paths. (Sometimes folks even SUBST a drive and "everyone builds to S:" to make this easier. I say ick to that.)

It seemed to me as I spread the word about the wonder and glory of Junctions (as was as the fantastic danger as in Windows XP SP2 when you delete a junction from Explorer, you delete what it points to!)

So, I was thrilled to notice some interesting and very cool new things regarding Junctions on Vista.

Vistajunction2First, in Vista now, deleting a junction point in Explorer doesn't delete the pointed-too folder. If you've used Junctions in Explorer, you'll realize this is huge.

Also, in Vista, while there's no way from Explorer to tell WHERE a junctions points to, either in the Properties or a Tooltip nor in the "Type" column in Details View (insert obvious feature request here) they at least include a Shortcut Icon Overlay on a Junction. It still says "Folder" when you look at it in Details, while a Shortcut to a Folder says "Shortcut." At least that's a start! In this screenshot the first icon is a folder while the second icon is a junction pointing to the first.

This got me thinking, since I keep all my data on a separate drive D: for "DATA." A lot of us do.

In Vista, "Documents and Setting" is now "C:\Users" and a lot of other stuff has changed. They MOVED my cheese. So, where did they move it, and how do they make things point to the newly moved stuff?

They use Junctions, making their first mainstream appearance! I went to C:\Users and did this:

C:\Users\Scott>dir /a /s | find /i "junction"
09/08/2006  01:23 AM    <JUNCTION>     Application Data [C:\Users\Scott\AppData\Roaming]
09/08/2006  01:23 AM    <JUNCTION>     Cookies [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\Cookies]
09/08/2006  01:23 AM    <JUNCTION>     Local Settings [C:\Users\Scott\AppData\Local]
09/08/2006  01:23 AM    <JUNCTION>     My Documents [C:\Users\Scott\Documents]
09/08/2006  01:23 AM    <JUNCTION>     NetHood [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\Network Shortcuts]
09/08/2006  01:23 AM    <JUNCTION>     PrintHood [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\Printer Shortcuts]
09/08/2006  01:23 AM    <JUNCTION>     Recent [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\Recent]
09/08/2006  01:23 AM    <JUNCTION>     SendTo [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\SendTo]
09/08/2006  01:23 AM    <JUNCTION>     Start Menu [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\Start Menu]
09/08/2006  01:23 AM    <JUNCTION>     Templates [C:\Users\Scott\AppData\Roaming\Microsoft\Windows\Templates]
09/08/2006  01:23 AM    <JUNCTION>     Application Data [C:\Users\Scott\AppData\Local]
09/08/2006  01:23 AM    <JUNCTION>     History [C:\Users\Scott\AppData\Local\Microsoft\Windows\History]
09/08/2006  01:23 AM    <JUNCTION>     Temporary Internet Files [C:\Users\Scott\AppData\Local\Microsoft\Windows\Temporary Internet Files]

Notice that I had to use /a because these junctions are HIDDEN as well. But, because they exist, when folks concatenate things after calling "GetSpecialFolder" they'll still get what they need.

I had a little trouble with my upgrade because I ended up with some stuff on my C: and My Documents on my D:, but Vista was still pointing to C:\Users\Scott for My Documents.

I tried to get tricky like this:

C:\Users\Scott>junction "My Documents" "D:\Scott\My Documents"
Junction v1.04 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2005 Mark Russinovich
Systems Internals -
http://www.sysinternals.com
C:\Users\Scott\My Documents: JUNCTION
   Print Name     : C:\Users\Scott\Documents
   Substitute Name: C:\Users\Scott\Documents

But while a cross-drive junction succeeded with Junction.exe, it apparently really didn't:

C:\Users\Scott
>dir *doc* /a
 Volume in drive C is 70 GIGS - SYSTEM
 Volume Serial Number is 88F3-D225
 Directory of C:\Users\Scott
09/08/2006  01:23 AM    <JUNCTION>     My Documents [\??\D:\Scott\My Documents]
               0 File(s)              0 bytes
               1 Dir(s)   6,877,286,400 bytes free

...and...

Vistamydocuments1C:\Users\Scott>dir /a "My Documents"
 Volume in drive C is 70 GIGS - SYSTEM
 Volume Serial Number is 88F3-D225
 Directory of C:\Users\Scott\My Documents
File Not Found

You are supposed to be able to create a "Volume Mount Point" like in *nix where you point a directory at a volume, but that's not exactly what I need here. I'm not sure why it didn't work, because it's supposed to be supported scenario in NTFS.

Well, while I'm not getting the junction to work, I can still move My Documents in the registry by simply right-clicking on the Document folder and moving it with the built-in UI as we've always been able to in Windows XP. It appears that David Mohundro has discovered some of this interesting stuff as well, although I'm not seeing the same behavior as him; my "Documents and Settings" folders are totally gone and emptied, replaced by C:\Users.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Security in MSXML4 and 80072efd

September 29, '06 Comments [1] Posted in
Sponsored By

Old news, but it matters to some. If you're using MSXML4 and you get this while doing a POST:

msxml4.dll error '80072efd'
A connection with the server could not be established

It might be because of the tightened security around MSXML 4.0 SP2.

The docs say:

"Security in the implementation of the MSXML 4.0 SP2 ServerXmlHttp object has been enhanced to check the Internet Explorer security policy setting for submitting non-encrypted form data. A security policy setting of "Disable" or "Prompt" for the "Submit nonencrypted form data" option will result in an "Access Denied" error message when attempting to post form data using the ServerXmlHttp object. This is a change that can potentially break existing code that uses earlier versions of the ServerXmlHttp object (such as prior released versions of both MSXML 3.0 and MSXML 4.0) to post form data when the Internet Explorer security policy setting for submitting non-encrypted form data is not enabled."

This might happen if you have an existing application running on, say, Windows 2000, then you upgrade the machine to Window 2003 and get the new MSXML "for free." Remember - know the application stack, the whole stack if you can. The OS is part of the stack, and in this case, XML is too.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.