Scott Hanselman

Analysis Paralysis: Over-thinking and Knowing Too Much to Just CODE

March 30, '14 Comments [104] Posted in Musings
Sponsored By
Pair Programming Photo courtesy of FOCUS100

I read a post on ArsTechnica today called "I know too much to program quickly. What can I do?" that is summary of a StackOverflow question by Zilk, who says:

Lately, I've been noticing that the more experience I gain, the longer it takes me to complete projects, or certain tasks in a project. I'm not going senile yet. It's just that I've seen so many different ways in which things can go wrong. And the potential pitfalls and gotchas that I know about and remember are just getting more and more.

Trivial example: it used to be just "okay, write a file here". Now I'm worrying about permissions, locking, concurrency, atomic operations, indirection/frameworks, different file systems, number of files in a directory, predictable temp file names, the quality of randomness in my PRNG, power shortages in the middle of any operation, an understandable API for what I'm doing, proper documentation, etc etc etc.

This really hit me because THIS IS ME. I was wondering recently if it was age-related, but I'm just not that old to be senile. It's too much experience combined with overthinking. I have more experience than many, but clearly not enough to keep me from suffering from Analysis Paralysis.

I have two side projects I'm doing on vacations and in the evenings when the house is asleep. One is a port of popular iOS application to Windows Phone, the other is a iOS app with a cloud service startup with my buddy Greg. Both projects have had awesome beginnings and then stalled when things just got overwhelming.

I kept starting features, the stalling. I felt like I was thrashing to disk, spending more time swapping ideas around in my head rather than just doing them. I'm still getting lots of things done, in general, I'm productive, but when I code I just thrash.

I'm overthinking stuff. "Write settings to a file" turns into a mess of paranoia around concurrency situations, upgrading settings from previous versions of the app (that don't exist, mind you), and it just snowballs from there. It's not exactly scope creep, but it's a kind of architectural paranoia. I see so many issues and possible bugs that I've learned over the years that could derail a feature that I end up derailing the feature.

YAGNI

The answer, they say, is You Aren't Gonna Need It. "Perfect is the enemy of the good" reminds user Telastyn.  These are easy to intellectualize but hard to internalize. User Mouviciel says:

Looks like you are not experienced enough :). The next lesson is: stick to requirements, not more.

I get that, but me, I often need another brain to complement my own.

How I Solve Overthinking

I learned about Agile from James Shore while I was working at Corillian some years ago, but it's Pairing that resonates with me the most. With a good pair, you'll get 3 times the work, not double.

I worked my way through both these startup issues by bringing in another brain. I'm not the best programmer, but I do OK. But somehow we are both better when we pair. I paired with Greg on the iOS and my new friend Jan Hanneman on the other. They are both clearly better coders than I, which is intimidating, but I'm still sure I provide value. What they gave me was a fresh perspective and a focus to say "YAGNI" and just get features done. The ironic part is, if I'm brought in on a project to pair, that's what I bring also.

My wife thinks this is hilarious. It's the old relationship joke where your partner says something for years and years, then one day you rush home from work to share this amazing new "insight" from a stranger...the same insight your partner has been sharing all this time.

Since I work remotely, all my Pair Programming has to happen over video chat and screen sharing. I use Skype, Lync, Join.me, and whatever else works. We take turns working through features in Trello boards, sharing one person's screen, talking and coding, designing and brainstorming, then commiting to Git, syncing, and switching the share.

This seems to work well for sessions as long as 3 hours, but after that, we get pretty wasted. However the feeling of accomplishment when you work through a problem with a partner is also magnified.

Does your coding life get paralyzed? How do YOU work through it?

* Photo courtesy of FOCUS100

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am 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 ORCS Web

How to automatically notify the user that it's time to upgrade a Windows App

March 19, '14 Comments [50] Posted in Musings
Sponsored By

imageBack in 2007 I did a post called Making your Application Automatically Update Itself. Yesterday I was pairing on a little startup I'm doing on the side with Greg Shackles and it was time do the setup application. I thought about WiX, I thought about InstallShield, but then discovered a wonderful little gem of a setup application called Inno Setup by Jordan Russell. It's free, but it's a joy and you should donate if you use it.

It took me just 15 minutes to make a simple installer, and it's clear that this tool is deep and broad in its support. However, there's no free lunch when it comes to auto-updating. Inno Setup will upgrade my app from build to build when I run a new setup over the top of an old one. I still need my app to notify the user that it's time to upgrade.

