Scott Hanselman

Microsoft Silverlight in Safari for Windows

June 11, '07 Comments [14] Posted in Musings | Silverlight
Sponsored By

After I installed Safari for Windows, the second thing I did was see if it would run Silverlight. I loaded up the Airline sample that I had running locally on my machine and got this.

Silverlight Airlines Demo

From this I glean that the JavaScript detection code isn't digging Safari on Windows. So...checking my HTTP UserAgent gives me:

Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/522.11.3 (KHTML, like Gecko) Version/3.0 Safari/522.11.3

...but on Mac it's usually:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/XX (KHTML, like Gecko) Safari/YY

...and since it's not Silverlight but rather the JavaScript that makes the decision on whether to try to load Silverlight (and considering that Flash and what-not worked in Safari without be needing to reinstall any plugins).

I opened up this app's Silverlight.js file and added an alert() around line 85:

var versionStr = detectAgControlVersion();
alert(versionStr);

...and it reported 0.8.5. That means that Safari can see the plugin on the system, but the version should be 0.95.

I figure that the Silverlight Team is already all over this, so rather than solving the problem for them, I added:

agVersion = "0.95.0";

...around line 65 to force the issue. This got Silverlight loaded into memory, as seen in the Process Explorer screenshot below...

Process Explorer - Sysinternals www.sysinternals.com [PDXSHanselm]

...but nothing showed up. Blank screen. No amount of windows jiggling or resizing (to force a paint) would get it going on my system.

UPDATE: Tim Heuer tried the same thing and says the Silverlight Team is on it and that Safari smells like Opera to Silverlight. He also says he was able to get a control to show while I was not.

