Improve the embedded browser in Visual Studio

Submitted by Robert MacLean on Tue, 07/01/2014 - 14:13

Visual Studio has an embedded browser, but it uses the IE 7 render path?! Really, that is pretty messed up.

image

and worse it can cause the Internet to break

image

Thankfully, you can fix this yourself with a quick registry addition. Note: Fiddling with the registry can break your device, so be careful and this carries the usual “this works on my machine” and it is your own risk for doing this.

The key you need to care about is:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

Note: the Wow6432Node bit is needed since Visual Studio is a 32bit process. In there, add a new registry key of DWORD type named: devenv.exe

I set the value to (HEX) 2af9 – since I have IE 11 on my Windows 8.1 machine, but you can pick from the list of options to best suit your needs and now it just works!

No issues on GitHub

image
A much better looking user agent.

image

The Rangers Treasure Map Updating System

Submitted by Robert MacLean on Thu, 05/15/2014 - 11:08

In the next release of the ALM Rangers Treasure Map one of the new features is a way to update content remotely in the app. The mechanism chosen for this is intentionally simplistic as it allows us to run this with minimal infrastructure as well as focus on the app development and not building server side code.

How it works?

Presentation2The system is very simple, but first let’s look at how content is handled internally. We store all content in XML and we have a folder full of images (we will call this collectively Assets). One of the changes needed in this release was code that copies the assets from the install location to the sandbox location – the reason for this is because we cannot write to the install location.

The update mechanism really just connects to web server and downloads a zip file, extracts it and overwrites the XML and images. We do have some extra logic internally which ensures that we do not waste your bandwidth – this is done by checking the if modified since in our request and we can see if we have new content available.

Setting up Azure

Unfortunately not every server supports the if modified since headers, but thankfully Azure Websites do support it. Using Azure websites allow us many ways to push to it which makes the work flow for updating content very easy. It is also very easy to set up the site:

Login to the management portal: http://azure.microsoft.com/en-us/account/

clip_image002

In the management portal – go to websites

clip_image004

Click NEW (lower left hand corner). Website should be pre-selected, if not, select it. Click quick create and specify a URL and hosting plan. Click create website.

clip_image006

Next click on the website which was created and click Reset your deployment credentials.

clip_image008

Specify a username and password and click OK.

clip_image010

And that is it!

Crafting the content

So how do we build the ZIP file which needs to be uploaded? Since we have two different sets of assets; first the art (images, photos, logos etc…) and second the data (as XML). These are stored in two different locations for the app: DataProviders, which contains the data, and Assets, which contains the images. So we setup the two folders and put the new items and data to be replaced in the right folders:

image

We then compress those folders into a normal ZIP file and upload it. It is that simple.

image

Developer User Group 2014 Survey results

Submitted by Robert MacLean on Thu, 04/24/2014 - 21:01

This year we launched the first annual user group and let me say thank you to every single one of you for taking the time to help us improve the group. For this survey all questions were optional so you may see some differences in the numbers. This post is meant to share the data and I am not going to speculation about what this could mean or how we will adjust the group based on it at this point. Lets have a look at the data!

Comments

The final item in the survey is the first I want to discuss – the comments. Many where along the line of congratulations which is awesome but there are four I want to highlight here.

more code please, e.g. everyone has talked about 'everything must be unit tested', yet not once have i seen the actual code. I AM UNIT TESTING, BUT I FEEL THE COVERAGE IS NOT ENOUGH, SO IT WOULD BE HELPFUL TO HAVE A REAL LIFE EXAMPLE OF 100% COVERAGE REGARDING TEST DRIVEN DEVELOPMENT.

We will be having the awesome Martin Cronje in June doing a talk exactly on this! Another idea would be to attend the CodeRetreats where this is a major focus of the events. A personal comment based on the talks I have given; the time for a presenter is limited so if they are talking on SignalR adding unit tests not only takes time away from the talk but can also confuse the audience.

A suggestion to some of the discussions is to have a practical aspect where coders can code

I love the scenario where the audience can code with the talk but there are logistical reasons this doesn’t work well in our format. The presentation style is the one that works best.

Have more advice for novice/beginners to programming

Below I will talk about what type of events we run most often, and while the bulk of our talks are technology focused which can be very tough for novices we have a big chunk that are about methodologies, theories, stories and patterns. These are PERFECT for a novice since they share valuable information which doesn’t rely on technical understanding.

I haven't attended for some time due to other commitments, but for some time I thought it would be beneficial to have a bit more conversation / talks about the open-source languages and projects. I understand that the group was initially primarily started around Microsoft products, and that's great, but in my field open-source is more dominant. It's just an observation, though, nothing against the setup of the group per sé

I disagree with this view – having a look at our past events the break down of the sessions is as follows:

