Development

TFS Service suddenly asking to create a new VS account? Don't Panic

Submitted by Robert MacLean on Wed, 06/19/2013 - 21:02

Clipboard01If you are logging into TFS Service with your normal account and are suddenly seeing a prompt to “Create a Visual Studio account”, where is nothing to fear. It is just a Terms & Conditions update that is BADLY labelled.

Click create and go on with your day Smile

Software Developers Mythology: iPhone Apps are important

Submitted by Robert MacLean on Thu, 06/13/2013 - 08:25

Seriously your mobile strategy can exclude iPhone, you don’t need to support that platform – it isn’t really that important. 

Before you move to the comment to call me a Microsoft kool-aid guzzling fanboy, let me explain. I see three reasons that fuel the myth that iPhone is an important platform and they are:

  • Lies, Damned Lies & Statistics
  • The FNB Effect
  • Development is hard for these other platforms

Lies, Damned Lies & Statistics

Image from https://twitter.com/mteton/status/313921852189855745I have been totally guilty of helping this cause of the myth prevail by standing in front of thousands of Windows Phone 7 developers & showing how Gartner & IDC both predicted that Windows Phone would grow to 2nd place behind Android by 2015, pushing ahead of iPhone – which at the time the stats said was the number two smart phone OS.

The truth is, Windows Phone is ALREADY ahead of iPhone. It also leads Android. Really, it does – maybe not world wide or even in your country, but in South Africa it does.

In South Africa the picture is very different, Symbian leads by a massive margin (44%) followed by BlackBerry (15%), then Windows Phone (9%), forth place is Android (8%) and last is iPhone (4%).

The problem is we look at these analysts and international reports and assume they apply to us – they do not and should not influence our understanding of our market.

The FNB Effect

banner01First National Bank, the bank that launched the first transactional smart phone app in South Africa & changed how we look at banking and did a lot to jump start app developed from companies. What platform did they launch on? iPhone & much (much) later an Android app was launched too – still no Windows Phone, Symbian or Blackberry app (or as I see it 68% of the market). Since there the number of times I have heard competing banks & companies in other industries start their mobile strategy with “FNB has iPhone – our customers expect iPhone”.

Those people are idiots. Their customers do not expect iPhone because FNB had an iPhone app, they expect an app for THEIR phone.

There are two sub-points to also consider with this factor which are vitally important in understanding why FNB’s choice of iPhone worked for them & why it may be right or wrong for your mobile strategy.

Know you customers

This is as much about the FNB effect as it is about statistics – looking at the statistics even for a country is almost completely flawed too. You need to look at what your customers have. To help explain this, let’s compare two companies who both produced an iPhone app:

For Discovery it totally makes sense to have an iPhone. Private health care & life insurance are expensive and really only the top portions of the country can afford it. That is the same market who buys iPhone. You market has iPhone, you build iPhone.

SABC, like so much at the national broadcaster, needs to appeal to the broad population. So they should be looking at the total market share and building based on that. The issue makes less sense when you think that DSTV’s news channels & eTV’s news appeal to the upper LM groups more – so in reality SABC SHOULD be targeting the lower income groups who buy cheap Symbian & Blackberry phones. They didn’t & it is just stupid of them.

In fact they should have a mobi site since that would allow even broader reach – but of course that doesn’t quiet work either…

image

FNB app isn’t special – their marketing dept. is

The FNB app isn’t special. At best the app idea was a just smart business seeing what the rest of the world is doing & getting on the band wagon first. So why do we care? Because FNB’s marketing dept. is so damn amazing, they made it an important point in many of their adverts. They used it to highlight how far ahead they were & how slow & old their competitors are. They also used it in an aspirational way to appeal to lower income groups: One day I will be rich & own an iPhone. Then I want to be at a bank with an app.

All four of the major banks in South Africa have apps for iPhone now & still we only ever talk about FNB. This isn’t because theirs is the best – but because they sold their app the best. They own the mind share.

A second aspect to this story is FNB have made it ridiculously easy to get an iPhone with them – which firstly pushes up their stats of which platforms are important and secondly re-enforces the marketing stories: Wish your bank had an app? Wish you had a phone that could run an app? Come to FNB, we make it easy to have both.

Development is hard for these other platforms

The final contributing factor to myth that iPhone is the first port of call, is from the prima donna’s involved in these strategies. You may know them as software developers. These folks will tell you that development for Symbian is tougher than milking a rattlesnake & development for Blackberry is tougher than getting a date with Megan Fox. iPhone, Android & Windows Phone development is easy by comparison and so you can get it a lot cheaper/quicker/better.

That is, naturally, complete bull shit. It is easier because these are sexier platforms and because of that

  • they don’t want to feel like an idiot when sharing what they do with their friends – who knows? Megan Fox maybe there and who will she date the iPhone dev or the Symbian dev? (I call this embarrassment tax – you pay extra for a developer to be embarrassed)
  • they likely have the devices today and understand the platforms already because they played with it in their free time. I am talking about platform & not development. Understanding why something works on a platform is just as important as learning to code for it.
  • they like the fact they do not need to learn new languages/tools. Android & Windows Phone developers are especially bad here since it is the top most common development platforms .NET & Java.

