Returning my HTC Titan for a Samsung Focus S


I love my HTC Titan, but sadly… yet another smartphone that’s can’t make phone calls.  Well, this one is hit or miss, but it’s enough of an issue where my wife is demand that I replace it.  There are wide spread reports of defective microphones on the Titan:

AT&T Wireless Forums: HTC Titan – Microphone Problem?

WPCentral.com Forums: HTC > Titan > Call Voice quality issues

HTC Forums: Terrible Call Quality

To be clear, Windows Phone is AMAZING.  After two iPhones and three Android devices, I can say with confidence Windows Phone is the best mobile OS I’ve ever used.  And it’s getting raving press:  The Critics Rave ... for Microsoft?I love it, I just have issues with this device.  Other than this mic problem, I would say this is the best device I’ve had as well.  I wish I didn’t have to return it, but this is a deal breaker.

I’ve decided I’m going to take a break from my HTC loyal for a while.  This is my 5th HTC device in the last 9 years… and the last two have had significant manufacturing issues.  I’m going with the Samsung Focus S.  I’m on the phone ordering it from AT&T as I type.

author: kellyb | posted @ Monday, January 09, 2012 10:27 AM | Feedback (0)

XCOPY Reminder


I can never remember the exact args for XCOPY and I use this in VS POST-BUILD events more than you would think.  Here’s my reminder so I never have to Google for this or read the XCOPY usage again.

    <PostBuildEvent>XCOPY "$(ProjectDir)\Foo\Bar.config" "$(ProjectDir)..\..\Bin\$(ConfigurationName)" /Y</PostBuildEvent>

author: kellyb | posted @ Wednesday, January 04, 2012 7:59 AM | Feedback (0)

Hello 2012


Forgive me, but this is my cheesy new year post.

I’m jazzed up about a number of cool things ahead.  Below is a few of the one I’m most pumped about.

Hello Baby Girl #2

My wife and I had our second girl on December 4th, 2011.  Having two in diapers is a challenge, but she’s an angel and I can’t imagine life before her.  Watching our first daughter go from zero to one year old was fascinating.  I’m looking forward to doing that again with another special little gal.

Return to Chicago (kinda)

A reorganization by my employer and end of year promotion will mean I’ll be traveling to Chicago mostly in 2012 instead of Omaha.  I’ll still be working primarily from home in Michigan, but I should be able to regularly return to the great city of Chicago and spend time with some great friends and coworkers in our Chicago office.

No diss to Omaha, but it’s just too hard for me to get there and Chicago will always be home to me.  Thanks for a fun 2011.

Fresh Material

This year appears to have many new technical challenges ahead.  With my new role I’ll be in a position to evangelize to a wider and more interested audience.  I’m hoping to share a lot of the lessons I’ve learned in 2010 and 2011 in terms of architecture and design to help teams delivery more with less.  I’ll be preaching a lot of NHibernate and test automation.

2012 looks like it will be saturated with JavaScript development.  I spent 2010 neck deep in Silverlight, and 2012 looks like it will be a return to the traditional web.  I’ve been reading JavaScript The Good Parts, JavaScript Patterns, and REST in Practice.  I’m looking forward to working heavily with JQuery, KnockoutJS, BackboneJS, Wijmo, KendoUI, ASP.NET MVC, and Web API.

Interesting Year for the Mothership

I think 2012 is going to be a interesting and pivotal year for Microsoft.

Windows Phone

I received the HTC Titan for Christmas and LOVE it.  I was skeptical, but am no more.  This is a phenomenal OS and I think the rest of the world is going to realize it in 2012.  I think it’s well positioned to have a big year.  It will be interesting to see how that plays out, but I think a Jobs’less Apple and Android in version hell as well as the Android Developer Community fed up with building apps they can’t charge money for will make room for strong growth by WP7.  The Windows Phone Marketplace is growing steadily, and if Microsoft knows how to do something well it’s make a comfy developer ecosystem.

BTW, If you happen to be one of those turd throwing I-hate-everything-Microsoft monkeys and feel like leaving some bile on my comments… I’d rather you not.  If you haven’t used a WP device for at least an entire day as your primary phone, I’m probably not interested in your opinions.

Windows 8

Windows 7 was great.  I think they finally get it in terms of what users want from the OS.  I expect Windows 8 will be very successful and will firmly establish MetroUI.  Having it on tablet form factors should come in 2012.

