Scott Hanselman

July 2008 Technical Reading List

July 25, '08 Comments [28] Posted in Learning .NET | Musings
Sponsored By

IMG_0019I'm still using the Kindle every day for casual reading, but just now I noticed that my pile of technical books on my desk is taller than my son.

Actually, a few of these I've already read in manuscript form and I wrote either a foreword or a quote for good ones. The vast majority of the pile are books I'm currently wading through (slowly).

Here's the books I'm currently trying to read, as told by the Delicious Library application.

julyreadinglist

I've previously read Code Leader and Head First Software Development and provided quotes extolling the virtues of both, but they are such good books that I end up referring to them often enough that I haven't moved tem over to the shelf.

BTW: The Ian Griffiths/Chris Sells WPF book is in my bag. ;)

Related Links

What are you currently reading (technical books...we'll do fiction later)?

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

Make your Website Mobile and iPhone Friendly - Add Home Screen iPhone Icons and Adjust the ViewPort

July 25, '08 Comments [18] Posted in ASP.NET | ASP.NET MVC
Sponsored By

If you're noticing when looking at your blog traffic logs that more and more people are visiting your site from a mobile device, you likely want to be accommodating.

I have noticed recently that mobile devices like the iPhone, iPod Touch and Danger Hiptop (well, that's probably just one guy) have been creeping up my list of Browsers+OSs that visit this blog.

image

How can I make their experience suck less? Just because the iPhone has Safari and can handle most full-size doesn't mean I should go bonkers with the HTML. There's a few simple things that can be done to make the experience more seamless.

Add Home Screen iPhone Icons for your Website

If you visit a website on an iPhone and hit the plus button and click Add to Home Screen...

NOTE: Hold down HOME and the LOCK button to take iPhone screenshots.

IMG_0004

You'll get this screen with a generated thumbnail icon of the current browser's screen. In this case, it's way too tiny and doesn't really well represent my site. It's certainly not an icon that I'd want on an iPhone's Home Screen.

IMG_0005

However, if you make a 60x60 PNG image file and name it "apple-touch-icon.png" and put it in the root of your website, you'll get control over that icon.

apple-touch-iconIf you don't have control over the root of your domain you can add a <link> to your pages and point it to whatever PNG you like wherever you like:

<link rel="apple-touch-icon" href="/customIcon.png"/>

Now, if you hit Add to Home Screen, you'll get a nice image with automatically rounded corners and a shiny bevel (the phone does that), your icon like this, will show up like this:

IMG_0007 IMG_0008

Very little effort for a considerable amount of polish.

Adjust the ViewPort for a "Pre-Zoomed" iPhone Experience

Next, if you visit a web page with Mobile Safari and you always double tap to select the content and zoom to the width of it, why not just set that as an initial default? Just add a <meta> tag like this:

<meta name="viewport" content="width=670, initial-scale=0.45, minimum-scale=0.45"/>

That will set the width of the "viewport" - the part of the page that is visible in the zoomed-in view - as well as the the initial zoom scale and minimum scale. This makes for a pre-zoomed and easily scrolled experience that doesn't change the way the page is laid out.

IMG_0003

It's still the full content, just pre-zoomed for the iPhone.

Enabling All Mobile Devices

Next, to the mobile users who are not using an iPhone, about two years ago I added support to DasBlog for a custom Mobile Theme that would enable Windows Mobile and Blackberry Mobile Browser users to browse DasBlogs more comfortably. In the DasBlog web.config there is a huge section at the end that was populated from this CodeProject article on BrowserCaps. It uses the older ASP.NET 1.1 style of browser detection.

dasblogblackberry

For example, if I wanted to serve a Mobile Theme to iPhone users that visit my blog, I could add these lines to the filter areas for platforms and OS's:

<case match="iPhone">
platform="iPhone"
</case>
...snip...
<case match="iPhone">
os="iPhone"
</case>
...snip...
<case match="iPhone" with="%{os}">
isMobileDevice="true"
</case>

DasBlog then just checks like this and does the right thing. DasBlog uses its own theming engine, but you can use this kind of detection and "downgrade" your site for any device you like.

//Are we on a Mobile Device? See if we have a mobile theme and use it instead.
System.Web.Mobile.MobileCapabilities mobile = (System.Web.Mobile.MobileCapabilities)Request.Browser;
if(mobile.IsMobileDevice == true)
{
theme = themes["mobile"];
if(theme == null)
{
loggingService.AddEvent(new EventDataItem(EventCodes.Error,
String.Format("If you have a theme called 'mobile' in your themes folder,
readers who visit your site via a Mobile Device will automatically
get that theme. User-Agent: {0}",Request.UserAgent),
String.Empty));
}
else
{
return theme;
}
}

Either way, if you choose to setup a custom Mobile theme for a visitor, or you just add a few bits of "chrome" like friendly icons and some browser specific metadata, it's important to at least be conscious of who is visiting your site in which devices and feel empowered to make good experiences for them.

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

Hanselminutes Podcast 123 - Dare Obasanjo on Social Networking

July 25, '08 Comments [2] Posted in Podcast
Sponsored By

image My one-hundred-and-twenty-third podcast is up.  I sat down with Dare Obasanjo this week and we chatted about the interesting problems that Social Networking sites face. Dare blogs about social networking, amongst other things, at http://www.25hoursaday.com/weblog/

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

If you have trouble downloading, or your download is slow, do try the torrent with µtorrent or another BitTorrent Downloader.

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik's new stuff is pretty sweet, check out the ONLINE DEMO of their new ASP.NET AJAX suite. RadGrid handles sorting, filtering, and paging of hundreds of thousands of records in milliseconds, and the RadEditor loads up to 4 times faster and the navigation controls now support binding to web services on the client.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

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

Hanselminutes Podcast 122 - BabySmash!

July 25, '08 Comments [2] Posted in BabySmash | Podcast
Sponsored By

My one-hundred-and-twenty-second podcast is up.  In this episode I share BabySmash! with Carl Franklin and we chat about WPF, its strengths and weaknesses, and my trials in launching my tiny (free) Micro-ISV.

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

If you have trouble downloading, or your download is slow, do try the torrent with µtorrent or another BitTorrent Downloader.

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is our sponsor for this show.

Telerik's new stuff is pretty sweet, check out the ONLINE DEMO of their new ASP.NET AJAX suite. RadGrid handles sorting, filtering, and paging of hundreds of thousands of records in milliseconds, and the RadEditor loads up to 4 times faster and the navigation controls now support binding to web services on the client.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

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

Learn How to use NHibernate with the Summer of NHibernate Screencast Series

July 22, '08 Comments [19] Posted in Screencasts
Sponsored By

I'm a huge fan of screencasts for learning. There are an increasing number of increasingly sophisticated tools and libraries that we as developers have available and I'm leaning on screencasts to learn them. I really like the screencasts that Rob Conery is doing and I've got really positive response from the ASP.NET MVC Screencasts.

I'm starting to think that all technical books should come with a accompanying screencast series. You typically have to watch closely and pay attention, and it's hard to watch a screencast in double speed (unlike a podcast) but a well-done screencast is the next-best thing to letting an expert take over your computer and show you.

There are many tools that support the fundamental tenets, beliefs, and preferred processes in the ALT.NET space. Certainly ALT.NET isn't "all about the tools," but there are certainly preferred tools.

One of those is NHibernate, a sophisticated Object Relational Mapper. I used NHibernate as my Data Layer recently when I got ASP.NET MVC running under .NET 2.0 using NHibernate examples from Davy Brion (who has an NHibernate Category on his blog).

NHibernate is very flexible, but it's a little overwhelming (for me, at least) to get started. Davy has a good "code-heavy" walkthrough of the concepts. Some NHibernate write-ups assume too much, IMHO.

Perhaps to combat this, Stephen Bohlen has created the Summer of NHibernate Screencast Series as a learning tool to educate engineers at his company. Stephen says:

"Often, our strategy for bringing people up to speed on [NHibernate] has been to rely on word-of-mouth and osmosis (often via pair-programming) to get the points across, but now we have a planned staffing ramp-up of a magnitude that will likely make that approach unwieldy."

He's releasing these screencasts to the public and you can check them out at http://www.summerofnhibernate.com/ or subscribe to the feed and get them downloaded automatically like podcasts! Stephen's also including Code Downloads with each screencast.

If you like them, remember that Stephen's doing this for free, while bandwidth isn't, so you can donate via Paypal to help him out. You can visit Stephen's blog with comments and suggestions. My primary suggestions to him would be to drop his resolution to 1024x768 or even 800x600 (what I do) and raise his font size to Lucida Console 16. Right now, you'll need a high-res (1280) monitor to watch his screencasts.

These small nits aside, I think it's great that NHibernate is getting more screencasts that really help folks get started and augment NHibernate's excellent documentation.

Related Links

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

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