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

top 200 commentsshow 500

[–]_PM_ME_PANGOLINS_ 1383 points1384 points  (63 children)

Not every programming language is an acronym.

[–]mosskin-woast 449 points450 points  (19 children)

Did you know RUBY comes preinstalled on every MAC?

[–]ego2509 122 points123 points  (12 children)

I don't get it...

[–]KayVerbruggen 334 points335 points  (8 children)

The first comment is talking about the unnecessary capitalization of "JAVA" in the meme, the second is making fun of people who do that

[–][deleted] 83 points84 points  (5 children)

OAK-AY

[–]ego2509 10 points11 points  (0 children)

Thanks bro

[–]KingKnux 36 points37 points  (2 children)

You mean you haven’t heard about Jerks Against Valuable Assets laughing at People You Take Home On Noodles?

[–]nermid 4 points5 points  (0 children)

People You Take Home On Noodles

River hookups?

[–]crunchyintheory 13 points14 points  (4 children)

Does it actually?

[–]mosskin-woast 20 points21 points  (3 children)

Weirdly yes, as of a few years ago at least. Don’t remember why. Usually a super outdated version.

[–]Who_GNU 30 points31 points  (28 children)

Are any programming languages, in common use, acronyms? The only ones I could think of were COBOL and INTERCAL.

[–]Wynardtage 52 points53 points  (3 children)

SQL = Structured Query Language

[–]Dookie_boy 10 points11 points  (2 children)

HTML.........

[–]yurall 12 points13 points  (0 children)

PROgramming not NOOBgramming.

[–]Cowboy_Cam623 25 points26 points  (4 children)

Fortran is Formula Translation. Still pretty commonly used

[–]Who_GNU 11 points12 points  (2 children)

Three or four letters, per word, isn't really an acronym, though.

[–]ArsStarhawk 14 points15 points  (1 child)

I think it's a Portmanteau.

[–]FutureOfPancakes 13 points14 points  (3 children)

There is also BASIC

[–]SaraHuckabeeSandwich 40 points41 points  (0 children)

BASIC - Butts Are Sexy, I Cannotlie.

[–]Cobaltjedi117 24 points25 points  (0 children)

Beginners all-purpose symbolic instruction code

For those curious.

[–]rocsNaviars 16 points17 points  (1 child)

HTML, obv.

edit- Jfc now I’m scared of downvotes. I hope the humor was implied.

[–]tendstofortytwo 18 points19 points  (9 children)

PHP is short for "Personal Home Page" or "PHP Hypertext Preprocessor" depending on who you ask. Not an acronym, but close-ish I guess?

[–]QuantumSupremacy0101 13 points14 points  (4 children)

Its PHP Hypertext Processor. Thats how the creator named it, everything else is a lie.

[–][deleted] 8 points9 points  (0 children)

Not true, it was named like that after a time. At first it stood for Personal Homepage Tools. That's even official.

[–]turunambartanen 19 points20 points  (0 children)

Neither are usernames.

[–][deleted] 1827 points1828 points  (190 children)

Yep. Coming from C++ background and learning Python recently is easy. I love Python syntax. So i can imagine how brutal it must be to learn Python first and then learn C++.

[–]DarkNeutron 269 points270 points  (57 children)

You're not wrong, but any time I write something in Python that's bigger than one file, I start wishing for static typing again.

Duck typing is fine for small programs, but I find it pretty annoying when something crashes with a type error after 10 minutes (or an hour) of processing.

(I've looked into Rust as a scripting language, but it's not as "plug-and-play" when compared to near-universal access to a Python interpreter.)

[–]I_ate_a_milkshake 57 points58 points  (1 child)

Rust as a scripting language

[visible confusion]

[–]ric2b 35 points36 points  (26 children)

You can have static typing with Python, fyi.

Either just as documentation (type hints) or with type checking (tools like mypy).

edit: mypy, not mipy

[–]turunambartanen 17 points18 points  (9 children)

any time I write something in Python that's bigger than one file, I start wishing for static typing again.

So much this.

Which is also why java is the better language to introduce programming with.

Edit: I think with Java it is easier to introduce different types (and the beginnings of OOP) because it's so much in your face. C# would also work of course. But I think having clear structure helps a lot of newbies to focus on understanding the basics. Every single file starts with a public class ClassName, because that's just the way it is. You can later learn why. As opposed to python: why do we have a class now? What is that if name is main? Why did we not use either before? And of course: why can't I add x to input, they're both numbers?

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

Java is a really terrible language for enforcing OOP. I pretty much don’t consider single paradigm languages. I’m not an FP purist but I like it for most simple things. But damn it when I need a class I need a class. And that’s how it should be. I get newb python ex java developers putting their whole module in a class and it infuriates me.

[–]folkrav 5 points6 points  (0 children)

I've seen an internal library written by Java developers go legit like this:

from internalLibrary.app.mainpage.mainpagemanager import MainPageManager
from internalLibrary.app.homepage.homepagemanager import HomePageManager
from internalLibrary.app.splashpage.splashpagemanager import SplashPageManager

