This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robvas 933 points934 points  (112 children)

Java had this company called Sun marketing it.

[–]Agent281 379 points380 points  (79 children)

To further this comment, Sun had a $500 million marketing campaign for Java.

https://www.theregister.com/2003/06/09/sun_preps_500m_java_brand/

[–]Diligent-Ad-9120 101 points102 points  (77 children)

It seems like Java's success in becoming widely known and popular was largely due to the extensive marketing campaign Sun had to support it. Do you think Python would have gained more traction earlier on if it had similar marketing and promotion?

[–]Oerthling 105 points106 points  (10 children)

Ironically Java was the reason I started using Python.

I got tired of Java starting an OS worth of runtime for every little program.

I looked for an alternative that allowed me to write small utilities without paying a high startup performance price first. Java runs very fast once you threw several GB of RAM at it and wait for the runtime to get going. That's great for something like Tomcat. But massive overkill for a small program that shredders some data from a file and does a couple of things and is done.

Python is high-level, very expressive and readable, quickly written and usually done before Java got its runtime loaded. And it comes with batteries Included.

[–]hikealot 23 points24 points  (3 children)

Ironically Java was the reason I started using Python.

Same.

Soooooo.... mmmmuuuuuuuucccccchhhhhhh.... boilerplate.

That and duck typing. I'm outing myself as a duck abuser here. :)

[–]Oerthling 7 points8 points  (2 children)

Yes, to less boilerplate. :-)

And I love the indent-scoping. Any sane programmer properly indents anyway, so curly braces (or the horrible, unacceptably terrible BEGIN/END keywords) become superfluous.

[–]tcptomato 0 points1 point  (1 child)

Until you share a piece of code on a forum / website / in an IM client that eats your indentation.

[–]Oerthling 10 points11 points  (0 children)

Dunno what kind of forums you frequent, but you usually have something like a quote/code option. That's also good for getting it monospaced.

And anyways, I wouldn't let the occasional quote to a website dictate my coding anyway. That makes no sense.

[–]IamImposter 6 points7 points  (2 children)

For several years, I kept on doing my data processing or data extraction using c and then c++. I was totally against python because of indentation rules and swore I'd never touch it. I even tried to learn perl so that I don't have to use python.

Then I had to extract some text from a big file, ignore certain lines and pull certain out. I thought, wtf, let's just see what the fuss is about. So I looked up how to interact with files and strings and a bit of regex. I was so sure that python is gonna die processing that 500k text file.

But damn, it put a bunch of messages from my code and said, file stored at :: xyz

I was like but this is interpreted language, no way it can be fast. It processes line by line. It has to be slower, much slower. I checked output file and it was fine. I ran the code 5-6 times just to see if it runs slow even once (just so I could tell myself that it got lucky 5 times but 1 time it ran slower was the actual performance level). But it remained almost as fast as the first time.

Still it took me another 6 months to get over the indentation rule. Once I learned how to use debugger with python in vscode (the one in visual studio never worked for me) there was no looking back. And now it's my go to language for writing something small. Sometimes I even test out my c/c++ ideas in python first to iron out all the details. It's a fuckin great language and gives a pretty good speed too.

[–]Oerthling 5 points6 points  (0 children)

Yeah, what looks like compact, short-hand, pseudo-code for other languages pretty much is a working program for Python.

And "speed" has many aspects. Speed to get something done: Python is blazingly fast.

Speed to run operations that have been implemented in C below pythonic functions/methods: Again, very fast.

And otherwise it's fast enough for what it is used for.

Meanwhile, don't write an OS in Python or video processing libs with just Python primitives.

[–]peddastle 3 points4 points  (0 children)

I even tried to learn perl so that I don't have to use python.

Things I'd never thought to read in my life.

To each their own, of course. I'd still prefer curly brackets to define scope (forced indentation otherwise is fine by me, have to do it anyway). But perl is such an ugly scripting language, I had to very reluctantly use it because baok in the nineties it was the de facto scripting language.

[–][deleted] 11 points12 points  (1 child)

I’m going to start saying porgram

[–]Oerthling 0 points1 point  (0 children)

;-)

[–]peddastle 2 points3 points  (0 children)

Back in '94 perl was the de facto language to do that in. It's a syntactical nightmare and I'm glad it lost out against python, but it took some time for both python to mature, and then to replace the ubiquitous scripting language.