HTML5/JavaScript Tooling vNext

If you look and what Microsoft has done in support for the HTML5/JavaScript movement in WinRT, it feels like something big is brewing on this front.  They seem to have unofficial ties CoffeeScript and Script#.  I’m hoping to see a Google Web Toolkit (GWT) like offering from Microsoft this year.

 

Learn, Learn, Learn

With two kids in diapers I have less personal time than I’ve ever had in my life, but I have renewed vigor to make this another year of learning.  I intend to be a JavaScript guru by this time new year.  I have an annual subscription of TekPub and I intend to watch at least half of the productions available in their catalog.  At a minimum:  GitHub, Mastering Mercurial, Linux for Softies, Mastering JQuery, Mastering LINQ, and Mastering Windows Phone 7.

author: kellyb | posted @ Monday, January 02, 2012 2:35 PM | Feedback (1)

Strengths Finder 2.0


A friend gave me a copy of this book and I took the test…

image

The Clifton StrengthsFinder

As you may know, the Clifton StrengthsFinder measures the presence of talent in 34 categories called "themes." These themes were determined by Gallup as those that most consistently predict outstanding performance. The greater the presence of a theme of talent within a person, the more likely that person is to spontaneously exhibit those talents in day-to-day behaviors.Focusing on naturally powerful talents helps people use them as the foundation of strengths and enjoy personal, academic, and career success through consistent, near-perfect performance.

Below are my top five themes of talent, ranked in the order revealed by my responses to the Clifton StrengthsFinder.

How well do you think these themes describe me?

Achiever

People who are especially talented in the Achiever theme have a great deal of stamina and work hard. They take great satisfaction from being busy and productive.

Focus

People who are especially talented in the Focus theme can take a direction, follow through, and make the corrections necessary to stay on track. They prioritize, then act.

Context

People who are especially talented in the Context theme enjoy thinking about the past. They understand the present by researching its history.

Learner

People who are especially talented in the Learner theme have a great desire to learn and want to continuously improve. In particular, the process of learning, rather than the outcome, excites them.

Discipline

People who are especially talented in the Discipline theme enjoy routine and structure. Their world is best described by the order they create.

To learn more about the Clifton StrengthsFinder and how you can discover your top five themes, visit http://strengths.gallup.com

author: kellyb | posted @ Friday, February 04, 2011 7:49 AM | Feedback (0)

T4 Debugging in VS2010 – Crashing IDE


In VS2008, it would common to put a System.Diagnostic.Debugger.Break() statement in your T4 template file and have the debugger prompt pop up and let you attach to your code.  In VS2010 on Windows 7, it crashes the IDE.  I think it’s specific to Windows 7, but I’m not sure about that.  The issue report is here:  http://connect.microsoft.com/VisualStudio/feedback/details/535479/vs2010-crashes-debugging-t4-templates

From reading the issue, it seems to be a policy difference in Windows 7.  I’ve heard of hack to the registry to change the default, but a cleaner solution is provided in the work-around’s tab.

Simply call Debugger.Launch() before calling Debugger.Break().  Like so:

<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ output extension=".cs" #>
<#@ assembly name="System.Xml.dll" #>
<#@ import namespace="System.Xml" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="System.Collections" #>
<#@ import namespace="System.Collections.Generic" #>
<# 
    Model model = null;

    try
    {
        XmlDocument document = new XmlDocument();
        document.Load(this.Host.ResolvePath("Model.xml"));

        XmlNode modelNode = document.SelectSingleNode("//model");

        if ( modelNode != null )
        {
            model = new Model(modelNode);
            
            System.Diagnostics.Debugger.Launch();
            System.Diagnostics.Debugger.Break();
            
            model.Load();
        }
    }
    catch ( Exception ex )
    {
        #>
        // ******************** UNHANDLED EXCEPTION DURING MODEL GENERATION **********************
        // Message: <#= ex.Message#>
        // Exception Type: <#= ex.GetType().FullName#>
        // ***************************************************************************************
        <#
    }
#>

 

Hopefully this helps someone else out there – this has been killing me for almost a year and I never thought to look for a workaround.

author: kellyb | posted @ Friday, January 14, 2011 6:20 PM | Feedback (0)

Weird Security Error with IIS and Win7


 

