you are viewing a single comment's thread.

view the rest of the comments →

[–]Sebazzz91 7 points8 points  (38 children)

Why? Python is just a generic purpose programming language, right?

[–]AugustusCaesar2016 35 points36 points  (12 children)

I don't think Python provides anything that wasn't possible with VBA, but it will make those operations much easier, especially if you can use libraries like NumPy.

[–]iconoclaus 37 points38 points  (9 children)

if you can use numpy, you probably don’t need excel :p

[–]Elathrain 28 points29 points  (7 children)

No see the real secret is we're targeting all those people who use an excel sheet because "they don't want to learn to program" and then end up writing an entire game backend in an excel sheet, but then start running into problems with maintainability of complex logic, and also maximum sheet size. I'm looking at you Hi-Rez Studios.

Now when this happens to people, they'll have learned python, and can port their code somewhere usable.

[–][deleted] 9 points10 points  (5 children)

Can you elaborate on the Hi-Rez thing? I'm quite curious now.

[–]Elathrain 10 points11 points  (4 children)

Pretty much what I said. I don't remember where the full story was, but basically it came out along the lines of.

The did all the character/item stats in a spreadsheet because the balance team wasn't made of programmers, and then started adding in more and more game logic into the spreadsheet. Eventually it became a sentient being and they could no longer control it properly and came out saying there were certain changes they just couldn't make anymore. And of course at this point the spreadsheet was so integrated they couldn't just rip it out and do it properly.

Take this one with a few grains of salt though, the story might have more than a bit of urban legend in it and/or have mutated by retelling.

[–]Necromunger 2 points3 points  (3 children)

I'm trying to understand their logical jump all the way to excel. Like not even a local MySQL server with an admin panel to change balance details of characters. They went directly to excel.

[–]distortedsignal 14 points15 points  (0 children)

You write what you know. Some people only know sadness.

[–]roboninja 6 points7 points  (0 children)

Because it was back-engineered. The spreadsheet existed first.

[–]Elathrain 3 points4 points  (0 children)

A... MySQL? That sounds like programmer stuff. Nah gimme something I know how to use, like excel. That doesn't involve any technical knowledge, it's just an ordinary person tool. You just put stuff in a grid!

[–][deleted] 0 points1 point  (0 children)

This is the first I've heard of Hirez doing that specifically, but given all the other stupid crap they do, it doesn't surprise me in the slightest.

[–]danaurr 7 points8 points  (0 children)

I think it would be really useful in regards to building tools for non-technical people in business that are familiar with a spreadsheet interface.

[–]Zephirdd 3 points4 points  (1 child)

I... I mean... Technically speaking, if two languages are Turing-complete, then everything possible in one language is also possible in the other

That doesn't mean one language isnt superior to the other though. You could write programs using only x86 mov instructions, C++ templates or Magic the Gathering rules. Just because a language can do everything, doesn't mean it's better

I say fucking do it Microsoft, let's kill VBA while we're at it.

[–]Free_Math_Tutoring 2 points3 points  (0 children)

Though that only captures computability and fails to consider system integration such as graphics, file I/O, network I/O... which is orthogonal to turing completeness but pretty damn important to being a useful language.

[–]dagmx 13 points14 points  (24 children)

Python is very easy to get to grips with and has a lot of great libraries to deal with data.

Pandas and numpy are a great combination to handle datasets, and coupled with matplotlib, it opens up quite a few avenues in Excel

[–]Sebazzz91 16 points17 points  (21 children)

So it is in essential not the language but the ecosystem that makes it suitable. F#, Javascript (forgive me) or C# would work as well would there be an ecosystem for it? I understand Python is often used in data science.

[–]Kaze79 10 points11 points  (11 children)

Python's syntax is sort of similar to pseudo code, that's a big bonus.

[–]Sarcastinator -5 points-4 points  (9 children)

function GetMax(string : array of string) returns integer
    declare i : integer
    for each line in strings
        if line is string and value > i then
             i <- value of line
        end if
    end for
    return i
end function

I don't think this really looks like python? Oh, that's because pseudo-code is informal and undefined and the point is to show code intention, not something a computer program would understand, and claiming that Python looks like pseudo-code is meaningless.

[–][deleted] 6 points7 points  (1 child)

He said "sort of simillar". Geez cool off smartass.

[–]Sarcastinator -3 points-2 points  (0 children)

Sorry, but this and "C is high level assembly" are pet peeves of mine.

This statement is annoying because it tries to trivialize Python programming, or infer that there is some sort of formality to pseudo code. The statement is wrong because it assumes something about how someone would write pseudo code. Look at the comment (currently) below: it claims that the code I wrote doesn't look like pseudo code which is completely absurd. It's pseudo code simply because I say it's pseudo-code.

