News for hackers. Stuff that matters.
Re:On VBScript by mevile on Wednesday December 19, 2018 @11:34PM (#18722538)
It's crazy to me to realize that there are still people employed at Microsoft who work on VBScript. I love VBScript, lots of great memories, but I don't know anyone who uses it anymore, not even VB.Net.
Re:On VBScript by ocdtrekkie on Thursday December 20, 2018 @12:15AM (#18722673)
A lot of business line applications are still written in VB.NET. Personally, I write all of my hobby code in VB.NET since it's more or less the same as writing C# but I find VB syntax more comfortable.

There's even claims it's the fifth most popular language out there today. https://visualstudiomagazine.com/articles/2018/12/17/tiobe-v... Though there's not a lot of other parties who agree with that, on one hand, on the other hand, a shockingly large number of developers do not work in Silicon Valley, and a lot of those developers aren't using the latest JavaScript frameworks for their day-to-day jobs.

Re:On VBScript by gscott on Thursday December 20, 2018 @12:45AM (#18722765)
I am probably the last person but I do everything in asp classic vbscript and SQL Server full time since 1998.

Internet development can't just be for people with expensive cs degrees.

Re:On VBScript by Jaruzel on Thursday December 20, 2018 @03:14AM (#18723270)
Replying to you, and ocdtrekkie.

I'm not alone! I know multiple coding languages but for fun coding (i.e. I'm not being paid to do it) I fallback to VB.Net as I just don't have to think about it, it just flows from my fingers. Once it's an EXE it's no different from C# and as no-one else has to support my code, who cares that it's in VB.Net. I actually don't understand the hate that VB.Net gets. I think maybe people are just biased based on their knowledge of bad VB code from the VB6 and earlier days.

I'm also a huge fan of ASP. It's small, fast, and super simple to deploy onto any Windows server. If you are just writing a small web based tool for end users that's easy for people to maintain, then ASP is still definitely the way to go for Windows Web servers. By comparison, I've recently converted a few ASP tools to PHP that run on the same spec of hardware (under debian, not Windows) and PHP is definitely slower than ASP.

Re:On VBScript by cm2187 on Thursday December 20, 2018 @03:40AM (#18723360)
I love vb.net and used it extensively, but given the multiple writings on multiple walls, I switched to C#. While I prefer the vb syntax, I found that using two languages simultaneously is more cumbersome than using a syntax I like less for home projects. I find that muscle memory is a powerful tool.
Re:On VBScript by mevile on Thursday December 20, 2018 @01:28PM (#18727589)
Hey they're great languages and if it works for you, it's great. I would just be conscious of any security vulnerabilities using older software, but outside of that, if it works it works.
Re:On VBScript by oblio on Thursday December 20, 2018 @06:01AM (#18723901)
You mean you like the point and click feel to these tools?

I know a few folks with mediocre high school degrees that are quite comfortable with command line tools, there's no clear divide saying that rich folks -> CLI, poor folks - > GUIs :)

Re:On VBScript by int_19h on Thursday December 20, 2018 @06:24AM (#18724005)
Classic ASP and VBScript were never point-and-click. It was ASP.NET that introduced the visual designer etc.
Re:On VBScript by teh_klev on Friday December 21, 2018 @06:41AM (#18732754)
Visual Interdev[0], permitted folks to build Classic ASP apps using drag'n'drop. It wasn't quite as sophisticated as Visual Studio.NET, but the basics were there. I never used it myself because there was too much "magic" and preferred to knock out my ASP using TextPad.

[0]: https://en.wikipedia.org/wiki/Visual_InterDev

Re:On VBScript by oblio on Thursday December 20, 2018 @11:18AM (#18726178)
Them I'm not sure I get the point. Why are classic ASP and VBScript low brow?
Re:On VBScript by int_19h on Friday December 21, 2018 @06:18PM (#18737603)
Think of it as PHP with VB syntax, and without much of a standard library.
Re:On VBScript by gscott on Thursday December 20, 2018 @03:36PM (#18728879)
At the time of their development there were not many best practices yet. Microsoft promised a version 4.0 and in the process morphed that development into Asp .Net instead.
Re:On VBScript by simonh on Thursday December 20, 2018 @02:31AM (#18723108)
VB.NET is still taught in the GCSE (secondary school) Computer Science course in the UK. My daughters are doing it now. Fortunately they are able to run it fine in Visual Studio for Mac.

I’m teaching them a bit of a Python as well, but I’m impressed with the material they’re doing at school, it’s all good stuff even if the language is a bit clunky. Apparently they will be using Java for the International Baccalaureate in a few years.

Re:On VBScript by da_chicken on Thursday December 20, 2018 @09:34AM (#18725169)
VB.NET has about as much to do with VBScript as Java has to do with JavaScript. VB.NET is largely just syntactic sugar for C# since they both utilize the CLR. While there are differences [0], about the only one that people typically find when moving to C# from VB.NET is the fact that there's no equivalent of Visual Basic's With statement [1]. The differences of opinion about C# and VB.NET are almost entirely personal preference.

[0]: https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Visu...

[1]: https://docs.microsoft.com/en-us/dotnet/visual-basic/languag...

Re:On VBScript by Lizzo on Thursday December 20, 2018 @07:16AM (#18724245)
As a current GCSE student in the UK, every school I know has moved on to Python 3. In fact, I wasn't aware VB.Net was ever taught in UK schools...
Re:On VBScript by setquk on Thursday December 20, 2018 @03:42AM (#18723367)
Some schools. My eldest did python on MacOS here in UK secondary school.
Re:On VBScript by simonh on Thursday December 20, 2018 @04:17AM (#18723485)
Really? I didn't know that was an option. Shame, still VB.NET isn't as painful as I'd feared it might be and the important thing is the concepts. Secondary school CS is a whole world better than it was when I was their age.

Having said that I know there are concerns that by focusing on 'real' computer science the course has swung too far away from everyday practical computing skills. Personally I think schools should have a bias towards putting weight on the academic end of the vocational-academic spectrum.

I've avoided pushing Python too hard, they have enough on their plates learning VB, but I have dipped into it with them to show how it does some things differently. I don't want to make them feel resentful about learning VB, that wouldn't be constructive, so I'm learning VB along with them. I do think it's useful to understand what things are pretty fundamental, and which things can vary meaningfully between languages though.

Re:On VBScript by setquk on Thursday December 20, 2018 @05:23AM (#18723769)
I may be older than you :)

When I did secondary school "technology" which was the overseeing subject, we used BBC basic and 6502 assembly (some of us anyway!) to drive CNC equipment and Lego and spent half of the time with a soldering iron in hand and etching PCBs and stuff. In business studies, a wholly separate subject at the time, we learned how to use spreadsheets, word processors, write letters etc on RiscOS which had just rolled out about then.

I think the education now is abysmal in comparison. Why? A weird reason. None of the technology I learned about then is relevant now. 6502 assembly is dead, BBC BASIC is dead, RiscOS is dead, all the software packages are dead, China makes my PCBs etc. The education it gave me was a mental model of computing and how to approach problems with self sufficiency.

I feel a lot of technology platforms now, including .Net (something I have been using since day one), remove all self sufficiency from you and abstract so much away that it's harmful. I see many younger staff at companies I have worked for who's education has left them with so many gaps that self sufficient problem solving is impossible.

Re:On VBScript by simonh on Thursday December 20, 2018 @07:07AM (#18724191)
I doubt it (the age thing). RiscOS came out while I was at University. I think you must have come into secondary school camp sci just as it started getting good. When I did it a few years earlier (started - I dropped out) they were still teaching us how core memories and punched cards used to work. They did have a few BCC micros, but hadn't started using them in teaching. Yes, I am THAT old :)

My eldest just did a test where one of the questions was to describe the fetch and execute cycle, so they do cover low level concepts in Comp Sci GCSE.

PCBs and integrated circuits is in GCSE Electronics. Robots and control systems I'm not sure about but they have that stuff and a 3D printer and laser cutter in the Design and Technology lab. I'd have been all over that stuff in my day, but my girls prefer to spend their time in the fully equipped soundproofed music studio practicing 7 Nation Army with their rock band after school. Kids these days! And this at a public school, albeit a really good one.

Re:On VBScript by leeman2016 on Thursday December 20, 2018 @01:24AM (#18722894)
Some time a go I had to work on a heavy XML processing application and found out VB.NET had a nice XML literals feature. I completed the development using it and it was a joy.

EDIT: To anyone who didn't get it, XML literals are used like this:

  Dim myContact = <contact><%= p.Name %></contact>
  Dim allContacts = <contacts><%= From c in db.contacts Select <contact><%= c.Name %></contact> %></contacts>
Re:On VBScript by cm2187 on Thursday December 20, 2018 @03:43AM (#18723374)
It's not that I don't like xml literals but I rarely use them. An XML serializer is almost always preferable. And they cause havoc in razor, where the editor is always confused between xml literals and html snippets.
Re:On VBScript by z3t4 on Thursday December 20, 2018 @03:38AM (#18723349)
I'm pretty sure vbScript as a language, or even the vbScript engine in Windows has not got any updates whatsoever in the last 15 years. It's still a nice language though, not to be confused with Visual Basic, (like JavaScript vs Java).
Re:On VBScript by int_19h on Thursday December 20, 2018 @06:23AM (#18723997)
VBScript is basically dynamically typed VB6. It's not a nice language - it has all the worst parts of VB6, and then adds its own. Take a look at some of Eric Lippert's old blog posts from the days when he was working on VBScript:

https://blogs.msdn.microsoft.com/ericlippert/tag/vbscript/

To give one example, that is somewhat relevant here because it describes one of the biggest misfeatures of the language - default properties - that is used in the exploit:

https://blogs.msdn.microsoft.com/ericlippert/2005/08/30/vbsc...

Re:On VBScript by jetti on Thursday December 20, 2018 @03:53AM (#18723410)
I use VBScript at work. I maintain a system that was started in the early 2000s and uses Classic ASP and continues on to this day. They are rewriting it slowly but in the meantime I get the joy of keeping it running.
Re:On VBScript by teh_klev on Thursday December 20, 2018 @08:45AM (#18724786)
I too had the joy of looking after a fairly large internet facing Classic ASP system which had code dating back to the late 90's. There were some parts of the codebase that I never ever got around to completely understanding. It was a horrific sprawl of deeply nested #include's and with markup and server side script intermingled. Some of these "pages" were up to 2000 lines long and you just wanted rip your eyeballs out any time you needed to go near it.
Re:On VBScript by jetti on Thursday December 20, 2018 @01:08PM (#18727356)
You made me want to check to see how many lines the biggest page we have is. Turns out it is 12,533 lines long. The kicker is that it could be much longer but there is a convoluted process to adding more HTML. The results from the database are turned into XML which is then transformed via an XSLT which creates more HTML and then Javascript is used to dynamically add the generated HTML
Re:On VBScript by wglb on Thursday December 20, 2018 @01:27AM (#18722905)
It might surprise you to know that there are many heavy, industrial scale systems written in VB.net
Re:On VBScript by xellisx on Thursday December 20, 2018 @12:22AM (#18722699)
MS Office stuff. Excel and Outlook use VBS. I've had do some crazy stuff in Outlook with VBS.
Re:On VBScript by teh_klev on Thursday December 20, 2018 @09:25AM (#18725088)
Minor nitpick. Office embeds VBA (Visual Basic for Applications) which is pretty much Visual Basic 6. You also get the benefits of early binding and strong typing, for example:

    Function DoSomething(name As String) As String
    End Function
VBS is a different beast. Whilst it shares the more or less the same language keywords and constructs as VB6/VBA (most VB6/VBA code is valid VBS code), it's actually more akin to a dynamically typed language.

For example, all variables in VBS are Variants, you can't declare things as explicit types, say strings or integers. If you need to instantiate classes residing in external COM libraries you need to use the CreateObject() built-in and specify that class's "ProgID" e.g.

    Set thinger = CreateObject("MyLib.Thingy")
vs

    Dim thinger As MyLib.Thingy
Re:On VBScript by xellisx on Thursday December 20, 2018 @12:31PM (#18726976)
Yeah - I got confused on VBA / VBS....
Re:On VBScript by smhenderson on Thursday December 20, 2018 @10:21AM (#18725611)
I thought that particular flavor was referred to as VBA (Applications). I know Office has exposed it's interface through COM to VBS since at least Office 2000 but I thought internally Office Macros were written in VBA.

And I know what you mean, regardless of what flavor it was I've had to some pretty crazy stuff using VB for Access, Excel and Outlook. Once you show something small and helpful to someone you wrote in VB they think they can automate the whole office with it. Sometimes it works, sometimes not but even when it worked it was always kind of brittle and I found myself have to code around a lot of exceptions which was pretty darn tedious.

All in all I don't think VB.net is too terrible but I would not be sorry to see a lot of legacy VB just quietly disappear. I feel like in 20 - 30 years though it will be the new COBOL given the amount of internal business systems that were implemented using it in the 90's and 2000's.

Re:On VBScript by xellisx on Thursday December 20, 2018 @12:30PM (#18726971)
That would be correct. I got confused.
Re:On VBScript by smhenderson on Thursday December 20, 2018 @01:25PM (#18727541)
No worries, it's been a while so I wasn't 100% sure either.
Re:On VBScript by FroshKiller on Thursday December 20, 2018 @08:35AM (#18724730)
I'm a professional programmer working full-time on multiple Visual Basic .NET applications. Apart from SQL and the odd bit of HTML, CSS, and JavaScript, it's the only language I need to know. I know more and can work in more, but it's all that I and the hundreds of other programmers in the company need.
Re:On VBScript by agumonkey on Thursday December 20, 2018 @02:19AM (#18723073)
I used VB a bit after a bit of linux/bash and I was super sad that MS never (even though it's not surprising[1]) marketed VB as a system customization language for Windows'es. It's not a great language, but at least it has some kinds of type, and with COM modules you can tap into just about anything in your OS (for better or worse of course). Bash felt like a string grep hell very fast to me.

And nowadays powershell seems a great replacement.

[1] of course Windows wasn't meant for tinkerers but for users/customers, developping was for the MSDN side of things, for which you'd agree to pay because you'd sell your creations I guess

Re:On VBScript by jaabe on Thursday December 20, 2018 @12:57AM (#18722799)
We still use it for a few services, like creating xml on our scanners that store who scanned a document so it can be automatically filed.

Moving data dumps onto and from SFTPs.

Emptying outlook mailboxes and storing their content so our SSIS/SSAS services can use it.

Stuff like that. We could use other things I suppose but, and it is slowly getting replaced, but VBScript is the only language everyone knows, from the IT technician to the developers and that had been really valuable to us.

Re:On VBScript by pjmlp on Thursday December 20, 2018 @02:00AM (#18723005)
Many people in life sciences domain use VB.NET when their macros cannot live anymore inside Excel, or for simple programming tasks without having to mess with IT.