Development

This category is for all things relating to scripting or programming languages, as well as software construction, design and development.

Will Neovim rock on Windows?

Gvim on Windows 8

I have been using Vim on Windows since I switched to 64-bit and edit.com stopped working. Originally I just used the console version inside of PowerShell or the standard command line. In the last three years I’ve been favouring Gvim as my go-to text editor for smaller scripts and utilities.

I know for a fact I’m not using everything Gvim or Vim has to offer, but I’m quite happy with the way it works. For example, I have line numbers turned off, but I can turn them on very easily using a quick :set nu.

Very powerful, very fast.

There are some things I absolutely hate though. For starters, what’s this horrible border on the inside of the window, and how can I make it disappear without hacking the whole application and recompiling it? This isn’t Windows 95.

Ugly Border

I’ve looked for some time but I haven’t found a solution. But hey, I found out that people can make it look pretty on Ubuntu (handy!)

Enter Neovim

Neovim promises to be a refactoring (and reimagining) of the Vim text editor using more modern techniques. The plan is to have the core Vim functionality moved into a new library, which will allow the interfaces to be separated out in a modular way.

The thing that got me really interested? When they mentioned Windows:

Modern GUIs written in high-level programming languages that integrate better with the operating system. We can have GUIs written using C#/WPF on Windows or Ruby/Cocoa on OS X, for example.

True they’re not saying they will write a GUI using C# & WPF, but someone can. And I like the sound of that. Of course, it’ll be open source – and I’ll be able to edit the XAML to have no borders at all, if I like.

Also, here’s hoping we get better PowerShell integration out of this too.

It could be huge.

So, will Neovim rock on Windows? I sure hope so.

It’s a great time to be a Microsoft-focused software developer

The Build 2014 conference took place in San Francisco last week, where thousands of developers and designers came together to learn all the latest information about what it means to use Microsoft development tools, and build solutions that run on Microsoft platforms.

I have over 137 GB of videos yet to watch, but I can already say that it has been one of the best Microsoft developer conferences to date.

Here are my thoughts so far, with a few links to some of my highlights.

.NET is alive and well – and becoming more open

build-2014-4

There was a general feeling that .NET developers had been left behind in recent years. A strong push to using HTML and JavaScript really got some people worried when Windows 8 was announced – but at Build 2014 the message was loud and clear. The .NET platform is alive and well.

It’s almost as if they asked .NET developers what would make them really happy, and set about doing all those things. For me, personally, I was most excited by the promise of open-sourcing even more of the framework, including the brand-new compiler platform (Roslyn) that has been years in the making.

Initiatives like .NET Native will allow applications built with C# and Visual Basic to get much closer performance to applications created with C++. Starting first with Windows Store apps, these architecture specific binaries will increase performance at runtime without losing the productivity of developing with the architecture-agnostic .NET Framework.

Roslyn and .NET Native are in preview, and won’t be completed until the next version of Visual Studio. But there have also been a wide range of updates to the ASP.NET web platform, MVC, Entity Framework and way more – most of which are either available now with Visual Studio 2013 Update 2, or can be downloaded using packages from NuGet.

You can tell Windows is under new leadership

build-2014-1

Cortana – the new assistant built into Windows Phone 8.1 – was the highlight of the show. There had been rumours of Microsoft’s answer to Siri and Google Now for quite some time, so a lot of the information had already come out. But still, it was great to see Joe Belfiore talking to her publicly for the first time, confirming what Halo fans were waiting for: yes she is called Cortana, and yes, she sounds like Cortana.

As Cortana is such a huge step for Microsoft, I’ll be going in depth on what I think over the next few weeks.

Cortana wasn’t the only addition to Windows Phone 8.1, there were hundreds of new features and tweaks to the UI that will take weeks to be documented – the new calendar is just one of these. I’ve tried it in the emulator and it’s really great. The developer preview is due this month.