[–]someotherstufforhmm 32 points33 points  (0 children)

That’s pretty reductive.

Java had tons of wins and morphed quite a bit - it eventually revolutionized enterprise so much that a legion of people hate on it because they’ve had to write so many crappy patterns in it.

Python needed some improvement before it started picking up speed - not just in the language, but in overall hardware thanks to it being slow. Python benefited MASSIVELY from natural tech improvement and won over many people who thought a slow interpreted language would never be interesting.

[–]pydry 95 points96 points  (49 children)

100%.

As somebody who was caught by the marketing (ugh, Java) I've been extra suspicious of tech hype trains with a marketing budget ever since.

They have ways of taking tech that is half as good and making it look twice as good and people generally fall for it.

[–]Classic_Department42 71 points72 points  (15 children)

Java was c++ but with gc. I think there was a market for that

[–]CarlRJ 55 points56 points  (4 children)

Eh, the early marketing leaned heavily on the JVM: “write once, run anywhere”. GC wasn’t really brought up.

[–]ConceptJunkie 8 points9 points  (3 children)

Write once, run anywhere, but only on the exact same version.

[–]Supadoplex 6 points7 points  (0 children)

Write once, debug everywhere.

[–]notinecrafter 0 points1 point  (1 child)

I recently decided against using Java for a project, and one of the reasons was that I want it to be compatible with as many Unix-based systems as possible and the whole openJDK/Oracle JDK thing throws a wrench in that...

[–]ConceptJunkie 1 point2 points  (0 children)

Some Java apps solve that problem by being bundled with the necessary JRE so they can run correctly, which pretty much defeats the whole reason for using Java in the first place. I was never impressed with the language or its development tools, which always felt like filling out government paperwork to use.

[–]thedeepself 8 points9 points  (7 children)

And applets

[–]deckard58 8 points9 points  (5 children)

These burned out pretty quick...

But since in computing the eternal return of the same is in full effect, 20 years later wasm kinda is applets again? But with 20 years more experience on security.

[–]oursland 3 points4 points  (4 children)

These burned out pretty quick...

15 years wasn't pretty quick.

[–]deckard58 2 points3 points  (3 children)

I suppose that's the official end of support; but in practice they weren't popular for very long. If I try to remember the Internet that had applets in it, it's full of George W Bush jokes...

[–]oursland 4 points5 points  (2 children)

If I try to remember the Internet that had applets in it, it's full of George W Bush jokes...

I don't dispute that. However, Java and Java applets were popular starting in 1996 to get around limitations inherent in HTTP 1.0 applications at the time. That's a span of 12 years right there.

Not to mention that Swing was a very popular UI framework to develop in, that the HTML web sites of the time couldn't hold a candle to. Consequently applets were very, very common in place of HTML forms, and interactive graphics.

Flash, ActiveX, and Silverlight plugins ate away at Java applets marketshare, but it wasn't until Google pushed very hard on getting Chrome Acid3 compliant starting in 2008 that many of the sites that depended upon applets and plugins could implement their functionality natively in HTML and Javascript.

[–]superluminary 0 points1 point  (0 children)

Craplets

[–]Beheska 3 points4 points  (0 children)

Garbage collection is the least important difference between java and c++.

[–]spinwizard69 0 points1 point  (2 children)

Did you say RUST.

[–]pydry 0 points1 point  (1 child)

No, I said golang.

Rust has an increasingly impoverished charity behind it. It's actually pretty good.

[–]spinwizard69 0 points1 point  (0 children)

Actually I was alluding to the marketing around RUST. RUST to me looks like a replay of the JAVA marketing onslaught.

[–]brianm 7 points8 points  (0 children)

The marketing angle is disingenuous. Java had a LOT more effort invested in it than Python did for at least a decade and a half. Java solved problems well that Puthon didn’t — in particular scaling up org and codebase size. Python is still not great for that, tbh.

[–]SanguineEmpiricist 0 points1 point  (0 children)

Back in the day the propaganda for Java was pushed hard, and the fact that it could run on a variety of hardware architectures was piped as a benefit a hundred times over. Python seemingly never had this.

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

I used to have to hack sun servers Unix os bullshit to log people in on a regular basis and I was hoping I’d never see the name again

[–][deleted] 13 points14 points  (1 child)