image

Looking at the numbers – we are more about open source technology and developer improvement than Microsoft.

Overall, how satisfied or dissatisfied are you with the Developer User Group?

The first and most important was how satisfied or dissatisfied people are, on a scale from 1 to 5 (1 being bad – 5 being great) and we hit at an average of just over 4! Smile

How likely are you to recommend the Developer User Group?

Second is very important for us, because we want to grow the group and being recommended is the best way for that. Here we did a scale from 1 to 5 and did even better scoring over 4.4!

Overall, how do you find the complexity of the sessions?

Third is  how members are finding the content – with this also on a 1 to 5 scale with 1 being too simplistic content and 5 being too complex content. 3 is the just right spot and we came in almost exactly at that!

 

Start time

imageThe most discussed issue in the group is the start time – it is brought up almost every month in the comments. Keeping the time the same really smashed the other options, both individually and if you group the times into early (16h00 + 16h30), medium (17h00 + 17h30) and late (18h00 + 18h30). We are planning to use the early start time to allow for longer sessions with multiple topics going forward so hopefully that will enable people to get the best of both worlds.

  • Keep it at 16h30: 49%
  • Start earlier at 16h00: 6%
  • Start later at 17h00: 15%
  • Start later at 17h30: 10%
  • Start later at 18h00: 15%
  • Start (really) later at 18h30: 5%

What do you hope to gain from the developer user group?

imageThe only item to allow multiple options to be selected, is also one of the most important – what do you want? Almost everyone said learning new skills and networking.

  • To learn new skills: 95%
  • Networking with other developers: 93%
  • Free drinks & pizza: 37%
  • To find potential employees: 20%
  • To find a new job: 12%

Age

imageMoving into the demographics for the group – the first one is age with the majority between 26 – 35.

  • 26 – 35: 75%
  • 36 – 50: 16% 
  • 18 – 25: 6% 
  • 51 – 65: 1% 

What is your level?

imageThe next item is the level, which shows a strong slant to the senior level.

  • Senior: 70%
  • Intermediate: 22%
  • Junior: 6%

What is your primary programming language?

imageThe third demographic which is vital for us in planning content is around primary development language and we have a GREAT mix of languages but the strongest community is c#.

  • C#: 59% 
  • Java: 9% 
  • C++: 3% 
  • JavaScript: 4%
  • Visual Basic: 1% 
  • I'm a QA: 1%
  • Python: 1%
  • PHP: 1%
  • Objective C: 1%
  • SQL: 1%
  • Many of the above: 1%
  • Scala: 1%
  • I'm a novice wanting to learn: 1%
  • Project management: 1%

What is your primary type of development work?

imageIn line with  planning content, knowing what people are doing is vital. Web work (internal and external) is a strong lead followed by integration and mobile.

  • Mobile apps: 11% 
  • Internal web sites or Intranets: 30% 
  • Integration projects: 19% 
  • External/Public web sites: 27% 
  • Coaching: 1%
  • UI/DB/Platform: 1%
  • Many of the above: 1%
  • Internal Projects: 1%
  • I'm a Novice wanting to learn: 1%
  • Server side development: 1%
  • Data warehousing: 1%

Organisation size

imageHow big are the companies that developers come from? Here it looks like a strong split between small (less than 20) and large (more than 90). Which I think is pretty accurate for the industry as a whole in South Africa.

  • >200: 25% 
  • 11-20: 8% 
  • 1-10: 29% 
  • 21-40: 12% 
  • 91-200: 14% 
  • 41-80: 9% 

Role in purchasing?

imageFinally, a question we can use when discussing with sponsors is what role people have in purchasing. Here there is some influence or none.

  • None: 37% 
  • I can suggest/influence purchases: 51% 
  • I make the final say: 11%

Raw data?

Want the raw data – you can download it below.

Why is it called the GAC?

Submitted by Robert MacLean on Tue, 04/01/2014 - 09:57

ArZg52WCAAAOyHAIn .NET we have a GAC or global assembly cache – which you may think describes it well and that is why we call it the GAC, but that isn’t true. One of the many things I’ve learnt since joining Microsoft last year is the real story of the GAC’s name and the fact that the acronym was chosen after the name to please legal. Think about it, the GAC is neither a cache (it is really a repository – a cache implies a temp nature to it’s contents) nor is it global (it is local to the machine) – that acronym just doesn’t make any sense.

The origin of the name is that Anders Hejlsberg when naming it wanted something to represent the only location on the device for assemblies. In addition Anders is a massive Dr Seuss fan and chose the name from the so in Cat in the Hat book. (emphasis below is mine).

At our house we play out back. We play a game called Ring the Gack. Would you like to play this game? Come down! we have the only Gack in town.