I was trying to get a web application we’re building using a commercial CMS system up and running on my localhost today.  I checked the ASP.NET source code out of our source control repository, and configured my local IIS instance to host the site.  The site started up successfully, but I noticed it wasn’t loading any of the CSS files.  After viewing the page source, the URL’s to the CSS files looked correct, but when I attempted to browse them I received the dreaded 401.3:

image

I poured over the file system security of that local directory – everything had read rights.  Then I noticed some of the directories were green (look closely):

image

I’m running Windows 7, and it turns out these directories were files I unzipped (using Windows unzip utility) from an email attachment.  I noticed they were great, but didn’t give it much thought (if they were red, I probably would have stopped and figured it out then).  It turns out that this is another (odd) Windows security feature.  The directory was set to “Encrypt contents to secure data”:

image

This is what was causing the 401.3 exception from IIS.  Clearing this put me back in business.

Hopefully this helps someone else out there.

author: kellyb | posted @ Friday, December 10, 2010 7:21 PM | Feedback (0)

Email Hacking Theory


I’m not a security expert.  I’m not a hacker.  I’m just a guy that spends a crazy amount of time online .  Maybe the story I’m about to tell is a well known thing… maybe it’s not.  All I know is I’m convinced it happened to me last year, and I see it frequently happening to people I know.  This is good general advice for everyone.  So I’m going to lay it out here for everyone I know to read.  If you were sent a link to this post by me, then you’re one of the people I’m worried about… so please read on.

How many web site accounts do you possess (i.e. facebook.com, myspace.com, ebay.com, google.com, yahoo.com, etc. etc.)?  Most sites ask for two main things:  your email address and a password.  Once registered, you use that information to gain access to that site’s online service.  How many times have you registered for a site that you don’t quite trust or recognize?  How often do you register with a password that matches that of your email address?  If you’re like most people, the answer to that last question is “frequently”.

Think about it….  What if some malicious person out there had access to your personal email address.  By that I mean, he/she could physically log in to your account and read and send email as you.  How easily could that person access something else (like an online back account) from there?  Oh… and, does that online bank account use that same password????

If that information you provided was ever compromised (intentionally or unintentional), you’re in big trouble.  Hackers know tech un-savvy and even tech savvy people hate to remember multiple passwords.  They also know that most people use the same password for every account they own.  So, if they can find a way to get your to provide them with your email address, and that precious password, then the odds are good that they have all they need to access your email account as you.

Don’t ever… EVER… reuse the password for your email account.  Pick a password for your email address, and never use that password for any other online service.  Make it a habit to change that password at least once a year.  If you have any reason to believe someone or something is accessing your email account (for instance, do you see Sent Items in your email account that you don’t remember sending), change your password immediately.

author: kellyb | posted @ Wednesday, December 08, 2010 10:12 PM | Feedback (0)

Thoughts on HTML5, Silverlight, and the future of the web


Over the last several months, there’s been a lot of rumblings in the community about HTML5 and the future of browser plugin technologies like Silverlight and Flash.  I follow Silverlight pretty closely, so I hear most of this talk in terms of the future of Silverlight.  As the HTML5 spec has been maturing and browser vendor implementations arrive, you’ve heard a lot of people start to sing it’s praises.  There is no doubt that HTML5 is going to be huge.  What we’ve been able to accomplish with HTML + CSS + JavaScript in the last 10 years is jaw dropping and HTML5 is going to take it to the next level.  That I believe 100%, but to say that HTML5 is going to kill Silverlight is silly.

For whatever reason, Microsoft unintentionally fueled this silliness by not giving Silverlight any pub at PDC this year.  Apparently there was a lot of talk about HTML5 – because Microsoft is trying to pimp IE9 (as they should be), but they forgot to mention Silverlight explicitly.  Mary Joe Foley wrote a nice article last week called Microsoft: Our strategy with Silverlight has shifted.  In that article he quotes Bob Muglia, President of the Server and Tools Division at Microsoft, as saying:

But when it comes to touting Silverlight as Microsoft’s vehicle for delivering a cross-platform runtime, “our strategy has shifted,” Muglia told me.