As a developer, the news of Universal Apps was very welcome. This allows high amounts of code sharing between applications designed for both Windows and Windows Phone. I can’t wait to try this stuff out, especially with the new JavaScript support.

Windows 8.1 has some new features too. The much-leaked Windows 8.1 Update includes changes to how the operating system behaves with a keyboard and mouse – though these changes are only the start of the improvements that are coming.

Azure is the future, and already here

build-2014-3

Microsoft’s cloud platform has improved tremendously over the last few years and this year was no exception – in fact, there were so many new features I can’t even begin to go through them all. Some I probably won’t even use (Java? No thanks.) but I know the option is there, which will inform my decisions for cloud hosting in the future.

Scott Guthrie and his team talked at great length about new features that will improve productivity for ‘DevOps’ tasks significantly. For example, the new Azure Portal includes the ability to view statistics, create new infrastructure, build new virtual machines, deploy websites and even do code changes with Git source control – all from one UI.

I already use Azure as part for my personal projects, as well as Visual Studio online as my source code repository. I plan on using it even more in the future – so I’m pleased to see Microsoft lead in this area. And they really are leading.

It doesn’t have to be Windows & .NET

build-2014-2

Times have certainly changed, and PCs that run Windows are no longer the most popular computing devices. As a predominantly Microsoft developer, this makes me wonder about the future. This year’s Build has continued the recent trend of Microsoft supporting other platforms in new ways – plus with partnerships with like likes of Xamarin, I see no reason to even contemplate switching over to Android (the most popular platform) in the foreseeable future.

While I was hoping that there would be the announcement of a Xamarin acquisition, they didn’t disappoint. It was great to see Maguel even joining Anders on stage during the keynote. Both of these guys are very smart, and I look forward to what else the partnership can bring. Being able to develop universal apps that also target iOS and Android is not very far away at all.

Surface Pro 2: Development Workstation

Surface Pro 2

After five years of faithful service, I have finally replaced my old MacBook with a new computer. I got myself the Surface Pro 2 with 256 gigabytes of storage, and 8 gigabytes of memory.

Frankly this small computer is the fastest one I have ever owned, and performs better than my higher spec work laptop. This is especially noticeable when using Visual Studio and other development tools, but it’s also faster doing every day things like Mail and OneNote.

Development Workstation

The purpose of this computer is to be my development workstation, and to run all my x86 applications. Due to the tiny size of the tablet it will probably spend a good deal of its time attached to external devices. A full size monitor, keyboard and mouse combination will allow me to be as productive as possible at home, while still being able to take everything to other locations in even the smallest of bags.

While thicker than my original Surface RT, the Surface Pro 2 shares the same design language, and I find that it looks almost indistinguishable when I’m facing the screen itself. Picking it up it certainly feels thicker, heavier, and warmer. But it’s still a Surface, and feels extremely well made and very sturdy.

So far, I’m very impressed. I’ll be writing up some of my experiences of using the Surface Pro 2 as a development workstation as I spend more time with it.

Surface

So if this device is meant to replace my MacBook, what does it mean for my Surface RT?

Having two 10.6 inch tablets is not ideal, I know. But I’m going to continue to use the Surface RT for things like Skype, Netflix and general carrying around in my backpack until there’s a 7 or 8 inch Windows RT based tablet that catches my eye.

Windows RT devices tend to have much better battery life, and the operating system itself certainly better suited to mobile devices. For example, Connected Standby allows Windows RT to collect email and other notifications over Wi-Fi even when ‘off’. A feature that is sorely missed on Windows 8.1 Pro x64.

I’m also not convinced that the 10.6 inch screen size of the Surface RT is what I want from a Windows RT tablet anyway. The relatively large screen is great for using with the Type Cover and being productive – but I’d rather have something smaller for using mostly with touch.

Windows 8.1 on the 2008 MacBook

Windows 8.1 on 2008 MacBook

For a while now I’ve been wanting to get myself a new PC, but I haven’t found one that really captures my attention. I tried looking at Vizio, Apple and Samsung – but nothing seemed worthy of the investment. Plus I must admit I have been holding out to see if Microsoft brings an Ultrabook to the Surface family.