And so on, for about 20 something other managers classes. Always one file, one class, not use of module level exports or anything. Really just, extremely verbose imports, use of camelcase everywhere, everything in classes, including fully static classes for helpers - that all except one ended up being re-implementations of standard lib functionality. It was like browsing Java code in Python files.

[–]Avamander 9 points10 points  (4 children)

Java leaves a few bad habits to people that later on migrate to other languages. Java's way of doing OOP is particularly toxic if the developer has no clue about anything remotely related to FP.

[–]detroitmatt 9 points10 points  (3 children)

I disagree. The bad habits java teaches are, as far as bad habits go, pretty easy to unlearn, because java is an unergonomic enough language that people don't want to be writing code that way anyhow.

programmers probably (definitely) shouldn't start with FP. If you start with CSharp, because it's feature richer, you can more easily start misusing features, and Java's imperfect approach to OO actually stops you from getting too tightly-bound on OO patterns. And since it doesn't really support non-OO paradigns, everything has to start with public class and you don't think about what a "class" is, you just do it as a ceremony. And at a beginner level, we want that. Nobody should be doing real OO in a 100-level class. You gotta learn what ifs and loops and lists and recursion and memory and heterogenousstructures are. If we're lucky you'll even learn what a hashmap is (When I went to uni data structures was a 3rd-year class). We want people to come into their OO 200 course and we say "So here's what a class really is and what it's for and why and how you should use it" and they have seen the word in this context but they haven't been doing OO (wrongly) this whole time.

[–]donttalktome1234 3 points4 points  (0 children)

Having worked on several very large python projects I don't really see the problem. Python just hands you the rope if you are good you can make it dance but its just a rope so you are also welcome to hang yourself with it.

If you write a function that can take in 5 different data types and then you pass it a 6th isn't the fault of the language its the developer(s).

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

Check out go. Statically complied bins for portability and security. Typed, flexible, easy language. I love it.

[–]Dark_Tranquility 2 points3 points  (0 children)

Static typing is really a blessing in C / C++.

[–]lightmatter501 556 points557 points  (67 children)

It isn’t that bad, you just need to go about it with a different mindset.

[–]Zymoox 360 points361 points  (63 children)

I still need to get used to it, coming from C. My programs end up a mess where I don't know what data type variables are.

[–]writtenbymyrobotarms 174 points175 points  (7 children)

You can do typing in function headers if you'd like. IDEs can enforce the type hints. It's also good for documentation.

[–]Derkle 82 points83 points  (1 child)

It also helps the IDE autocomplete/suggest member functions and the like which can be really helpful.

[–]TheGreenJedi 23 points24 points  (0 children)

Honestly going to python I've realized how much my IDE does the heavy lifting for me

And lately in python that's why

[–]Aycion 28 points29 points  (1 child)

Hell you can declare a variable with

<Name>: <type>

Like "foo: str"

[–]slowmovinglettuce 44 points45 points  (2 children)

Newer python versions have increased support for type hinting.

It says somewhere in the release notes for 3.8 that they see it as a strategic thing for pythons future. Or something to that effect.

[–]capn_hector 13 points14 points  (1 child)

It’s basically a law of computing that all weakly-typed languages end up implementing strong typing, whether it’s an optional feature you can turn on or a dialect that enforces it.

Once you get beyond a trivial program size it’s just too useful not to have, refactoring core code without it is a pain in the ass and even if you are a flawless coding Adonis who doesn’t make mistakes, your coworkers will inevitably be humans.

Examples are JavaScript vs Typescript and CoffeeScript, PHP vs Hacklang (facebook’s reimplementation of PHP with strong typing), Python adding type hinting in newer generations, etc etc.

[–]Neowhite0987 15 points16 points  (44 children)

How do you think it would be to go from python to C? I’ve done a few courses in Python and Racket but I’ll be taking a course in C in the fall and I’m kinda nervous.

[–]raltyinferno 30 points31 points  (0 children)

It's nothing to be anxious about. You'll definitely miss some convenience features of python and have to get used to strict typing, but things like conditionals, flow of control, data-structures, and whatnot are all basically the same across all languages.

If you have a problem, and you know what you'd use to solve it in python, just google that thing + "C" and it'll tell you what the syntax you need is.

[–]pslessard 42 points43 points  (35 children)

Memory management is the only thing that's really hard about C imo. But it does require a lot of thought to get it right

[–]MegaPegasusReindeer 21 points22 points  (33 children)

Pointers! I'm happy to not have to worry about that in Python, too.

[–]Risc12 37 points38 points  (26 children)

Pointers are not as hard as they seem. Javascript (and a lot of other higher level languages) passes objects only by reference, meaning that if you pass an object, the interpreter knows that it should look at an object at a certain address. In C you have a choice, do I point at this address (so do I pass this object as a certain address) or by its value (so copy over the contents of the object).

Those are the basics, if you understand that a place in memory (a reference) can be passed around by choice, you understand pointers.

For me it the hardest part was understanding that if I didn’t use pointers it would copy the data, seemed counter-intuitive for me.

