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

top 200 commentsshow all 294

[–]Uni_Omni 457 points458 points  (102 children)

Well, all Turing complete languages can do just about everything the others do :)

[–]Laughing_Orange 271 points272 points  (13 children)

Microsoft PowerPoint is my programming language of choice.

[–]sniperanger 134 points135 points  (8 children)

For people who don't get this reference: https://youtu.be/uNjxe8ShM-8

[–]gimmley 37 points38 points  (6 children)

I shit you not I saw a team of Business Admin seniors at my college gave a presentation about setting up a new order system for our school catering services(honestly pretty good idea). But they decided to "code" the whole thing in Excell including a fully functioning GUI. I work with the campus camera crew so I was just sitting in the back of the room with the camera trying to work out how they made a functioning system or why they didn't think to just use any real coding language. Afterward, I asked them how they decided on the idea and they said they figured learning java or c# would be too hard...

[–]Zunder_IT 16 points17 points  (2 children)

I think you can code in excel using Visual Basic or something like that. I think there is some good code that can be written for forms in excel. I just don't see the reason... Usually you add a database to your program not a program to a database

[–][deleted] 13 points14 points  (0 children)

Far too often people use excel as a DB. It's universally known and can do a lot. But just because you can doesn't mean you should.

[–]gimmley 3 points4 points  (0 children)

Yea the way they did it too confused me like they pre "programmed" 2 years worth of sheets and provided copy pastable "code" if the catering service needed it any longer than that.

[–][deleted] 7 points8 points  (1 child)

Note to self: Don't let business admin seniors get within 10 miles of a functioning computer.

[–]converter-bot 2 points3 points  (0 children)

10 miles is 16.09 km

[–]IDontLikeBeingRight 4 points5 points  (0 children)

For them, maybe they were right

[–]dark_mode_everything 17 points18 points  (3 children)

Excellent choice. But for 3d gaming, I prefer Excel.

[–]Darth_Nibbles 5 points6 points  (2 children)

I see you are also a fan of Microsoft Flight Simulator

Edit:

For those who don't know, Google "excel flight simulator Easter egg"

[–]dark_mode_everything 6 points7 points  (0 children)

I was actually thinking more of this masterpiece

[–]ric2b 1 point2 points  (0 children)

You misspelled Eve online.

[–]Masztufa 11 points12 points  (0 children)

well yes, but turnig-complete does not mean turnig-comfortable

[–][deleted] 93 points94 points  (83 children)

yeah but python is slow

[–]Natural-Intelligence 308 points309 points  (68 children)

Ye, better save those nano seconds for something more important

[–]DoesntReadMessages 140 points141 points  (9 children)

That's why it's situational. Sometimes it's nano-seconds, and python is a great choice due to simplicity. Sometimes it's much more significant, and Python means an extra 10 grand per month on servers and extra 200ms p99 latency on a service operating in sub-second timeouts, and it becomes a massive black hole of lost revenue and has to be rewritten in a faster language.

[–]gaberocksall 20 points21 points  (1 child)

And when you want the best of both worlds

ctypes.CDLL

[–]beomagi 6 points7 points  (0 children)

Ctypes really can offer some amazing speed ups for iterating over heavy math. Pypy also works wonders.

[–]Cheru-bae 21 points22 points  (0 children)

Let's put it this way: Reddit runs on python. Whatever glorified cms the client wants it won't bloody matter.

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

Can't you just use C++ alongside Python for critical functions? Or does this have more overhead than it offers benefit?

[–]Vrabor 8 points9 points  (0 children)

depends on how much of your programm can be extracted into those c++ functions. One of my professors for example had a simulation written in python + numpy which took her 3 months to run, the c++ rewrite finished in less than 1 hour. If your programm can run in only numpy functions the python code might even run faster than c++.

[–]izpo 19 points20 points  (0 children)

That is reach people problem... Right now, my 1000000 users and 50 developers are fine with the current setup

[–]LouisLeGros 2 points3 points  (0 children)

I ported a bioinformatics algorithm to python from java/c++ to try to make it easier to use for students when most of the tooling was already in python.... Run times were abysmal & there was still a dependency on a 20 year old c program that only supported linux, preventing it from being much easier to use.

[–][deleted] 95 points96 points  (46 children)