Most of the time I actually use my Surface RT for doing every day stuff, but there are some things that are much faster using a larger keyboard, a proper track pad and the ability to be used on the lap. I have been using my 2008 MacBook running Windows 7 for these tasks, as well as pretty much all of the development I do for my personal projects.

Last week – when trying to get the MacBook to boot from a VHD file – I managed to mess up the boot configuration, and two of the three operating systems (OSX, Windows 7 and Windows 8.1) didn’t work at all – the only one that worked didn’t really provide me any way to fix the issue.

So for the first time in what seems like forever, I actually burnt a DVD and got a copy of the Windows 8.1 Preview installed fresh on the NTFS partition. This worked much better than the Windows 8 Preview I had previously tried, and I decided to try and get things up and running properly by following a guide (slightly modified to get the new version of Boot Camp) and lots of hacking around.

To my amazement, not only did all the Apple specific drivers (the backlit keyboard, multi-touch track pad etc.) all work for the x64 version of Windows, but the operating system itself felt a lot faster than Windows 7. It also seemed the Apple’s Boot Camp software wasn’t hammering the CPU as much as it used it.

Thanks to some of the changes in Windows 8.1 – like being able to use Snap view on lower resolutions – I’m actually able to complete most of the tasks I wanted a new computer for. Sure there are a few down points:

  • No hypervisor – meaning I can’t run the Windows Phone Emulator.
  • No touch screen – yes I have tried to swipe content on the screen by mistake!
  • Not very speedy – hey it’s a 2008 machine, it’s not going to be fast.
  • Hacky configurationthe third party drivers sometimes feel like they’re held together with luck. And they are.

But these negatives aside, I’m actually able to get most of my development tasks complete on the new operating system, and I’m going to upgrade to the final version of Windows 8.1 when it comes out in the fall. This means I don’t need to buy a new computer right away, and I’m going to try to get at least another year out of this one.

Windows 8.1 on 2008 MacBook

I still hope that Microsoft will enter the Ultrabook market, and if they do I’m sure I’ll be glad that I waited. But for now I’m going to try to continue to use this 2008 MacBook as long as I can.

My hat goes off to Apple – this has definitely been the best machine I have ever owned.

Update

While my MacBook still works with Windows 8.1, I don’t use it anymore as I’ve upgraded to a Surface.

Installing Windows RT 8.1 Preview on Surface RT in the UK

Like many Surface RT owners in the UK, I was extremely excited to install the Windows RT 8.1 Preview that was announced today. Unfortunately, the update provided doesn’t seem to support English (UK) as a language option on my Surface RT.

First I attempted to add English (US) and replace my existing language, however that did not work and I still got the error.

So, hacking away like I usually do, I decided to try forcing the installation of KB2849636 from the Command Prompt:

expand -f:* Windows8-RT-KB2849636-arm.msu .
pkgmgr Windows8-RT-KB2849636-arm.xml

After a reboot my tablet sat on ‘Preparing to configure Windows’ for a long time, and after the jump I was able to see the preview from the Windows Store.

Windows RT 8.1 on Surface RT in the UK

Unfortunately I haven’t been able to install it yet, and I’m told to try again later. It seems to sit in this state and doesn’t progress any further…

Please try again later...

Update 1

Still no joy in getting the preview installed, but there are a few other people looking into the problem.

Check this question on the Microsoft Community for more information.

Update 2

It looks more and more like there is an issue around the installation that can only be fixed by installing an English (US) operating system. I have decided to wait and see what happens. I’ve heard that Microsoft will be releasing a fix for this in July.

In my opinion, this has been extremely poorly handled by Microsoft.

Update 3

There is another question on the Microsoft Community which has some replies from the moderators:


Windows RT users

Please do not change your base language just to install the Preview. If you do this and then update to the preview version, you will permanently change your base language on these devices. This happens because we create a new restore image based on your selected 8.1 base language during install.

