r/programming • • May 08 '18

Excel adds JavaScript support

https://dev.office.com/blogs/azure-machine-learning-javascript-custom-functions-and-power-bi-custom-visuals-further-expand-developers-capabilities-with-excel
2.4k Upvotes

585 comments sorted by

View all comments

-11

u/cediddi May 08 '18

Are they crazy? Js for excel is may be the worst language choice.

11

u/Marquis_Andras May 08 '18

It's the most flexible. Many other languages compile to JS. e.g. Haskell, Kotlin, C.

5

u/Somepotato May 08 '18

something something luajit, esp. relevant given Lua was created to be an easy language for designers and engineers who didn't understand programming, to pick up

5

u/tripl3dogdare May 08 '18

If there's such a thing as a lingua franca in modern programming, it's JavaScript. It only makes sense to go with the language that more people know and understand, and personally I'd take JavaScript over Lua any day even without the popularity factor, because Lua has even more half-crazed, barely-fathomable design decisions behind it than JavaScript does. In the end, all else being equal, it wouldn't make sense to pick a language that's easy to learn over a language that nearly everyone knows already.

5

u/Somepotato May 08 '18

well, false != 0 in Lua, Lua has operator overloads, it's not a detriment to speed to swap metatables (prototypes in JS), etc, so I mean I'd say JS has more grodey quirks than Lua, not to mention speed, and not even to mention that the primary users of Excel will more than likely NOT be previous programmers

not to mention the sheer speed of luajit would be very important in something like Excel.

2

u/tripl3dogdare May 08 '18

I'd just like to point out, since we're at at, that Lua has:

  • 1-indexed arrays with none of the good excuses

  • One of the messiest dictionary/hash systems I've ever seen short of PHP

  • Terrible scoping rules

  • Syntax that can't seem to decide if it wants to be C-style or not

  • A barely-comprehensible class system

  • Among other problems

Whatever technical advantages it may have over JavaScript are in my opinion far outweighed by the user experience - while JavaScript certainly isn't perfect, it at least feels like I'm using a language that knows what it's trying to be even if it fails, rather than a language that can't make up it's mind on anything. To each their own, though - nothing wrong with preferring Lua as long as you know why you prefer it =}

1

u/Somepotato May 08 '18 edited May 08 '18

1 based indexing is again to be easier. The whole 0 based started because c does it. Remember it's not a memory offset, it's an index. Also you can't just say messier hash/terrible scoping without naming any examples, and you claiming the class system is terrible hints at you not having much experience with it to complain about it.

Js most definitely does not make up its mind, why is its truthiness require a printed table? Your examples are really vague so it'd be nice if you at least let me sway your opinion a little bit.

Don't get me wrong Lua has some very weird quirks like ".." vs + and implicit number conversion and no continue statement and more i can't type on mobile I created a fork of to deal with, but js has a lot more imo

1

u/[deleted] May 08 '18

How does c compile to JavaScript?

1

u/Marquis_Andras May 08 '18

Emscripten is an LLVM to JavaScript compiler. It takes LLVM bytecode (e.g. generated from C/C++ using Clang, or from another language) and compiles that into JavaScript, which can be run on the Web.

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Emscripten

→ More replies (10)

0

u/[deleted] May 08 '18

[deleted]

3

u/cediddi May 08 '18

Js is surely well known, but is it up for the task? Being well known is surely important but that alone can't be the main reason.

→ More replies (5)

1

u/[deleted] May 08 '18

I find it hard to believe that the population scripting Excel and the population using JS is a huge overlap. Something like python or R seems like a better fit.

→ More replies (5)

2

u/heisgone May 08 '18

Short or VB... it’s horrible how the office team abandonned developers. There have been no progress to language, IDE... They don’t give a damn about Access or providing something modern to replace it. Web integration sucks. Damn. Office is a great set of tools but it stagnated for 10 years.

5

u/therealcreamCHEESUS May 08 '18 edited Jan 08 '26

grandiose grab deserve sip quickest society upbeat tap chunky marble