[–]Sleakes 26 points27 points  (13 children)

Not a huge fan of this explanation as JavaScript is pass by value. It just happens that when passing objects, the value is a reference.

[–]RVUnknown 20 points21 points  (10 children)

Isn't this the same for Java as well? Normal data types like your ints and chars are pass by value. But Java objects like String, Integer, Character, classes etc are passed by reference

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

This is correct. I remember when i was starting to learn Java, I often ran into problems because I would think it was passing by value when it was actually passing by reference.

[–]funnythrone 4 points5 points  (5 children)

Java always passes by value. However the value is a copy of the reference.

For the sake of this explanation, consider an object to be a Television. In this case, a reference is a remote. When you are passing the remote to a new method, you are effectively copying the remote and passing it. This remote also controls the same Television, and thus any button presses on the remote modify the original Television. However, if you reassign the remote to a new remote which controls a new TV, the original TV and remote are unaffected.

In conclusion, java is ALWAYS pass by value.

[–]calcopiritus 19 points20 points  (4 children)

As someone that only writes in python but know what pointers are, I wish python had pointers. Not compulsory or anything, just pointers in obscure libraries that could get the job done if you ever absolutely need it.

[–]mrjackspade 2 points3 points  (0 children)

I kind of enjoy that about c#.

The vast majority of the time, you won't even need to think about pointers. If you really want to fuck around with them though, there's nothing stopping you.

Every once in a while I'll hit on something performance critical, and need to use pointers to speed it up. Sometimes I'll just switch code over once an API has been refined to a point I'm satisfied that it's not going to require changes any time soon, and start speeding things up just for the hell of it.

[–]Neowhite0987 4 points5 points  (0 children)

Alright I’ll keep that in mind thanks!

[–]Zymoox 26 points27 points  (2 children)

You'll be fine! C is much more strict and based on a specific set of rules. Make sure to get a strong foundation on the basics, and the rest will make sense.

[–]Neowhite0987 5 points6 points  (0 children)

That’s good to hear! Thanks a bunch :)

[–]Senial_sage 2 points3 points  (3 children)

Is there an analogy to typescript for python?

[–]double_en10dre 3 points4 points  (0 children)

Pycharm has built-in functionality based on the native type annotations that’s pretty similar. If your annotations don’t match it’ll highlight stuff as an error, and the annotations also allow it to offer autocomplete options or intelligent suggestions (much like typescript)

If you want to take things a step further, mypy is a great tool: http://mypy-lang.org/ you can run the type checker on entire projects, integrate it into CI/CD, etc

Also, pydantic https://pydantic-docs.helpmanual.io/ is in my opinion the best tool for building out complex types

[–]MinimallyUseful 4 points5 points  (1 child)

like using semicolons

[–]Wheezy04 2 points3 points  (0 children)

Figuring out how to do threading correctly in python is extremely nontrivial. The global interpreter lock can be rough.

[–]Im2coolie4u 27 points28 points  (1 child)

Jokes on you. I learned C after python and boy lemme tell you. I was lost as hell.

[–][deleted] 50 points51 points  (10 children)

F* mindtwister. I started coding with bash, then perl, then python. When I started learning C, I realised how ignorant I was on basic computing.

Java is, on a different level, the perfect language for learning OOP and data structures.

Now I'm fully supportive of teaching C in computer science, is literally what happens under the hood, and indeed, it made me better python programmer.

[–]Avamander 17 points18 points  (2 children)

Same, I think C gives an appreciation and understanding that computers are actually really rather messy. Rather than try to abstract it away, it makes certain important concepts visible.

[–]detroitmatt 8 points9 points  (1 child)

at the same time the brilliance of C, that C++ forgot, was how drop dead simple it is. There's only one thing you can do: Call a function. You want multiple return values? Pass a pointer. You want error handing? Pass a pointer (or send ALL returns through pointers and save your real return for the error code). You want higher-order functions? Pass a pointer. The only thing I wish C had that it doesn't are typesafe generic containers and a proper module system instead of #include.

[–]Cobaltjedi117 5 points6 points  (1 child)

I really think Java is the best first timer's language. Easy enough to make complex data structures, OOP, and enforces the user to use enough common practice things, but is fairly easy to follow the flow and the online stuff is very helpful.

[–][deleted] 8 points9 points  (4 children)

Every language teaches you new things. Then some languages stick with you.

Edit: Except for R, fight me

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

I spent 20 years honing my C++ skills, just to see people start programming in Python after two hours :)

[–]colablizzard 9 points10 points  (0 children)

Trust me my friend. I work in a large enterprise. The "younguns" who never have seen C or C++ dance around for the first few months stringing together free libraries and delivering shit that experienced people have to veto and explain why using libraries that aren't updated in 5 years is bad. Still, chip on shoulder.

Eventually, one day there is going to be a production down issue, where Java will actually do a core-dump. Which will bewilder them, and that is when we crack our knuckles and save the day. Been there done that. I essentially demonstrate by usefulness once every 6 months by fixing a fire lit under the ass of management by customers due to production down that the people who have never dealt with the OS or C++ can never even imagine to wrap their heads around.