Also, as we noted on the download page, if you’ve installed a language pack on Windows RT, we ask you not to install Windows RT 8.1 Preview at this time. A fix will be available soon for updating through the store with a language pack installed, so please check back.

Charles [MSFT]

Goodbye, Pokéject

When Windows Phone 7 first came out, I immediately started looking to use the new development tools to create an application. Pokémon Black and White were out around the same time, so I figured creating a Pokédex-like application would be a good idea.

pokeject

Unfortunately, not much over a year later The Pokémon Company International went after a number of the Pokémon apps for iOS, Android and Windows Phone. They asked Apple, Google and Microsoft to remove the offending applications from their respective stores. My app was included*.

Eventually, The Pokémon Company International released their official Pokédex applications for both the Nintendo 3DS and iOS. (at time of writing, there is no official app for Windows.)

pokedex-ios

The Pokédex app for iOS has a different focus from my app, aiming directly at listing out all the information rather than focusing on checking off the list (though you can use it this way using tagging). This is great, as the information contained in the application far outweighs the data I managed to collect for use in Pokéject. Including some rather cool 3D models.

pokedex-3ds

Personally, I believe the 3DS version to be a lot weaker – the user interface is pretty horrible looking, and I found it a lot harder to navigate. The biggest complaint is the lack of ‘multi-tasking’ on the 3DS. I would like to be able to check off my Pokédex as I play my game. This isn’t possible when both are applications on the same machine.

I thought about reviving Pokéject as web application, going as far as porting a large amount of the source code over to ASP.NET – however I recently started using the iOS version – which contains much more data – and decided it would not be worth the time investment.

So this is the end of the Pokéject project. It’s been fun, but the official versions contain way more information, I suggest people use them moving forward.

* A recent check shows that there are still a number of Pokédex apps in the Windows Phone store, though the most popular and best presented ones were removed long ago.

Metro vs. Your Own Design Language

Facebook Banner

There was a little stir about the Facebook Beta for Windows Phone when it came out. Check out the comments on the official post. A few news sites covered the release, which ended in similar comments. This got me thinking about my view on the situation…

Why has the Metro design gone? Where is the uniqueness of Windows Phone?

Yes, as immediately noticed by those who care – the app doesn’t use the Metro hub pattern that the previous app used, but in my opinion it doesn’t matter because Facebook have their own design language.

Facebook News Feed

In March Facebook announced an update to the News Feed that will bring a lot of design elements from their mobile applications into their main web application, here they clearly state that they’re after a consistent user experience across all of their platforms. While there’s no doubt that the design borrows heavily from Android and iOS apps, but – more importantly to me – it also is very similar to the mobile web experience, which was my primary way of accessing Facebook throughout the day.

Original, Web and New Facebook Experiences for Windows Phone

But the principles are forward looking and similar to Metro, Facebook are focussing on stories and imagery, removing clutter and keeping their distinctive look with the typography and colour choices that users are familiar with. See below an example of how the same information is displayed on both the old and new versions of the Facebook app for Windows Phone. Which one looks more like Facebook?

Old and New Facebook App

By focussing on Facebook design language rather than Windows Phone design language, they’re actually following one of the most important UI principles for Windows Phone – content over chrome. Where the Facebook experience is the content, and the previous Metro UI treatments – like larger fonts and the main panorama – were essentially just chrome.

Does this mean the end of the Metro design language? Obviously not.

My personal view is that the built in templates that come with Windows 8 and Windows Phone 8 are to be used as starting points. You get a lot of good design for free that way, but if your application has its own way of doing things then the Microsoft development tools will allow you to craft them. Real designers make the best decisions from the options that are available to them. In this case, the consistent Facebook experience makes the most sense.

Using Windows 8 (without Touch)

Using Windows 8 (without Touch)