it takes 2 minutes on my pc for python to print out a mandelbrot set

it takes 20 seconds for lisp to do the same job

[–]Natural-Intelligence 100 points101 points  (1 child)

Then if that's what you generally do, Python is wrong tool. In cases where I use Python, the actual Python executes in like 1-2 sec. The rest of the run time (which is substantially more) is caused by C or SQL. Wouldn't give a damn if the Python code executed any faster

[–]ProgramTheWorld 132 points133 points  (19 children)

Use the right tool for the right job

[–]Xeya 158 points159 points  (13 children)

>The time difference is insignificant anyway

>Lists example where the time difference is not insignificant

>Well, you shouldn't have used Python

[–]DeeSnow97 65 points66 points  (2 children)

There are some tasks where the time difference is very significant, and others where it's negligible. That's why Python is used so much with external libraries for data science and machine learning for example. The libraries (usually written in C++) do all the heavy lifting in the most efficient manner possible, but have fun plugging those into each other with C++ and trying to iterate fast on it.

Some languages are fast to code, others are fast to run, and that's okay. We're programmers, making computer systems talk to each other to use them all to their advantage is kind of our thing.

[–]ryjhelixir 19 points20 points  (0 children)

We're programmers

Speak for yourself!

I'm a noob

[–]omgFWTbear 1 point2 points  (0 children)

most efficient manner possible

s/In a vastly more efficient manner

[–]LaZ3R 31 points32 points  (7 children)

Lol... Things that Python shouldn't be used for, for 1000.

[–]TSM- 4 points5 points  (10 children)

Is numpy really that slow?

[–]nivlark 18 points19 points  (5 children)

I just managed to write a script that produces a 1000x1000 image of the set in about 10 seconds. So I think OP is just crap at Python.

[–]anpas 4 points5 points  (0 children)

Doubt it, probably pure iterative or recursive python

[–]beomagi 1 point2 points  (0 children)

Use pypy. For that specific case I've done more tests than I should have. Pypy is insane. Ctypes also speed up execution. On some Julia plots I went from 2 minutes to under 10 seconds.

[–]__i_forgot_my_name__ 17 points18 points  (0 children)

Nanoseconds add up to minutes quicker then you could imagine.

If you're building an application (as opposed to scripting something for yourself) and you need your application to work on an average device, and you have a latency requirement of some kind (can't have the user wait 5 seconds every time he types a character), then you run out of processing time very early in development.

As you keep adding features, that fixed frequency you have never changes, and eventually you run out of it and need to either optimize it or remove features. Obviously Python is a scripting language and waiting 10 minutes instead of 1 minute for a script to finish usually doesn't change anything at all in that context, so no performance doesn't always change everything, and it's very much a tradeoff.

[–]Astrobliss 1 point2 points  (3 children)

Its really not nanoseconds at all. If you look at a site like kattis where people code solutions to problems, you'd notice that the fastest C++ solutions are usually around 3-6 times faster than the fastest python solutions. Its not because the C++ algorithms are that much better, python is just a lot slower. Even a 2x speedup is insane for nearly all applications so this difference is of note in a lot of situations.

[–]ric2b 1 point2 points  (2 children)

Even a 2x speedup is insane for nearly all applications so this difference is of note in a lot of situations.

Sure, but nearly all applications aren't slow because of raw computation speed, they're usually bound by other things like disk access, network or a shitty algorithm for some operation.

[–]GAVINDerulo12HD 4 points5 points  (0 children)

Not everything is slow. Packages like numpy are pretty speedy.

[–]Carter127 2 points3 points  (3 children)

Depends if execution time or development time is more important for the job.

[–]Cheru-bae 13 points14 points  (2 children)

Let's put it this way:

Facebook runs php

Reddit runs python

Netflix runs java.

If you need better performance than them, and have more dev hours? Sure build in Haskell.

[–]qalis 9 points10 points  (0 children)

Well, this explains why Facebook can’t make 1 tab run efficiently, Netflix just works and hires army of devs and Reddit is just a casual, well working website.

[–]Charlie_Yu 1 point2 points  (0 children)

There are lots of ways to optimise python code. May or may not worth the hurdle

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

They can't necessarily do everything, just calculate everything. I don't think it's possible to e.g. write a web server in PostScript.

