r/visualbasic • u/Zhatar • Nov 06 '19
Visual Basic programmers , what do you actually do at your job?
My friend just told me the place where he works at needs some Visual Basic programmers. I haven't used VB much but I like C++/C#, and considered building a small portfolio because VB looks like something I would like to use and be good at.
But what do you actually do as a VB programmer, hired by a company? And do you have any suggestions on what I should do?
5
u/chrwei Nov 06 '19
vb.net or vb6 or vba or ??
I still do a lot of VB6, fixing minor bugs, adding VERY minor features, and porting feature sets to C# when it needs more than a little tweak.
there's also a good number of VBA, doing office macro and automation stuff.
I really still don't understand the draw of vb.net, it's not that much easier than C#.
4
u/andrewsmd87 Web Specialist Nov 06 '19
I really still don't understand the draw of vb.net
I think it's draw is that I've always joked that excel is the gateway drug to programming.
Especially 10 or 20 years ago. You might have had a lot of guys who ended up as programmers, because they were good with excel. Excel was done in VBA, hence VB was more familiar, so they chose that. This was way before you had tons of dedicated programming schools, boot camps, 4 year degree paths, etc.
The other half is that it had a "readable" language, which would appeal to a beginner.
if foo = 0 Then Console.Log("foo is 0") end ifReads easier to a new person than
if(foo = 0) { Console.Log("foo is 0"); }Not to mention you could do
if foo = "0"In vb and still get true, where as c# would throw an error. (I'm not arguing in favor loosely typed languages here)
That stuff seems trivial to any programmer with experience, but I think it's why so many people went down the path.
That's just always been my theory anyways.
it's not that much easier than C#.
Per my syntax examples, I think it makes it seem easier to someone new. I agree with you that coding in one vs the other really isn't any easier. I'd even toss an argument out there that vb is harder because if you don't understand you should be declaring everything with types, you can get weird use cases where shit turns back a false positive or something because VB is trying to do the conversion for you on the back end.
A simple example there is always
Dim myNumber = 5
Dim dividedNumber = myNumber / 2
you would expect 2.5 for dividedNumber but VB parses that shit to an int and you lose the decimal
2
u/JasonHenley Nov 07 '19
The syntax is also more readable when you have big Try, For, and If blocks. When you scroll down enough that you can't see the opening statements, the closing blocks in C# looks like this:
} Code A here } Code B here }In VB it looks like this:
End If Code A here Next Code B here End TryIn VB it's much more clear that Code A executes in the For... Loop but outside of the If statement, and that Code B executes outside of the For... Loop. In C# you are going to have to scroll up to see what's what.
2
u/andrewsmd87 Web Specialist Nov 07 '19
Yea until it's nested ifs or whatever then you hit the same problem.
One thing I do now religiously is end anything that's opened like that, a for, a while, using, etc with a
//End if blah is true
For everything, regardless of language. It's helped me in debugging more times than I can count
Modern IDEs also help with the a lot now too though
1
u/JasonHenley Nov 07 '19
That's a good idea
1
u/andrewsmd87 Web Specialist Nov 07 '19
I learned it from a college professor. I force all my qa's to have it. Seems trivial until it saves you time at some point
1
u/chrwei Nov 06 '19
you would expect 2.5 for dividedNumber but VB parses that shit to an int and you lose the decimal
that's not just VB, that's pretty much all languages that have first class Interger concept, only exception I can think of off the top of my head is javascript because internally all numbers are floats.
1
u/andrewsmd87 Web Specialist Nov 06 '19
Well it's a really basic example, but I meant more that as a new programmer in your head you're thinking decimal, but vb says int.
If you're forced to define types on all your variables this doesn't happen.
Weirder times it's bit me is like a string.pos where the return is supposed to be true but it was at position 0 in the string, and it translates that to false.
It's not an issue for me anymore as I know all that and frankly, don't pass code where everything isn't strictly typed, but new me got burnt by stuff like that more than once.
2
Nov 06 '19
I really still don't understand the draw of vb.net, it's not that much easier than C#.
AFAIK, it was done that way to give OOP and respectability to old school VB programmers. Kinda funny, coz they basically had to learn a new language after the changes.
2
u/TheFotty Nov 06 '19
Once MS made it clear that C# was the .NET language it cared about and not VB, it was obvious which one would be better to do .NET development in. However that didn't happen right away, and when .NET launched, it needed to bring VB6 developers over, as well as Java developers. So C# has a C/Java style syntax and VB.NET maintains a VB style syntax. You could learn the framework and its namespaces/classes and use whichever syntax you wanted to because it was the one you were familiar with. C# also became much better over the years, partly from borrowing features from VB. For example in the first few versions of C#, there was no background compiler in the IDE. You had to build your project to get a list of errors. VB was always background compiling your code to give you real time feedback on syntax errors.
1
u/chrwei Nov 06 '19
is it actually compiling or just linting? linters in general have gotten a lot better since C# first came about
1
5
u/andrewsmd87 Web Specialist Nov 06 '19
Work in C# :).
However, I built an enterprise class system in VB years ago that about a dozen of my clients still run their business on, so I maintain that, and do updates.
But from an end product perspective, you couldn't tell a difference between my VB software and my C# software.
If you're fluent in C# you can jump to VB no problem. I did the opposite but actually hire out a couple of my co-workers to do VB work for me that had 0 VB experience and they picked it up right away. It does all of the familiar .net stuff.
HOWEVER, what I'd tell you is if you take this job, you're more than likely going to be working on a legacy application, and probably won't be able to get to learn new technologies and skills as part of your job. So if that doesn't matter to you, then go for it, I think VB will be around for a lot longer than anyone wants to admit due to the legacy stuff that runs on it. The only caveat there would be if they have a plan to migrate to a newer framework.
So, unless this company has really great pay and benefits, you really want to work with your friend, or some other valid reason, I'd try to look for a c# job since you already know that, and there are plenty out there.
2
2
u/Laicure Nov 07 '19
I do process automation and create systems (e.g. Payroll, Inventory etc) for different engagements using VB (I work in a BPO company as a developer).
Right now, I am doing SAP GUI automation via VB.NET. I was planning to use C# (I want to migrate all my codes to C# 'cause $$) for the project but oh boy, SAP GUI scripts are very difficult to implement in C#.
A simple strict off GetSCriptingEngine in VB.NET is using wrappers and such in C#.
Anyway, the thing in my job is that VB is easier to hand over to other developers because of readability. Some of my workmates who only knows VBA macro can somehow read .NET specific codes and work on it on day two.
1
u/thudly Nov 06 '19
I once built the end-user interface for a very complicated gene-sequencing program. There was huge amounts of complicated data behind the scenes, but they needed a simple interface to select which data points they wanted back from the system. So we reduced it to a grid of click-able colored circles that would switch between red and blue and send the appropriate request to the main system. That was just easier to do in VB than in C++.
1
Nov 07 '19
[removed] — view removed comment
1
u/1d3nt Nov 09 '19
Jesus, cant stand this forum no more. I would happily help anyone here with a vb issues. But fuck sake the utter lies. Anyone ever says (which is common) knows c++ yet has to ask a how do i learn another language question, or worse says knows c# when its built on the same frigging framework as vb only syntax is different(frameworks are written in c#) is an utter lier.
this thread is just filled with lies n bullshit
6
u/[deleted] Nov 06 '19
The inventory /warehousing software we use was built with VB, so I maintain and update that. Day to day though I am actively building a JavaScript platform to convert this mess too so keep that in mind 😂