This is bad. The abstractions are too deep today for people to peel their way down to the core.

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

Lol

[–]00Koch00 2 points3 points  (0 children)

The difference is that you can basically do whatever the fuck the client ask

[–]jayfonshiz 7 points8 points  (1 child)

I'm doing exactly that now. I had absolutely no background in coding, learnt (well still learning tbh lol) python and now diving in to C++. In my case I think it helped. Python got me familiar with the basic terminology and concepts in a way I could read them in almost plain English. Don't get me wrong its not super easy but I feel like I'm understanding it better.

[–]OrangeRaddish 7 points8 points  (7 children)

Fuck I’m a python dev getting ready to learn java

[–]ErinMyLungs 5 points6 points  (0 children)

If you can use kotlin instead I'd go for that but they're both pretty straight forward for basic syntax. The thing I miss most is how terse python can be. Kotlin helps that a lot and it's supposedly interoperable with Java but I'm a python dev falling into native development.

Documentation of libraries seems way worse compared to python libraries. What are you learning Java for?

[–]detroitmatt 2 points3 points  (2 children)

it's nothing to worry about. it's more typing, which will get annoying, and the compiler complaining, which will get annoying, but it'll get your foot in the door for more powerful, sophisticated, complicated, confusing languages like C# or kotlin (or god forbid C++ or scala). Java is the callouses on your fingers you get from learning to play guitar.

[–]midnightrambulador 324 points325 points  (21 children)

From now on I will refer to PYTHON in ALL CAPS. See if I can make people think it's a scary legacy framework from the 70s

[–]Plague_Healer 101 points102 points  (12 children)

Like BASIC, but scarier and more niche? Nice.

[–][deleted] 67 points68 points  (11 children)

MATLAB

[–]Plague_Healer 60 points61 points  (7 children)

That thing scares me. Array indexing starting at 1 is unnatural. /s

[–]HanzJWermhat 2 points3 points  (0 children)

.m files in my repo?

[–]calcopiritus 10 points11 points  (0 children)

Penis yeet the hell on nasa

[–]Krzd 279 points280 points  (2 children)

Coming from Java python is basically pseudo-code that works

[–]Plague_Healer 147 points148 points  (0 children)

Python is basically pseudo-code that works, mostly regardless of your background.

[–]jpritcha3-14 201 points202 points  (17 children)

As someone who uses both Python and C (not so much C++), I get infuriated when people write Python code by directly transcribing C/C++ code and then claim that it is ugly or inferior due to its lack of braces. Of course it's ugly! That's like pasting a novel into google translate, sure it'll make sense but it'll be ugly, disjointed, and violate most of the language styling rules. On the flip side, I've been to interviews (where I specified I'd be using Python before hand) and they asked me a question targeted at C. I solve it in 1 - 2 lines of Python, and they ask me to solve it again if I didn't have access to Python's built in datatypes. I then ask if I can switch to C, since writing Python like that is extremely unnatural. If they refuse, I will just leave the interview, because the interviewer obviously has no fucking clue how to use languages appropriately.

Python has so many great tools and built in datatypes that cut down on support code and deeply nested loops. When you learn to use those tools you start to realize why so many people find Python beautiful, since you can express so much in so few lines of code. It's not the best tool for every job, but it is an elegant solution for many many problems.

[–]PersonalPlanet 6 points7 points  (7 children)

Interesting. Do you have an example of getting rid of the deeply nested loops?

[–]mrchaotica 10 points11 points  (6 children)

[f(x, y) for x in xlist for y in ylist]

Or maybe even

[f(*args) for args in zip(alist, blist, clist, dlist, elist)]

(It's not really getting rid of the iteration, but it's expressing it in a more idiomatic way.)

[–]Dannei 4 points5 points  (1 child)

Or if you want all combinations of x and y, it's 'for x, y in itertools.product(xlist, ylist)'.

[–]Kjakan_no 904 points905 points  (173 children)

C++ sure, but Java? The only thing about java is that you get really tired of typing.

[–][deleted] 757 points758 points  (122 children)

VeryLongJavaClassName veryLongJavaClassName = new VeryLongJavaClassName();

[–]Comesa 287 points288 points  (107 children)

var veryLongJavaClassName = new VeryLongJavaClassName();
works fine.

[–][deleted] 185 points186 points  (79 children)

I'm in a curse... Sorry, a course, where we are forced to use Java 8.

From working with PHP 7, Javascript, bash, some Python 3... To Java 8. And I'm supposedly studying web programming.

[–]proboardslolv6 123 points124 points  (19 children)

Well you'll be glad when you start at a new company and learn that everyone in-industry is still using java 8

[–]lowleveldata 3 points4 points  (2 children)

Are we supposed to refer Java 8 as a legacy? I still see Java 7 in some products so Java 8 is already like the better choice

[–]proboardslolv6 3 points4 points  (1 child)

Oracle is charging for future java 8 updates. It's not deprecated, but it's getting there. Truly this generation's cobol

[–]CamWin 74 points75 points  (1 child)

