Live data from Hacker News

Excel team considering Python as scripting language: asking for feedback

news.ycombinator.com

101–110 of 280 posts

Re: Excel team considering Python as scripting language: asking for feedback

#102
post #58

Earlier quoted context omitted.

I agree and I would add to that that many users of these scripting tools in Office are novice, and dynamic typing makes the language non self-discoverable. Static typing lets the IDE give a lot more feedback on invalid syntax, what can be done from there, etc. So I think this is a disservice we make them.

Saying dynamic languages are for novices hints more at you being one than anything else. Not everyone likes IDEs (Emacs and VIM are still by far superior to many) and not everyone wants to deal with all the extra code and boilerplate and ad-hoc data classes that comes with static typing, to name a few. Dynamic languages have faster iteration times and from experience that can yield higher quality software. They're ea…

I am not saying dynamic languages are for novice. I am saying people who will be using office's scripting are more often than not programming novices (like they are with VBA).

You may like plain text editor but for someone who doesn't know how to program, typing a variable then dot, and having a drop down of what is available from there, with an embedded documentation and direct IDE feedback on what is correct or incorrect syntax immediately after typing every character is super useful. RTFM isn't novice friendly.

Re: Excel team considering Python as scripting language: asking for feedback

#103
post #66
post #24

Earlier quoted context omitted.

Potentially different. .NET allows signed binaries / libs / a fully signed execution context, Python has nothing equivalent AFAIK.

Excel VBA is not .Net though. It's plain old VB code in text files inside the .xlsx, and you just have to trust it (or not).

Aaah. Then probably about the same, yea :) Maybe less of a nightmare around dependencies than the pip world...?

Re: Excel team considering Python as scripting language: asking for feedback

#104

Earlier quoted context omitted.

Python is strongly typed, and Python 3 annotations with tools like MyPy brings static type checks.

Have you used MyPy? I'm currently looking to adopt it, but the feedback I've been getting is that it's a lot more painful to use than Typescript (which imho sets the gold standard of "optional typing").

I haven't used typescript, but I have used MyPy (Or, more accurately, pytype), and its absolutely a joy to work with. I've also used closure (the JS type system that isn't TypeScript) and I prefer pytype, fwiw.

My only complaint about Pytype is that there's no `Char` type at compile time (ie `for x in "a string"` -> Iterable[Char] instead of Iterable[str] during typechecking). But alas.

Re: Excel team considering Python as scripting language: asking for feedback

#105
post #12

An absolute no-brainer. Python is the new BASIC - very popular with people who have to program to do their work but aren't programmers. It's an excellent choice for a spreadsheet.

>aren't programmers Also extremely popular with people who are programmers and need to do things. Sorry, this is a frustration of mine lately. Python is a fantastic introductory language. It's also a fantastic general purpose language. Newbies get turned off of it because it feels too easy, and they know that "real" programming is supposed to be hard.

Yup, it teaches algorithms very effectively with low boilerplate; personally it's my favorite way of expressing dictionaries/hashtables and other data structures. Generators and iterators are super powerful concepts that I didn't learn in college and wish I did earlier.

It also allows a developer to manipulate individual bits, which is pretty amazing for security research or other cases when you want to get low level but don't want to get in the weeds with C.

Re: Excel team considering Python as scripting language: asking for feedback

#106
I'd vote for Lua: faster and less heavy than Python... Plus my biggest concern for Python would be how well the team can sandbox it. I know in this regard Lua also has advantages. Disclaimer: I am _way_ more proficient in Python than Lua, I just think Lua is a better choice.

Re: Excel team considering Python as scripting language: asking for feedback

#107
post #79
post #28

Earlier quoted context omitted.

Instagram would disagree with you. Seriously, Python is an absolute pleasure for managing large web projects and the lack of static typing has never been an issue for my company (spend the time writing tests instead!)

That's one thing I don't understand. The argument I hear against static typing is that it's too much work to write all this type metadata. But if you have to make up the lack of compiler checks with lots of tests for things that wouldn't require tests in a static language, we are not saving any work.

I love Python but I also don’t mind static types. Maybe I will realize some day what this argument is really about, but I expected that day to come by now.

Re: Excel team considering Python as scripting language: asking for feedback

#108

Imagine all of those simple tasks that you could do in seconds with a python script. Export to csv in UTF-8 with double quoted fields. Loop through cells for row in rows: do some cool stuff Pull data from a REST API using requests rather than some VBA hack. I'm getting over excited already. Edit data for your ERP and then post it back to the API and update the db... This is exactly what finance/data people want. Writ…

I already find myself reaching for Google Sheets quite frequently just to do this. I'd love to be able to use Python instead of JavaScript.

Re: Excel team considering Python as scripting language: asking for feedback

#109

I'd vote for Lua: faster and less heavy than Python... Plus my biggest concern for Python would be how well the team can sandbox it. I know in this regard Lua also has advantages. Disclaimer: I am _way_ more proficient in Python than Lua, I just think Lua is a better choice.

Does Lua have anything like Numpy or Scikit-learn?

Re: Excel team considering Python as scripting language: asking for feedback

#110

Earlier quoted context omitted.

Last time I saw the Bank of America python codebase, it had ~6 million lines of code, was worked on by about 4,000 developers, and ran some core, performance critical functionality. Python programming is an aesthetic that needs learning. Many of the worst written, and least maintainable python codebases I've seen are by programmers/teams coming from "proper" languages and don't think they have to learn how to write i…

A bit dated now, but still a great read about a Python project done by Java developers: http://dirtsimple.org/2004/12/python-is-not-java.html "So, the sad thing is that these poor folks worked much, much harder than they needed to, in order to produce much more code than they needed to write, that then performs much more slowly than the equivalent idiomatic Python would."

> A bit dated now, but still a great read about a Python project done by Java developers: http://dirtsimple.org/2004/12/python-is-not-java.html

I included a link to this blog-post in the "letter of intent" (don't know the exact English term) that I sent to my potential employer just before my first interview for a professional (Python) programmer job, back in 2005. I got the job. Good times.

Post reply on HN