In reality Symbian is a marvellously stable & well developed platform with many tools. In fact, if you don’t need a transactional app, they have tools that are completely code-less (i.e. everything is done visually). I haven’t ever worked with Blackberry myself, so I can’t comment on their tools but I have been on projects where someone else did BlackBerry work & I did Windows Phone.  In those scenarios we were mostly matched for development performance and any difference was not because of the tooling.

Lastly, with tools like PhoneGap & Worklight getting better all the time, the need to native apps is getting REALLY small – you can easily use web development skills with those tools to create hybrid apps for BlackBerry & Symbian. There seems to be this belief though that if you go hybrid you go all in – which is totally bullshit too. I can totally see a native app built for your premier clients & then using hybrid, which may be a second rate experience, to clean up the rest of the market share platforms have in your customers.

Summary

In reality iPhone maybe the right choice to go for. The issue is there are so many people who do not apply their minds to what they really need. Rather these lazy people who make the decisions or feed information into the decision makers just regurgitate the bullshit that is out their. What I have hoped to highlight is there is no one right strategy but with a bit of thought & investigation you can find the one that is right for you and more importantly, your customers.

Windows Store app Development snack: XAMLSPY

Submitted by Robert MacLean on Tue, 05/28/2013 - 09:15

For more posts in this series, see the series index.

xamlspuThe above video shows the great XAMLSPY tool which is a massively helpful tool when working with any XAML based application, like a Windows Store app. XAMLSpy allows you to get insights such as performance & memory usage but for me the real value is when you add it to the application you get a set of small tools to use in the app to help identify and navigate the XAML.

xamlspyOnce you have found the piece of XAML that is causing issues, you can test out your ideas in real time using the real time editor functions which really speeds up development. This is a must have tool for those who really have pride in their craft!

Windows Store app Development snack: Compress your images!

Submitted by Robert MacLean on Wed, 05/08/2013 - 14:15

For more posts in this series, see the series index.

This post is both a development snack, i.e. something I think you should know to build better Windows Store apps, as well as being part of the Treasure Map transparency, which are meant to show you how we built a real Windows Store app.

Size Matters

Lab Rat

Clipboard01In web development, there is often a concern to get the download size of the page down & there are plenty of tools to help with this (Visual Studio has a lot for CSS & JavaScript) but when we get to app development, size isn’t always as big a concern.

Windows Phone development made 20Mb an important limit, since that meant the download could go over 3G rather than requiring WiFi – this is why my Lab Rat comic book for Windows Phone is 17Mb in size. I made a very conscience choice to ensure it would fit under 20Mb.

Windows Store apps don’t have a similar limit to Windows Phone – so when I was recreating Lab Rat for Windows 8, I just went with the highest resolution images I could so it would look great. This resulted in the download being 225Mb!

Treasure Map

Clipboard02With version 1 of the treasure map, no one really thought of file size either rather focusing on making it look and feel great. Which resulted in it containing a lot of high resolution images and many of them in the JPEG format. When we shipped version 1, we shipped a 57Mb install!

Small is better

For version 2 of the treasure map, one piece of feedback we got (I believe the awesome Mike Fourie raised it) was that it was a big download. So I spent some time looking through our assets and doing some sneaky clean-up and in the process learnt a bit.

JPEG

It’s crap – use PNG. PNG is better quality and for most scenarios is smaller in file size. So in both Lab Rat & Treasure Map the first step was to replace all the JPEG images (including assets like store logo) with PNG.

If you want more info on the differences between JPEG and PNG see this amazing StackOverflow answer.

PNG 32, 24, 16, 8… oh my

Clipboard03A PNG isn’t PNG – in fact PNG’s can specify the bit depth of each of the channels they support which directly impacts how distinct colours they support. They can also allocate a specific bit in the colours to indicate transparency. However if you do not need transparency, which in the case for the bulk of Lab Rat & Treasure Map is true, you can save bit for a colour.

Very few images will have all 16 million colours that are needed, so if you identify how many unique colours there are, then you can shrink the bit depth which results in a smaller file. I did some work on this and found two pretty interesting tools:

  • TinyPNG – a free website to do this. Only downside, one file at a time.
  • PNGoo – a free Windows tool that can do bulk changes. Not as easy as the website to use though.

So I ran both Lab Rat & Treasure Map through that and we got a MASSIVE saving in disk.

  • Treasure Map went from 57Mb to (approx.) 11Mb – so a saving of 80%. The 11Mb is just a test on my machine and also includes a lot of new resources, so it may change by release.
  • Lab Rat went from 225Mb to 89Mb! So a saving of 60%!

Summary

So in summary, use PNG not JPG & make sure you compress your images before you release!

TechEd Africa 2013: Windows Store Apps - Tips & Tricks

