How VB.NET was resurrected and why it’s more important than you think.

Written by witoldganko | Published 2019/02/04
Tech Story Tags: programming | automation | robotics | business | technology

TLDRvia the TL;DR App

Written by Witold Gańko, Intelligent Automation Consultant

Let’s start with my inspiration to write this article. During one of the automation projects for my client, I was asked if we can automate some smaller processes without using RPA as all robots were working full capacity at this point. My answer was short. I can make an app using VBA or VB.NET. The letter immediately made one of the managers with a strong technical background laugh.

“VB.NET? Is this language even still in use, or are you planning to become a necromancer* ?”

Necromancer* — a popular term for developers maintaining old software written in languages like COBOL

It’s not surprising as VB popularity in 2011 was 0.259% according to the TIOBE Index. To give you some comparison C#, another language created by Microsoft used to develop .NET apps was over 8.2%. At this time “VB.NET Developer” was used as a joke, as due to easy to read (for non-IT people) syntax (more about it later) give birth to a wave of beginners with… questionable programming skills.

But then something unexpected happened. Since 2012 we could observe a steady rise in popularity to the point where in 2018 it surpassed C# scoring 7.12% (C# 3.45%).

Developers community was shaken up, accusing TIOBE index of being completely biased and nonrepresentative (you can find out how TIOBE index is calculated here).Just to quote some comments on Reddit :

“I used to follow TIOBE but they lost all credibility with these numbers.”

“It is nonsense. What could this possibly mean? Just nonsense. Nobody in their right mind would make a new application with VB.Net.”

Are these people right, or there is more to it? What happened?

The rise of the Robots — RPA.

For those who are not familiar with this term, RPA stands for Robotic Process Automation. These are software tools used for automating business processes by emulating human work. The biggest advantage of RPA is the ability to interact with apps using user interface (no need for API) including Citrix virtual machines.

Furthermore, RPA tools like UiPath or Blue Prism are designed to be used by business people without any programming knowledge needed. Developing in most RPA tools looks like drawing a BPMN process map. You just drag and drop objects/activities (for example “click the button”) on the designing map. That’s it. No codding, no API. In the case of UiPath, you can even use an Excel-like recorder to capture what are you doing and translate this to process map with already made activities.

All of this without involving a long development process and cost of migrating to new systems. Nice, right? Well…

Who is supposed to use this? When I talk with software developers I can see paternalism in their eyes. Especially those who are experienced with test automation. Why should they spend more time using some quote “random tool” when the same can be archived using a few lines of code.

Moreover, they have no incentive to switch jobs, as the salaries are on a comparable level and it is a popular belief that switching from “true development” to using code-free tool is some sort of demotion.

Business Analyst on steroids.

So we establish that RPA doesn’t require programming skills, and is mostly made by the business, not IT departments. So who’s left to do it? Business analysts; who are already responsible for process improvement, optimization and modelling.

“Ok… Right… I get it RPA is great… But what all of this has with VB.NET?” you may ask. The answer is simple: VBA

The little brother of VB used to develop solutions in MS Office apps. For years this language was used by many business analysts and other non-IT employees to automate their jobs. VBA is not seen as a security threat (despite it should be), so many employees are allowed to develop their own solutions without involving IT departments and cybersec approvals. This is critical in companies from the financial sector, where such processes can take years (I’m not exaggerating).

But VBA, no matter how powerful (you would be surprised how advanced apps can be made using only Excel, VBA and some Access databases), has one big weakness, it’s limited to MS Office apps. There are some workarounds, like running batch files or moving the cursor to a location specified by pixels (sounds fun, right?). So we found a solution, Holy Grail of business automation.

The language of business automation.

History of RPA tools creation is out of the scope of this article. Let me just say that RPA was designed by business analysts for business analysts. That combined with the fact, that most of the apps used by financial sectors are written for Windows OS using .NET caused choosing the following unsurprising. Almost all RPA tools use .NET framework and by consequence its languages C# and VB.NET.

For people not familiar with these languages syntax let me show you some code for comparison:

VB:

If a Is b Then' variables refer to the same instanceEnd If

If a IsNot b Then' variables do not refer to the same instanceEnd If

For row = 1 To rowsFor column = 1 To rowWrite("{0,-2} ", current)current += 1Next

WriteLine()  

Next

C#:if (object.ReferenceEquals(a, b)) {// variables refer to the same instance}

if (!object.ReferenceEquals(a, b)) {// variables do not refer to the same instance}

Do you see the difference? For any non-technical person, VB is definitely easier to read and learn. Many times I have seen my clients’ employees understanding the code without any background in programming. Add to this massive popularity of VBA in financial institutions, shared services centres, logistic companies, accounting (the list can go on and on). Not to mention, that switching from VBA to VB.NET is a breeze.

Now we can go back to RPA. I’ve said that programming is not necessary but let me explain the bigger picture using UiPath as an example (by the way they offer free community edition, so I recommend you check it yourself).VB.NET and .NET are implemented in a very specific way. For example, variables are declared using user interface but operations on variables can use .NET objects properties and methods. For example EmployeeName.Contains(“Adam”) will return True or False depending on Employee name.

Furthermore, all variables can be declared as (almost) any .NET object. So naturally as you progress as RPA developer you will need more and more VB.NET knowledge to bypass lack of some activities and make advanced operations on objects (like DataTable or MailMessage Class).You just add variable (using UI and supper easy object browser) “Mail” choose Microsoft.Office.Interop.Outlook.MailItem (UiPath will show that as “MailItem” type) and BCCFromEmail as String.Then just place an activity called assign and write BCCFromEmail = Mail.BCC()Easy and clear, even for a business person.

Why this important?

As Intelligent Automation Consultant, which is a fancy word for RPA Developer/Analyst combining RPA with Chatbots, Assistants, OCR and OCR I see Centers of Excellence growing more and more, as well as, free access for RPA tools for all employees. For you, my non-technical reader, it means that sooner than later you using RPA and programming will be as obvious as using Excel today.

So what about my semicolon/brackets loving colleges? You can expect a rise in VB usage also in classic software development, so don’t be surprised when your new college will be writing in VB.

Is this growth sustainable, for VB in the long run? No. More and more RPA tools (like BluePrism) allows other languages like C# or Java. Even in previously mentioned UiPath, you can inject Python code as an activity. All of that is another small part of the next revolution. The democratization of software development and abolishment of this artificial border between IT and business professionals.

You can reach me on my Twitter and LinkedIn profile.

I want to say thank you to Isaac Yuen as his article was part of my inspiration to write this.


Published by HackerNoon on 2019/02/04