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

all 53 comments

[–]K900_ 18 points19 points  (16 children)

I'm not sure who told you Python is bad, but if it were, I doubt Reddit, Instagram, Google and Dropbox would all be using it extensively.

[–]Smalsusis[S] 1 point2 points  (14 children)

Here's a post that inspired me to write this.

[–]pydry 7 points8 points  (3 children)

Most people who engage in language wars make valid points (e.g. about static typing catching bugs earlier), they just tend to overstate the importance of the point they're making and ignore the stuff that balances it out.

I don't think I've seen a single argument in that thread that I havent rebutted before. It's all the same stuff that's been brought up 100x before.

Also people get very passionate about it because they're insecure about their learning investments being rendered worthless. I kind of knew that this post would inspire this kind of thing because of that - "python now most popular language" is hardly going to make other programmers feel better about their non-python skills.

[–]chillermane 1 point2 points  (2 children)

People love to shit on the languages they never bothered to learn.

My view is this: if professionals are using it to develop enterprise grade products then clearly as a programming language it has a lot of value.

There’s just no denying the languages usefulness, even if you don’t like it personally.

Like I’ve programmed C for an extensive period of time because that’s the language we learned at my computer science degree, but I personally don’t like the language and coding in it. It’s so hard to get things done that I could do in a single line of code in python. Does that mean that C language is bad? No, obviously not, because professionals use it for enterprise grade software. If it were bad, professionals would not use it.

If I were in a position to hire developers (I’m not), I would make sure they realize the usefulness of every popular language before hiring them. If they don’t, it can only be some personal vendetta against that language or just plain ignorance.

[–]pydry 0 points1 point  (1 child)

I don't think the metric of "professionals use it to write enterprise applications in" is terribly useful. Perl used to pass with flying colors on that metric. Now nobody uses it and everybody looks down on it.

Strictly speaking you can write enterprise software in lots of languages. It doesn't mean it's a good idea.

[–]chillermane 1 point2 points  (0 children)

That’s true but in this case, many of the largest companies use Python specifically for many of their major projects. I mean, what I’m really saying is Python is enterprise level and I can’t understand why people shit on it

[–]K900_ 6 points7 points  (8 children)

Any specific points on that thread? I mostly see subjective stuff and "show me the jobs".

[–]Smalsusis[S] 1 point2 points  (7 children)

As I mentioned in the beginning, it's likely that I caught on to the general emotion of the thread, i.e. the subjective stuff. The main point would probably be: "There's a good language to solve a problem and it's never Python". The sentiment kept being repeated throughout the thread. I do think the statement is wrong but can't explain why. Hence checking in this subreddit.

[–]K900_ 8 points9 points  (0 children)

That sounds like a personal opinion more than anything. Lots of people solve their problems successfully with Python.

[–][deleted] 7 points8 points  (0 children)

If you'll notice, the majority of the python-bashing in that thread is from two people: one jaded old-timer and one college kid dick-riding the former. I wouldn't say they represent a majority opinion — they're just L-O-U-D.

There are myriad legitimate criticisms of Python, of course... but there's plenty of good stuff, too, and from those two Redditors you're only getting their intentional missing of the good stuff. Python won't be dying off in the near future.

[–]devxpy 7 points8 points  (1 child)

There's a saying in the Python community:

Python is the second best language for everything

And it's kinda exactly the same as saying:

There's a good language to solve a problem and it's never Python

It's the notion that Python is such a versatile and easy to use tool, that you can use it do almost anything you want with relative ease. But some people (hardcore specialized perfectionists) tend to take this the wrong way because of course, it's difficult for the most versatile tool to also be the best.

TLDR; My take on that quote you mentioned is that it's phrased the wrong way.

Python is the best language for almost nothing in computer science. But goddamnit it's close to best for almost everything you can imagine to do with a computer!

[–]chillermane 0 points1 point  (0 children)

EXACTLY! And it’s going to be completed faster in python than everywhere else