The name was used in the team until legal got hold of it and worried that Microsoft maybe sued, so it was shortened and an acronym made up to explain it. The original name does appear in the original beta documentation for .NET 1.0 which you can find here.

An independent .NET conference

Submitted by Robert MacLean on Fri, 01/24/2014 - 10:09

At the last developer user group, a discussion around .NET and the community came up where an issue  was identified that because Microsoft does such a good job of communication around .NET, anything outside their realm is pretty much ignored. The example was that open source doesn’t get enough coverage at big events – my response, why doesn’t the community run their own .NET event. The idea would be that it targets a .NET audience, but the content is not limited to .NET i.e. you could present on Perl, but as the audience is .NET it would make sense to tailor the talk to the things those people expect and address there concerns. I ran a small poll to see what the response would be.

425 people ended up loading the poll, yet a mere 35 people completed it Sad smile

So looking at the data (hint, that link takes you to the live report). It seems that

  • Free vs. cost: Isn’t an issue. I think the main thing here that if there is value people will pay.
  • Weekday vs. Saturday: A weekday seems far more popular an option
  • Multi-track seems a lot more popular than a single track.
  • Johannesburg FTW! Cape Town and Durban are just a fraction of the amounts (the colours on the charts don't match up Sad smile - so biggest is always blue, which doesn’t make sense).

So what is next? I am not sure – the numbers are surprisingly low which indicates to me that either we, as a community are horrid at sharing things, or there isn’t demand. Your thoughts?

image

Some analytical information

Clipboard01

Joining the AppFactory

Submitted by Robert MacLean on Wed, 12/04/2013 - 09:04

appfactory_za_headerI am very proud to do a short announcement that I have moved to join Microsoft, and specifically the AppFactory. The AppFactory is a group of people, mostly consisting of interns who are gaining real world experience in software development. So what is this real world development focused on? Locally relevant apps which give all users a rich and meaningful experience on Windows 8.1 and Windows Phone.

I am joining as a senior developer with my focus on both development, but also skilling up of those involved!

Browser Link + LESS? Does it work?

Submitted by Robert MacLean on Fri, 11/01/2013 - 10:22

(You can grab the code for this from: https://github.com/rmaclean/BrowserLinkAndLESSDemo)

imageAt TechDays in Johannesburg, I showed a lot of cool stuff, but this post is about two specific pieces of awesome technology – Browser Link & LESS. In my talk (you can watch  a video of it here) I showed off how you use Browser Link with Web Essentials it can detect unused CSS. A rather sharp attendee came up to me afterwards and asked me, what happens with LESS? Does it do the same thing?

I went back and experimented with it – first was to setup some CSS that wasn’t used and test. Everything works as expected.

Step two, was to use LESS directly, so I setup the HTML with

  • I used Nuget to pull down LESS.js
  • I put in the the link to the LESS file
<head runat="server">
    <title></title>
    <link rel="stylesheet/less" type="text/css" href="/Content/Awesome.less" />
    <script src="Scripts/less-1.4.2.min.js"></script>
</head>

Next step was to configure IIS Express, using the web.config, to serve the LESS file. To do that I added the following to the web.config file:

<system.webServer>
  <staticContent>
    <mimeMap fileExtension=".less" mimeType="text/css" />
  </staticContent>
</system.webServer>

and I ran the app again. You know what happened? It all just worked – Browser Link’s CSS logic detected the unused class in the LESS file, and when I clicked it – it took me directly to the class in the LESS file Smile

Missed TechDays? Check out my LightSwitch talk on YouTube!

Submitted by Robert MacLean on Fri, 11/01/2013 - 09:49

I you couldn’t make TechDays in Johannesburg or Cape Town (or maybe you did & went to Dave Russell’s awesome MVVM talk which was at the same time as my LightSwitch talk) then you can watch a recording of my LightSwitch talk I did recently.

If you want to get the slides, the completed demo or the script, you can find all of that in my earlier post.

Missed TechDays: ASP.NET

Submitted by Robert MacLean on Fri, 11/01/2013 - 09:27

Did you miss the awesome TechDays events in Johannesburg and Durban? Fear not – I recorded my ASP.NET talk for you! This is no way as good as being there as the excitement and energy from the event help a lot, but this is still a great talk to watch!

All the slides, assets, demo bits etc.... can be download in this post.

TechDays 2013: LightSwitch

Submitted by Robert MacLean on Thu, 10/31/2013 - 09:11

I had an awesome time recently at the Microsoft TechDays events in both Johannesburg and Cape Town where I presented on Visual Studio LightSwitch and ASP.NET! Below you can find the slides (SlideShare does a poor job with them, but if you go to the website you can download the original PowerPoint!), the demo script, the completed demo and the assets used in the demos!