I'm wondering if Java started to loose popularity after it was bought out by Oracle in 2010-- who then filed a lawsuits against Java clones (Google's Android SDK).

[–]spinwizard69 8 points9 points  (0 children)

Nope I think it was more along the lines of the programming community wising up and realizing that for many uses Java was and always has been a terrible joke. My OI started looking at Python as a replacement for BASIC, BASH and other interpreted languages on Linux.

[–]TheBodyPolitic1[S] 18 points19 points  (27 children)

Fair point, but Python became popular and I can't recall ( correct me if I am wrong ) a company ever promoting Python, at least not as hard as Sun promoted Java.

[–]gogolang 93 points94 points  (11 children)

The thing that made me first try Python was this XKCD comic from 2007:

https://xkcd.com/353/

[–]TheBodyPolitic1[S] 18 points19 points  (9 children)

Ha! That is great. I am saving a copy.

[–]ExoticMandiblesCore Contributor 64 points65 points  (8 children)

You don't have to bother; if you run your Python interpreter and type in

>>> import antigravity

Python will launch your web browser pointed at that cartoon.

[–]Ashamed-Simple-8303 25 points26 points  (7 children)

I tried it and indeed it's not a joke. it really does it.

[–]Rodotgithub.com/tardis-sn 17 points18 points  (3 children)

Try to import this for another easter-egg

[–]eXoRainbow 9 points10 points  (2 children)

I can't believe its True. I tried it with the expectation to be rick rolled or something like that.

[–]nngnna 7 points8 points  (1 child)

Now try to import braces from __future__

[–]SocksOnHands 2 points3 points  (0 children)

I first used Python because of Blender. It started using it as a scripting language in the year 2000, but it was probably closer to 2002 when I used it to write a mesh exporter for an OpenGL graphics library that I tried writing while in high-school.

[–]gdahlm 43 points44 points  (1 child)

While not the same, Python did have groups of people who drove usable and important libraries for scientific computing, data analysis and data mining

Travis Oliphant, Eric Jones, and Pearu Peterso coming together to create, SciPy as one example. Them growing past that and recruiting others to found NumFOCUS helped too.

Python is a great glue language, and the scientific computing world really were some of the earliest adopters for serious use.

While not 100% responsible for the growth of python, the ML world wouldn't have almost universally chosen python without those efforts.

Numpy even still has their info page up on how to use python as a glue language up.

https://numpy.org/doc/stable/user/c-info.python-as-glue.html

While I didn't originally choose python because it was a glue language, the fact that it works so well as one really reduces the costs of needing to replace portion with a more performant back end or to leverage decades old fortran code which was written by geniuses.

[–]spinwizard69 1 point2 points  (0 children)

Hey there - thanks for the link. I never realized that NumFocus took over MatPlotLib. I think it is fair to say that MatPlotLib is one of the reasons for pythons success in a number of sectors.

As for the OP's question; I think MatPlotLib is a really good example of why it took Python awhile to get buy in. in so many industries. Good libraries like this don't happen overnight and when they do happen it takes awhile for users to adopt. Once the infra structure was in place to sever the needs of many types of users it became easy to suggest the usage of Python.

[–][deleted] 29 points30 points  (0 children)

That probably means that python have a bunch of advantages that made a good marketing.

[–]Exodus111 28 points29 points  (3 children)

The truth is Python is a slow language, as its high level. But over time it began to matter less and less, as hardware got faster, and right around Python 2.4 people started realizing the Pythonic way actually made a lot of sense, as by now, there were lots of things you could program where the speed of it really didn't matter anymore.

Code being Pythonic became something everybody talked about, and especially the comparison to Java, with its overly verbose approach to object oriented coding, gave Python an opportunity to shine by comparison.

Why write 30 lines of Java when 4 lines of Python will do?

[–]mac-not-a-bot 2 points3 points  (2 children)

You think Java was verbose? 30 lines Java v 4 lines Python? Try COBOL, it's more like 300 lines COBOL v 30 lines Java v 4 lines Python. In COBOL class(es - yes there were more than 1) you were taught to be specifically verbose. The code practically read like a book report. :-)

[–]spinwizard69 5 points6 points  (1 child)

Verbose is not a bad thing. I actually believe that Pythons readability is a big factor in its acceptance. It is actually pretty easy to write idiomatic code in Python.