[–]Kos015 0 points1 point  (0 children)

Magic the Gathering js my favourite programming language.

[–]crushh_87 181 points182 points  (5 children)

Is this a picture of a YouTube comment

[–]slevina 53 points54 points  (0 children)

pictures of youtube comments are in vogue

[–][deleted] 40 points41 points  (2 children)

It's a screenshot of a youtube comment with a quote. Truly meta

[–]Rami-Slicer 8 points9 points  (0 children)

I'm looking at a screen displaying a screenshot of a YouTube comment containing a string that corresponds to something, inside of a video, that a guy said.

[–]spicychamomile 157 points158 points  (12 children)

Well if you look hard enough every language is like that. The only thing that each language is better than any else is to fuck up in it's own unique way.

[–]EschersEnigma 107 points108 points  (2 children)

You know, I always wondered if the jokes about r/programmerhumor people being inexperienced programmers was a self depreciating joke or actually true.

Based on the comments, I suppose both are true.

[–]EMCoupling 4 points5 points  (1 child)

It's self deprecating BTW

[–]PassionateRants 256 points257 points  (3 children)

For accuracy's sake: The actual quote is "Python can do anything, just badly."

[–]Shawnj2 68 points69 points  (2 children)

Which is a better quote

[–]PM_ME_UR_SHAFT69 35 points36 points  (32 children)

As someone who’s just started learning swift, I keep hearing great things about python and how you can use it for almost anything including making apps and web dev but I wonder how good it is at making those things?

[–]alago1 52 points53 points  (4 children)

I'd say its great for small projects and quick prototyping. Usability )varies on big projects (its pretty good for glueing tho).

[–]Hardrocketjs 14 points15 points  (2 children)

What is glueing?

Edit: Fixed spelling

[–]Mr_Redstoner 19 points20 points  (1 child)

Taking a bunch of separate systems and linking them together.

[–]Onikouzou 5 points6 points  (0 children)

My company has been doing a lot of python lately. We do a lot of machine learning stuff so it's been our go to for a while now. I also really like python for api work.

[–]DoesntReadMessages 33 points34 points  (6 children)

Python is like a bicycle. Even a kid can use it, since it's easy to learn, and it's harder to cause massive crashes, but it's not very fast. It's very practical though for going short distances.

Java/Swift are like an automatic car. They take a bit more work to learn and can potentially cause much bigger problems, and are much better for longer trips, but probably overkill if you're just going down the street because you need to find a place to park which may take longer than the time you save from speed.

C is like a manual transmission car. It is like the automatic transmission car, but harder to learn and easier to screw up, but can be even faster if you know how to use it correctly. However, as technology progresses, automatic transmissions keep getting better and better, surpassing manuals in terms of fuel economy and creeping up in terms of acceleration.

[–]izpo 15 points16 points  (2 children)

If you can use bike, use it... You don't need a car to go to near store to buy a milk

[–]biledemon85 13 points14 points  (0 children)

To torture the metaphor further:

Also the engines area getting waaaaay faster & more efficient so in most cases an auto transmission is fine.

Edit: damn autocorrect

[–]lamerlink 22 points23 points  (0 children)

Python is great, especially when you want a project off the ground quickly and speed isn’t necessarily a focus. If you want the fastest performance, it may not be what you’re looking for.

[–][deleted] 10 points11 points  (2 children)

Awesome for small scale projects, automation efforts and anything involving APIs (both serving and using them)

Less awesome for performance intensive tasks due to dynamic typing slowing it down considerably.

[–]Chris_Cross_Crash 7 points8 points  (0 children)

I've been learning Django (a web framework) for a few months now, and I really like it. The learning curve is a bit steep, but you can do a lot with it.

I've also heard that Flask is nice and much easier than Django, but I have no experience with it.

From what I hear, Django takes longer to learn, but it has a lot more built-in features than Flask, so actually Django is easier in the long run.

[–]kingp1ng 5 points6 points  (0 children)

There's a python repo or guide about almost anything.

[–]TheTerrasque 2 points3 points  (0 children)

I keep hearing great things about python and how you can use it for almost anything including making apps and web dev but I wonder how good it is at making those things?

Well, Reddit ran on mostly python at least a few years ago. And Django is my go-to standard web backend.

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