When I had my first Windows PC, I spent a large amount of my time in the DOS environment, playing with scripts and trying to optimize memory. When I went into Windows I had access to cool applications like Solitaire… but most of the things I had ran in DOS.

Using Windows 8 (without Touch)

Windows 8 is like that today, most of the applications I need to complete tasks – be that for work or for personal endeavours – are well established on the Desktop UI paradigm. I tend to use laptops mainly, but when I’m working I plug the laptop into a monitor and a keyboard to get stuff done.

Using Windows 8 (without Touch)

I use a lot of utilities in the desktop for various development tasks, including F#, Python, Ruby, Vim, Filezilla, WinMerge, Fl.ux, KatMouse – all of which are portable applications which do not require installation. I keep these inside my Scripts folder and usually access them via PowerShell commands.

Because these applications sit inside my Scripts directory I get a number of benefits:

  1. I can sync the tools between computers (manually or via the cloud)
  2. I don’t need to sit through loads of installs on new machines (and remove the icons from the start screen!)
  3. I can be sure I always have a rich development environment for when I need to build software

On top of my scripts, I also run a number of proper desktop applications that require installing. Chrome, Office, Visual Studio, SQL Server, the Windows SDK and a few more.

Using Windows 8 (without Touch)

Once I have all these applications installed, Windows 8 gives me everything I need to get tasks done. I have Email, Word Processing, Spreadsheets, and an extremely rich development and scripting environment thanks to Visual Studio and PowerShell.

Using Windows 8 (without Touch)

My Desktop doesn’t include a number of things – apps don’t want to see there. No instant messenger, news readers or weather apps. That kind of information is made visible directly through the start screen and its use of Live Tiles. Clicking on the tile takes you to a full screen application that brings your focus to the task at hand.

Using Windows 8 (without Touch)

The full desktop is just one click away. If I want to check if a Visual Studio build has completed I can just flick back to check. This combination of the new and old interfaces seems to work perfectly for me. Taking all the distractions out of the desktop, and moving them into their own space. If I want to play a game of Solitaire – it takes over the full screen, giving me a rich experience. One click in the top left hand corner and I’m back in the desktop with all my windows exactly as they were.

Using Windows 8 (without Touch)

Am I going to continue using the desktop to access applications and consoles? Yup. Windows 8 has more than this though. The new applications we have today are pretty good. The Bing app has turned out to be extremely useful, for example. But where the new apps currently lag is in the more complex tasks like photo manipulation or music creation.

These kinds of experiences would be better in the full screen UI, and I’m very interested in finding out what the likes of Adobe and Propellerhead Software come up with in the future. But at the moment their products like Photoshop and Reason will have to be accessed via the multi-tasking desktop interface.

Many windows features are still only available in the desktop interface. Most notably File Explorer. There’s no way of casually browsing your file system through the new user interface. Sure you can select files to open inside of other applications – but if you fancy just browsing around – you are out of luck.

Through my use, I can say that Windows 8 has surpassed Windows 7 for its ability to get stuff done with a mouse and keyboard. The new start screen is also going to provide a rich user experience for touch input, and the new applications will really shine in these finger friendly scenarios.

While Using Windows 7 now feels like going back in time, I still think there is work to be done with Windows 8. It’ll be interesting to see if Windows Blue brings any changes to the desktop interface.

The ‘Metro Inspired’ Interface

We recently saw the release of the Office 2013 Preview which has been received by many as one of the best looking and best executed reboots by Microsoft. The preview is very consumer focused (which is where Microsoft is lagging) and includes some very interesting cloud integration features – like saving to SkyDrive by default.

The thing I want to talk about now is a trend that has been coming at Microsoft for a while now – everything is moving over the Metro look and feel, but there is a distinction between an application that is ‘Metro style‘ and ‘Metro inspired’ the first is built for the new Windows 8 user experience, and the second is just an existing Windows application which has been built with the Metro Design philosophy in mind. (Yes I’m going to keep calling it Metro, for now)