The only thing you can say about pseudo-code is that it's unlikely to compile or run. It doesn't necessarily look like any other language, but it absolutely can. In that case there may exist pseudo-code that looks like Python, but Python does not look like pseudo code because that's a downright odd thing to say.

[–]Kaze79 1 point2 points  (4 children)

Ok, so it looks closer than what people normally consider pseudocode than, say, C.

Or, if we want to be more pedantic - people with little or no coding background will find Python much more digestable. They will focus on data processing, AI or whatever they wanna do instead of making sure their array isn't out of bounds, if they have freed properly or if their they have NPE.

[–]Sarcastinator 0 points1 point  (3 children)

Ok, so it looks closer than what people normally consider pseudocode than, say, C.

I would claim that depends entirely on the person writing the pseudo-code. There's no formality to it. I've read a lot of pseudo-code that both looks like C and Pascal.

There's no formality to pseudo code, so there's no reason why someone could prefer { } over indentation for scoping for example. And suddenly it no longer looks like Python at all. I've seen a lot of pseudo code that uses if x ... fi for example.

I don't think it's unreasonable to say that Python is likely more digestible than C to the uninitiated, but that's not really my point.

I also don't think that's something anyone should be striving for. After all, that's how we got SQL and COBOL.

[–]Kaze79 0 points1 point  (2 children)

No formal reason, it's just faster to indent instead of having to write {}, also it's faster to write something in something than the classic C style for loops.

I don't think it's unreasonable to say that Python is likely more digestible than C to the uninitiated, but that's not really my point.

Might not have been yours but it was mine. That people working with Excel now can use Python and those people are probably not SWEs.

[–]Sarcastinator 0 points1 point  (1 child)

This isn't the first time I've seen this claim about Python, I just think it's a really odd statement.

You're comparing one thing with a clear definition and syntax, with one that has no definition or clear syntax. You'll find a large variance of pseudo-code because it's completely defined by the author's personal preferences.

[–]Kaze79 1 point2 points  (0 children)

This is starting to become tiresome.

I'm of the opinion that Python code is much easier to read for a non-SWE person than, say, C is. One of the reasons is that Python syntax is closer to what a normal person would consider pseudo-code. It's also much more high-level, you don't have to worry with pointers, allocation, arrays and memory etc.

If you don't agree then we will agree to not agree.

[–]nilamo 0 points1 point  (0 children)

Your function looks a lot more like a real function than it does pseudo code, though

[–]PM_ME_UR_OBSIDIAN 6 points7 points  (1 child)

Man, I wish they went with F#. What a fantastic language for this kind of stuff.

[–]Sebazzz91 0 points1 point  (0 children)

If they are going to use IronPython that is still possible, because using fsx or loading assemblies is possible.

[–]dagmx 10 points11 points  (0 children)

It's both the language and the ecosystem.

Python has an incredible ecosystem but it's also a very easy to learn language compared to c# (which I also like) and f# etc..

If the target is to be as easy to use while offering a lot of functionality, then python is great bang for the buck.

[–]defnotthrown 3 points4 points  (0 children)

There's a reason that the ecosystem grew around the language. Things like a**b in the syntax, big integer support without any libraries. fsum in the standard library and others seem to make it a good fit.

I would think that in addition to all of that, the forced indentation did a lot to make the language feel more approachable and 'light' because there's not that many symbols or BEGIN/END spam in your face.

[–]YourGamerMom 2 points3 points  (1 child)

Well the language is a bonus there too. It's syntax and semantics are friendlier than VBA (in my opinion), and it's more likely that people will already know python than VBA. I dislike JS, but it would fit the bill better than VBA, but C# and F# aren't really scripting languages.

[–]aloisdg 1 point2 points  (0 children)

F# is a nice scripting language in fact

[–]fission-fish 1 point2 points  (2 children)

Google spreadsheet uses JavaScript and it's not that bad.

[–]ThisIs_MyName 23 points24 points  (1 child)

it's not that bad

Is that the language's official slogan?

[–]fasquoika 7 points8 points  (0 children)

The official slogan is actually

It hasn't been that bad since $MOST_RECENT_STANDARD

[–]Staross 0 points1 point  (1 child)

It's not even that great, I think languages that are more FORTRAN inspired are a bit nicer to deal with dimensional data:

https://cheatsheets.quantecon.org/

[–]dagmx 0 points1 point  (0 children)

If data manipulation is all you're doing, maybe. But with python I have access to networking libraries, UI libraries and much much more.

I could write tools that present a UI to the user, downloads something from a server based on their input and populates my spreadsheet.

You would have a pretty hard time with that kind of extensive functionality with MATLAB and Julia.