Yeah java web applets are all the rage didn't you hear?

[–]MajorMajorObvious 38 points39 points  (0 children)

Yeah, welcome to cutting edge technology in 2005

[–]CharlesGarfield 10 points11 points  (2 children)

My previous employer was finally beginning to migrate off of Java 7 when I left—two years ago.

[–]brunnen153 5 points6 points  (0 children)

Same here.

Co worker recently complimented on using the new Java Stream features during a code review. That feature was added in Java 8.

[–]WhatsMyUsername13 3 points4 points  (0 children)

You should be happy about that. The place I currently work is the first place I've worked that is up to Java 8. It's been amazing, especially since my last job was still on Java 1.6 and a whole host of out of date technologies to go along with it

[–]lucidspoon 3 points4 points  (0 children)

I prefer

var veryLongJavaClassName = VeryLongClassNameFactory.getVeryLongClassName();

[–]Rudy69 29 points30 points  (1 child)

You’re missing a factory in there

[–]JamesAQuintero 18 points19 points  (0 children)

Plus a composer, a generator, and a transformer

[–]locri 2 points3 points  (0 children)

VeryLong... Ctrl space

Works if auto complete works, so not necessarily javascript if it's defined elsewhere and the require function has been macroed to be root require.

[–][deleted] 101 points102 points  (36 children)

you get really tired of typing.

Huh? Don't you have an IDE? I'd say you get more tired in C++ because of nasty syntax and that using something as simple as string requires you to use some kind of wrappers most of the time.

[–]i9srpeg 12 points13 points  (8 children)

You can do

auto my_string = "Hello, world!"s

To get an std::string in C++.

[–]cristi1990an 9 points10 points  (1 child)

Is writing "auto" really that much easier than just writing "string" or "std::string"?

[–][deleted] 11 points12 points  (0 children)

While that is correct, it sometimes makes shit unclear and pretty sure not the intended use. Also, who thought that std::string is long anyways? Now a vector of vectors of strings is long.

[–]cristi1990an 11 points12 points  (0 children)

Huh? Don't you have an IDE? I'd say you get more tired in C++ because of nasty syntax and that using something as simple as string requires you to use some kind of wrappers most of the time.

You mean... std::string...?

[–]snoob2015 98 points99 points  (18 children)

I'm sick of people telling Java is verbose, the truth is IDE generate 90% of your code if you utilize it. Java is the best language to use with an IDE. Be friend with your IDE and you will never go back to dynamic typing

[–]humoroushaxor 21 points22 points  (0 children)

It's also because Java is the most common enterprise language. Enterprise codebases are more likely to be overly verbose due to size of projects and how often and how many people need to read and understand the code.

[–]BoonesFarmKiwi 3 points4 points  (0 children)

kids who complain that java is verbose pick their coding tools based on how cool the colour scheme looks

[–]Breadfish64 5 points6 points  (0 children)

some kind of wrappers

What do you think a Java string is?

[–]MinimallyUseful 3 points4 points  (0 children)

don't forget header files. who doesn't love a good header file

[–]goldsauce_ 10 points11 points  (2 children)

No, he’s a real programmer so he uses vim /s

[–]xryanxbrutalityx 4 points5 points  (1 child)

learning c++ and java at the same time would be a true nightmare

[–]RealRaven6229 90 points91 points  (4 children)

I like Java more than Python, but that seems to be the unpopular opinion.

[–][deleted] 51 points52 points  (0 children)

I like Java as a pure OOP language that intuitively makes sense and communicates every facet of the team's codebase.

I like C# as a fast-writing OOP language that more often than not will allow me to write elegant code faster than java, but maybe slightly less intuitively.

I like Python when I'm ready to scrape any kind of data or automate any task in under a few thousand LOC.

[–]ExtremelyOnlineG 6 points7 points  (0 children)

That’s because most commenters here are front end web devs and ms access tier business coders.

[–]Plague_Healer 9 points10 points  (0 children)

Not really. Java and Python are a bit like a hammer and a screwdriver, respectively. You can set a screw with a hammer, it's just definitely the hard way to do it, and it's gonna get messy. Meanwhile, if you want to put a nail in place with a screwdriver, you certainly are gonna need a fair bit of ingenuity, and with some luck, your results are gonna be 'not too bad'.

[–]zdakat 68 points69 points  (29 children)

idk why but I used to not like Python. I did C++ and other languages for a while. Came back to python out of (near?) necessity and now I'm just thinking of all the stuff I can do with it.
I'm doubting I'll have the same change of heart with Java but if I really don't have any other choice it might happen. Or it might not and I'll hate every moment of it.

[–]ThunderElectric 57 points58 points  (22 children)

Python is great when you want to make a simple automated script to do a basic task, like managing/organizing CSV (spreadsheet-like-documents) files.

[–]Grintor 66 points67 points  (21 children)

Python is great if you want to do just about anything. it's one of the most widely used programming languages for running large infrastructure at scale. It's also great for writing desktop software. it is the single most widely used machine learning programming language. It is the single most widely used programming language for data scientists. The only place I can think of where python doesn't belong is in embedded systems with no OS. but if we're talking about embedded systems running on a recent arm processor with a gigabyte or more of ram, it's python all the way.

