Straight talking 71
by Tim Anderson
Are you still using Visual Basic? Tim Anderson suggests it’s time that you switch.
HardCopy Issue: 71 | Published: May 10, 2017
In February 2017 Microsoft’s Mads Torgersen posted an item about the company’s .NET language strategy. It is worth a read for anyone considering programming language choices for new projects, or where to focus your training.
Torgersen discusses three .NET languages, namely C#, Visual Basic and F#. He says that C# is used by millions and is a well-loved language. “We’ve been good at evolving it tastefully and pragmatically, addressing new challenges while keeping the spirit of the language intact,” he claims. He adds that C# is perceived as “almost synonymous with .NET”, meaning that as long as .NET exists, so too will C#.
F# is also a language Microsoft cares about. F# is a functional programming language, ideal for analytics and data manipulation. It is strong in the financial industry, and skilled F# developers command high salaries. Torgersen refers to its “phenomenally engaged community”, and promises that the company will continue to improve its tooling and ensure good interoperability with C#. That promise was delivered in Visual Studio 2017, which has a greatly improved F# editor.
F# also runs on .NET Core, the open source and cross-platform version of .NET.
But what about Visual Basic? Torgersen reveals that most VB developers, according to Microsoft’s research, build Windows business applications using Windows Forms, and a few “are building websites, overwhelmingly using ASP.NET Web Forms.” This implies that VB developers are not at the cutting edge of technology, since these frameworks are old and have to some extent been replaced by WPF (Windows Presentation Foundation) or UWP (Universal Windows Platform) for the desktop, and ASP.NET MVC for web applications.
That said, Torgersen adds that VB has “twice the share of new developers as it does of all developers,” suggesting that it remains strong as a beginner’s language. BASIC stands for ‘Beginner’s All-purpose Symbolic Instruction Code’, so this is true to its roots.
The consequence is that Microsoft has shifted its VB strategy away from parity with C#, as in Visual Studio 2015, and towards a ‘core scenario’ policy. This is why VB version 15, which is the Visual Studio 2017 version, has only a subset of the new features in C# 7.0.
Another issue is that Xamarin, Microsoft’s cross-platform mobile toolkit, uses C# but does not support VB.
None of this should come as a surprise. In the .NET world, VB was never quite the equal of C#, the new language designed alongside the platform. Microsoft’s .NET Framework was launched in early 2002, at a time when Visual Basic 6 was the most popular programming language for Windows business applications. VB.NET was also launched, but it was incompatible with VB6 and porting was not straightforward, not only due to language differences, but also because of the then-new Windows Forms GUI framework. Many VB developers either stuck with VB6, or jumped to C#. The language has been in slow decline ever since, despite having advantages over C# in some areas.
What does this mean for VB developers? Let’s be clear about one thing: Microsoft is not abandoning VB any time soon; in fact, it is still being actively developed, despite the change in focus. “Same great tooling … same great platform … same great language,” as Microsoft’s VB language designer Anthony D Green said recently.
It is also worth noting that VBA, based on VB6, remains the macro language of Microsoft Office. This means that even the old VB runtime is still part of Windows, and will be supported far into the future. Even though running the VB6 development environment on Windows 10 is tricky, the applications it creates generally run fine, if you can cope with a few issues around ActiveX component compatibility.
Just because you can do something, does not mean that you should. The original Visual Basic was a marvel in its day, but there was plenty wrong with it. Microsoft was right to replace it, and it is right to focus now on C#. According to the programming help site StackOverflow, C# is relatively well liked by developers, ranking 8th in best-loved languages (well ahead of Java at 17th), while VB6 is top of the “Most dreaded,” followed by VBA in 2nd place and VB.NET in 4th.
So, if you do have an application in VB.NET, you will not run into any difficulties maintaining it, but for new projects, or anything that falls outside the core scenarios outlined by Microsoft, it is time to switch.
Reading the Runes
Should you pay attention to developer trends? Or should you keep your head down with your current projects as there is too much to do anyway? Since you are reading this I guess you do believe in paying attention to what is coming next, a practice that is always worthwhile. Of course today’s trend may be forgotten tomorrow (Silverlight anyone?) but there are often insights that can guide future planning to good effect.
I have been reading a couple of new reports: one from Vision Mobile on The State of the Developer Nation, and the other the latest in the Technology Radar series from Thoughtworks.
Technology Radar is not so much a survey as a set of opinions from a large software development company with an Agile tradition. This time around the topics include Conversational UI, Natural Language Processing and Intelligence as a Service, which caught my eye having recently experimented with Microsoft’s Bot Framework and Cognitive Services.
“Building conversational and natural language user interfaces, while presenting new challenges, has obvious benefits,” says the Radar. There is also more visibility for this type of UI, thanks to Amazon Echo, Google Home, and personal assistants such as Apple Siri, Google Now and Microsoft Cortana.
The team suggest building “conversationally aware APIs”, the key attribute being the ability to manage conversation states so that users don’t have to repeat the context of their enquiry. This “can be hard to build on top of many existing APIs,” according to the report.
Technology Radar also observes the rise of Python: “Its ease of use as a general programming language, combined with its strong foundation in mathematical and scientific computing, has historically led to its grassroots adoption by the academic and research communities. More recently, industry trends around AI commoditisation and applications, combined with the maturity of Python 3, have helped bring new communities into the Python fold.”
There is a link here, since Python is a popular language for interacting with natural language processing and other intelligence services. The Vision Mobile report also observes this trend. Investigating the popularity of machine learning languages: “Python leads the pack, with 57 percent of data scientists and machine learning developers using it and 33 percent prioritising it for development … Python is recognised as the main language that one needs to experiment with to find out what machine learning is all about.”
Vision Mobile also reports on the cloud wars between Amazon Web Services, Microsoft Azure, Google Cloud Platform and others, and on cloud versus internal deployments. Bear in mind that this report is based on a survey of developers, rather than covering the whole spread of those who use cloud computing.
According to its report, 51 percent of internal applications are still self-hosted, a figure which is smaller than I had expected. The business going to cloud platforms is huge and still growing.
Amazon “leads at every company size,” says the report, though in the smallest companies not by all that much: 15 percent Amazon, 12 percent Microsoft, 11 percent Google.
As company size grows, Amazon becomes more dominant, with 26-27 percent share. Microsoft’s share stays around the same at 11-13 percent, but Google’s declines towards 5 percent in the biggest companies.
The report confirms that Google still has work to do in building both trust and mindshare in enterprises, as opposed to among small businesses and consumers where it is already strong.
Finally, Visual Mobile looks at another hot topic, Augmented Reality (AR) and Virtual Reality (VR). While the rise of machine learning and intelligence services seems a safe bet, the future of AR and VR is harder to judge. Still, if you do get into this area, the report identifies the tool of choice: the Unity platform and accompanying C# language is most popular by far, with 30 percent usage among the developers surveyed, versus 16 percent for the next most popular (C/C++).