Scott Hanselman

2012 Archive of Hanselman's Newsletter of Wonderful Things

January 8, '13 Comments [5] Posted in Newsletter
Sponsored By

I have a "whenever I get around to doing it" Newsletter of Wonderful Things. Why a newsletter? I dunno. It seems more personal somehow. Fight me.

Still, it's one more site to check and it's a hassle for some of you  Dear Readers. Therefore, I will still do the newsletter, but I'll post each newsletter to the blog a week or so later.

Here's 2012's Archive of Wonderful Things' Newsletters as a way to kick it off.


Hanselman's Newsletter of Wonderful Things: November 9th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: October 20th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: October 8th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: September 12th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: August 22nd, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down athttp://www.tinyletter.com/hanselman.

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: August 2nd, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: July 5th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: June 12th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: May 30th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week.

If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: May 16th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week.

If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: May 9th, 2012

Hi Interfriends,

Thanks again for signing up for this experiment. This is my fifth newsletter. Here's some interesting things I've come upon this week.

If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: May 2nd, 2012

Hi friends,

Thanks again for signing up for this experiment. This is my fourth newsletter - I hope I'm not boring you yet.

This is a place for me to include some things that are on my mind as well as fun or interesting links I come upon as well as ideas that aren't ready for prime time. No, I have no master plan. Just having fun. :)

Here's some interesting things I've come upon this week.