If this browser is going to get some share (and it likely will with 1 million iTunes downloads a month - they'll likely bundle it virally) then Silverlight support is a must.

Technorati Tags: , , ,

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

Safari for Windows - First Impressions

June 11, '07 Comments [68] Posted in Musings | Reviews
Sponsored By

imageHell has frozen over and I'm running Safari on Windows (v3 Public Beta) You can download it at: www.apple.com/safari.

Good Things:

Weird Things:

  • Dialog Boxes show up as additional Application Windows in the Explorer bar. Meaning, if you have the Preferences Dialog open, the Taskbar says you're running two Safari Windows.
  • The installer asks to install the Bonjour Service, Apple's service discovery protocol ala UPnP. I declined.
  • It uses its own Font Smoothing system with three options, light, medium and strong. It's not using ClearType, and they appear to have their own embedded fonts for rendering text within the browser.
  • It looks like a Mac Application on Windows. Not bad, but slightly creepy.
  • This blog's comment box renders strangely, possibly because they allow you to resize text boxes yourself. It obscures the new Live Comment Preview.
  • What's the point? Was this browser needed?
  • As with OS X apps, you can only resize the window with the handle in the lower right corner.

Speculation:

  • They've clearly built some amazing owner-draw cross-platform UI framework here. Perhaps Safari was the proving ground? Well, they've proven it. I wonder if the Apple concept of a "Universal Binary" has more draconian world dominationesque connotations? Perhaps Objective C is the new Java? Write once, debug everywhere.

Either way, I encourage you to download Safari and try it out. I'm not switching away from Firefox2 just yet, but speed is the #1 thing that'll make me switch. We will see.

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

How To: Use Google Earth or Virtual Earth to Visualize a New House Lot - Part 1

June 10, '07 Comments [7] Posted in Musings | Tools
Sponsored By

Required Tools
(assumes Windows, but there's comparable tools on any platform)

We were screwing around last weekend looking a houses and found a big empty lot that some folks are building houses on. I was surprised that the Real Estate folks (at least these) weren't very computer savvy. Everything's pushed around on paper. There's no kiosk, no 3D renderings, nada. I wanted to understand how the neighborhood would lay out and where houses would sit, but other than pencil sketches, they couldn't help me. Seems that this kind of thing could be very useful to a prospective buyer.

So, given my lunch hour...

(This isn't a house or neighborhood I'm looking at, I've just selected it for demonstration)

Most folks have used Google Maps or Virtual Earth before, but mostly just for driving directions. Few "civilians" (read: non-geek) that I've met have used Google Earth, which is a shame.

If you want to visualize your house lot, here's some steps to help make that possible.

1. Download Google Earth and find the lot.

The imagery is usually a few years old, but if it's an empty lot anyway it shouldn't matter. Put a pushpin on the area so you can get back there quickly.

 Google Earth (2)

2. Go to your Builder or Realtor's site and get the neighborhood map.

Often these maps are in PDF format. Open the PDF and get it as large as you can on the screen.

 

3. Edit the Neighborhood map and remove the non-map stuff, leaving the rest transparent.

Use the screenshot tool or press Printscreen to get a screenshot in the clipboard. Open your Paint application and paste in the picture of the neighborhood.

Untitled (72%) - Paint.NET v3.07

Once you've got your neighborhood picture in Paint.NET (or whatever editor) use the Eraser or Magic Wand tool set to low tolerance to select and delete all the whitespace that isn't part of the map. In this example I'm removing logos, the legend, everything. The checkerboard area underneath means "transparent" or "see-thru." This will make our map look much better once we put it into Google Earth. Now, be sure to save this file as a PNG, which is a file format that includes transparency.

4. Import the new transparent Neighborhood Map and resize

Now, go back over to Google Earth and click Add | Image Overlay and select your just-saved PNG file.

Goof: I realize now after this is all done that I kind of screwed up this example because I left some white border in the far right and very bottom, and a tiny white line on the far left of the neighborhood map. It looks a smidge sloppy. :( Make sure you double check your transparency and get all the non-map stuff removed cleanly.

Google Earth (3)

This step can be VERY confusing because Google Earth has no way of knowing what the "scale" of your image is, so it'll just fill the screen. You can't immediately resize the image and it can be very frustrating.

TIP: You have to Right Click the new Image Overlay in the Places pane, usually on the left site of the Google Earth screen. In my screenshot above it's called "Untitled Image Overlay." Right-click it and select Properties. Only when the Properties Dialog is up can you resize the image. You'll know you're able to resize when Kermit-green colored lines appear all around your image. Hover your mouse over these lines to resize your image. I encourage you to make the image partially transparent to make resizing easier.

Try to use existing or soon-to-be-connecting streets to get an idea how your neighborhood and lot will fit into the scheme of things. Remember that you can use the mouse wheel and move the view around WHILE you are resizing your image. Note that the Properties Dialog is "modeless" - that means you can do stuff while it's showing, unlike many other Dialog Boxes.

Google Earth (5)

Be sure to press "OK" on the Properties Dialog or you'll undo all your hard work. Now that your image overlay is positioned it is a part of the Google Earth system (at least on your computer) and you can few the lot from multiple angles and elevations. You can also move your Pushpin - again, only via the Properties Dialog - and point it at your lot.

Google Earth (6)

4a. Get better imagery in Microsoft Virtual Earth and a Static Bird's Eye Image

Microsoft Virtual Earth has flyover imagery from airplanes taken at an angle that are MUCH higher resolution than typical satellite photos. The pictures are also sometimes newer than those found at Google. Find your lot/plot in Virtual Earth, and click the Bird's Eye View icon under 2D imagery. Press F11 to put your browser into "Kiosk" Mode in order to get a larger image.

TIP: In Virtual Earth, click Share | View Permalink and notice the latitude and longitude numbers in the URL. You can "hack" that URL (you can edit it) and plug in the exact lat/long numbers from Google Earth to quickly get to the same spot in Virtual Earth.

Take a screenshot and put it in the clipboard. Launch your Paint Program and paste it in as a fresh image.

Live Search - Windows Internet Explorer (2)

Add a new layer in your Paint program. In Paint.NET, click Layers | Import from File and select your PNG file of the neighborhood layout that you created earlier. Make the layer slightly transparent to help with positioning. In Paint.NET you do this by double-clicking on your new layer in the Layers Floating Toolbox and changing it's opacity.

In an application like Photoshop you can use the Free Transform option to skew and warp your neighborhood map to match the angle and aspect of the Bird Eye View imagery. In Paint.NET I didn't think this would be possible, until I figured out the Rotate/Zoom tool. The tick is that you can actually click and drag that little ball to change any selection. You can also use the Pan and Zoom to affect your image. These are the tools you need to get your neighborhood map to fit. A second after you make a change - without closing the Dialog - the picture will update. By making small incremental changes you can line up the map to the photo. If you have trouble with things moving too fast, select the control you want to change and use the Arrow Keys to move things 1 number at a time.

rotatezoom 

You might even use the Lasso tool to grab a house in the neighborhood that looks just like your future home and place it on the lot as I've done in the sample below.

homesite

In a Part 2 post I'll show you how to start drawing your house (to the best of primitive ability) in 3D using the home plans and placing it into the Google Earth environment.

Technorati Tags: , , ,

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

Can you show screenshots of an application you built for another company on your resume?

June 8, '07 Comments [10] Posted in Musings
Sponsored By

I got a great question in the mail today.

I'm writing to you because I thought I would give this question a shot, and you would probably know, or know someone I could ask. I realize there is a lot of gray spectrum in this question, but is there a simple answer? I don't know. Hence my email/message. Here goes.

I used to work for a company, I wrote a lot of dot net apps for an intranet. I took screen shots of the apps while I worked there. Can I display those screen shots on a resume page on my personal website with a brief description of the application? The apps have the company logo on them. Actual data can be blurred/marred via a paint program easily. Photos of anyone can also be blurred. My question is: Can I display, or give a visual of my previous applications that I have written to display the style and design of the application via a picture or photo? There would be no functionality, nor any secrets on how the application actually works beyond the type of technology used. At what point, if any, could someone post a screen shot of the application, with or without permission? Basically without infringing on copyrights etc.

I tried to keep it simple. I have spoken to some colleagues about this and no one can give me a clear cut answer. Any help or direction would be greatly appreciated.

Well, first, I'm not even close to being a lawyer. I don't even play one on TV. That disclaimer aside, I say this.

  • Consider if the app is public or not
    • If the app is accessible on the public Internet - yes.
    • If the app is an intranet only app - ask your original boss (ideally ask before you leave the job).
  • Make it clear what you did and didn't do.
    • Make sure you indicate CLEARLY if you worked on the UI. If you did NO WORK on the UI and your showing a screenshot, always err on the side of full disclosure. "Here's what it looked like; we had a great designer who wasn't me."
  • Is a screenshot going to add value?
    • If it's a visual thing, and you were a contract designer, you need to work these agreements into your contact ahead of time. If you're a non-UI component developer, then do you really need a screenshot? I'd consider using UML diagrams, state diagrams, data flow diagrams, etc.  Again you'd need to ask for permission to use these.
  • Use sample data
    • Don't take the chance of a screenshot of any real data and "obfuscate" it. I've learned that blurring images to hide data is not 100%, do don't even try it. Seriously. I've started redacting data by digital white/black-out. But for this kind of thing, don't take the chance. Use sample data.
  • Make it clear who paid for the application development.
    • You're not trying to say, "here's an app I wrote," but rather, "here's an app I was paid to work on." In this case, I think it's reasonable not only to ask for permission, but to include some kind of watermark indicating who holds the copyright on the application. If there was a UI designer, include their details as well.

Again, this is all opinion. Any techno-lawyers out there? What do you say, Dear Reader?

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

Random Friday Lowercase-A arguments

June 8, '07 Comments [48] Posted in Musings
Sponsored By

My wife and I tend to lowercase-a argue about random stuff. We have a good time, though, it's part of our collective charm. We have "gentleman's bets." There was a good one yesterday while we were watching TV..."which of those chicks is a dude." Seriously, don't ever test my 'trannydar', you'll always lose.

Anyway, here's two recent arguments questions:

#1. A relative was reviewing the information of correlation that he'd learnt some time ago in statistics. It is possible for sets of data to be perfectly correlated, with a linear correlation co-efficient of 1, although this is very rare. Sets of data can also be correlated in a non-linear fashion such as in the form of a binomial or other polynomial function.

He was looking at his energy bills over the past year in comparison with the average monthly temperatures over the same period, and have come up with the following data (currency values converted to US dollars). What sort of relationship can you deduce, if any, between the bill and the temperatures (in Fahrenheit)? Can we say there is any correlation between the data? 

AverageBill/$,150,140,137,118,110,90,84,82,96,98,120,143
AverageMonthlyTemperature,38,41,45,48,54,57,64,69,77,79,85,90

#2. Discussion around this one went on animatedly for hours, and she's still not convinced. I've pasted it in her original phrasing so as not to get into more trouble. ;)

1a. What is the probability of two siblings having the same birthday (month and day)? (Specifically not twins. We're looking for the probability of siblings having say, January 1st or December 25th as their birthday.) Please explain your answer, I wouldn't want Scott to get too lost!

1b. Does your answer to 1a change if one of the siblings has already been born, and the other isn't? Again, we're looking for an explanation along with the answer.

An answer or two (maybe the right ones? Who knows?) will be added to this post tomorrow.

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.