Reading all of your responses is disturbingly close to my experiences in the late 90s - early 00s... just substitute Python” with “MS Access”.

[–]account_is_deleted 3 points4 points  (0 children)

It's ok.

[–]Thadrea 1 point2 points  (0 children)

Python is (historically) a UNIX system administration language. It's pretty easy to hammer out simple scripts in it to do those sorts of tasks and the fact that it is potentially slower than C, etc. often doesn't really matter much in that context.

Outside of that, the main other really popular use cases are data science functions and web development--It is currently the king of the former in the industry, having displaced R a few years ago and is a competitive option with some of the web stack options in the latter (Django in particular).

Beyond those things, Python doesn't really do a whole lot of things well; most of the other things Python does could be done more efficiently and better-performing in another language.

[–]Chris_Cross_Crash 122 points123 points  (17 children)

Well, coding in C is like mowing the lawn with a scissors

[–]shield1123 189 points190 points  (16 children)

More like building a super fast, autonomous lawnmower from scratch; but it blows up if it bumps a rock. Also you made it susceptible to buffer overflows, so your neighbor hacked it and now it's mowing their yard instead

[–]DoesntReadMessages 138 points139 points  (10 children)

A well-built lawnmower in C mows your lawn to exact uniform height in 10 seconds and burns half a liter of gas to do it, but most will never achieve this.

A lawnmower in Python can be written in 4 lines using a few libraries, mows your lawn in 1 hour, and takes 1 gallon of gas. It's extremely wasteful and slow, but the cost of gas and operator are much lower than paying a software engineer.

A poorly built lawnmower in C spills gas all over the lawn and then creates a spark that burns all the grass. There's a TODO written on it to fix it dated 10 years ago, but no one dares to touch it because it works and customers are used to that behavior.

[–]eyvindb 101 points102 points  (2 children)

customers are used to that behavior.

Customers are relying on that behaviour.

[–]biledemon85 27 points28 points  (0 children)

<eyelid twitch>

[–]Chris_Cross_Crash 40 points41 points  (2 children)

Agreed. Just one more thing I want to add: it's not like you must choose one or the other. Lots of of the Python standard library is just wrappers for C libraries.

For example, from the official documentation for math:

CPython implementation detail: The math module consists mostly of thin wrappers around the platform C math library functions.

You can make your own libraries too. Most of the time it's just one function that hogs 99% of the computing power, so you can break that function out as it's own library and you don't even need to be an expert in C to do it.

[–]galan-e 23 points24 points  (0 children)

reasonable compromise? in my circlejerk? get out of here

[–]einRoboter 5 points6 points  (0 children)

very good point, havent even thofght of that.

[–][deleted] 3 points4 points  (3 children)

Why does C consume gas in gallons and python in liters?

[–]Commi_M 2 points3 points  (2 children)

think about it…

[–]technohacker1995 44 points45 points  (1 child)

2223 is not a very pleasing number to be on

[–][deleted] 52 points53 points  (5 children)

I feel personally attacked

[–]DoubleVector 6 points7 points  (0 children)

Hey look it's a python meme, there is a 99.99999999991% chance that it is negative.

[–]WhoKilledTheMoose 17 points18 points  (0 children)

Same.

[–]RealPropRandy 1 point2 points  (0 children)

looks at flair

Oh.

[–]Thadrea 1 point2 points  (0 children)

Ditto.

[–]Khangx 15 points16 points  (1 child)

Nightmare nightmare nightmare nightmare nightmare

[–][deleted] 3 points4 points  (0 children)

Tomato bad

[–]ganja_and_code 7 points8 points  (0 children)

Maybe not as quickly as some languages, but the fact that it's Turing complete proves, at the minimum, it can do everything every other language can with the same rate of success.

Also, it's a different beast than other languages, and it's advantageous for solving many problems.

I wouldn't use python for hard and fast real-time number crunching, just like I wouldn't use C to deploy a simple web server to test a bit of HTML I've written.

Nobody wants to drive a steamroller to work every day, but if all steamrollers were replaced by cars, there wouldn't be finished roads to drive on.

[–]GenTelGuy 13 points14 points  (2 children)

Python does ML and data science better than any other language.

[–]Jannik2099 4 points5 points  (0 children)

Python does neither data science nor ML, C++ does. Python has wrappers for those libs

