I don't own a Windows computer, but I've seen some incredibly interesting stuff come out of the VBA for Excel, which I sadly never have had a chance to learn.
Does anyone here have a side-by-side comparison of the LibreOffice BASIC vs the VBA?
The main difference will be the object models for the various applications. LibreOffice's object model was designed around the expected scripting/automation language - Java. That means that the object model, especially the properties and methods of those objects, is written in a very Java-accented way that would normally feel like foreign vocabulary mixed into a Visual Basic-based dialect. If you're used to that, then the way objects work in VBA (or the very similar Lotusscript) might feel a little bit weird at first, then make more sense than the LibreOffice objects/properties/methods. (Similarly, writing Java against a COM- or OLE-oriented API object model feels awkward, even if you can do all of the same things that you could do with VBA.)
this will definitely will be a huge relief for many sys-admins in windows environments...
I think javascript isn't a bad choice since ms isn't as ignorant as some years ago, when it comes to new standards.
As long as Excel is used by businesses, VBA will be relevant. Excel will probably continue to exist - and be supported and updated to ever newer versions - forever, so it stands to reason that VBA will probably also exist forever. Unless Microsoft goes bankrupt and Excel isn't picked up by another company. Which will also probably never happen.
The Excel object model is really a COM/IDispatch object model... it's been accessible from non-VBA applications essentially since the beginning.
Not Excel, but one of my first consulting projects was at a company that developed some custom libraries in Java and for a company that used ASP for the front end. The architecture we used ran the Java code in the Microsoft JVM, which then made Java accessible via IDispatch (and therefore by ASP's scripting engine).
IIRC, we were doing stuff similar to this:
let javaObject = CreateObject("java:com.company.library.ApiClass")
print javaObject.version
This is essentially a part of the 'embrace and extend' functionality that MS added to Java and got sued by Sun over. (There were also mechanisms for relatively easily calling into Windows from the MSJVM too... it felt an awful lot like the Proto-CLR that it was.)
At the moment the implementation is to basically inject code, but I imagine eventually Microsoft would like to move away from that.
Issues like DCOM and legacy systems would need some interface from Microsoft of course to handle IDispatch, GC etc, but thats what Microsoft do.. And to behonest, as much as I like to rip on them, they do it well.
Edit: I think the Java example is a little bit different, but i don't know anything about Proto-CLR!
Hopefully not. It's withstood the test of time, why replace it with something trendy?
Edit: Yes, Python has also withstood the test of time... as a scientific and web language. There's no reason to assume that it could replace VBA as a spreadsheet automation language used by relatively non-technical business folks.
If there's one thing I've learned in 15 years of IT work, it's that once business users have discovered a thing it will never die.
No matter how outdated, shitty, useless, etc. it may be, some jackass has built their entire workflow around it and has more power than you to prevent that from ever changing.
They keep compatibility but abandon a lot of stuff. If they switch to JavaScript VBA development will slow to almost nothing and it will take years for the JavaScript stuff to catch up, if ever.
Something similar happened with visual studio. 2008 was really nice, very customizable and fast. Then they redid everything in 2010 and the result was slower with way less capability. And even now there are still a lot of features that 2008 had not implemented.
I also love vs2008 over vs2010 and still use it for some projects just because it feels so nice and snappy.
But which features exactly are missing in vs2010 that were in vs2008 (except the snappy feeling)? I have not actually noticed anything missing and would like to know more
2008 had an excellent macro recorder which was gone on 2010. 2008 had an easy way to customize toolbars and menus by drag and drop. With 2010 setting up a toolbar is much harder. There were a few other things but I don’t remember right now.
Microsoft should rather provide a better path toward office automation rather than just frustrate users. As I have seen it, javascript isn’t even remotely close to the sort of integration that made the success of VBA. Like how can I save a javascript macro as a user? Javascript user defined function?
VSTA was a good attempt in its time, a mini visual studio integrated in office with VB.net and C# instead of VB6. That would have been cool.
JavaScript has a huge upside because a lot of people already know JavaScript. The more tools and platforms switch to JavaScript the more of an office superhero users are when they know something about the language. The productivity of employees will jump off the charts. When you send someone to train for one thing that utilizes JavaScript you get the benefit that those skills may also happen to work with something else as well.
At some point, I hope we can get past this argument. Learning a new language for rudimentary tasks is not particularly hard. I'm not sure why people decided that JavaScript of all things was what we had to all latch onto.
You're right, we should automate everything with Rust \s
People both over and underestimate the ability of users to learn a language for quick scripting/automation. Languages like Bash, Python, JS, VBA... they're extremely accessible for quick and dirty work, which is why people latch on to them compared to others.
Because it’s the new Franca lingua of programming. Everyone knows it whether they like it or not. There’s value in not have to switch context while programming. Also there’s typescript which makes JavaScript usable. I don’t like JavaScript either but typescript isn’t terrible and the ecosystem is much bigger than any Microsoft programming ecosystem which results in less reinventions of the wheel. MS has also been treating JavaScript as a 1st class citizen on Windows
I suspect that we are reaching peak javascript, that wasm will open the browser to all languages and that javascript will compete based on its own merits rather than its historical monopoly.
> MS has also been treating JavaScript as a 1st class citizen on Windows
Eh what now?
The ActiveSctipt host for JScript (for shell and Classic ASP scripting) hasn’t been updated since Windows 2000, and for shell scripting in-general Microsoft has been (“was” at this point?) pushing PowerShell since its demo at PDC 2003.
WinJS for Windows 8 was a huge waste of money for the company that people always seem to forget.
And their Chakra JS engine is effectively now retired given Chromium+V8 replaced EdgeHTML earlier this year.
The only places Microsoft has been using JS are for their current set of Electron-based applications (VS Code, Skype, MS Teams, Azure Storage Explorer, etc). TypeScript is nice and all (and I really love it and I hope it brings algebraic typing and structural typing to more languages) but it’s only popular because Google, of all people, adopted it for Angular.
It kind of won in a lot of ways... biggest package ecosystem. The most developers using it. Highly optimized runtime. Supports the use of OO, Functional and Procedural paradigms. Able to run in the browser for online versions. Cross platform and nearly ubiquitous.
I don't understand how you can be proud of having the most unusable package ecosystem. Sure the numbers are large but can you actually safely use those packages? No, you can't. Just add a single library and you will include a huge amount of transitive dependencies from random package maintainers over which you have no control.
Other languages like Java or Rust have the same problem but this is a problem with exponential impact and NPM is the leader in tree depth. Having a 10 layer deep dependency tree is far worse than a 7 layer deep dependency tree. When I look at the dependency tree of my own projects more than 50% of the libraries are first party and from a vendor with a good reputation. (spring, apache commons, tomcat). The rest are less trust worthy but each project has a small opensource community that consists of more than just a random guy that may randomly throw emotional fits like in the leftpad scenario.
That comes down to due diligence... I look at my bundle outputs and overall package size... I also review the packages I use, and tend to avoid anything that isn't open source. I've also forked packages that have issues I need resolved.
You have all the control in the world, and just because someone is lazy doesn't mean it doesn't work. Beyond this, you probably don't review every single line of code that goes into your applications dependencies regardless of language. It's about impedance vs productivity for the most part.
I tend to, at least with front end projects focus on koa for the server tethered to the UI, React and material-ui ... nearly everything else is one-off building from there. Unless you think the likes Facebook and Google are just one random guy.
I have a friend that wanted to learn programming. I suggested Python, but they wanted to go directly into making web apps.
I don't think they finished the class. Javascript just has too many weird concepts (what's the difference between null and undefined and false and 0 and "") that distract from the mechanics of learning what a computer program is, and I also think that the desire to make something others can use too early on leads to going too quickly through the basics ("yeah yeah, add numbers, who needs to do that") and are then overwhelmed when things like objects and promises show up. You have to crawl before you walk.
I think if I were going to introduce someone to programming today, I'd probably pick CircuitPython. Python is simple and makes sense almost immediately. Doing it on a microcontroller lets you make something "neat" almost immediately, and you're spared a lot of the complicated externalities of the real world. (HTML, CSS, dev servers, npm modules, etc.) Some day you can learn all that stuff, but you need to know about if statements and loops and variables first.
I also miss the days of BASIC and Logo. I think those would be fun for the younger generation... but now everyone just wants to make a mobile app and those don't get you there. Ahh, for simpler times.
Since we are in a VBA thread, I'd argue that VBA is a great introduction itself into programming; especially with its macro recorder.
Progamming by clicking (in the spreadsheets) and seeing how the code changes instantly is arguably better for beginners than what normal programming languages usually offer.
On that I agree... Python would probably be a better option if there weren't a need for cross platform support including in-browser. Also, I'm not sure if there's a good path from Python to JS or Wasm for browser usage.
I love JS, but it's not that accessible and a poor first language for people. I just enjoy the shear flexibility of it.
Sure, but it's not as big as an ecosystem. Knowing JavaScript at this point is way more valuable than learning VBA. I'm not saying VBA is bad, I think visual basic is great, I have fond memories of it, but reality is JavaScript is going to be what companies are going to want their employees to know.
Can JavaScript use COM libraries and windows APIs? The JavaScript ecosystem is big but I doubt it covers much of what a typical VBA application needs. I think C# or another .Net language would be more suitable.
Comparing javascript to C# is really not appropriate here, for so many reasons. I do think you know the main differences between interperated, transpiled and compiled for starters, but the "right tool for the job" is far more important.
Being fashionable is also not exactly fair, it was very flakey before jQuery created some entry level standard, because of its popularity it grew to what it is today, if thats 'fashionable' then I support it.
:) Not sure if you're joking or not, so I'll be more rude and ask if you've ever written a compiler for the fun of it.. That will gauge your real age ;)
On a more serious note: an excel macro language like VBA pretty much needs to be interperated or the compiler needs to be hidden away like VBA does. As user you shouldn’t have to deal with a compiler step. You can do this with C# pretty well as you can with other languages.
Personally I think it would be really cool if they used TypeScript instead of JavaScript.
> Comparing [JavaScript] to C# is really not appropriate here, for so many reasons. I do think you know the main differences between [interpreted], transpiled and compiled for starters...
Are you saying there is a fundamental difference between JavaScript and C# in this regard? I don't think there is.
Each language has a compiler that compiles source code to bytecode. Each has an interpreter that can directly execute that bytecode, and a Just In Time compiler that can compile the bytecode into native machine code.
These languages, along with Java, are pretty much identical with regard to these distinctions.
Transpiled and transpilation are ugly and unnecessary words. They are just a fancy way of saying compiled and compilation.
Some make a distinction between a transpiler and a compiler; however this is a distinction without a difference. A compiler transforms source code into object code. The source code or the object code may be a "low level" language like bytecode or machine code. Or either may be a "high level" language.
For example, TypeScript has a compiler that compiles TypeScript code into JavaScript. [1]
The original implementation of C++ was Cfront, a compiler that compiled C++ code into C code. [2]
For that matter, "machine code" on modern CPUs is a high level language of its own, which bears little resemblance to the low level operations that happen within the CPU.
[2] Personal discussion with Bjarne Stroustrup on BIX around 1985 when I called Cfront a "preprocessor" and he chewed me out and told me it was a compiler just like any other compiler. Also: "Cfront was the original compiler for C++... which converted C++ to C" https://en.wikipedia.org/wiki/Cfront
Especially with Microsoft's creation of Blazor (leveraging WASM) and the .NET Jupyter notebooks, it seems like they'd be positioned to make .NET/C# accessible in the mobile and web platforms too.
VSTO to the best of my knowledge is still a thing. And you could indeed do some pretty cool stuff with it!
But it's not as easy to use as VBA, nor was it incredibly easy to work with from a development standpoint when I last tried to use it (Maybe I was doing it wrong, but I had to do a full VS install with the add-in module.)
I think there's a different focus with JS vs VBA or C#. JS is the future because of Office365 ie. Cloud/online apps are the future.
I don't think C# integrates with the o365 codebase, but I'd consider both JS and C# as attempt to move people to good dev practices, C# with IDE/versioning/debug etc and JS with the approach of funneling data in and out of excel eg. Cloud compute, and then using excel for basic functions that don't involve using macros etc.
I can relate to every single point he makes about how great VBA is compared to other languages and how annoying it is that MS has basically abandoned it in favor of JS.
I'm working on an excell addin right now. It doesn't use VBA (it uses microsoft interop libs for .NET) And I have zero interest in using VBA, but I will admit, it would have been much easier to do this project in VBA instead of C#.
Debugging would have been easier. I could debug inside the VBA code-behind instead of Attaching to the excel process in Visual Studio.
Deployment would have been easier. I could make an .xlam file and just give it to the users instead of A separate visual studio project that creates an installer on each build.
Excel interop would have been easier too(probably, I'm not 100% sure.) But using the Microsoft.Office.Interop.Excel libs are kinda hard. I don't have any good reference material for this lib, but for VBA, there are tutorials all over the internet for doing common things.
I mostly avoided VBA because I prefer the syntax of C#. I would imagine most people that only know VBA would have no interest in using C# to write office interop code, and I don't blame them. As for javascript, I doubt anyone that knows VBA well would have a hard time learning javascript, and if the codebehind for excel was slowly migrated to that, most devs would welcome the change.
There is so much of this I can relate to, I have worked with legacy systems too and have been fortunate in a sense to have to drill into someone else's VBA and thankfully there were people there to run me through those strangeness of it.
While I don't think it needs to continue, I believe it's been replaced in all aspects to date.. I do think that there is a requirement for a knowledgeable person to at the very least lead the re-write.
> As for javascript, I doubt anyone that knows VBA well would have a hard time learning javascript, and if the codebehind for excel was slowly migrated to that, most devs would welcome the change.
One of the main points of contact for my VBA adventure picked up vanilla javascript super fast, and within a few weeks he was already explaining how it could be made semi strongly typed, he introduced us then to a newly formed TypeScript subset and we never looked back.
It's not a language issue, its an understanding issue, give a good engineer/developer/hacker any language and they will figure it out and know how to make it work.
That said, if I ever see VB again, I will still shed some salty tears.
> I would imagine most people that only know VBA would have no interest in using C# to write office interop code, and I don't blame them.
I'd be happy to use C# but it's so god damn hard to learn those libraries.
The biggest disadvantage in using VBA is speed – not to mention the idiosyncrasies of the language itself, which can make complex code rather painful.
Writing a .xlam addin is easy, except there's no tooling for creating "builds".
On a separate but related note, since writing XML for the ribbon by hand is so annoying (and you also have to write callback wrappers for each Sub you want to expose) I have actually written a python tool that parses annotations from comments in .bas files in a given folder and spits out a .xlam file. Haven't gotten around to publishing it but if folks are interested I can give it a little oomph and finish in the next few weeks, so lmk
I’m the other way. Started a large project in VBA once, jumped over to C# interop and never looked back. I found the libraries to map fairly well to the same named functions in VBA when it came to worksheet manipulation. My biggest issue was that the interop has quite a bit of latency. You really want to accomplish as much in one call as you can (i.e. read whole ranges into an array instead of looping through cell by cell).
Edit: If this is internal, you can also set up one click deployment to some folder on the network that will auto update the add on for end users.
The latency might be because the C# is running out-of-process and has to serialize all the data and make calls by (internally) sending window messages. If you can create the COM component in-process (in the Excel process) it should be a lot faster.
I was working on a small program that originally used the C# interop and found the latency pretty bad as well. For a small document, it was taking like 4 or 5 seconds to do what we wanted (dont remember exactly what that was atm). Eventually, I used some OpenXML library Microsft offered that was basically LINQ to XML with some types / extensions and found something interesting:
On smaller documents, the OpenXML manipulation blew the COM interop out of the water in terms of speed, but with larger documents (hundreds of thousands of rows), I think the COM interop was either faster or at least just as fast.
The key to using C# for manipulating Excel for me was ExcelDNA. The development workflow and binary packing was pretty good, I thought.
Before ending up on ExcelDNA, I had started with a VSTO template from Visual Studio, and the development workflow was hell because of how buggy the interactions with Excel were. And I thought the ClickOnce deployment was annoying, if you can instead merely copy an excel file as well as its add-in file(s).
You don't really need to sign your add-in, though I guess that's not good.
VBA is very annoying, and I wouldn't love it if I hadn't been forced to spend so much time in it creating custom functions before attempting larger scale applications.
Once you get used to classes/interfaces, however, the feeling is comparable to realizing the guitar you learned how to play on was terrible and had absurdly high action, and now that you're holding a mediocre to moderately good guitar, you can play a lot better than you thought.
I also think you have to accumulate a personal library of utility functions to make it tolerable (or sometimes even fun.) I've never noticed a real community with standards and norms around VBA, so you're on your own a lot.
One thing to consider, which I've found powerful, is a hybrid approach where you use vba for what it's best at -- interacting with the Excel object model -- and have the vba load and call a C# xll that leverages the .Net libraries and does all the work that would be tedious to do in vba. For your users, they would simply open a "host" .xlam file, which is the only one they would be aware of, and this file would load additional .xlam or xll files and typically also check for updates to these files. No installer necessary.
For example, your vba code would pick up a range of index (or ETF) tickers from a sheet, use Application.Run("lib.constituents") to call a C# function that pulls the stock tickers and weights that represent each indices' constituents, your vba code would receive back an array of arrays and use Excel's row grouping feature to group the members & weights under the parent index and perhaps add some formatting and\or formulas.
The advantage of this division of labor is that you get faster dev & debug feedback loops within your Excel-centric code, while minimizing the amount of time you spend working in a dev environment that has stood still for 20+ years as others have raced far past.
Ha - good timing! I've been using VBA today and yesterday actually!
Often only a few times a year I use it now but when I do it I feel productive.
In case your wondering I has a previous Excel VBA Macro that I wrote for updating a SQL Server Database based on data in Excel. The macro first has to run checks against data in an IBM AS/400 Database.
I ended up having to pull out the macro to do a bulk update in an ERP. It was faster to do this then re-write in an modern language (especially since I work with the data in Excel first).
I don’t think it will. Microsoft might add another macro language but everyone is obsessed with backwards compatibility at MS and I highly doubt they would remove something as widely used as this. I used to be really annoyed by this as an engineer, but in contrast to Google’s culture where products are shutdown all the time I’ve started to come around that users should come first to avoid getting this reputation, even if it does become a combinatorial hell of different versions. I work at MS so I’m biased probably
It'd honestly be a shame if it did (but I understand the stresses that might cause it to happen).
Flash back to ~1986, and Bill Gates wrote an article for a Byte magazine special edition in which he described a unified version of BASIC implemented across a suite of GUI productivity applications.
Keep in mind, this is before Windows 3.0 and the Microsoft hegomony, before Word for Windows, (and Access, Project, Visio, etc.), before OLE/COM/ActiveX/IDispatch, and all of which are arguably necessary to complete the vision he outlined in the article. Ten years later, the vision of the article was realized, and thirty-five years later, it not only still exists, it's still useful across a huge cross section of computer users. (Despite the radical changes in the industry over that time.)
Microsoft has gotten a lot of flack over the years, and a lot of it has been earned, but the ability to identity a useful target state ten years in the future and rally an organization to achieve that goal is an amazing accomplishment.
Attorney General Barr is not resigning; not before President Trump does. Barr is the same as Mueller,Pelosi,Schiff, Nadler: feign opposition to cover the true motive of obstruction to keep Trump in power. Supreme Court Justice Alito & FBI Deputy Director Wray also on board. See latest updates
"Impeachment" Is A Diversion And Delay - Part II: Blocking of the "impeachment" witnesses was collusion planned before the new year. Listen to an FBI agent's disclosure from January 1, 2O2O here. The President was to resign late summer securing election for DNC. See latest updates.
Here is the zip file, which was also made available in the 3Jan2O2O update. The file within is VID_20200101_201948.mp3. Turn up the volume and put on headphones.
The dialogue about the impeachment starts near the beginning. Having Biden in the White House is as good as Trump or anyone else in their organization. Obviously Schiff and Nadler pledged their allegiance to the organization by raping boys on the record, with their task being to drag out an impeachment designed to obstruct and delay any real efforts to remove the President, thus keeping Trump in power. The witness blocking was to cause an apparent uproar delaying things with legal actions until late Summer. Soon after, the President would resign, leaving any other candidate with not enough time or support to compete with an opportunistic Biden, who is as good as Trump or any other Illuminati friendly politician in the Presidency.
\Wag The Dog: first was feigned impeachment hearings meant to obstruct, now an attack on Iranians in Iraq. Here is what they are trying to distract from & cover up to retain power. $100+ billion in bribes to the highest offices in this country. 815+ deaths from child rapes to prove loyalty!
See the latest PDF updates: FBI Director Wray, AG Barr, SoD Shanahan, & SoS Pompeo each raped boys and were paid billions in bribes for a Soros & Koch funded child rape org. So did Trump & his "impeachment" team Nadler,Schiff,Mueller.So did media moguls Redstone,Murdoch,Moonves. What are they trying to set up? Who can arrest them since they are all bribed and in on it ? UInkjnkre, lkvrnlkjnowp, miwenctege.
Their strategy to stay in every office and obstruct until forced to leave no matter what. Feigning impeachment: see page 13O.
\\if;Download the video/audio file, put on headphones and turn up the volume. You will hear these people committing these crimes. Audio was broadcast into my apartment by outdated surveillance equipment illegally embedded within my walls. This very same technology was being used to broadcast me to the internet for five years without my consent. I own this footage. Please use this to prosecute all found within. Note:: I am obliviously speaking throughout the video, and it can be quite loud at times relative to the desired content. The are dozens more links, including these, that can be found in this PDF that was last updated on 27 FEB 2O2O:
I still think that original Excel macro language was better than VBA. It essentially excel's formula language extended to be imperative language and represented as sheets. At the same time it was user friendly and had kind of lisp feeling.
Quote: "What Will Replace VBA? Short answer: JavaScript. "; and author follows with some logic about JS vs VBA using cross-platform.
Except this will never happen:
1 - M$ loves backward compatibility. It's what keeps their software being sold all these times. Worse case JS will have bigger user share and that's it, but M$ will never cut VBA out.
2 - Also majority of business is done on Windows. Cross-platform means absolutely nothing to corporations. The day that Windows dies that's the day VBA will die as well.
3 - JS as golden boy vs VBA? pleease. Best case scenario you're switching from one ugly boy to another ugly boy. Both VBA and JS are horrors. Don't believe me? Go read'em horror stories about JS cross browsers implementations. JS solved the problem of cross-platform only to open the problem of cross browsers. Good luck having Apple implement the same JS in Safari as their mortal enemy from Google in Chrome.
1) They are paid to support their own tech, when they drop one (Silverlight for example) it can be a serious hit for a buisiness.
2) Yes, but it is changing thanks in part to dotNet core understanding this too. So we should see some benefits across the board for everyone.
3) Well, like PHP back when it was the golden boy against Perl, it's up to the developers to decide the direction of the language itself. Browsers and Node are big players to influence that too, but M$'s interest bringing TypeScript for example is evidence they might believe that.. Also as for standards, I might be wrong but I think they now decide their own standards, with all the browsers as members ?
> They are paid to support their own tech, when they drop one (Silverlight for example) it can be a serious hit for a buisiness.
...but you can still download and run Silverlight.
Fun fact: if you load up Netflix in a browser that's too old to support the html5 player, they'll prompt you to install the Silverlight plugin. https://help.netflix.com/en/node/23742
Depends on what you're using VBA for, it is for Excel data processing or analytics. IMO it will likely die out, there are much better data solutions on the market for data analytics that use python.
169 comments
[ 1.4 ms ] story [ 206 ms ] threadDoes anyone here have a side-by-side comparison of the LibreOffice BASIC vs the VBA?
Not Excel, but one of my first consulting projects was at a company that developed some custom libraries in Java and for a company that used ASP for the front end. The architecture we used ran the Java code in the Microsoft JVM, which then made Java accessible via IDispatch (and therefore by ASP's scripting engine).
IIRC, we were doing stuff similar to this:
This is essentially a part of the 'embrace and extend' functionality that MS added to Java and got sued by Sun over. (There were also mechanisms for relatively easily calling into Windows from the MSJVM too... it felt an awful lot like the Proto-CLR that it was.)Issues like DCOM and legacy systems would need some interface from Microsoft of course to handle IDispatch, GC etc, but thats what Microsoft do.. And to behonest, as much as I like to rip on them, they do it well.
Edit: I think the Java example is a little bit different, but i don't know anything about Proto-CLR!
https://blogs.msdn.microsoft.com/dsyme/2012/07/05/more-c-net...
"Project 7 and .NET Generics"
https://fsharp.org/history/hopl-draft-1.pdf
WinRT, as it was originally designed, traces its ideas back to that Ext-VOS project, but going back to COM as they were thinking about it back then.
https://docs.microsoft.com/en-us/uwp/winrt-cref/winrt-type-s...
Edit: Yes, Python has also withstood the test of time... as a scientific and web language. There's no reason to assume that it could replace VBA as a spreadsheet automation language used by relatively non-technical business folks.
No matter how outdated, shitty, useless, etc. it may be, some jackass has built their entire workflow around it and has more power than you to prevent that from ever changing.
Something similar happened with visual studio. 2008 was really nice, very customizable and fast. Then they redid everything in 2010 and the result was slower with way less capability. And even now there are still a lot of features that 2008 had not implemented.
But which features exactly are missing in vs2010 that were in vs2008 (except the snappy feeling)? I have not actually noticed anything missing and would like to know more
https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost...
(Particularly relevant to this article, because Spolsky was the original 'designer' for the Excel/VBA integration: https://www.joelonsoftware.com/2006/06/16/my-first-billg-rev... )
VSTA was a good attempt in its time, a mini visual studio integrated in office with VB.net and C# instead of VB6. That would have been cool.
People both over and underestimate the ability of users to learn a language for quick scripting/automation. Languages like Bash, Python, JS, VBA... they're extremely accessible for quick and dirty work, which is why people latch on to them compared to others.
I did chuckle a bit.
Accessibility is key, so is documentation, so is flexibility, but again I re-itterate, the right tool for the job matters most.
Eh what now?
The ActiveSctipt host for JScript (for shell and Classic ASP scripting) hasn’t been updated since Windows 2000, and for shell scripting in-general Microsoft has been (“was” at this point?) pushing PowerShell since its demo at PDC 2003.
WinJS for Windows 8 was a huge waste of money for the company that people always seem to forget.
And their Chakra JS engine is effectively now retired given Chromium+V8 replaced EdgeHTML earlier this year.
The only places Microsoft has been using JS are for their current set of Electron-based applications (VS Code, Skype, MS Teams, Azure Storage Explorer, etc). TypeScript is nice and all (and I really love it and I hope it brings algebraic typing and structural typing to more languages) but it’s only popular because Google, of all people, adopted it for Angular.
I don't understand how you can be proud of having the most unusable package ecosystem. Sure the numbers are large but can you actually safely use those packages? No, you can't. Just add a single library and you will include a huge amount of transitive dependencies from random package maintainers over which you have no control.
Other languages like Java or Rust have the same problem but this is a problem with exponential impact and NPM is the leader in tree depth. Having a 10 layer deep dependency tree is far worse than a 7 layer deep dependency tree. When I look at the dependency tree of my own projects more than 50% of the libraries are first party and from a vendor with a good reputation. (spring, apache commons, tomcat). The rest are less trust worthy but each project has a small opensource community that consists of more than just a random guy that may randomly throw emotional fits like in the leftpad scenario.
You have all the control in the world, and just because someone is lazy doesn't mean it doesn't work. Beyond this, you probably don't review every single line of code that goes into your applications dependencies regardless of language. It's about impedance vs productivity for the most part.
I tend to, at least with front end projects focus on koa for the server tethered to the UI, React and material-ui ... nearly everything else is one-off building from there. Unless you think the likes Facebook and Google are just one random guy.
I don't think they finished the class. Javascript just has too many weird concepts (what's the difference between null and undefined and false and 0 and "") that distract from the mechanics of learning what a computer program is, and I also think that the desire to make something others can use too early on leads to going too quickly through the basics ("yeah yeah, add numbers, who needs to do that") and are then overwhelmed when things like objects and promises show up. You have to crawl before you walk.
I think if I were going to introduce someone to programming today, I'd probably pick CircuitPython. Python is simple and makes sense almost immediately. Doing it on a microcontroller lets you make something "neat" almost immediately, and you're spared a lot of the complicated externalities of the real world. (HTML, CSS, dev servers, npm modules, etc.) Some day you can learn all that stuff, but you need to know about if statements and loops and variables first.
I also miss the days of BASIC and Logo. I think those would be fun for the younger generation... but now everyone just wants to make a mobile app and those don't get you there. Ahh, for simpler times.
Progamming by clicking (in the spreadsheets) and seeing how the code changes instantly is arguably better for beginners than what normal programming languages usually offer.
I love JS, but it's not that accessible and a poor first language for people. I just enjoy the shear flexibility of it.
https://docs.microsoft.com/en-us/microsoft-edge/windows-runt...
I'm sure Microsoft is probably at least considering making JavaScript work well with existing Windows APIs.
https://social.msdn.microsoft.com/Forums/en-US/ebb5e04b-d00a...
Being fashionable is also not exactly fair, it was very flakey before jQuery created some entry level standard, because of its popularity it grew to what it is today, if thats 'fashionable' then I support it.
Personally I think it would be really cool if they used TypeScript instead of JavaScript.
Are you saying there is a fundamental difference between JavaScript and C# in this regard? I don't think there is.
Each language has a compiler that compiles source code to bytecode. Each has an interpreter that can directly execute that bytecode, and a Just In Time compiler that can compile the bytecode into native machine code.
These languages, along with Java, are pretty much identical with regard to these distinctions.
Transpiled and transpilation are ugly and unnecessary words. They are just a fancy way of saying compiled and compilation.
Some make a distinction between a transpiler and a compiler; however this is a distinction without a difference. A compiler transforms source code into object code. The source code or the object code may be a "low level" language like bytecode or machine code. Or either may be a "high level" language.
For example, TypeScript has a compiler that compiles TypeScript code into JavaScript. [1]
The original implementation of C++ was Cfront, a compiler that compiled C++ code into C code. [2]
For that matter, "machine code" on modern CPUs is a high level language of its own, which bears little resemblance to the low level operations that happen within the CPU.
[1] "The command-line TypeScript compiler can be installed as a Node.js package." https://www.typescriptlang.org/
[2] Personal discussion with Bjarne Stroustrup on BIX around 1985 when I called Cfront a "preprocessor" and he chewed me out and told me it was a compiler just like any other compiler. Also: "Cfront was the original compiler for C++... which converted C++ to C" https://en.wikipedia.org/wiki/Cfront
But it's not as easy to use as VBA, nor was it incredibly easy to work with from a development standpoint when I last tried to use it (Maybe I was doing it wrong, but I had to do a full VS install with the add-in module.)
That makes me ask why VSTO -didn't- work more like VSTA, then. It may have improved adoption substantially...
I don't think C# integrates with the o365 codebase, but I'd consider both JS and C# as attempt to move people to good dev practices, C# with IDE/versioning/debug etc and JS with the approach of funneling data in and out of excel eg. Cloud compute, and then using excel for basic functions that don't involve using macros etc.
Edit: I believe Libre has python.
https://github.com/asemic-horizon/stanton
https://youtu.be/u6EV2jiKRfc
While I don't think it needs to continue, I believe it's been replaced in all aspects to date.. I do think that there is a requirement for a knowledgeable person to at the very least lead the re-write.
> As for javascript, I doubt anyone that knows VBA well would have a hard time learning javascript, and if the codebehind for excel was slowly migrated to that, most devs would welcome the change.
One of the main points of contact for my VBA adventure picked up vanilla javascript super fast, and within a few weeks he was already explaining how it could be made semi strongly typed, he introduced us then to a newly formed TypeScript subset and we never looked back.
It's not a language issue, its an understanding issue, give a good engineer/developer/hacker any language and they will figure it out and know how to make it work.
That said, if I ever see VB again, I will still shed some salty tears.
I'd be happy to use C# but it's so god damn hard to learn those libraries.
The biggest disadvantage in using VBA is speed – not to mention the idiosyncrasies of the language itself, which can make complex code rather painful.
Writing a .xlam addin is easy, except there's no tooling for creating "builds".
On a separate but related note, since writing XML for the ribbon by hand is so annoying (and you also have to write callback wrappers for each Sub you want to expose) I have actually written a python tool that parses annotations from comments in .bas files in a given folder and spits out a .xlam file. Haven't gotten around to publishing it but if folks are interested I can give it a little oomph and finish in the next few weeks, so lmk
Edit: If this is internal, you can also set up one click deployment to some folder on the network that will auto update the add on for end users.
On smaller documents, the OpenXML manipulation blew the COM interop out of the water in terms of speed, but with larger documents (hundreds of thousands of rows), I think the COM interop was either faster or at least just as fast.
Before ending up on ExcelDNA, I had started with a VSTO template from Visual Studio, and the development workflow was hell because of how buggy the interactions with Excel were. And I thought the ClickOnce deployment was annoying, if you can instead merely copy an excel file as well as its add-in file(s).
You don't really need to sign your add-in, though I guess that's not good.
Once you get used to classes/interfaces, however, the feeling is comparable to realizing the guitar you learned how to play on was terrible and had absurdly high action, and now that you're holding a mediocre to moderately good guitar, you can play a lot better than you thought.
I also think you have to accumulate a personal library of utility functions to make it tolerable (or sometimes even fun.) I've never noticed a real community with standards and norms around VBA, so you're on your own a lot.
For example, your vba code would pick up a range of index (or ETF) tickers from a sheet, use Application.Run("lib.constituents") to call a C# function that pulls the stock tickers and weights that represent each indices' constituents, your vba code would receive back an array of arrays and use Excel's row grouping feature to group the members & weights under the parent index and perhaps add some formatting and\or formulas.
The advantage of this division of labor is that you get faster dev & debug feedback loops within your Excel-centric code, while minimizing the amount of time you spend working in a dev environment that has stood still for 20+ years as others have raced far past.
Often only a few times a year I use it now but when I do it I feel productive.
In case your wondering I has a previous Excel VBA Macro that I wrote for updating a SQL Server Database based on data in Excel. The macro first has to run checks against data in an IBM AS/400 Database.
I ended up having to pull out the macro to do a bulk update in an ERP. It was faster to do this then re-write in an modern language (especially since I work with the data in Excel first).
Flash back to ~1986, and Bill Gates wrote an article for a Byte magazine special edition in which he described a unified version of BASIC implemented across a suite of GUI productivity applications.
Keep in mind, this is before Windows 3.0 and the Microsoft hegomony, before Word for Windows, (and Access, Project, Visio, etc.), before OLE/COM/ActiveX/IDispatch, and all of which are arguably necessary to complete the vision he outlined in the article. Ten years later, the vision of the article was realized, and thirty-five years later, it not only still exists, it's still useful across a huge cross section of computer users. (Despite the radical changes in the industry over that time.)
Microsoft has gotten a lot of flack over the years, and a lot of it has been earned, but the ability to identity a useful target state ten years in the future and rally an organization to achieve that goal is an amazing accomplishment.
Here is the zip file, which was also made available in the 3Jan2O2O update. The file within is VID_20200101_201948.mp3. Turn up the volume and put on headphones.
BB10Mp3Footage31Dec1Jan.zip 122.4mb
https://drive.google.com/file/d/1IXOOhQhHybwky8Z5pGdr9ZXhWpI...
The dialogue about the impeachment starts near the beginning. Having Biden in the White House is as good as Trump or anyone else in their organization. Obviously Schiff and Nadler pledged their allegiance to the organization by raping boys on the record, with their task being to drag out an impeachment designed to obstruct and delay any real efforts to remove the President, thus keeping Trump in power. The witness blocking was to cause an apparent uproar delaying things with legal actions until late Summer. Soon after, the President would resign, leaving any other candidate with not enough time or support to compete with an opportunistic Biden, who is as good as Trump or any other Illuminati friendly politician in the Presidency.
170 pg PDF [last updated: February|27|2O2O]:
https://drive.google.com/file/d/1S7T_kDv48E40eHzus6CTXHxcm0W...
Previously reported:
\Wag The Dog: first was feigned impeachment hearings meant to obstruct, now an attack on Iranians in Iraq. Here is what they are trying to distract from & cover up to retain power. $100+ billion in bribes to the highest offices in this country. 815+ deaths from child rapes to prove loyalty!
See the latest PDF updates: FBI Director Wray, AG Barr, SoD Shanahan, & SoS Pompeo each raped boys and were paid billions in bribes for a Soros & Koch funded child rape org. So did Trump & his "impeachment" team Nadler,Schiff,Mueller.So did media moguls Redstone,Murdoch,Moonves. What are they trying to set up? Who can arrest them since they are all bribed and in on it ? UInkjnkre, lkvrnlkjnowp, miwenctege.
Their strategy to stay in every office and obstruct until forced to leave no matter what. Feigning impeachment: see page 13O.
\\if;Download the video/audio file, put on headphones and turn up the volume. You will hear these people committing these crimes. Audio was broadcast into my apartment by outdated surveillance equipment illegally embedded within my walls. This very same technology was being used to broadcast me to the internet for five years without my consent. I own this footage. Please use this to prosecute all found within. Note:: I am obliviously speaking throughout the video, and it can be quite loud at times relative to the desired content. The are dozens more links, including these, that can be found in this PDF that was last updated on 27 FEB 2O2O:
https://drive.google.com/file/d/1S7T_kDv48E40eHzus6CTXHxcm0W...
All members of the "Illuminati"; "....an underground organization of homosexuals and child rapists..." (from pg 26: Barack Obama with Jack Dorsey).
President Donald Trump:
Demands a $4 billion dollar bribe here at 10:18am 4Jan2019:
Except this will never happen:
1 - M$ loves backward compatibility. It's what keeps their software being sold all these times. Worse case JS will have bigger user share and that's it, but M$ will never cut VBA out.
2 - Also majority of business is done on Windows. Cross-platform means absolutely nothing to corporations. The day that Windows dies that's the day VBA will die as well.
3 - JS as golden boy vs VBA? pleease. Best case scenario you're switching from one ugly boy to another ugly boy. Both VBA and JS are horrors. Don't believe me? Go read'em horror stories about JS cross browsers implementations. JS solved the problem of cross-platform only to open the problem of cross browsers. Good luck having Apple implement the same JS in Safari as their mortal enemy from Google in Chrome.
2) Yes, but it is changing thanks in part to dotNet core understanding this too. So we should see some benefits across the board for everyone.
3) Well, like PHP back when it was the golden boy against Perl, it's up to the developers to decide the direction of the language itself. Browsers and Node are big players to influence that too, but M$'s interest bringing TypeScript for example is evidence they might believe that.. Also as for standards, I might be wrong but I think they now decide their own standards, with all the browsers as members ?
...but you can still download and run Silverlight.
Fun fact: if you load up Netflix in a browser that's too old to support the html5 player, they'll prompt you to install the Silverlight plugin. https://help.netflix.com/en/node/23742