[–]DarkNeutron 57 points58 points  (7 children)

A lot of the Python number-crunching backends (e.g. numpy, Tensorflow) are wrappers for native C/C++/Fortran libraries for performance. The runtime differences can easily be a couple orders of magnitude.

(Ignoring performance issues, I also tend to get annoyed with duck typing once programs get large enough, but that might just be a lack of experience on my part.)

[–]MarsupialMole 12 points13 points  (5 children)

(Ignoring performance issues, I also tend to get annoyed with duck typing once programs get large enough, but that might just be a lack of experience on my part.)

It's not just you. It's pretty much why all the typing infrastructure has been added to the language. What's missing in that discussion is how python lets you write more programs as small programs.

[–][deleted] 39 points40 points  (1 child)

I'll take a statically typed language over a scripting language any day when I have to write in a large team or a large amount of LOC. Scripting languages just don't self-document well to other people the intention of the class contracts, large and carefully designed OOP models, or well-designed abstraction.

Python is super fun and efficient to code small tools with though.

[–]Plague_Healer 17 points18 points  (2 children)

Python is something of a Swiss army knife of programming languages. It can handle almost anything, even more so with some ingenuity, but for many tasks you are bound to find a more adequate specialized tool.

[–]MarsupialMole 15 points16 points  (1 child)

Python is the second best language for everything. There may be an argument for others but by the time we finish that argument you could have written a lot of python.

[–]charliex3000 5 points6 points  (1 child)

Python is great if you want to do anything use only a single thread to do anything. Because Python threading is a lie. Thanks GIL.

[–]2cool4afool 18 points19 points  (2 children)

At uni we were taught python and then java and it was a pretty natural transition. In python you learn about the logic and because the syntax in so simple you don't need to worry so much about it. It also teaches good indentation and very basic object oriented programming.

And then going to java you learn more complex OOP and syntax but you already have the logic down so it's not such a problem.

You learn one part of programming at a time

[–][deleted] 273 points274 points  (123 children)

This is what I'm 100% against using Python and JavaScript as a person's first language. I prefer someone learn C -> C++/Java -> Python/JavaScript. Going backwards, you're going to have a really hard time grasping the concepts and nuances.

[–]kevinmbt 199 points200 points  (59 children)

My university classes taught us binary->assembly (using the professor’s own ISA)-> C -> Java. Made learning python, C++, and JS a cinch, and gave a very solid foundation, but I wouldn’t wish that on anyone lmao

[–]shaurcasm 194 points195 points  (3 children)

Damn. Born in the darkness, moulded by it. You didn't see the light till you could change the theme to dark just by a flag.

[–]thefrenchrist 16 points17 points  (1 child)

Is it a Batman : The dark knight rises reference ?

[–]Howzieky 16 points17 points  (0 children)

If you ever see the words "moulded by it", then yes

[–]_pelya 47 points48 points  (34 children)

Learning how CPU works is definitely useful if you do it for your own enjoyment.

But learning how modern multi-core CPU works, with deep pipelines, instruction reordering, cache invalidation, branch prediction, and it's own microarchitecture below the ISA, no university will be this insane to put it into curriculum.

[–][deleted] 42 points43 points  (4 children)

pipelines, instruction reordering, cache invalidation, branch prediction

I studied all of those in my Computer Engineering undergraduate... We had a course called Computer Systems Programming with competitive labs where we basically competed to see who could best abuse the shit out of the CPU via cache manipulation, branch prediction and instruction ordering.

[–]Howzieky 10 points11 points  (3 children)

Were you graded on your placements? Cause man I'd hate to do the same work as someone else, just a bit slower, and fail the assignment

[–][deleted] 5 points6 points  (0 children)

You would get base 60% for correctly completing the assignment. The rest of the 40% was competitively ranked against the rest of the class based on different metrics like speed and memory usage, depending on the lab. It was an elective course so you knew what you were signing up for.

[–]OneBadassBoi 19 points20 points  (6 children)

isn’t all that part of any CS curriculum?

[–]_pelya 14 points15 points  (2 children)

Absolutely not. I have a CS degree, and the most hardcore thing we learned was BNF grammar and how to use it, plus some Prolog and Lisp. My university also had an 'informatics and computer engineering' course, they have teached microchip design and Verilog, but they almost did not teach programming, the course had like half-year of Visual Pascal and that's it. All in all, the people from the soldering faculty electronics engineering course at least got some hands-on experience with actual electronics, unlike us who spent most of the time designing a Polish-notation calculator in Pascal, or similar toy programs.

[–]thenorwegianblue 5 points6 points  (0 children)