If you read the whole article, it all make sense, but that line out of context is a bit misleading.  I don’t particularly like the way Muglia phrased that because the entire meaning of the statement hinges on what he means by “cross-platform runtime”.  If you have a solid understanding of what Silverlight is, that statement makes perfect sense and doesn’t at all make you think Silverlight is dead or dying.  If you don’t understand what Silverlight is, you probably think the opposite.  Nonetheless, Bob attempted to clarify with a post on the Silverlight Team blog.

Speculation on where the silliness is coming from…

I’m forced to believe there are still a huge number of people out there that simply don’t know what Silverlight is.  Probably because Microsoft (purposefully) focused on media – specifically video streaming - in the early releases of Silverlight, and largely ignored Silverlight has an application platform, I believe many people still see it simply as a video player technology that runs in the browser.  Once you see the video and animation capabilities within HTML5, you can see where people jump to conclusions about the viability of Silverlight in an HTML5 world.

So, what is Silverlight?

The reality is, the last two releases of Silverlight (half of it’s life time) has been far more than a browser based video player.  Silverlight has two forms:  in-browser and out-of-browser.  Silverlight In-browser is like Adobe Flash – users install a special plugin from Microsoft that hosts the tiny Silverlight runtime natively within the browser.  When a user visits a web page that contains HTML signaling the browser to run some Silverlight code, the browser simply does this silently and seamlessly, and Silverlight is running within the page right along side HTML, CSS, and JavaScript.  The other form is out-of-browser – this is like Adobe AIR (Adobe Integrated Runtime) where the tiny Silverlight runtime in installed directly on the host operating system and can run natively on the local OS – no browser as a conduit.  Starting with version 2, the Silverlight runtime included the .NET Common Language Runtime (CLR) and a subset of the .NET Base Class Library (BCL).  That means Silverlight is a mini .NET running in these two forms.  That means it’s the same programming model, the same infrastructure libraries, the same programming language(s), the same IDE, the same debugger, etc. etc. etc.  There are parts of .NET that were intentionally left out because they simply were not applicable to the Silverlight environment or were cut to keep the download size small, but for all practical purposes Silverlight is .NET.  This is HUGE. 

When I first started working with Silverlight, I had several years of HTML/CSS/Javascript/ASP/ASP.NET under my belt as well as several years of .NET middleware development.  At that time, I didn’t get how huge this Silverlight programming model thing was.  I had heard all the marketing speeches inline with what I said in the previous paragraph, but I didn’t get it.  Modern web programming with HTML, CSS, Javascript+JQuery just didn’t seem that tough.  After a year and a half of Silverlight development, I can tell you with certainty this is HUGE.  Until you’ve experienced the development experience of Silverlight – the familiar tools, the smoothness in the programming model across client and server, the frictionless debugging, etc. you simply cannot argue that developers have the same productivity in HTML, CSS, and Javascript – not to mention there are just things you can’t do in Javascript.  There will always be a need for the technologies like Silverlight and Flash for doing things that you just can’t do with Javascript.  Google and products like Gmail have broken down the mental barriers surrounding what people consider possible with Javascript, but it’s still limited and it’s just unrealistic to expect the average developer to build complex JavaScript layers in their applications.

Fuel to the silliness fire…

Microsoft did a lot of things right with Silverlight.  They have a good cross-platform story.  Unlike Microsoft to yesteryear, they didn’t just implement this on Internet Explorer.  They built this to be cross browser friendly and therefore cross-platform.  They did it in a very transparent, community-oriented fashion where they did sub yearly releases and honestly listened and reacted to community feedback.  This approach catapulted Silverlight adoption and browser vendors got on broad.  So, Silverlight is cross-platform friendly, but this is where Mary Joe’s report breaks down for me.  She quotes Bob Muglia as saying:

But when it comes to touting Silverlight as Microsoft’s vehicle for delivering a cross-platform runtime, “our strategy has shifted,” Muglia told me.

I don’t disagree, because Silverlight never was their cross platform strategy, and he’s correct when he goes on to say:

“But HTML is the only true cross platform solution for everything, including (Apple’s) iOS platform,”

Microsoft is smartly getting on the HTML5 bandwagon because it’s going to be huge.  The only true cross platform solution are HTML based web applications running on browsers that run wherever they want to run.  That model isn’t changing, but that doesn’t mean Silverlight or Flash are dead either.  Just because Silverlight is cross-platform, that doesn’t mean it’s Microsoft’s cross-platform strategy.