Part of the confusion on the Metro name is due to this shift, and we actually have two things:

  • New Windows 8 Applications (Metro style)
  • Any app designed with the Metro philosophy (Metro inspired)

Now ‘Metro style’ applications are going to be known as Windows Store Applications. But we’ve had no word on what the Metro inspired applications are going to be called yet.

Below are a few of these ‘Metro inspired’ apps we have today…

The first of these applications pre-dates Windows 8 itself and was really the birth of the Metro design philosophy on Windows. The Zune desktop software has always had many of the original design features which we now know as Metro design – big on typography and whitespace.

I spend a massive amount of time in OneNote, and the 2013 version is so Metro it’s almost invisible. If you go into the full-screen mode.

Now applications from the Office Division are merging their ‘fluent’ ribbon interface with the Metro design that the Windows team has embraced. The combination is very interesting.

The Developer Division has also taken note, and Visual Studio 2012 has a really amazing (and controversial) look.

Personally, I really love this Metro look. I just wish Microsoft would decide exactly what we should be calling it. Until then – it’s Metro.

Photosynthesise

I’ve had two themes for this site since I started it in December 2010, and even the second one was only a small refinement of the first. Back then I figured that getting the site up and running was more important than the look itself, so I never really gave that much attention to the theme – until now.

Before the design of my new theme even started, I had to give the project a name. I decided to call it Photosynthesise, as I wanted to give the feeling of energy and growth. (Oh and also the signature colour is green!)

This time I thought I’d share my ideas behind the design process…

Goals

There were three things I really wanted to have for my Photosynthesise project:

  • A design built to fit inside a typographic grid
  • A design which evolves the current identity
  • A design that is great for all existing content

Thinking about space

While researching Swiss Style, I discovered that things look better in grids. I think this is a concept that everyone already knows, but really focusing on the grid when laying out a user interface gives it much more balance. The users may never be aware of the work you have done, but unconsciously – they’ll appreciate the eye for detail.

Switch on the grid to see how it looks.

Thinking about identity

My old site was green, and I decided to keep it. This time the new logo at the top was designed to be a lot smaller, allowing the title of the website to come outside of the coloured box. Designed in a 16×16 grid, the new logo will easily scale down to the microscopic resolutions of favicons, as well as scale nicely when zoomed up to higher definition.

Joining the signature green, the previous theme’s hyperlink colours have also been used throughout the new look. It will be no surprise to designers that this almost-RGB colour pallet is influenced by digital displays. Finally, three shades of grey and white make up all of the colours used throughout the design. The darkest of the greys is used in place of black to ensure the other colours are never overpowered.

The old site was based on Twenty Ten, which had a shape that was very similar to other WordPress blogs. I’m happy to continue to use this layout as it is familiar and user friendly. The overall size of typographical elements in the design is fairly large, something which has also continued over from the previous theme. This keeps the overall look of the site mostly the same as it was before, even though everything has been refined.

When it comes to the typography, I decided to go for Segoe UI for the body font. I had also greatly considered using either Calibri and Cambria, but I ultimately decided that I liked Segoe UI the most. The reason I picked Windows fonts is not by accident – as a Windows developer they feel very familiar to me, and I like writing in them.

Thinking about content

The content is the really tricky bit. Due to the fact I have previously used 600px wide images throughout the blog, I’ve decided to keep the content at that width. Consequently, images like the one above still have a big impact on the body text. Oh and I don’t have to resize everything.

“I feel like a pig shat in my head.” – Withnail

I’ve greatly improved the spacing of the text and other elements to make the whole content area flow with the 100+ posts I already have. I’ve also improved the ability to post quotes, code samples and console commands, handy when you spend as much time in PowerShell as I do.

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

PS>


To enable new discovery of content, I’ve improved the visibility of the categories and tags. Large blue links to the right of the content enable switching between categories, and now a new section at the bottom of each post makes the relevant tags much more visible.

I plan to keep tweaking the code over the next few days, but if you have any feedback or you’ve noticed any bugs please let me know in the comments!