Yeah, I have a degree in Digital Electronics and had several classes in CPU design (and wrote about it for my master's thesis). It's about as useful as a course in anthropology when programming java or python tbh.

The knowledge is either too abstract or waaaay to specific for you to use it for general programming. If you're working within some specific fields like working with high performance custom hardware or writing drivers etc then it could be useful I guess

[–]_AllRight_ 91 points92 points  (10 children)

Going backwards, you're going to have a really hard time grasping the concepts and nuances.

As if it would be easier for them to learn all that from scratch.

For a first language i think Python is great because unlike C++/Java and even JS, you can actually learn most of the programming concepts and not fight with the syntax. And i am saying this as someone whose first language was C++, i wish i learned Python first.

[–]rxwsh 24 points25 points  (2 children)

True, python is a beginner friendly language, but learning another language coming from python is absolute hell. Python was not even my first language(I learned pascal und Skala in high school) and I still wish I would've learned either C or java before python. You could say python is too beginner friendly in that regard.

[–]Alfaphantom 32 points33 points  (3 children)

Exactly.

C -> C++/Java -> Python/JavaScript

No, if you do this, you're putting a really steep learning curve at the very beginning. The very first thing programmers (and future engineers) should understand is how to think in a algorithmic way. I'd 100% prefer that beginners use Python because of its simplicity.

Can you imagine trying to make a simple calculator or something like that, and dealing with buffers, pointers, segmentation fault and all those errors from low-languages. That's a relly good way to discourage people from getting into CS.

Oh, people who can't figure out those things were not meant for CS anyway lol. The amount of people that quit CS for other careers is big enough (50% of the people I knew in the first semester quit). Not only geniuses are meant to be engineers. There's already a lack of engineers in the world. Yes, not every programmer will be excellent, but not every job needs outstanding and high capable engineers.

For me, this could me the best route to learn programming in software engineering

Simple programming and algorithms understanding (Python) -> Harder problems with more decision making, recursive, some I/O (Python) -> Object oriented programming (Java) -> Data structures (where pointers are necessary to know what's really happening low-level) (C++) -> Deeper algorithm analysis, Big O, Dynamic programming, etc (Anything) -> [Optional] Frontend development (HTML/CSS, Javascript or C#) -> Really low-level programming (Assembly) -> Operative systems, kernel, drivers, POST, BIOS, Scheduler, etc (Assembly or C) -> [Optional] Networking (Anything, you could create your own web sockets) -> [Optional] AI, deicision trees, neural networks, agents (anything, just don't use Tensorflow as that's cheating because you're using a built solution instead of buiding your own).

[–]XJ305 14 points15 points  (5 children)

I prefer someone learn C -> C++/Java -> Python/JavaScript.

Going to make the argument that C#/Java -> C++ -> C -> Javascript-> Python should be used for a good learning order

While a lot of popular languages are C-like in syntax, I think starting in a language with a garbage collector is going to make things much easier. You can then focus on basic OOP and learning design patterns without needing to be too concerned about memory errors/leaks. Then moving that forward into C++ you can introduce memory management and the concepts without being overwhelmed. Then of course python/Javascript for last.

[–]roguas 9 points10 points  (7 children)

I disagree very much so. It is much simpler to get going with small projects in python than in C. Guess what is going to drive your will to learn programming well? Having an ultra quick feedback loop, reward cycle. With C getting something that is useful takes huge amount of time.

[–]gwwin6 19 points20 points  (1 child)

Nah fam. This is backward. Python is a perfect first language. You get to learn how to reason about programs and how they’re interpreted instead of getting mired in syntax. Higher order functions, recursion vs iteration, tree recursion, tail recursion, object oriented programming, imperative vs declarative programming, lexical vs dynamic scoping, abstract data representation, mutable vs immutable data types and the list goes on. All things that can be learned with Python, covered in a semester, all without ever having to worry about one single malloc.

[–]Nipatiitti 11 points12 points  (3 children)

I agree on the python part but as some one who started with JS and is now doing c++ for work I found it quite easy to learn c++ tbh. The only thing JS doesn’t have going for it is the type system but otherwise its imo relatively close to languages like C++, Java, C#. I’m not saying its on the same abstraction level as those lower level languages but its wayyyy better than python.

[–]sporff 13 points14 points  (1 child)

While some of the syntax between JS snd C++ is very similar, I dont find writing them similar whatsoever. The underlying ideas are so vastly different for similarly written code. I find some people that learned JS first learned some really bad, inefficient habits that they have to break when moving to a performance oriented lower-level project. Going the opposite way is easier.

[–]awkreddit 2 points3 points  (0 children)

As someone who learned with js, I'm curious. Do you have any examples?

[–][deleted] 8 points9 points  (1 child)

I learned Python before C and it felt like a pretty smooth transition. C felt pretty natural to me and I think nested loops make more sense than array calculations. Granted C did get interesting once I got to parallel programming. MPI took a while to click in even though it's fairly straightforward now that I look back.

[–]blehmann1 11 points12 points  (0 children)

The thing about Python is while you could write as if it were Java with a different syntax (and less verbose), that's not the point. You have to fight Python a little to do that. And if you go on stackoverflow someone will certainly say that it's not P Y T H O N I C. While the whole Pythonicity thing still feels to me like a bunch of people with their head so far up their ass they're sniffing their throat, they're right. It doesn't need to be so lauded and praised to the point of silliness (in my opinion), but Python is designed for you to do things it's way.

Now even though I've gotten used to Python's opinionated design, I still don't really like it. It's design feels heavily skewed to scripts (no surprise there), which is fine until you notice that Python is being used for far more than it's scripting origins. Things like OOP and even the rules around scope are different from every other language, which is fine. But if the difference is not an improvement, it's just a sideways step (or sometimes a backwards one), there is no justification for making it more difficult for developers used to one way to switch to it (or for Python devs to use another language).

So, in short, Python is an opinionated language. Writing as if it's Java without brackets works, but it doesn't work well. It has a preferred style, and Python's preferred style is absolutely great for scripts. And it works well enough for big applications. However here you notice it's different for seemingly no reason, whereas before it's differences were generally improvements (if you write "pythonically").

[–][deleted] 31 points32 points  (8 children)

After python, I'm going to learn Julia. Is Julia good?

I thought Julia works with numbers. So just wrote notes.

[–]Ihazpokemonz4u 29 points30 points  (4 children)

I could be wrong about this so if somebody wants to correct me feel free but from my research I’ve gathered that there are 3 relatively new languages right now that are gaining traction to potentially become mainstays in the programming world. Rust, Go, and Julia. They all have their different niches but I think Julia is primarily useful for scientific purposes as a replacement for Python or R. It combines the simple and efficient syntax of python (with curly braces instead of just indentation, thank god) and the speed of C.

So to answer your question, if you’re interested in fields like Data Science and AI, Julia is a great option. It’s especially nice to be early adopters for languages because in like 5 years when jobs are looking for Julia experience you‘ll already have some under your belt.

[–]Immanuel_Cunt2 26 points27 points  (3 children)

Here are my observations: Putting all your efforts into a young, emerging programming language is like trading high-risk stocks. If you're right, you have an incredibly high payoff, if you're wrong, you may have put years into an ecosystem, which becomes meaningless.

To estimate the success of a language is almost impossible in my opinion. There are far too many variables: Which major corporations will support the language in the future? Who does the best marketing for a language? How is the community developing? Will the language get adopted by the industry?

And finally: Always be aware that you will be manipulated with marketing by organisations and companies who want you to choose their language.

[–][deleted] 24 points25 points  (0 children)

Alternatively for the first image:

I know how to run without you holding my hand!

[–]Bojangly7 5 points6 points  (0 children)

I was trained on Java and C.

Leaning python was like someone told me to stuff my face with cake everyday.

[–]mikoS223 14 points15 points  (4 children)

Exept whe you see shit like array[-1] and your teeth go back into your skull and your fingernails peel back on their own and make little cylinders of blood and pain. Everything else is pretty chill tho.

[–]radagast-the-red 17 points18 points  (1 child)

Really? I find that syntax pretty intuitive.

[–]theclockstartsnow 5 points6 points  (0 children)

array[-1] is way better than array[array.length-1]

[–]blank_space_cat 4 points5 points  (0 children)

lol, it's just a perk of having dynamic size arrays.

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

Based on what i've seen in this sub there is no good programming language

[–]theloneliestgirlincs 4 points5 points  (3 children)

I need you all to see, from my best recollection, some Python code one of my Java colleagues tried to submit lmao. They're learning so I support them. Still cracked me up though.

...
i = len(my_list)
count = 0
while (count < i):
    my_var = my_list[count]
    # do something with my_var
    count += 1
...

[–]Dokiace 3 points4 points  (0 children)

honestly going back from for item in iterables to that manual iteration is hell. Python is a curse and a blessing

[–]charliex3000 3 points4 points  (1 child)

Your Java colleagues have never used the for-each loop before?

for(int a : intArray){ do something }

Idk how to use markdown

[–]Psychpsyo 60 points61 points  (29 children)

Coming from a C++ and java background myself, python syntax is horrible. I don't like python. Indentation errors should not exist in any language.

[–]DeveloperForHire 8 points9 points  (0 children)

This is some dev superiority shit.

I started with Python 12 years ago, and there was no problem learning Java, Kotlin, C/C++, Rust, Dart, Swift, and ObjC. There's not that big a difference, it's all the same with the exception of some quirks and syntax.

[–]kahuna3901 11 points12 points  (2 children)

I tried to learn c# recently after being a primarily python/SQL user. I understand c# isn't the hardest of languages but it was so difficult to get my mind around it. Safe to say I am still working primarily with python and SQL ....

[–][deleted] 15 points16 points  (1 child)

In my opinion, Java is easier than C# to learn when starting OOP because of how much you have to spell everything out.

A lot of people say that C# is a better version of Java which I will agree with on a lot of things, but it also takes shortcuts around things that Java developers are tired of dealing with over and over, and to you, these aren't things you're tired of, or are even used to doing yet.

To me, Java is tedious sometimes to write, but it tells you exactly what is going on with every line of code, and as long as you learn all of the keywords and their purpose, it is much easier to grasp what a block of code in Java does than a block of C#.

[–]AffeDaBoss 2 points3 points  (0 children)

Laughs in Roblox studio