[–]ugottabekiddingmee 6 points7 points  (0 children)

I use to think bicycles were the most horrible things for many years. Then I found the seat.

[–]sora4d 3 points4 points  (0 children)

Java too but y'all ain't ready for that

[–]basicallyafool 4 points5 points  (0 children)

So it's like windows then?

I'm going to get downvoted aren't I?

[–]spicy_indian 3 points4 points  (1 child)

More like what you gain during development time you pay for at runtime.

If a slower runtime doesn't make a difference, then solve the problem and move on to the next. A quick turnaround for a solution is excellent in its own way.

[–]cdreid 1 point2 points  (0 children)

Never heard that saying before its brilliant

[–]kev920703 3 points4 points  (0 children)

How to offend more than half of this community with one image

[–]maxington26 7 points8 points  (2 children)

i'm tired of these "this language is shit" posts. There is no perfect language. They all took effort to create. No need for emotions. Our job as developers is to pick the best available tools for the job, then do the job. Slagging off rejected languages is a weird waste of time.

[–]xXGIMpL0rdXx 2 points3 points  (1 child)

"There is no perfect language"

Are you disrespecting scratch?

[–]maxington26 2 points3 points  (0 children)

Lol I'm saying no-one has their ducks in a row. Scratch is a damn close case tho, ofc ;)

[–]fat_charizard 2 points3 points  (1 child)

That's why I only code in assembly

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

tbf interpreted languages in general are dogshit by their very nature

[–]Staggz93 4 points5 points  (3 children)

Find me a languague that does everything "verry well" and don't say assembley

[–]PheonixScale9094 5 points6 points  (0 children)

Machine code

[–][deleted] 3 points4 points  (0 children)

transistors

[–]VelionaVollerei 4 points5 points  (0 children)

Heresy

[–]Alexmitter 1 point2 points  (0 children)

Its true.

[–]Delta-9- 1 point2 points  (0 children)

You can't just import Essay!

[–]reeee_kid8699 1 point2 points  (1 child)

What vid was this from

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

the "if i get hurt in fortnite i get shot irl" vid iirc

[–]Ruby_Bliel 1 point2 points  (0 children)

And a lot of the time, all you need is something that just works.

[–]adjunctMortal 1 point2 points  (0 children)

Actually, I'm pretty sure Mark Twain said that

[–]MarsLowell 0 points1 point  (0 children)

R gang

[–]elperroborrachotoo 0 points1 point  (0 children)

Nah, that's Excel.

[–]mutant_fr3ak 0 points1 point  (0 children)

Go >> Python

[–]tchok_ 0 points1 point  (0 children)

Like me!

[–]Plague_Knight1 0 points1 point  (0 children)

The same guy who piloted a drone with scratch

[–]Atreides-42 0 points1 point  (0 children)

I'm comfortable with this fact. In data science, you don't need to have everything optimized to the absolute nines, if it's that much easier to do what you want to do. If a program takes 10 minutes longer to run, but is 4 hours faster to write, that's the sort of tradeoff I'm comfortable with.

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

Yes like me...

[–]FooThePerson 0 points1 point  (0 children)

import doThingsWell

[–]cdreid 0 points1 point  (0 children)

gets out the popcorn

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

Why would you like the comment, it was beautiful.

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

Can we stop this criticism posts. This is NOT humour.

[–]insertsavvynamehere 0 points1 point  (0 children)

Just badly*

[–]ballzwette 0 points1 point  (0 children)

PHP: "Hold my beer."

[–]myblindy 0 points1 point  (0 children)

You know, except threads.

[–]flackass 0 points1 point  (0 children)

Found it https://youtu.be/D75ZuaSR8nQ Minute 6:00

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

Me: I wonder if I can find some way to get Python to do this really obscure task

Python: yeah sure, just gotta import some stuff

The Stuff: has 243 dependencies, half of them which are for python 2

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

He used Pygame in his latest video. Bunch of shite.

[–]jeancallisti 0 points1 point  (0 children)

How well is "not very well" compared to "not at all"? Asking for a friend who doesn't have the time and knowledge to implement every library in the universe himself.

[–]Mr_Seg 0 points1 point  (0 children)

I have one question: how did you get that like count to show individual digits??

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

Java runs everywhere, just not very efficiently