This is our little 10 minute solution, but it's actually working very nicely. Inside the latest.txt files is a simple version string like 0.9.9.4.

var http = new HttpClient();
string versionString = await http.GetStringAsync(new Uri("http://www.hanselman.com/SecretStartup/latest.txt"));
Version latestVersion = new Version(versionString);

//get my own version to compare against latest.
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
Version myVersion = new Version(fvi.ProductVersion);

if (latestVersion > myVersion)
{
if (System.Windows.MessageBox.Show(String.Format("You've got version {0} of SecretStartup for Windows. Would you like to update to the latest version {1}?", myVersion, latestVersion), "Update SecretStartup?", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
{
Process.Start("http://www.hanselman.com/blog");
}
}

I'm thinking:

  • We'll add an SSL certificate and confirm its identity on the HTTP call as a little added security.
  • Error Handling, natch.
  • One could also download the setup app to %temp%, check it's SHA hash, launch it and close myself. Not sure I like it this automatic, though.
  • Maybe only check the version once a day or once every few days.

Comments?


Sponsor: Big thanks to Red Gate for sponsoring the blog feed this week. Check out the Free Starter Edition of their release management tool! Deploy your SQL Server databases, .NET apps and services in a single, repeatable process with Red Gate’s Deployment Manager. Get started now with the free Starter Edition.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am 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 ORCS Web

AngleBrackets open web conference in Florida - April 2014

March 19, '14 Comments [7] Posted in Musings
Sponsored By

imageWe had a blast last year at AngleBrackets in Vegas. Next month we're heading to family-friendly Orlando with our friends ScottGu, Denise Jacobs, Douglas Crockford, John Papa, Dan Wahlin, and lots more.

There's some great optional workshops/pre-cons and post-cons that are a fantastic opportunity to get some one-on-one training with experts in the field. It's deep web technologies with a focus on practicality, open source, and creative problem solving. Check this out, get your boss to sign off and bring your laptop!

  • PRECON12: AngularJS SPA Development - 0 to 60 (Sunday, April 13) Hands-on Bring your own Laptop - John Papa
  • PRECON08: Architecting Applications for Multiple UIs (Sunday, April 13) - Paul Sheriff
  • On the Metal: Essential HTML 5, CSS 3 and JavaScript for All Developers (Sunday, April 13) - Todd Anglin
  • Service Orientation Technologies Designing, Developing and Implementing WCF and the WEB API (Sunday, April 13) - Miguel Castro
  • PRECON07: The Architecture Clinic - (Sunday, April 13) - Juval Lowy
  • POSTCON08: Building Data-Centric Single Page Applications with Durandal, Knockout, Breeze and Web API (Thursday, April 17) - Brian Noyes
  • POSTCON03: Experimental Design for User Interfaces (Thursday, April 17) - Billy Hollis
  • POSTCON09: Hacking the Creative Brain (Thursday, April 17) - Denise R. Jacobs

AngleBrackets is a conference that's "co-located" with the DevIntersections conference. That means that you can move between the two conferences and attend the sessions you want. You can move between MongoDB, Ruby, and node.js sessions and even (gasp!) SharePoint sessions at the other conference. It's a great way to get your boss to send you to a conference while you learn all aspects of web development.

Here's a few cool session I'm tracking for myself, just to give you a taste of the diversity of topics.

Managing Asynchronicity with RQ - Douglas Crockford

Turn based servers are now joining turn based browsers in providing race-free and deadlock-free interactivity. The event-driven model has long been popular in UI systems, but the nature of work in servers presents some new challenges. Functional programming provides solutions, including monads, arrows, promises, and various flavors of FRP. This is another such solution, intended to enhance ease of use with constructs that support parallel and sequential operations.

The Art of Disciplined Creativity - Denise Jacobs

As tech industry professionals, we rarely experience a shortage of projects that necessitate our creative thinking. While everyone has moments of being on fire with creativity, all too often the time of being in the state of creative flow is too short. Additionally, sometimes we get stuck: we lack inspiration, our creative confidence wanes, and the generation of ideas comes to a standstill. Much like elite athletes, we need to exercise discipline to be able to get into the creative "zone" at at will and produce consistently great results. Let's explore ideas and practices for regularly gathering sources of inspiration, eliminating blocks to more easily access creative states, prolong them, and leverage their power to develop and execute great work.

Grunt-ify Your Front-End Web Development - Elijah Manor

There are a lot of manual processes that front-end developers tend to perform in order to get their job done. Wouldn't it be nice if there was some way to automate all the things? Well, thanks to Grunt you can :) In this session we will introduce Grunt and showcase some common workflows to automate building, live reloading, CSS processing, unit testing, deploying, as well as making your own custom plugins. Along the way, we will discuss some tips and tricks when using Grunt.

There's also other optional PreCons at DevIntersections on SQL, C, ALM, Disaster Recovery, Rosylin and CodeGen and more. Check out the great line-up we have this year at AngleBrackets and I'll see you there!


Sponsor: Big thanks to Red Gate for sponsoring the blog feed this week. Check out the Free Starter Edition of their release management tool! Deploy your SQL Server databases, .NET apps and services in a single, repeatable process with Red Gate’s Deployment Manager. Get started now with the free Starter Edition.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am 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 ORCS Web

OneNote and Microsoft's quiet API revolution

March 17, '14 Comments [19] Posted in Musings
Sponsored By

imageMicrosoft just released OneNote for Mac today. They also made OneNote for PC free, which means there's a free OneNote app on Windows, Windows Phone, iOS, Mac, Android and a really full featured HTML5 web version at http://www.office.com. This is all very cool of course, but I'm interested in the APIs.

Now, to be clear, I have worked for Microsoft for the last few years on ASP.NET and Azure, but I don't know anyone in the Office team. I am not privy to any secret info and I get most of my news from The Verge, just like you.

But from my perspective, the real story here is that Microsoft has woken up to the power of the API. Some may argue that they've always had powerful web APIs, which is true, however the breadth and scope of these APIs and their ubiquity seems to have accelerated in recent years. They are clearer, more open, simpler, and more cross-platform than ever before.

The Azure cloud and the Azure HTML5 Portal where folks manage their apps uses a REST API, and the SDKs to use them - as well as a cross platform nodejs command line application - are on GitHub. If you use the main portal, write your own, or use Visual Studio, it all calls the same open API. Duh.

Exchange has APIs, Microsoft IDs use OAuth, Azure's Portal has an API and uses it themselves, SharePoint is one giant REST/OData API, Office 365 has been quietly releasing APIs for Mail, Calendar, and Contacts, and even now Lync has a REST Web API now.

Today when the Office team launched OneNote for Mac, they also launched http://dev.onenote.com along with integration partners like Feedly, JotNot, IFTTT, Weave News Reader and more all integrating with their REST API.

The moral of the story here is - if you have no API then you have no story.

Using the OneNote API

There's even more evidence of a change in thinking inside the big house. It's clearly of note that the API example in the OneNote API documentation on MSDN used Objective-C. They also link to a OneNote interactive Console at Apigee.

The API appears to be basically RESTful, with a POST of HTML to https://www.onenote.com/api/v1.0/pages creating a new OneNote page in your authenticated notebook.

You authenticate with your Microsoft ID using the SDK, get the token from the SDK object to be used in the authentication header then POST.

What has surprised me is that they have tutorials and samples across all platforms:

And, heck, the samples are all on GitHub too: https://github.com/OneNoteDev.

It looks like the focus for this initial launch is POST/Create for capture apps, photos, text, clippers, etc, but all the verbs are coming, clearly at the top of their backlog.

I like this direction, and to me, it's representative of a larger shift to recognize that the world doesn't always run Windows. I've said it before, and I'll said it again - The Web will always win.

Related Links


Sponsor: Big thanks to Red Gate for sponsoring the blog feed this week. Check out the Free Starter Edition of their release management tool! Deploy your SQL Server databases, .NET apps and services in a single, repeatable process with Red Gate’s Deployment Manager. Get started now with the free Starter Edition.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am 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 ORCS Web

When is it stealing?

February 26, '14 Comments [88] Posted in Musings
Sponsored By

Image by Duncan Hill, used under Creative Commons from http://flic.kr/p/7YkGurAnything you put on the internet is gonna get stolen. It's preferable if it gets shared or linked to but often it gets copied and copied again.

RSS is magical but it makes it even easier to programmatically syndicate (copy) content. Search around and you'll likely find complete copies of your entire blog mirrored in other countries'.

There's so many websites (now "media empires") that have taken aggregation to the extreme, giving it the more palatable name "content curation." Now, to be clear, I respect the work involved in curation. Sites like http://dumbesttweets.com require work and attribute creators. But taking a post, copying unique content, even paraphrasing, and then including a small link just isn't kind. Forget about the legality of it, remembering IANAL, but it's just poor netiquette to not to ask permission before using non-Creative Commons content.

Every week or two I get an email from some large aggregation site that says "We'd love to reprint your post...it'll get you more readers." The few times I've done this they've gotten 50,000 views and I've gotten 300 referral views. Likely because the "originally appeared on Hanselman.com" link a the bottom is in 4 point font.

Sites like ViralNova and BuzzFeed are effectively reblogging and embedding machines powered by linkbait copyrighters. "What happened next will shock you."

Even if you make a piece of software, someone may just wrap/embed your installer with their own installer and build a whole business around it.

Narrating your blog posts

Today It was pointed out to me that a nearly 7 year old (and not very good) blog post of mine had be narrated - effectively turned into a podcast - by a startup called Umano. BTW, it's more than a little ironic that my post wasn't even mine. It's an excerpt - published with permission - of my friend Patrick Cauldwell's larger post.

I've used the Umano developer tools and embedded the narrated version here.

First, let me just say that this is essentially a great idea. It's the opposite of transcribing a podcast. It's creating podcasts from existing content using professional narrators, not just text to speech. This could be great for not just the visually impaired but also for anyone who wants to catch up on blogs while commuting.

UPDATE! Umano has narrated THIS blog post! Have a listen! http://umano.me/c/AExmo

Where did the Content come from?

Here's a screenshot of the post on Umano's site. You can see my name "Hanselman" is there, but it's not a link. The headline is a link, but you'd never know until you hovered over it. There's really no easy way to tell where, when, and how this content came about. I think that Umano could easily redesign this site to put the content owner front and center.

image

Podcasts and audio snippets from blog posts? Great idea, except I wrote the script for this podcast. If I wrote the script and they did the narration, then this must be a partnership, right?

However, if we look at Umano's own Terms of Use:

SoThree claims no ownership or control over any of the content you post to the Service ("Your User Content"). You or a third party licensor, as appropriate, retain all copyright, patent, and trademark rights to any of the content you post on or through the Service. You are responsible for protecting those rights.

Ok, they don't own the content.

By posting Your User Content on or through the Service, you grant SoThree a universal, non-exclusive, royalty-free license to reproduce, adapt, distribute and publish such content through the Service and for the purpose of promoting SoThree and its services.

I'm pretty sure I haven't granted them a universal license to my content as I didn't submit this link. On their home page they say that "you tell us what articles should be voiced." The community submits links, sometimes to content they are a fan of, but don't own, then Umano narrates it.

You may not aggregate, copy, or duplicate any SoThree Content.

Wait, but I can't copy their content? Their content that was generated from my content.

Does this mean I can get a book from the library and narrate it? Turn it into a podcast?

I am told by Umano's twitter account that I'm the first person to object to their content being copied without permission.

I certainly don't think Umano is are malicious. Umano is perhaps naive, if they think can narrate blogs without someone speaking up. That said, their narrators are top notch and their site and app are both attractive and usable. Frankly, I'd be happy if they narrated my whole blog (or at least the good stuff and not the lousy decade-old stuff) and made a podcast feed of my blog like their competitor Castify. But I'd like Umano to do it with me.

Sites like this should ask creators first and their business model should be based on partnerships with content creators, not assumptions. Stitcher has the right idea. I've submitted my content to them and entered into a partnership. They didn't just suck my podcasts in and make a radio station.

Even a single email from Umano like "hey, we would love to narrate your blog, click here and sign this little form" would have be sufficient. 

Narrate first, ask questions later? Michael Dunbar nails it with this tweet:

This is an easily solved problem, and it's not just a problem with Umano. This applies to all businesses and startups that rely on content created by others. I think it's important to honor attribution. This isn't about money or even copyright, although those things do apply. Rather, this is about netiquette. When you're building a business model, build it around partnerships and transparency, not assumptions around fair use and copyright. Aask first.

What are your thoughts, Dear Reader?

(If they narrate this one, I'll update the post and complete the circle. ;) )

Related Links

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am 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 ORCS Web
Page 1 of 127 in the Musings category Next Page

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