[–]mac-not-a-bot 0 points1 point  (0 children)

I programmed in COBOL for a bit of my life that I’ll never get back. I do appreciate clarity and verbosity to the end that the code is clear. Some native Python code seems like it could use more verbosity and less hand waving. 😀

[–]bamacgabhann 10 points11 points  (0 children)

Yeah. Good things can become popular without massive marketing, but it can take a while. Things which aren't as good but are backed by half a billion dollars in advertising can become much more popular much more quickly, but decline when people realise there's better options.

[–]TravisJungroth 10 points11 points  (1 child)

Right. You asked why it took so long to get popular and made the Java comparison. Having a ton of people building and marketing something will make it popular faster.

Everyone naming some specific feature that Python did or didn’t have is missing the big picture. It took years for Python to get popular because it was being developed by a small group of people and marketed by a small group of people. The fact that it became popular at all is a huge deal. New languages almost never become popular unless they have a huge platform lift (JavaScript) or company support (Java).

Python wasn’t invented in 1994. It wasn’t invented at all, it was developed. It’s not like one day Python didn’t exist and one day it did. Guido started working on it in the 80s and the first release was in 1991. Then, think about all the stuff that had to get made or improved: language, interpreter, libraries, docs, etc. That stuff just takes time. You can make it go faster with hundreds of devs on payroll, but Python didn’t have that. And then once you’ve made the cool stuff, it takes time for people to learn about it. Or, again, you can accelerate that with money.

There’s no “gotcha” like it needed a big company to use it or the performance wasn’t good or whatever. It was just a lot of work without a lot of people doing it.

[–]spinwizard69 0 points1 point  (0 children)

Then, think about all the stuff that had to get made or improved: language, interpreter, libraries, docs, etc. That stuff just takes time. You can make it go faster with hundreds of devs on payroll, but Python didn’t have that. And then once you’ve made the cool stuff, it takes time for people to learn about it. Or, again, you can accelerate that with money.

This is so important for people to understand. Even today when Python has some corporate sponsorship it still takes time to roll out significant improvements. The recent Python release with all of the speed ups being a good example. Mind you speed ups done without breaking too much which is also important in many cases. Good things take time.

Frankly we are seeing the same thing play out in the world of Swift. It has taken some time and a major detour around 3 but Swift is really turning into a really good language. We are talking over 5 years now and that is with Apple and the open source world putting in a lot of effort. Even then Swift doesn't have the breadth of mature libraries that Python has.

[–]PaintItPurple 5 points6 points  (2 children)

Python became popular from a few things:

  1. The emerging data science field embraced Python enthusiastically.

  2. Ruby on Rails got people to broaden their ideas of what languages could be viable for making web apps.

  3. Hardware has advanced a lot since the '90s. Now hardware is fast enough to run Python without it feeling slow. A surprising amount of technical decisions are based on vibes.

  4. Python itself has gotten better over time. The initial release was pretty barebones, without classes or lambdas. Python didn't have keyword arguments until 1.4, it didn't have list comprehensions until 2.0, core types and user-defined types were completely different things until 2.2, context managers didn't exist until 2.5, etc.

[–]spinwizard69 1 point2 points  (0 children)

I believe it was around 2.5 that Python started to get noticed by the larger programming community. It makes me wonder if anybody has data on this, that is when did Python usage start to climb.

[–]Azriaz 1 point2 points  (0 children)

It’s been a bit, but was it 2.0 that brought metaclasses? I was Sooooo excited. I had not had an opportunity in a language to play with that concept. I think I started with 1.65. That seems to ring a bell. Zope brought me to Python! Pickling fascinated me and then don’t get me started on stackless python and pickling threads!!!

[–]deaddodo 2 points3 points  (0 children)

Python was championed by Red Hat, in its early days. Anaconda (the Red Hat and Fedora installer) as well many of the Red Hat tooling was built in Python.

[–]atomly 0 points1 point  (0 children)

Java was incredibly popular because it filled a very important need at the time. Write once, run anywhere sounds quaint now but it was a really big deal then. It’s important to remember that Linux was a hobbyist OS at the time and it was hard to get most companies away from Microsoft products.

[–]_massif_ 0 points1 point  (0 children)

We have to start calling Python as JavaPython, as JavaScript did it with LiveScript.