Plugin technologies like Silverlight and Flash will never replace HTML5 and HTML5 will never replace the need for Silverlight or Flash.  The least common denominator (HTML, CSS, Javascript) will never been good enough for all scenarios.

Summary

Silverlight is a phenomenal technology.  It’s going to continue to thrive… and so will HTML5.  Here’s some other good reading on this subject:

Jeremy Likness:  So What's the Fuss about Silverlight?

Laurent Bugnion:  My position on the #Silverlight debate

author: kellyb | posted @ Wednesday, December 08, 2010 9:51 PM | Feedback (0)

System.IO.Path.Combine() Snafu


I’ve found the Path.Combine() function cannot be fully trusted and can cause some sneaky bugs in your systems.

I’ll use SnippetCompiler to demo the scenario I’m talking about.

image

image

If the right term is prefixed with a slash, the right term is dropped.  I’m sure it behaves this way for some good reason, but I don’t know what it is.  I always write a utility method to wrap and check the strings prior to calling Combine.

author: kellyb | posted @ Wednesday, December 08, 2010 9:39 PM | Feedback (1)

System.IO.Path Cheatsheet


I spent a great deal of time last week wrestling with the .NET System.IO.Path API.  I frequently struggle to remember what some of these methods do.  Here’s a cryptic cheatsheet for future reference.

        public void Test()
        {
            string[] strings = new string[] { @"\", @".", @"C:\Temp", @"C:\Temp\foo\bar.txt", @"C:\Temp\foo.txt", @"\foo\bar.txt", @"\foo\bar\baz.txt", @"\foo\bar\", @"foo\bar\", @"\\\\\\" };

            DoGetDirectory(strings);
            Console.WriteLine();
            DoIsPathRooted(strings);
            Console.WriteLine();
            DoGetPathRoot(strings);
            Console.WriteLine();
        }

        private static void DoGetDirectory(IEnumerable<string> strings)
        {
            foreach (string s in strings)
            {
                Console.WriteLine(s + ": GetDirectory(): " + Path.GetDirectoryName(s));
            }

        }

        private static void DoIsPathRooted(IEnumerable<string> strings)
        {
            foreach (string s in strings)
            {
                Console.WriteLine(s + ": IsPathRooted(): " + Path.IsPathRooted(s));
            }
        }

        private static void DoGetPathRoot(IEnumerable<string> strings)
        {
            foreach (string s in strings)
            {
                Console.WriteLine(s + ": GetPathRoot(): " + Path.GetPathRoot(s));
            }
        }
 
------ Test started: Assembly: test.vsc.masco.com.dll ------

\: GetDirectory(): 
.: GetDirectory(): 
C:\Temp: GetDirectory(): C:\
C:\Temp\foo\bar.txt: GetDirectory(): C:\Temp\foo
C:\Temp\foo.txt: GetDirectory(): C:\Temp
\foo\bar.txt: GetDirectory(): \foo
\foo\bar\baz.txt: GetDirectory(): \foo\bar
\foo\bar\: GetDirectory(): \foo\bar
foo\bar\: GetDirectory(): foo\bar
\\\\\\: GetDirectory(): 

\: IsPathRooted(): True
.: IsPathRooted(): False
C:\Temp: IsPathRooted(): True
C:\Temp\foo\bar.txt: IsPathRooted(): True
C:\Temp\foo.txt: IsPathRooted(): True
\foo\bar.txt: IsPathRooted(): True
\foo\bar\baz.txt: IsPathRooted(): True
\foo\bar\: IsPathRooted(): True
foo\bar\: IsPathRooted(): False
\\\\\\: IsPathRooted(): True

\: GetPathRoot(): \
.: GetPathRoot(): 
C:\Temp: GetPathRoot(): C:\
C:\Temp\foo\bar.txt: GetPathRoot(): C:\
C:\Temp\foo.txt: GetPathRoot(): C:\
\foo\bar.txt: GetPathRoot(): \
\foo\bar\baz.txt: GetPathRoot(): \
\foo\bar\: GetPathRoot(): \
foo\bar\: GetPathRoot(): 
\\\\\\: GetPathRoot(): \\


1 passed, 0 failed, 0 skipped, took 0.68 seconds (Ad hoc).

author: kellyb | posted @ Wednesday, December 08, 2010 9:27 PM | Feedback (0)