Visual Studio “14” announced, preview available with “Roslyn” open source compiler

Microsoft’s Soma Somasegar has announced the next version of Visual Studio, currently known as Visual Studio 14, but likely to be fully released in 2015 (and, I am guessing, likely to be called Visual Studio 2015).

This is a major release. It includes a new VB and C# compiler which is itself written in managed code, codenamed Roslyn. The open source Roslyn project provides new APIs that enable more powerful IDE features. Visual Basic is getting refactoring support for the first time.

The preview also includes a major update to ASP.NET that unifies ASP.NET MVC and the ASP.NET Web API, and has a new deployment model and developer experience:

Thanks to the Rosyln compiler, if you change ".cs” files or project.json file and want to see the change in the browser, you don’t need to build the project any more. Just refresh the browser.

There is no IIS express, nor IIS involved when you run from the command line. It means that you can publish your website to a USB drive, and run it by double clicking the web.cmd file!

On the C++ side, there is improved C++ 11 support and more features from C++ 14:

The Visual Studio "14" CTP includes support for user-defined literals, noexcept, alignof and alignas, and inheriting constructors from C++11, generalized lambda capture, auto function return type deduction, and generic lambdas from C++14, as well as many more new C++ features.

says Somasegar. There is also a refactored C Runtime (CRT):

msvcr140.dll no longer exists. It is replaced by a trio of DLLs: vcruntime140.dll, appcrt140.dll, and desktopcrt140.dll.

If you install the CTP (mine is downloading) use a spare machine or VM; it is an early preview that does not work side-by-side with other versions and the only uninstall may be to flatten the machine:

Installing a CTP release will place a computer in an unsupported state. For that reason, we recommend only installing CTP releases in a virtual machine, or on a computer that is available for reformatting.

Soundgarden’s Superunknown in DTS virtual 11.1 surround-sound: better than stereo for your mobile listening?

A&M/Universal has released Soundgarden’s classic 1994 Superunknown album in the DTS Headphone:X format, which offers 11.1 virtual surround sound through normal stereo headphones.

image

Is such a thing possible? I am sceptical of the claims for 11.1 (11 discrete channels plus sub-woofer) though the DTS Headphone X demo app is most impressive, and you hear the surround effect clearly. When I first heard this demonstrated at Mobile World Congress in Barcelona, it was so convincing that I took off my headphones to make sure that the sound was not really coming from speakers positioned around the studio.

image

This demo is included in a new app developed for the 20th anniversary of Superunknown. The app is free. and also includes a free sample track in virtual 11.1, Spoonman.

If you want the full 16 track album in this format, it seems that you have to buy the Super Deluxe box: 4CD plus Blu-Ray at an extravagant price. This includes a voucher which lets you download the full album in the app. Note that the Blu-Ray also includes a 96/24 5.1 surround mix, so you can think of the app as a mobile version of the surround mix, though they are different: the credits say:

Surround sound mixes by Adam Kasper at Studio X, Seattle and Bob DeMaa at DTS, Calabasas, California.

The app offers four settings for listening: In Ear, On Ear, Over Ear, and unprocessed stereo. DTS knows what it is doing: with On Ear headphones, the On Ear setting sounded best and the In Ear setting muffled; with earbuds, the In Ear setting sounded best and the On Ear setting harsh.

image

But how is the sound? The odd thing about the Headphone X system is that the spectacular demo raises expectations that actual music does not deliver; the surround illusion is less striking.

That said, there is a huge difference in sound between plain stereo and virtual surround. Unfortunately switching to virtual surround significantly raises the volume, making comparison more difficult, but the surround processing does open out the sound and make it more immersive. It is easier to pick out individual instruments. Bass is more accentuated.

It is not all in one direction though; the stereo sounds cleaner and less processed.

Still, I would personally choose to hear the DTS version. It is effective technology even though I cannot honestly say that it sounds like 11.1 surround sound. Producer Kasper is quoted though saying: “The experience Soundgarden’s fans will hear over headphones is identical to how I heard the mix in the studio when producing the surround sound version.” This could be a matter of which headphones you use, or he might be exaggerating.

I am less impressed with the app itself. Tracks are slow to load and I got occasional stuttering on an older iPad. The settings menu pops up repeatedly, rather than remembering your last setting. If you switch from the tracklist to the Player menu and back you get a momentary pause in the sound. The design is basic and it looks as if the app was put together quickly.

It is also obvious that having a separate app for every album is hopeless as a long-term strategy. Space is also an issue. The app with the album downloaded is 344MB and there is no provision for storing the music files anywhere other than in the iPad’s on-board storage. It is unfortunate that once downloaded, the surround mix is only available on that device; you cannot download for both iOS and Android with one voucher.

Overall I still like it, and would like to see more surround mixes released in this format. It may not be quite as good as the real thing, but it is vastly more convenient.

You can get the new app here, on Apple iOS or Android, and try it for yourself.

The Microsoft Apartment: full of screens and an uninvited cucumber

I visited Microsoft’s “Apartment” in London, billed as a chance to see “Dragon’s Den star Kelly Hoppen’s apartment in the heart of Covent Garden kitted out with the latest Microsoft technologies,” and to include a “deep dive discussion” on Microsoft’s latest developer announcements.

How do you kit out an apartment with the latest Microsoft technologies? Apparently, you stick an Xbox One and a couple of PC screens in the living area, and upstairs in the study (a mezzanine floor), a PC, a Surface (not 3 sadly), and a Windows phone connected to a big screen.