Submitted by Robert MacLean on Sun, 04/21/2013 - 17:13

On Thursday I presented at TechEd Africa 2013 the third & final of my talks which was very personal in nature as I spent a lot of time talking about what I did wrong & what I wish I knew when I started building Windows Store apps. The title of the talk was Windows Store Apps – Tips & Tricks! If you click more (below) you will be able to grab the slides, demos & my demo script if you are wanting to see what I was doing.

TechEd Africa 2013: What's new in LightSwitch 2013?

Submitted by Robert MacLean on Thu, 04/18/2013 - 15:53

Today I presented at TechEd Africa 2013 the second of my talks which is my personal favourite What’s new in LightSwitch 2013! If you click more (below) you will be able to grab the slides, demos & my demo script if you are wanting to see what I was doing.

The one item I gave the LEAST amount of coverage to was the SharePoint story, which is really amazing and deserved more. So if you would like to know more about it have a look at Brian Moores blog post on this. Of course, no LightSwitch talk is complete with a mention to Michael Washington (who is Mr. LightSwitch – if he was born in the UK, he would Sir. LightSwitch already) but I never showed his website URL, so here it is: www.lightswitchhelpwebsite.com

Download the completed demo

XAML (Windows Store apps) editing in Visual Studio broken with NVIDIA Optimus

Submitted by Robert MacLean on Sun, 04/07/2013 - 21:01

I have a fancy laptop that seems to delight in giving me headaches, and the latest is to do with Windows Store app development. The problem is simple, you edit the XAML and nothing happens! You need to trigger a full redraw of the screen to get it to render the changes, the below video may explain it better:

The issue here is that my fancy laptop has two graphics cards, a low powered Intel one (great for battery – average for performance) & a high powered NVIDIA one (bad for battery – great for performance). Add to this, that it uses a new technology from NVIDIA called Optimus which allows individual parts of the screen to be rendered by each card – the best explanation of this can be found on SuperUser.

So what is the solution to this problem? Disable one of the graphics card – yeah, that is the work around at this point. I am doing this by using device manager to disable the NVIDIA one.

image

That fixes the rendering issue and allows Visual Studio to work properly. Not great by any stretch of the imagination.

MVP's @ TechEd Africa 2013

Submitted by Robert MacLean on Fri, 04/05/2013 - 14:15

Microsoft_MVP_logoWith TechEd fast approaching, I have been asked a few times who are interesting presenters to see. That is always a tough problem to answer since it depends on what you like. One group of people who are always great are Microsoft MVPs, although I maybe biased, and there are a few presenting at TechEd.

(Click the names – they take you to their TechEd profiles which has, links to blogs etc… & a list of their talks)

There is also a couple of ex-MVP’s I spotted presenting too:

Haven't I seen these presentations before?

Submitted by Robert MacLean on Tue, 04/02/2013 - 15:38

imageIn a few short weeks I will be speaking at TechEd Africa 2013 and if you have come to my talks before (previous TechEd’s, TechDays, Hogshead when I have had one too many) you may see that I am giving similar sounding content – so why should you come to these TechEd talks? What will be new and awesome? I am going to give you an honest review of what you can expect from the three talks below.

Windows Store Apps, Tips & Tricks from the field

This is a brand new talk, filled with awesome new content for people developing apps for Windows 8 today & going forward to the Windows ‘Blue’ world. Some of this is from Windows Store app Development Snack series but not all of it, especially in the architecture & tooling sections of the talk.

Note: This is not an introduction to Windows Store apps talk – I will assume the audience has some of the concepts of apps already. So for example, I will talk about background tasks but not explain what they are or where they used in any depth.

What’s new in .NET 4.5 & VS 2012

Same title as my TechDays talk and really this is the version 2 of that talk. So what can you expect different from TechDays?

  • Part 1 is very similar, in fact you could probably just watch the YouTube video of that part & get 95% of the content. I will have some new tricks, especially since we have two updates to VS available now & I have adjusted the emphasis in some places – but that is the only changes in part 1.
  • Part 2 is very different, both the WCF & LightSwitch sections are gone! LightSwitch was dropped because I have an hour long talk just on that :) WCF was dropped since the demo’s were not great and despite it being an amazing tool, the focus for the talk needs to be what’s new – and the new way for API’s is WebAPI. Do not read that as WCF is dead – hardly, just it doesn’t meet this talks requirements. This means I freed up a lot of time, so I am filling it with A LOT of new ASP.NET content. I will show you tricks & tips in ASP.NET land that will blow your mind away!

What’s new in LightSwitch

This session is vastly different my previous LightSwitch talks – we will start in roughly the same way and look at what it does however rather than 1 hour on that, we do a higher level treatment of that in 20min.  So if you never have seen LightSwitch – I am ensuring you are catered for. That is followed by a quick view of the new stuff and then finally we look to the future and the amazing new items coming down the line.

This talk is aimed at those who have never seen LightSwitch, those who have & those we are using it and want to see where it is headed – so basically everyone :)