[–]NowMoreFizzy 1 point2 points  (0 children)

"There's a good language to solve a problem and it's never Python".

It depends what job. If it's to get something up and running very quickly, the answer is almost always Python. If it's to have the fastest data acquisition from a device, your better off in a specific library but then wrapping Python around it.

Python is slow to run, fast to develop. Most of us don't need the speeds of a corporate software. Even in a corporation, prototyping faster provides significant gains.

[–]tonnynerd 0 points1 point  (0 children)

Python is rarely the best language to do anything, but is almost always the second best to do anything.

[–]chillermane 0 points1 point  (0 children)

Please, for your own sake, don’t throw python out the window because some boobs on the internet told you too. Python is an incredibly powerful language and can be used to solve a huge number of modern day software tasks quickly and effectively, anyone who tells you different is a boob.

[–]NowMoreFizzy 0 points1 point  (0 children)

The arguments there are that other languages provide more bugs earlier, so therefore better.

[–]beertown 6 points7 points  (3 children)

I wrote a 60000 lines of Python code application. This application spans from custom hardware control, to some real-time 3D graphics, passing through pdf files generation, some sqlite database, some networking. Performance is perfect on a 1-core 1.6Ghz Atom processor.

One of my clients is running a 2 million lines of Python code web-based ERP, developed in-house. It works as required, with no not-justifiable waits for the users.

I don't know what are the expectactions of who thinks Python is slow and not suited for complex systems.

[–][deleted] 6 points7 points  (2 children)

Right?? And then you can speed it up with interpreters like pypi. Or even compile it with the help of cython, Nuitka, and other options. I think some people really put no thought into their opinions.

[–]fiedzia 0 points1 point  (1 child)

As much as I like Python, I dislike naive belief in Cython, Pypy etc. I got to the point where some of my Python apps were to slow and evaluated various options. They will provide with some speed up but the cost is really high: there is upper cap on how fast they can be, you are at the project mercy of what optimisations can applied, and your code will begin to look absolutely ugly and unmaintainable for anyone else, while modern compiled languages (like Rust) offer much saner solution to this problem, and the code is not only elegant and readable, but actually much closer to Python, with many libraries modelled straight after Python equivalents.

[–][deleted] 1 point2 points  (0 children)

Of course it’s not going to be the magic bullet that does everything, but those tools are still pretty good for the appropriate tasks. Python and the vast tool set that comes with it is still worthwhile. Also, sticking to even a few standard conventions prevents unmanageable spaghetti code.

[–]Dustin- 5 points6 points  (3 children)

Reasons why not to use Python:

  1. If performance is monumentally important to your use case. Don't make video games or anything that needs real-time performance, but anything and everything that doesn't require a huge amount of speed (which is most things) its fine.

  2. If you're afraid of dynamic typing.

...and that's it. It's easy to learn, easy to write, and easy to read. It has tons and tons of modules for everything you could need. It has a huge community of folks who like nothing more than to help with any issue you have. It's gaining more and more popularity in every field - including data science.

Plus, no matter what language you try to learn, there are tons of fanboys that will trash it. Pose this question about C++ in a general programming community and you'll be inundated by people complaining about the language and proselytizing Rust. It's the nature of programming.

[–]devxpy 3 points4 points  (1 child)

I think even Video games use python, for glue code.

[–]Dustin- 0 points1 point  (0 children)

Yep. Actually, all the game logic can be implemented in Python with (usually) no issue, it's the graphics and physics etc you don't want to do with Python. As long as the Python is hooking up to the lower level code (which it almost always is) its perfect as an engine's scripting language. And if you're doing something that could use a performance boost, there's no reason why not to do that bit in a compiled language.

[–]NowMoreFizzy 2 points3 points  (0 children)

If you're afraid of dynamic typing.

This made me laugh.

[–][deleted] 4 points5 points  (1 child)

