Monday, October 17, 2016

An attempt with Visual Studio 2015s "Visual Studio" template

I've been programming since I was about 8.  Trouble was for 3 years I did it on paper as I didn't get an actual computer until 1984.

Over the years, I've programmed a lot of things:  Notable items include working on first Palm Pilot banking app in Canada.  Mobile advertising on buses.  Writing several versions (singlehandedly until I was given help) of iHeartRadio for iOS, and most recently I programmed the app for Tellspec.

That quick run down skips a lot of Windows, Mac, iOS, Palm, Blackberry, and so on, jumping about between development environments and platforms.  I've literally spent my past 9 years up to my eyeballs in iOS with some runs into C# for FEMA EAS related stuff, and other languages for banking or manufacturing.

So it was that I found myself installing Visual Studio last week.  This is something I first got introduced to in the late 1990s when VB 6 merged with Visual C++ (and IT Ake with Visual InterDev for web development).  (I'd been with VB since v3 before that)

I may have started programming on a 48k Spectrum, and I may have had millions of people running my code on iOS, but Windows is like my spiritual home.  I've spent decades there.  My first professional Windows app (the "Memory Compactor") worked on Windows 3.11 and played on a mechanism of Windows that I could use to the users advantage to free up memory.

Now, I found myself "coming home" for a new project on the side, where I was tinkering with an idea.  The outcome of the project has no bearing on the company i work for - the only thing at stake was whether the idea would fly or not.  If it flies, I present the idea to the boss - and if it fails, then I've spent a bit of time keeping abreast. At worst, if someone asks me what the latest version of Visual Studio I've used is, because they're trying to trip me up, I can answer 2015.

So I installed the Community Edition to get re-acquainted with it. (yes, this hardcore Apple Dev was back in Microsoft land)

On the whole, I was very pleasantly surprised.  There was some familiarity that made me happy - and there was something new, which made me really happy.... the MFC "Visual Studio" style template.

The standard templates for SDI and MDI MFC apps have been around 20+ years and are well documented to the nth degree.  If you have a problem, 20 seconds in your favourite search engine will show you the answer.  This new Visual Studio template, however, is new, undocumented, and doesn't have a tone of Q&A.

On the flip side, I posted a comment on Twitter that I'd spent a day in VS (which for a person who spends most of his time in Xcode, makes for a massive change), and was surprised to hear from the Visual Studio Twitter team.

They were proactive, but given my circumstances (I work on a mac in a virtual machine), their enthusiasm to share keyboard shortcuts didn't hit a bullseye with me - but that's not their fault as I'm on a Mac right now.

Now I let them know that unfortunately I was a slight edge case, and they took it gracefully and extended that if I needed future help to shout....

And this is where this post comes into play.

I started Windows programming in VB3.  Like before the data access control showed up and revolutionized things.  I've grown up through VB4, 5, 5 Control Edition, 6, Fred, C#, and simultaneously gone through MSVC 1, 2, 3, 6, (skip a lot) and now land at (14?).....

... and I hit a problem.

Rather than complain about lack of docs, I spend several consecutive evenings (I have a day job to attend to) trying to find a solution and ultimately now decided to pick up the offer from the Twitter team about help.

What I want to know is how this VS template works.  I can put properties in the Property Sheet view and if I ask for the current document, it always null, meaning I cannot persist those changes.

I normally don't consider myself an idiot, but if I'm using a VS2015 template, surely there is some documentation somewhere explaining how this is supposed to work?

It's not the end of the world for me (I can just drop the idea that we ship a windows app), but I'm kinda feeling that I should have a solution.