This post was mass deleted and anonymized with Redact

4

u/heisgone May 08 '18

It’s better at what it does. Access is crap and the little I had to use it gave me PTSD. That being said, it allowed RAD. Not RAD platform have emerged to replace it yet. PowerBI cover one part, but not all of it.

2

u/sphks May 08 '18

What's RAD ?

4

u/heisgone May 08 '18

Rapid Application Development. It’s an ancient practice that only the elders among us remember. The youth have been raised blind to the greatness of past, when a man could feed a family with one salary and build complex systems with simple tools. It meant great joy for everyone. But the days of darkness came...

2

u/yopla May 08 '18

Does it come with a form builder?

2

u/therealcreamCHEESUS May 08 '18

No but you have visual studio for building front ends.

Access is a database for non database people.

If you really need to be able to manipulate data either master excel or learn a proper DML like T-SQL.

With SQL you can have much larger database sizes, variables, more than 255 users, full joins, count distinct etc etc. So many features in SQL don't exist in access.

There is a very good reason why Access is not that well supported, its an inferior product for people who do not have the technical skills to properly manage data.

Sure its easier, cheaper and has a much shallower learning curve but if your doing anything important, you should do it properly or get a DB developer to do it properly. You will save yourself money and time in the long run.

1

u/yopla May 08 '18

I think you have a very narrow vision of the world. Maybe you never had a real job where you had to balance a budget.

In the real world you have millions of people making the best of their limited resources and building apps and process tools in excel and access.

First they do not have the skills to use sql server and visual studio.

Second they dont have the budget to buy them and/or hire someone.

Third, so many of those apps dont even require the complexity of the infrastructure you're suggesting.

Do you think it make sense to use SQL server for a tool used by a secretary to manage a total of 100 invoices per year? You can do a full text search on 10 years worth of invoices without even needing to index anything and it'll still be fast.

That same secretary will be much better off with a less than perfect access tool over nothing because she can't afford your perfect architecture.

Sometime the inferior product is the best tool for the job.

1

u/therealcreamCHEESUS May 08 '18

One of the many cheap software packages for managing invoices and internal cashflow could be bought or a simple excel spreadsheet at that volume.

If its too complex for a spreadsheet then either get a software package or a proper database. If you go down the access route you are hindering yourself later on. If you are absolutely sure your business won't expand or your requirements and volume of data will never change significantly and know access well then maybe but few businesses operate on the principle of staying stagnent. You at the very least need to know DML concepts to design a decent access database anyway. You can struggle on without that knowledge but it will cost you later.

Thanks for your comments on my narrow vision, FYI my background is in reporting. I literally work in the industry you are saying I have a narrow vision of. Again if your business model is stagnent then go ahead but people like me get paid to sort out the situation a few years down the line after some inspired soul decides to hack together an access 'solution' round a core business process.

1

u/yopla May 08 '18

You've just repeated the same thing so just assume my answer is still about your limited understanding how how companies need to prioritize their capex spending and how small, intermediate, zero added cost, DIY solutions can provide a lot of benefit to a company.

1

u/therealcreamCHEESUS May 08 '18

As I said, I work in the industry and have worked with clients managing over £150 billion in assets servicing internal e-invoicing and procurement systems. From intergrations with accounting systems such as Sage and Microsoft Dynamics to reporting and managing workflow systems administering costs. My limited understanding once discovered and helped recover a charity over £1 million in lost assets. The bread and butter product of my last employer was a software package to reduce internal expenditure of organisations. They made a lot of money from replacing things like home brew access solutions.

Please tell me... what experience are you talking from? Do you know any DML languages? Have you ever worked on the backend of financial or reporting systems?

→ More replies (4)

1

u/chucker23n May 08 '18

No but you have visual studio for building front ends.

Cool.

You have a $10,000 budget.

Go!

Oh, what do you mean you spent all the budget just on requirements gathering? This gal who used Access already has with an 80% finished solution. What are you doing?

→ More replies (1)