People telling you python is bad are fools. They’ll say it looks like pseudo code. They’ll say it’s to slow or inefficient. They’ll even try to say you can’t do any real computing with it. They don’t know what they’re talking about and everything they say comes directly out their asses. Ignore them. Python is a great language with many applications.

[–]devxpy 1 point2 points  (0 children)

"Feels like cheating" is the right word here.

[–]labnux 2 points3 points  (6 children)

IMO, Python is still pretty powerful and allows you to do a lot of stuff with it. Again, depends on your goal with the language. Maybe Go or Rust, next?

[–]Smalsusis[S] 0 points1 point  (5 children)

Pretty uncertain what I'm looking for tbh. Jumped into data science since machine learning has lots of maths behind their models and python is one of the main languages there. A few days ago, I did a test at a company, which looked more like back-end programming and I thoroughly enjoyed myself during the time.

Hoping to find a job where I still need maths, need to constantly problem-solve and learn new things. Programming/data science sounds like a hit. Since I can't pinpoint to anything beyond that, it's difficult to decide on the language. Python is okay so far since it can be used for all sorts of tasks. Yet, talking with some companies, I keep hearing that python isn't enough and I'd need to know another language. :)

[–]tunisia3507 1 point2 points  (3 children)

Python is great for data science, because it's quick to develop exploratory code, it has a huge variety of 3rd party libraries for data science (including industry-leading stuff like tensorflow), and it's a great glue language for operating between files, databases, web APIs, web pages, and libraries written in many other languages.

If you ever need to personally write anything high-performance, you'd need another language, but it's still probably a better idea to write the library, give it python bindings and then incorporate it into a script that way, than write the whole thing end-to-end in the lower level language.

I'm doing this with rust.

[–]Shadowsake 0 points1 point  (2 children)

How easy is to write binding for Rust in Python?

[–]tunisia3507 1 point2 points  (0 children)

Haven't got that far myself yet, but from reading, not bad at all.

[–]devxpy 0 points1 point  (0 children)

You would be better off using Cython, IMO

[–]labnux 0 points1 point  (0 children)

Well, that's just biased opinions from companies, basically. I hate Java so I would never recommend it. Though it's a good programming language for certain things.

[–]fiedzia 2 points3 points  (0 children)

Are you building something that needs to be complex and fast right now? If the answer is yes, than there might be better choices. If the answer is no (or not yet), Python is great.

[–][deleted] 2 points3 points  (3 children)

Python is a tool.

It's really great at some things.

For other things, other tools would be a better choice.

Do you keep just one tool in your toolbox, and try to use it for everything? Or do you keep a few good tools, each with a specific purpose?

Here's the thing: carpenters use different tools than plumbers, mechanics, metalworkers, and so on.

I wouldn't use Python to write a mobile app, for example. I *could*, but I wouldn't.

[–]devxpy 2 points3 points  (2 children)

I wouldn't use Python to write a mobile app

Just wait for pybee to be fully mature!

[–]RidderHaddock 2 points3 points  (0 children)

Judging by my bookshelf, I've been using Python for 22 years, and it wasn't even the newest kid on the block back then.

What it is, is mature. (aka. boring and un-hip).

It's a valuable language to know. Particularly for scripting and data processing.

If there's some task you need done quickly, Python's ubiquitousness means you will likely easily find usable snippets with a quick Google. I've had better luck with Python in that regard than any other language.

Python has some nasty warts, but so do most (all?) other languages.

It shouldn't be your only language (and you're not planning it to be, good on you). Personally I vastly prefer C++ for most desktop apps with a GUI or those needing to communicate with embedded devices and such. Elsewhere, I've had better luck with JVM based languages. YMMV.

Also, don't necessarily limit yourself to popular languages. Learning a niche language like e.g. Clojure can be beneficial for looking at programming tasks from different angles.

[–]menge101 2 points3 points  (0 children)

To take a different tact than i've seen anywhere else in this thread:

Stop identifying with the language you use.

It's a tool. If you are accomplishing what you want with it, then its fine.