If you forwarded this email (or if it was forward to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: April 24, 2012

Hi friends,

Thanks again for signing up for this experiment. This is my third newsletter - I hope I'm not boring you.

This is a place for me to include some things that aren't usually in my blogs or tweets. Things that are on my mind as well as fun or interesting links I come upon as well as ideas that aren't ready for prime time.

Here's some interesting things I've come upon this week.

Please feel free to forward. If you forwarded this email (or if it was forward to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Be well, write good code, and stay in touch,

Scott Hanselman


Hanselman's Newsletter of Wonderful Things: April 12, 2012

Hi friends,

Thanks again for signing up for this experiment. This is a place for me to include some things that aren't usually in my blogs or tweets. Things that are on my mind as well as fun or interesting links I come upon as well as ideas that aren't ready for prime time.


Please feel free to forward. If you forwarded this email (or if it was forward to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman.

Here's some interesting things I've come upon this week.

And finally, if you collect links and good reading like these, I really recommend you start using Instapaper with your mobile devices. Save items for later with the bookmarklet in your browser, and read them whenever on your mobile devices. I have no affiliation with Instapaper.

Be well, write good code, and stay in touch,

Scott Hanselman


The First One

Hi friends,

I hope you're well. Thanks for signing up for this experiment. I thought I'd include some things that aren't usually in my blogs or tweets. Things that are on my mind as well as fun or interesting links I come upon. I'll also try sending "preview blog posts." By this I mean when I'm working on a new idea but it's not totally fleshed out, perhaps I can run it by you guys first.

That's all for now.

Scott

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 keep your ASP.NET database connection strings secure when deploying to Azure from Source

January 8, '13 Comments [13] Posted in ASP.NET | Azure
Sponsored By

I was working with Rob Conery today during lunch moving the This Developer's Life podcast website to Git. We recorded the whole upgrade and migration experience and it will be up as a video on TekPub soon.

Shameless Plug: Check out my TekPub show "The Source" available on TekPub.tv.

A question came up during the deployment. We moved our database from SQL Compact to a SQL Server instance in Azure. But, how do we keep our database connection strings a secret? We are pushing our source code to GitHub and don't want our connection strings and passwords committed as well.

Sometimes you'll make a Web.Release.Config file and keep them in there. Sometimes you'll make a connectionStrings.config and refer to it from the web.config but never deploy it.

However, Azure lets you keep those configuration settings in Azure securely so they never end up in code. Note the screenshot below. There's a Connection String named "TDL." This matches the name that we reference in code and the name of the connection string in our web.config.

Azure hides connection strings

Our ASP.NET Web Pages database call was to Database.Open in WebMatrix.Data. It's pretty simple. Dead simple, in fact.

var db = Database.Open("TDL");

This used to refer to a TDL.sdf SQL Server Compact Edition (SQL CE) file. Then we moved it into a connection string.

<connectionStrings>
<add name="TDL" connectionString="blah blah" providerName="yada yada"/>
</connectionStrings>

The idea is that if your Azure configuration (as seen in the screenshot above) has an value with the same name, that secure value from Azure will get replaced when your app is deployed.

GOTCHA WARNING: I spent twenty minutes trying to figure out why my value wasn't getting updated. My app was was acting as if there was no connection string value at all. I was getting "Connection string "TDL" was not found." After much gnashing of teeth I discovered (thanks to David Ebbo's help) that I had put my <connectionStrings> element inside of <runtime> within the web.config and the error was being swallowed. Apparently that section is pretty relaxed about elements it doesn't understand - certainly more relaxed that the system.web section. Regardless, in the hope that it save some visitor (perhaps you!) time, make sure your connectionStrings element is right at the tine under <configuration/>

All in all, this worked very well for us.

Git Deployments from GitHub directly into Azure

It let us put our code on GitHub, setup automatic deployment to Azure directly from GitHub, while still keeping our SQL connection strings (and any additional production settings) private.

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

iPad, Surface, Ultrabook: Are we there yet?

January 5, '13 Comments [53] Posted in Reviews
Sponsored By

imageDisclaimer: I work for Microsoft in Azure doing open source for the web. I have never worked for the Windows group. I've been blogging here for a decade and I stand on my reputation for being fair and impartial to the best of my abilities.

One day, someone will make the perfect computing device. Or will they? I'm starting to think it's just not possible.

At this point, in 2013, we all want something that is/has:

  • Speed. Note that I didn't say power. I think the days of chasing the all mighty gigahertz is over. I don't care if I have a 3GHz processor or a quad-core whatever. I want apps to launch in an a second or so.
  • Light. I spent years carrying around a 10 pound laptop and calling it light. Before that it was 17 pounds and I called it light. Now I'm carrying a 3 pound Ultrabook and thinking that the power supply is heavy. Whatever is next, it needs to be <= 3 pounds.
  • Size. For a number of years there have been 15" and 17" laptops with huge screens. I believe this is because a 15" or larger laptop was the only way to get a great screen resolution. Now that we can get 1080p resolution (or larger!) on a 13" or 11" screen there's less reason to go large.
  • Touch. Everything needs touch. Reaching out and touching an icon is more intuitive than using a mouse, touchpad or that weird little Thinkpad eraser head. You eraserhead people are weird.
    • "Every laptop should (and will) have a touch screen in a year. Mark my words. This nonsense about how your arm will hurt assumes that you're only using it. A touchscreen is complementary not primary."
  • Quality. Plastic crap is plastic crap. We care about our devices these days and we use them everywhere. Apple proved this with its excellent engineering and aluminum construction. Microsoft validated this and pointed out to OEMs with the engineering work put into the Surface. Microsoft has long made awesome keyboards and mice. I'm glad to see more quality hardware coming out.
  • Keyboard. Now, I didn't say "integrated keyboard" or "fancy touch cover keyboard." I just mean keyboard. I would expand this even more to say "I need a keyboard when I need one and I need it to work well." When I need a keyboard, I usually need it for either a short email OR a long document. For short emails or tweets an on-screen keyboard works but sometimes I do need to write for a dozen pages and I want that experience to be comfortable.
  • Integrated. Everything should "just work." That means touch scrolling without thinking of drivers, automatic updates without thinking, apps that support all my services (Gmail, Hotmail, LinkedIn, etc.)
  • Ecosystem. The apps that I use. Twitter, Facebook, Instagram, Trello, Words with Friends, etc. I wrote about this in my post  "I can't even think about switching phones without these apps." Once you're invested in an ecosystem, the ecosystem itself is a kind of gravity that keeps you on that platform. If I had 2 apps I cared about, switching phones or platforms isn't a big deal. Once I have 20, I need those 20 to exist on new platform - and be awesome - before I switch.

Those are the characteristics that we can all agree on. Now, let's apply those to different needs and work styles.

Consumption vs. Production

SkyDrive integration in Windows 8 RTThis is an axis you see a lot, most often as a way for folks to say that the iPad is a device for reading/getting/consuming and not making/creating/producing. This may have been the case early with the iPad on but it's less valid now.

If you're a writing using an iPad, there are a number of excellent keyboards and 3rd party keyboard covers for the iPad. Personally, I've paired an Apple Wireless Keyboard to my iPad and written on it quite happily. The real issue with producing on the iPad is its lack of a shared file system and most application's mediocre offline integration with services like Dropbox. There are a number of Markdown editors like IA Writer that get close, but none quite achieve the dream: get on a plane, write a bunch offline with a great word processor, get off the plane and sync to Dropbox. We are always forced to "think" about where thing are. Even in Pages - which is a fantastic technical achievement - there's still a constant "copy from WebDav" and "Copy to iTunes." Dealing with iPad documents is such a hassle, in fact, sometimes just emailing the thing is easiest. This is something that COULD be solved, I'm sure, if there was the will to do it right. If you buy into using only iCloud, the experience is better, of course. QuickOffice Pro HD also gets close, but the inability to use one app for storage and another for editing is a consistent problem.

If you're a coder, you can use an iPad or Surface to remote into a larger machine via Remote Desktop or VNC or SSH (with an app like Prompt from Panic) but then you've turned your modern machine into a terminal. That's fine, but it doesn't really take advantage of its capabilities.

The Surface RT has a similar but slightly different problem. There IS a clear file system and it's accessible to you, even from "modern" apps. However, there's no DropBox application (yet) although there's word that an app has been submitted to the store. I'd like to see it in the standard file dialogs like this screenshot. I'd like to see SkyDrive, DropBox, Google Docs, etc. all be available and smart. SkyDrive is well integrated into Office and standard dialogs. I hope others can be. We shall see!

UPDATE: The DropBox app has just arrived in the Windows Store and YES you can open and save files to it from any applications! Get the Dropbox app here.

An Ultrabook (or a MacBook), since it's a full computer, doesn't have any of these restrictions. You can do whatever you like however you like with whatever programs you want whether they are "in the store" or not.

This brings me to the next axis...

Keyboard or no Keyboard or Keyboard in a Cover

Lenovo Yoga 13 ConvertibleTo get "real" work done, until voice recognition reaches 99% or subvocalization becomes reality, you'll need a keyboard. The touch keyboard on the iPad is excellent, really. There's some amazing dynamic resizing of the buttons as well as some smarts when the keyboard is split in two. However, tapping on a screen hurts my bones after a few pages. It's just not as comfortable as a keyboard with "throw" where the keys give under pressure. Not to mention an on-screen keyboard takes up half the screen.

The Surface RT's claim to fame is the Touch Cover. It's a magnetic cover not unlike the iPad one except it doesn't fold. There's an integrated keyboard within the felt cover. You really have to try it to decide if it's for you. It's not for me. I have tried to type on it for weeks now and I've given up. I am only about 80% of my regular speed and it consistently misses my touches. This need to double-touch to make sure a key is hit has been the deal breaker for me, preventing me from getting work done with the Surface.

I went and bought a Type Cover. This is the magnetic Surface cover with an actual keyboard with keys that move. This is a fantastic keyboard rivaling that of my ThinkPad. It's super thin but it's a few millimeters thicker than the Touch Cover so I'm a tiny bit sad. Also, when you fold the Type Cover back, the keys are facing outward so you can feel them when you use the Surface. It bothered me for a bit but then I just decided to get over it. It remains to be seen if others will, but I can attest to the fact that the Type Cover is a killer keyboard, not unlike my Apple Wireless Keyboard.

In fact, if Apple would make an iPad keyboard that didn't have the round battery area that sticks up so much, they'd have a great little combo. I tried carrying an iPad and the Apple Wireless Keyboard around for a while but but the resulting thickness is greater than - and less useful than - a MacBook Air or Ultrabook alone.

I love the idea of a no-compromises "convertible." A full keyboard that takes up only the space required and then goes away as much as possible when I just want a tablet for touch or movies. The Lenovo Yoga (or some MacBook Air that doesn't yet exist but has a touch screen and folds) approaches this perfection. The new Samsung Chronos Ultrabook Series 7 doesn't fold but includes a touchscreen and looks pretty awesome as well.

Speed

iPad AppsI don't know what the speed of the Surface or my iPad but I don't care. Knowing the processor speed doesn't tell me if apps load in a second. Some do on my iPad. Some do on my Surface. All the important ones (Mail, Calendar, etc) load on my iPad in a second. It unlocks instantly. On the Surface they almost load in a second. Sometimes it's instant, sometimes it's 3 seconds. I don't know why it differs. Perhaps sometimes the apps are "warm." I think the Surface RT could do for some app-specific speed optimizations because some apps (Maps) take as long as 5 seconds to load which, in my mind, isn't acceptable for something classified as a "tablet." I expect instant from a tablet.

Here's where things get interesting. Are the expectations that different from a tablet vs. a laptop? We seem to be more patient with our laptops. I expect basically everything except Gameloft games to load instantly on my iPad. Loading in 5 seconds? Time to Force Quit you because something's taking too long.

This expectation of speed started with the original PalmPilot. I wrote apps for the PalmPilot - one very successful - and they always told their developers "our platform has no concept of a wait cursor. Everything must be instantaneous." That perception persists today. You touch, it jumps. Fast.

This is where the Surface straddles two realities. It's Windows 8. A different version in that it only runs the included Microsoft Office desktop apps, recompiled for ARM processors, and apps from the Windows Store. I haven't had any speed issues to speak of with apps in the Windows Store. The only app that has felt "pokey" is the overloaded default Mail application.

In fact, it's only my Ultrabook (given it's a full i7 processor) that has no issues with speed. However, it does have a fan that kicks on while the Surface and iPad run silent.

Laptops vs. Tablets

For me, the Surface's greatest strength and confusing weakness is that the Surface sometimes looks like a laptop. It has a great keyboard in the Type Cover so I keep having laptop expectations. The Surface wants to be held in landscape - not vertically like an iPad. Because I want it to be a great little laptop I keep being disappointed that is isn't one. I actually removed the cover a number of times to try to force myself to use the Surface as a Tablet. In this mode, as a largely consumption-focused device, the Surface shines in ways my iPad doesn't, mostly because of two things: Its 16:9 screen ratio and the ability to really multitask two apps at once.

The screenshots below have be running Hulu and looking at my calendar. I've got Hulu on the right in the first screen, with the calendar big. Notice the Hulu app knows this and makes great use of the space when it's small. Same thing when I switch them with Hulu Large. I get a different but adaptive view of the calendar. This is a great example of the Surface (and Windows 8) shining as a Tablet. I've even considered rooting my iPad to get this kind of Multitasking. I use the iPad gestures and task switching a lot, but sometimes you just want your video playing while you do other stuff.

Surface running Hulu and my Calendar   Surface running Hulu large and my Calendar small

Size

Surface, iPad and UltrabookThis is such a relative thing. I took the boys to the Apple Store to check out an iPad Mini. They were ALL over it. They have iPod touches and have used the iPad, but you guessed it, the iPods are squinty and the iPad is pretty big. The iPad Mini (and most 7" tablets in general including the Kindle Fire HD and slightly larger tablets like the dead (and rooted) HP TouchPad running Android.

My wife, on the other hand, currently has a 15" Dell Laptop that she likes just fine. It's about 5 years old and runs Word and Excel and Gmail and looks at pictures. She has no complaints. She's written thousands of papers on it and it's currently seeing her through a third advanced degree. She uses her iPad for Words with Friends. For her, it's literally a Words With Friends tablet, and that's cool. I showed her the Surface and told her it was "Windows, except you can only run Office and apps from The Store." She wanted to see what apps were in the store, got Bejeweled and Netflix and was happy. She then proceeded to bang out a paper using Word. I warned her she couldn't install Quicken but she said "all my apps are on the web anyway. It does Gmail, right?" So right there, Spouse Acceptance Factor (SAF or "WAF") handled. Funny thing is, she is confused her old laptop is huge now. She's clearly a good candidate for either a Surface or something in the 11" to 13" range, perhaps an Ultrabook.

Me, I keep coming back to my Ultrabook. It's 1600x900 resolution is nice, although I'd prefer 1080p. Perhaps the Surface Pro or a new Samsung would do. It's full Windows, plus it has a touch screen. However, it's kind of a lousy tablet as I can't flip it around or yank off its keyboard.

Ecosystem

surfaceipadultrabookThe Windows Store is getting considerably bigger even in the last few months I've been watching it. There's 13 Markdown editors for example, if the number of Markdown editors can be any evidence of an App Store's health, but half are churned out garbage as is common in the early days of App Stores. As a user I'm less interested in if there's 20,000 apps or 100,000 apps. Those numbers are less meaningful to me that 100 or 200 apps that I will use and love and tell friends about.

According to the Windows Store when I select "Your Apps," I've downloaded and installed 198 apps.  I have 55 pinned to my start screen and 15 are games. I'd tell my friends about all these apps and others. I'm comforted, however, as there are apps to write code with syntax highlighting so an Emacs with SSH app can't be far away. People ARE writing apps for the Surface and the Windows 8 ecosystem.

Comparing this to my iPad which has about 95 apps where 30 of them are games. These are apps that I use every week and they are apps I'd tell my friend about. In this measure, as of today the Surface lacks behind. However, 90% of the big apps I care about are there like Amazon, Hulu, Netflix, Plex, MarkPad, Pulse, Podcasts, Skype, Flixster, FitBit, All Recipes, Remote Terminal and Remote Desktop, etc. Actually, the Google Search apps is fantastic, especially the Voice Search feature which is lots of fun to impress the family with.

The iOS ecosystem has a large number of really high quality apps. I have noticed with some digging there are some gems in the Windows Store like Discourse, NextGen Reader, Google Search, ReddHub, MetroTwit, and many others. They don't all have recognizable names yet, but with time I suspect we'll seem some unknowns independent publishers become knowns.

Integration

Watching "Justified" on my HDTV via AirPlay on an iPad talking to a RaspbmcWhat's integration mean? Well, things should just work together. I love AirPlay, for example. It just works great. You can be on your iPad, watching a movie and then just "throw" the video up to an AppleTV, or even a Raspberry Pi. If you live the Apple lifestyle, it pretty works all works together brilliantly. Our family has two iPads, an iPhone and two iPod touches. AirPlay works, iTunes servers are shared, happiness ensures. To get AirPlay to work with my PCs, I have to install AirServer (a brilliant app, by the way) so I can throw video or even mirror my iPad to my PCs.

The same applies to the Surface. I've got a "Homegroup" setup (took about 5 min) and when the Surface showed up, I added it to the Homegroup. This means that my HP printer just appeared as available and default on the Surface, which was impressive to me. Also, the other machines (my wife's, the kitchen PC, my home office machine) all shared files with the Surface, again without configuration as it's all part of the Homegroup.

Both the Surface and the iPad talked nicely to the Xbox using the SmartGlass app, as they should. If I've got a connected device I expect it to talk to other devices without complaint and in this case they did.

Where the Surface utterly fell down was when I introduced a micro-SD card. The iPad doesn't allow for extensible memory, but for the Surface RT it's a feature so I took a 64 gig mini SD card and put it in the near-hidden slot. I expected some kind of popup followed by an integration step where I'd click OK and then have more space to store my photos and movies.

It was not so, I'm afraid. The SD card showed up like just any other storage. OK, I'll add it to my Library Locations. Nope, you're prevented from adding Removable Storage to Libraries. I tried copying a bunch of Videos to the SD Card and they copied fine and played fine, but the videos (or music, or movies, or photos) don't show up in the Surface applications. Perhaps this can be fixed in some future update, but while I've taken my Surface from 32 gigs of storage to 96 gigs, it sure doesn't feel like it. I have to launch my videos from the Windows Explorer side and not get any integration on the tablet/full screen side of things. It's disappointing. Yes there are workarounds and hacks but there shouldn't have to be.

That said, having a USB port on the Surface is a plus. My USB mice and USB keys have all worked just fine.

As my friend Jon says: "Apple solves media sharing, Windows solves file sharing. It would be nice if one of them solved both. Completely."

Getting Work Done

Word is a decent Blogging PlatformWell, depends on what your work is. Take this blog post for example. It's just text and some pictures. You need a good blog editor, support to get the data into your blog and some picture editor. Being able to assemble a competent blog post (or doctoral thesis for that matter) is a good litmus test for any device that purports to do more than play games and watch movies.

I tried to write it on the iPad, which has a lot of great Markdown apps but no good XML-RPC blog front ends, and I don't run Wordpress. There is Blogsy, which is arguably the only decent blog editor on iOS, although there's also BlogPress. Blogsy is close and I may use it to fix the occasional typo from the road, but there's no way to crop, edit or resize photos. Fine, I'll use the iOS photo app or PhotoShop in iOS. There's not even a way to move an image like dragging it once its placed. This isn't the iPad hardware's fault but it does point out that it's challenging to do work when work consists of moving a lot of diverse data around without a file system.

The Surface RT fared a little better. Since the Surface  includes Word 2013 and Word supports the MetaWeblog interface out of the box I was able to type and edit this post in Microsoft Word (who knew that Word was a reasonable Blogging app?). It works pretty well as there are no great Blogging apps on the Windows Store as of this writing. Additionally, I wasn't able to find some kind of a free Paint.NET clone to crop and markup my screenshots. The closest I found was Artefacts but at $13.99 I wasn't willing to go for it. Fortunately the Free version of Artefacts supports cropping via its "reframe" command. It's a gorgeous app but I had to dig to find it.

I finished this post on my Ultrabook using my favorite (and the best) blogging app, Windows Live Writer. This makes me feel like I would personally be best served by an Ultrabook (or possibly a Surface Pro, which is effectively an Ultrabook) that would let me run any Windows application, whether it's in the Store or not. I want a small, touchable, fast machine that can do anything.

Conclusion

The iPad is a great tablet with a great ecosystem that is continuing to push the device to the limit. There are consistently great apps coming out for iOS. I'd love to see new features like picture in picture (PiP) or some basic multi-window multi-tasking. The hardware is solid and comforting. Pages and Numbers are great productivity apps for $10 additional each but the lack of seamless DropBox integration slows me down. ICloud syncing works great, however. I use my iPad for surfing, Netflix, Hulu, and Comics every day.

The Surface RT is a landscape tablet with an optional keyboard. It's got a great feel, good weight, is about the same size as an iPad but a little longer. The inclusion of Office (Word, Excel, etc) is a clever one and made my wife happy. I could see a Surface RT as a good balance between tablet and laptop for students, parents, and folks who can find apps that can do what what they need to do in the Windows Store.

An Ultrabook (I have a generic) is a 11" or 13" laptop with a touch screen. They almost all have fans - today - and they are fast, light and at least twice as much money as a tablet. They are full and fabulous "everything and the kitchen sink" machines. Some are good tablets like the Yoga, and some are great laptops. I suspect that at some future point I'll find a good touchscreen Ultrabook for around $1200 at a 13" size and it will become not only my primary machine but also my primary tablet. But in order for me to stop throwing my iPad or Surface in my backpack along with my laptop - as I do on every trip - Ultrabooks will need 10 hour battery lives, reliable touchscreens and lots of apps in the App Store.

It's a great time to be a user of consumer electronics. Whether it's the coming Surface Pro (I haven't seen one) or a possible MacBook Air with a touchscreen (I don't know of one) I believe there will be some great choices available this coming year.

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

When in doubt, turn on Tracing

January 1, '13 Comments [12] Posted in ASP.NET | ASP.NET Web API
Sponsored By

One of my favorite posts that I've done is "The Internet is not a black box. Look inside."

I really want to encourage folks to look inside "black boxes" - or more accurately, what they perceive as black boxes - in order to solve their issues.

I got a great question from blog reader Eddie F. He also knows I don't like to waste keystrokes so he mentioned that I could blog the result if I answered his question. Hat tip to Eddie.

He says:

I have a case with an Entity Framework 5.0 entity that refuses to "PUT" to my ASP.NET WebApi controller (all .NET 4.5 RTM) if I add the [Required] data annotation to a property on my entity class which I find really bizarre.

So Eddie has an entity with the [Required] attribute on a property. When he PUTS (not POSTS) he gets an error:

var response = client.PutAsJsonAsync("/api/MagicPants/Update", entry).Result; 
//HERE IS THE POINT OF FAILURE when the [Required] attribute
// is added to the EF poco type PortfolioEntry.

If he removes [Required] it works. If he uses any other DataAnnotation like RangeValidation, it also works.

Eddie points out that he's Googled (with Bing) all over and found nothing. He has asked lots of friends and StackOverflow before asking me. Very thoughtful.

I replied with this to get more info.

What happens underneath? You're describing an interaction with a black box without pushing under....what does tracing say? What does Fiddler say?
http://blogs.msdn.com/b/henrikn/archive/2012/08/15/asp-net-web-api-released-and-a-preview-of-what-s-next.aspx

Eddie replied:

That question, along with your provided hyperlink to Henrik’s blog (bookmark… check) allowed me to discover web api tracing.  Genius!  I feel like I’ve been riding in the car, but now I feel like I’ve taken the wheel.  Thank you!

As an ASP.NET guy I take this to mean that Tracing isn't easily discoverable in the product. However, once you know it exists (through all of ASP.NET) things get interesting. You have to know to ask about Tracing (and hence, Google) before you can unlock its power. Most products have tracing or logging or "turn diagnostics up to 11."

Eddie said:

Tracing was very clear about the problem:

iisexpress.exe Error: 0 : Operation=FormatterParameterBinding.ExecuteBindingAsync, 
Exception=System.InvalidOperationException:
Property 'OrderOfMagnitude' on type 'TFSPortfolio.Models.PortfolioEntry' is invalid.
Value-typed properties marked as [Required] must also be marked with
[DataMember(IsRequired=true)] to be recognized as required.
Consider attributing the declaring type with [DataContract]
and the property with [DataMember(IsRequired=true)].

at System.Web.Http.Validation.Validators.ErrorModelValidator.Validate(ModelMetadata metadata, Object container)
...
at System.Threading.Tasks.TaskHelpers.RunSynchronously[TResult](Func`1 func, CancellationToken cancellationToken)

I had the DataMember attribute on the property but not the IsRequired=True

So I add the attribute and bingo!

Even better, Eddie knows about T4 and is code-generating his Entities so he adds:

I’ll have to make another minor tweak to the T4 template for this attribute to fix this globally… gotta love T4 for this job.

A great result via a clarifying question about a question. When in doubt, turn on tracing!

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

ASP.NET and Web Tools 2012.2 (Release Candidate)

December 13, '12 Comments [52] Posted in ASP.NET | ASP.NET Ajax | ASP.NET Dynamic Data | ASP.NET MVC | ASP.NET Web API
Sponsored By

All the parts of ASP.NET, all the subsystems are all part of the larger ASP.NET communityI've talked before in presentations that the ASP.NET and Web Tools team has been slowly externalizing pieces of ASP.NET. You've seen it in many pieces of the ASP.NET runtime moving into NuGet while also being open sourced, and you've seen it as we've moved big chunks of the "tooling" (that means the menus and dialogs you interact within Visual Studio when using ASP.NET) into external installers.

Why are we doing this? Because the Web moves faster than Visual Studio does. We want to be able to offer a stable ASP.NET core that you can count on while being able to offer new and powerful features more often as needed.

Visual Studio itself has moved to a faster update model and recently released Visual Studio 2012.1 (that's Visual Studio 2012 Update 1 if you prefer.) You can get the VS2012.1 update here or just wait for Visual Studio to popup some toast and let you know.

We're going to release an update to ASP.NET we'll call ASP.NET and Web Tools 2012.2. This will happen early next year but today you can download our Release Candidate! You can watch my presentation with Jon Galloway from the BUILD conference or read the release notes. This RC is, of course, newer than the one we released at BUILD and has a better name.

This is a tooling refresh of Visual Studio 2012 and extends the existing run time with new features without breaking existing applications. This adds new templates and features including:

  • Enhancements to Web Publishing unifying Web Application and Website project publish experience.  Selective publish, local/remote diffs and more.
  • Page Inspector has enhancements including JavaScript selection mapping and ability to see CSS updates in real-time.
  • New Web API functionality including support for OData, tracing and generating a help page for your API.
  • New MVC templates
    • You can create Facebook apps using the MVC Facebook template. In just a few easy steps you can create a Facebook Canvas Application that gets data from the logged in user as well and with friends.
    • The return and refresh of an all-new Single Page Application template allows developers to build interactive web apps using Knockout JavaScript library and a RESTful Web API.
  • Real-time communication via SignalR. This means SignalR, in case you haven't heard, is a real and official thing. It's fully supported by Microsoft.
  • Extensionless Web Forms via ASP.NET Friendly URLs which makes it easy for web forms developers to generate clean URLs without the .aspx extension. This can be used with existing ASP.NET 4.0 applications as well!
    • FriendlyURLs also makes it easier for developers to add mobile support to their applications, by supporting switching between desktop and mobile views.
  • Editor support for Knockout IntelliSense and pasting JSON as a class.

ASP.NET and Web Tools 2012.2 installs quickly and does NOT alter the current ASP.NET run time components or change the GAC. For a complete description see the Release Notes.

ASP.NET Fall 2012 Update for Visual Studio 2012 can be installed from the Fall 2012 Update home page(http://www.asp.net/vnext/overview/fall-2012-update). This is an update to Visual Studio 2012, which is required. This Release Candidate update does not support localized versions yet.  You see the new features in English but we'll will have localization support in upcoming RTM. It is an RC so there are some known issues. Be sure to check out the Release Notes for issues and workarounds.

Also be sure to get our "labs" component for Web Developers called Web Essentials. This is a place for Mads and the team to try out new features and play. When those features are baked, we'll graduate them to an update like this one!

Why isn't this called ASP.NET 4.6? Because it's not. The GAC'ed ASP.NET 4.5 doesn't change. This is mostly a tooling update as well as a collection of NuGet-based libraries that augment but don't replace ASP.NET 4.5. If we called if ASP.NET 4.6 then folks would think they needed to rush to update their servers. They don't. It's an update for "Web Tools for VS 2012" but that's lame, so since we got the VS guys to use the .1, .2, .3 scheme rather than September Update CTP Refresh, then we can make things easier by calling this Web Tools 2012.2.

This .2 release is just a step towards a more componentized "One ASP.NET." I hope you enjoy the direction we're heading. We've got some new things planned like a unified "File New ASP.NET Application" dialog, a better way to add your own templates and share them with the community, and a more level playing field for everyone.

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.