image

There were certainly lots of screens, but nothing in the way of home automation, and after watching Microsoft presenters struggling to get the Xbox One to play the right kind of music, and later a shaky Skype demo, it is hard to enthuse over this particular setup.

For some reason, we were not shown any cool games on the Xbox One, nor cool apps on the Windows Phone other than the Cortana assistant which is not yet available in the UK. There was a demo of the new swipe keyboard in Windows 8.1 which inevitably saw the word “document” rendered as “cucumber”; a shame as I know from my own experience that this keyboard works very well, but demoing this kind of thing in public is only for the brave or the very well rehearsed.

We did see collaborative real-time editing on an Office document – not something home users generally do, but to be fair this was part of a business-oriented discussion which followed.

One feature which I had not previously been aware of was the ability of Skype on the Xbox One, in conjunction with Kinect, to follow the speaker around the room automatically. If you like pacing up and down while on Skype, this is a cool feature; perhaps it would be good for talking to excitable kids as well.

Takeaways? Let me put it like this. If you thought, perhaps, that the Xbox One has potential but feels (in software terms) not yet ready; or that Microsoft has no idea how to market to consumers; then there was nothing here that would change your mind.

As chance would have it, the Microsoft apartment is a few paces away from Apple’s huge Covent Garden store, and seeing the crowds eager to try the latest iDevices put the Microsoft event in perspective.

PS for another, more positive take on the event see this Neowin report.

Apple’s Swift programming language: easy coding for OS X and iOS at last?

Apple has announced a new programming language, called Swift. (There was already a language called Swift, used for parallel scripting, but Apple links to the other Swift in case you land on the wrong page. So far it looks like the other Swift has not returned the favour).

For as long as I can remember, serious Apple developers have had to use Objective-C, an object-oriented C that is not like C++. I have only dabbled in Objective-C but when I last tried it I was pleasantly surprised: memory management was no hassle and I found it productive. Nevertheless it is an intimidating language if you come from a background of, say, JavaScript or Microsoft .NET. Apple’s focus on Objective-C has left a gap for easier to use alternatives, though the main reason developers use something other than Objective-C, as far as I am aware, is for cross-platform projects. Companies such as Xamarin and Embarcadero (with Delphi) have had some success, and of course Adobe PhoneGap (or the open source Cordova) has had significant take-up for cross-platform code based on HTML and JavaScript.

I should mention that RAD (Rapid Application Development) on OS X has long been possible using the wholly-owned Filemaker, a database manager with a powerful scripting language, but this is not suitable for general-purpose apps.

Overall, it is fair to say that coding for OS X and iOS has a higher bar than for Windows because Apple has not provided anything like Microsoft’s C# or Visual Basic, type-safe languages with easy form builders that let you snap together an application in a short time, while still being powerful enough for almost any purpose. This has been a differentiator for Windows. Visual Basic is almost as old as Windows itself, and C# was introduced in 2000.

Now Apple has come up with its own equivalent. I am new to Swift as are most people outside Apple, but took a quick look at the book, The Swift Programming Language, along with the announcement details. A few highlights:

  • Swift is a type-safe language that compiles to native code using LLVM.
  • The IDE for Swift is Xcode. It supports Cocoa development (Apple’s user interface framework) via import of the existing Objective-C frameworks, which become Swift APIs via the import keyword:

import UIKit

  • You can mix Swift and Objective-C in a single project. In Objective C you can use #import to make Swift code visible and usable.
  • Swift is a C-family language and you will find familiar features like curly braces and semi-colons to terminate lines (though semi-colons are optional).
  • Swift uses reference counting for automatic memory management. There is rather complex section in the book about weak references and unowned references, to solve some of the problems inherent in reference counting.
  • Type inference is the preferred approach to declaring the type of a variable, but you can state the type if required. You can also declare constants.
  • Swift supports single inheritance for classes and multiple inheritance for protocols (protocols are more or less equivalent to interfaces in other languages).
  • There are advanced features including closures, generics, tuples, and variadic parameters. (I am not sure if “advanced” is the right word, but other languages such as C# and Java took a while to get these).
  • Swift has something like destructors which it calls deinitializers.
  • There is an interesting feature called Extensions which lets you add methods to any existing type. For example, you could extend Int with a prettyprint method and then call 3.prettyprint.
  • Swift variables are not normally nullable; they must have a value. However you can declare optional types (add a ?, such as Int?) that can be set to nil. You can also declare implicitly unwrapped optionals which can be nil, but once assigned a value cannot be nil thereafter.
  • Swift includes the AnyObject type which can represent anything.

Swift seems to me to have similar goals to Microsoft’s C#: easier and safer than C or C++, but intended for any use right up to large and complex applications. One of the best things about it is the smooth interoperability with Objective-C; this also saves Apple from having to write native Swift frameworks for its entire stack.

A smart move? I think so, though Swift is different enough from any other language that developers have some learning to do.

What difference will Swift make? Initially, not that much. Objective-C developers now have a choice and some will move over or start mixing and matching, but Swift is still single-platform and will not change the developer landscape. That said, Swift may make Apple’s platform more attractive to business developers, for whom C# or Java is currently more productive; and perhaps Apple could find ways of using Swift in places where previously you would have to use AppleScript, extending its usefulness.

If Apple developers were tempted towards Xamarin or Delphi for productivity, as opposed to cross-platform, they will probably now use Swift; but I doubt there were all that many in that particular group.

I would be interested to hear from developers though: what do you think of Swift?