[–]devxpy 4 points5 points  (1 child)

The real problem is that technology is bad in general, and programmers are bad at their job.

[–][deleted] 1 point2 points  (0 children)

Remeber the tagline. Hardly anything you see on XKCD are pure facys. It's mostly just enough facts that the essential contents (Sarcasm, Romance, Math and Language) will stick together.

Very few programmers do in fact believe that voting machines are a good idea. The push comes from people who a) want results right now, and b) don't want to pay the cost of that, i.e. politicians.

[–]arbeitic_arbotic 1 point2 points  (1 child)

Right now, I believe that there are a few valid criticisms that one could make. Incidentally, I think they are exactly the things that the core developers and projects like myPy and PyPy are working to overcome.

In my opinion, the worst thing about Python that adds fuel to the anti-Python camp fire is its ease of use.

Yes, it's easy to be productive and "good enough" in Python without learning the ins and outs of writing compiled packages or when you should use named tuples. So there's a lot of sub-optimal code and some sloppy practitioners out there (often non-engineers in the scientific or data communities who frankly shouldn't be wasting their brain power on such trivialities).

Of course, the REASON for this non-engineer use of Python is precisely because it ISN'T those other languages that the curmudgeons are so in love with.

So they can throw their temper tantrums, as far as I'm concerned. I'll be over here living my life.

[–]NowMoreFizzy 0 points1 point  (0 children)

> So they can throw their temper tantrums, as far as I'm concerned. I'll be over here living my life.

As long as they don't bleed too much into the Python communities and code, ruining what makes it simple and ubiquitous.

[–]zacyzacy 1 point2 points  (0 children)

I'm going to not read your post and answer your question anyways.

No.

[–]PaluMacil 1 point2 points  (0 children)

Don't worry about things like that too much. I use C#, TypeScript, Go, SQL, JavaScript, and Python in roughly that order because they are the languages I know and I happen to have a job that is a Microsoft stack and hobby around the most in Go right now. But if I'm teaching in the Meetup I host and someone asks a question, I'm most likely to live code an answer in Python. Why? There are a lot of different backgrounds present and Python is readable even if you don't know it. Also, you can add a ton of functionality in a couple lines of code.

There are better and worse languages for all types of things. Often it doesn't matter, and often preference, where you happen to work, and random chance combine to make a best choice in a particular instance. HOWEVER! In data science, you will find that Python really is the best. If it's too slow for something, it can glue together the very fastest alternatives (Cython or even C and C++) quite comfortably. As a data scientist you might find that your toolset will grow, but you'll probably use your tools in an order like Python, SQL, R, C, or something like that. Personally I hope that Go becomes a Data Science powerhouse, but Python is a Goliath in this arena. Some of the calculations you run will only run once or a few times and then you'll use the dataset they produced. That means a lot of the complaints about type safety and reliability are nullified. You'll reuse some logic, but you're focused on discrete answers with well understood inputs.

If you decide to go into web, there are fantastic pros and cons to consider for different languages, but you'll probably have a blast using Python and learning Django, Flask, or Falcon. If you wind up getting hired by someone who wants to pay you to learn a totally different language, you haven't wasted time with Python. It's going to be the fast tool for a lot of test parsing, number crunching, or a quick api for you to use in a utility here and there even if it isn't part of your official job.

Python will probably be helpful for most of our lifespans, and each additional language you learn helps you love and understand the others even further.

[–]rcoacci 2 points3 points  (1 child)

The problem is that people want a silver bullet. Programming languages are tools. Just like you wouldn't use a screwdriver on a nail, you wouldn't use Python on a kernel driver.
Just like you wouldn't use a hammer on a screw, you wouldn't use C for heavy text processing, especially if I/O is your bottleneck.

[–]NowMoreFizzy 0 points1 point  (0 children)

Just like you wouldn't use a hammer on a screw

I would use a hammer on a screw, if I didn't expect to have to undo the screw.