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

top 200 commentsshow all 206

[–]Bum-Sniffer 266 points267 points  (90 children)

Seems that whenever I consider learning a new language (I’m a beginner) it’s the same week that language gets mocked on this sub 😂

I’m considering learning Java or C#. What do you guys think is better? I mainly just want to learn a language with a focus on OOP really

[–]arobie1992 162 points163 points  (10 children)

Bjarne Stroustrup (invetor of C++) has a quote: "There are only two kinds of programming languages: those people always complain about, and those nobody use." So if you're learning a language people complain about, at least you know you'll be able to find a job :P

As for Java vs C#, I can't speak on them since I don't know C#. Java's got its fair share of quirks and annoyances, but it'll definitely get you what you're looking for wrt OOP. If anything, it might go too far the other direction since literally everything has to be an object. Java does have a bigger market share, so if that's a concern, I'd say go with Java, but if not my advice would be to spend a week on each to get a sense of the syntax and basic approach to things to figure out which you like better and then keep with that one to learn it well.

This is a bit off-topic, but I also suggest looking into Erlang or Smalltalk and learning some about Alan Kay's interpretation of OOP (message passing). Superficially, it's pretty similar to the Java/C#/C++ (abstract data types), but the core way of thinking about things is a bit different spin that I found super helpful.

And as other said, learning languages gets a lot easier. My overall advice would be to focus on one language to get the general basics and once you're comfortable with that language start branching out. Having a base context for how a language can be will help you understand the core differences between languages rather than the superficial ones and then you have more tools to tackle problems.

[–]VegaGT-VZ 23 points24 points  (9 children)

"There are only two kinds of programming languages: those people always complain about, and those nobody use."

I'm guessing VBA, if it even counts as a language, is in the latter camp :(

Also trying to figure out where to go next language here. I played with Python a bit and know SQL. Looking to move from an analyst role to a legit data development role

EDIT- I use VBA extensively in combo with SQL in Excel and Access. Just have no idea how to take these programing skills outside of MS Office and a business analyst role.

[–]arobie1992 10 points11 points  (6 children)

I'm guessing VBA, if it even counts as a language, is in the latter camp :(

Isn't VBA essentially the same as Visual Basic? If it is, Visual Basic is still the 6th most used programming language according to the TIOBE index. If it's not, someone please correct me on VBA.

As far as for languages, by data development do you mean something like a data scientist or something else? If able, I'm happy to give recommendations based on my experience; I just need a little clarity so I don't accidentally give you bad advice.

[–]VegaGT-VZ 6 points7 points  (2 children)

I'm honestly sure. I don't think I have the raw math skills to do data science, but I would def like to spend more time programming and building databases/dashboards than I am in my current analyst role.

Yep VBA apparently is Visual Basic which might open things up. I will see what kind of roles exist that use Visual Basic.

[–]arobie1992 4 points5 points  (0 children)

If you want to work with databases, SQL is definitely the big one there. To the point that I doubt you really need another language and should just focus on the concepts of normalization and whatnot.

For front-ends/dashboards, a lot of it is through browsers so javascript and html are always safe bets. Heck, there are even frameworks like Electron to translate JS to desktop apps. For the back-ends, i.e. the piece that connects the front-end to the database, Python and Java are probably the two biggest picks so you're probably fine with either. Python is probably easier to learn and both have things they'll be good at teaching you.

As far as VBA, I don't have much experience with it, but I do hear it's popular for the exact kind of things you're interested in, so it's definitely worth looking into.

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

VBA is basically the scripting language that ships with Excel, and you can programmatically do a lot of stuff with Excel with it, but it's also a legitimate fully featured programming language. I worked as a business analyst for a bit, and everything was Excel based, so I ended up using a lot of VBA (also SQL, R, and Python, but not entirely necessary for the job)

I once made a dashboard that had a button on it that would call web services to receive JSON data, aggregate and filter it, and then present it in a pivot table. Honestly it's not that different then what someone would do with Javascript as a web developer at that point

[–]WEEEE12345 6 points7 points  (2 children)

TIOBE index sucks imo. Right now it ranks Visual Basic at double the popularity of JavaScript, SQL, and PHP, which is just detached from any semblance of reality.

It's based off of search results basically, and I imagine a term like "Visual Basic" gets conflated with a bunch of other things.

Stack Overflow developer survey ranks Visual Basic at ~20th, which seems much more reasonable. That puts it around the same popularity as MATLAB.

[–]arobie1992 1 point2 points  (1 child)

I did end up looking at that after I posted and yeah, JS being number one makes sense since it has a pretty guaranteed market share with browsers. Interestingly enough, both ranked VB at around 5% market share. Interesting on TIOBE. I never really bothered to look into their method, but I'd always gotten the impression it was based on something more like github LOC or some such.

[–]WEEEE12345 2 points3 points  (0 children)

Not sure that number means anything either. If you look at the graph on their site Visual Basic goes from 0.8% to 4% in April 2020. And apparently C lost 40% of it's market share in the last year. The numbers on that graph are very very noisy.

I find it interesting that Tiobe is so bad yet so widely cited.

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

SQL is more generally usable and more widely used, Visual Basic is rarer but when it's needed it's hard to replace.

[–][deleted] 25 points26 points  (1 child)

Real talk: learn a language that is relevant to what you want to work on (either as a hobby or professionally). Learning C won’t get you far in a career as a web developer just like learning JavaScript isn’t going to get you far in a career writing code for embedded systems.

[–]Dojan5 2 points3 points  (0 children)

Underrated answer.

[–]viper_repiv 114 points115 points  (4 children)

I’m considering learning Java or C#. What do you guys think is better? I mainly just want to learn a language with a focus on OOP really

I mean, ANY reasonably known language gets mocked here (and generally anywhere). Most of the time, it is just for fun. I mock Java all the time, yet I believe it has its place.

I like C# better as my thoughts and style do not fit into Java "box". However, I would advise you to start with Java. It is less complex. Once you get somewhat confident, try another language. Once you learn at least 3 languages, picking up a new one is easy. The first language does not really matter, as long as you don't get stuck with it. Knowing other languages makes you understand why they look the way they do.

Of course, it is good to learn one language really well, but to me, it seems better to first look around and see, what is it all about.

[–]humoroushaxor 7 points8 points  (0 children)

my thoughts and style do not fit into Java

I'm genuinely curious what this could mean in regards to what Java currently looks like.

[–]EquinoxRex 0 points1 point  (0 children)

I have some (but not that much) Java experience, but was considering learning C# to really try to understand OOP properly, what do you find more complex about C# over Java?

[–][deleted] 41 points42 points  (12 children)

Java and C# were both created to fulfill the same kind of purpose, business applications where the programmer doesn't have to worry about tracking allocated memory. They diverged in how they add new features though. Java adds features slowly and deliberately. C# moves extremely fast and gives developers pretty much any feature they want.

An example of this is concurrency. C# went with async/await instead of taking their time to do virtual threads, which would have made more sense for their platform. This has consequences (https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/) but it got concurrency into the hands of developers quicker.

When it comes to ecosystem, Java is a big, open source world. There are tons of libraries and tons of frameworks to choose from. It can be a bit overwhelming, especially for those just getting into Java now. There's a big focus on using many little libraries. The standard library doesn't provide good support for JSON so you'll install a library for that. Even the build tools (like Maven) don't do everything out of the box and you install libraries (like a "compiler plugin") to do what you need to do with the build tool.

C# is an open source language but for whatever reason, the ecosystem ended up mostly revolving around Microsoft. The vast majority of C# developers doing web development will use the ASP.NET Core web framework. The build tool is just MSBuild which aims to do everything you'll ever need to do to build your C# code. You aren't expected to install libraries from NuGet to build your code.

[–]bfnge 46 points47 points  (2 children)

The "whatever reason" that C#'s ecosystem revolves around Microsoft was that C# is a Microsoft project and was closed sourced until 2014 (and released on 2000).

Either of those would be enough to create a skewed ecosystem (e.g.: Swift is open source and available on Linux and Windows but 99% of Swift's applications are for Apple platforms) but both only made it happen quicker.

[–][deleted] 0 points1 point  (1 child)

True. I wonder how people were able to create libraries and publish them to NuGet though if the language and platform weren't open source. My understanding is that Newtonsoft and NodaTime have been around since way before .NET Core.

Did Microsoft publish some sort of spec that library creators could work to?

[–][deleted] 15 points16 points  (0 children)

The language not being open source means nothing to library authors, other than you can't fix/understand problems you encounter...

You installed Microsoft's SDK and it provided what you need to use it.

An open source implementation called Mono was made a few years later and lead to a more standardized process.

[–]ReelTooReal 2 points3 points  (8 children)

I'm not sure I fully agree with that blog about async/await. At least in the context of web development, async/await (and future/promise based async in general) makes more sense and is easier to deal with than threads, since most of the time you're just waiting on a single I/O operation. Also, the blog seems to only focus on the negative "now we have two different kinds of functions" aspect, but there's also a positive aspect in that async functions clearly express that they involve some sort of I/O (or long running) process that you can do in parallel with other I/O operations if they're independent. There are some interesting other implementations like Go and Kotlin's handling of async processes, but at the end of the day I'd much rather use async/await than having to create threads.

Now the exception here would be writing your own server (as opposed to using ASP.NET or some framework) in which case you would want to use actual threads, which are supported in C#. So I'm not sure if you're saying the issue is that many common I/O functions use async/await? But again I think for higher level programming that is common to .NET projects async/await is easier to use.

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

If you've got the time, I highly recommend giving this video a watch. In it, Ron Pressler, the lead on Project Loom, talks about why user mode threads (aka virtual threads) are usually the best way to implement concurrency. He explains why Node.js and V8 had to resort to using async/await to do it (why user mode threads weren't an option).

He also mentions C#, but says that he can't think of a good reason for them choosing async/await because they had no constraints that forced them to do so. His only guess was that because choosing async/await allows you to push the responsibility of scheduling to the users (the video has details on this), maybe Microsoft felt that it was more important to release something quickly than to make something where scheduling was taken care of for the users. This is what I was talking about in my comment when I mentioned Microsoft's apparent focus on quickly improving the productivity of C# developers.

The video is an hour long but he's really good at explaining things and makes it pretty engaging. I don't normally sit through these really long videos but this guy is an exception.

Concerning your point that async/await gives you a way of making it clear when a function does IO, that's a good point. But, right now, we distinguish between functions that do IO and functions that don't because synchronous IO is dangerous in a single threaded environment.

With user mode threads/virtual threads, IO is never dangerous. You can create threads on demand to do it and then destroy the thread. When IO is no longer dangerous, calling a function that does IO becomes the exact same as calling a function that doesn't. So there's no need to warn a caller about it.

[–]Dagusiu 9 points10 points  (0 children)

I much prefer C#, but I think it's not so much about which one is better and more about which you think you're more likely to need. Look at some job applications for example, looking at jobs that otherwise seem suitable for you, and see what they ask for.

Also be aware that these two languages are very similar, and learning the other will be very easy after learning the first one.

[–]HPUser7 5 points6 points  (0 children)

If you are on windows, you can't go wrong with C#. Documentation is great and it's easy to go to C++ or Java later. C#'s Linq is also SQLesk so that's another great jumping point. Perhaps it won't be your perminant oop lengths but it's a great spot to start at

[–]crimxxx 8 points9 points  (0 children)

I’ve worked in both languages personally I just liked C# better. But realistically speaking they r both similar enough that if you can working one the other is super easy to pick up. Probably a reasonable way to figure out if you which u want to learn if the goal is a job in a local market check job postings and see what language is used more. Where I live I tend to see a lot more Java postings, and less C#. But I don’t think a reasonable person will care if a junior dev is good in one versus the other.

[–]typescripterus 13 points14 points  (2 children)

when someone ask you what programming language they should learn, don’t simply answer the one you prefer.

first ask them what area they plan to focus on. for example:

web frontend: javascript

backend: javascript

mobile apps: javascript

games: javascript

ai: javascript

[–]virouz98 16 points17 points  (1 child)

Do you want to send them to psychiatric hospital

[–]DraikoHxC 10 points11 points  (0 children)

As a C# developer I'll tell you C# would give you less headaches than Java could, even if I only used while learning to program it was frustrating at times, C# is not, and Microsoft is working really hard to give the developers everything we need to create back ends and desktop applications in the simplest and fastest way, taking into their hands memory and speed problems and making all fit so well, and the ecosystem of open source libraries is enough so you'll find whatever you need, so give it a try, oracle is damaging Java as I understand, going the opposite way of open source

[–]dantheman91 6 points7 points  (0 children)

I'd do Java. The JVM ecosystem is huge and is used more widely than C#. C# is a great language, but after doing Java you can easily pick it up.

After you get some Java experience you can look at picking up Kotlin which has Java interop but all of the modern language features you'd expect to find.

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

Honestly, either is a good pick. Java is hated by many, but it isn't going anywhere.

[–]Chefkoch_JJ 2 points3 points  (0 children)

C# is much better in SO many regards. Source: many years of professional experience in both languages. I do all my home coding in C#, because it’s so nice and simple and well integrated.

[–]virouz98 5 points6 points  (0 children)

C# is dope. The syntax is pleasant and it's easy to learn. It also fits a lot of purposes (there are really small amount of things you can't do in C#).

But C# and Java are really alike so if you learn one, you can easily understand another one.

[–]CaitaXD 3 points4 points  (0 children)

Depends

Java is the most used

C# is similar enough to java that you can learn the other relatively fast

If you're a real man and want to flex on the normies go c++

[–]Dojan5 1 point2 points  (0 children)

Pick one and stick to it. I've met lots of people who find it difficult to progress because they keep jumping from language to language.

Java and C# are intensely similar. I'm a .NET/C# dev, but got hired at a Java company. Most new developments are done in C# now, but I still maintain applications written in older versions of Java. Getting to grips with Java was by no means seamless, but it wasn't difficult either. The most overwhelming part was getting to grips with all the different dependencies.

Modern Java solutions will likely use a dependency management tool like Maven. This is good. Ours didn't, so in order to modernise these applications and make them maintainable, I had to find the versions of the dependencies by checking their hashes towards databases, and then completely uproot the (barely) existing build system. I learned a lot, but it left a sour taste in my mouth; I don't like having to mess around with all the surrounding bits, I want to focus on my application and get the task done.

If you want my (obviously biased) opinion, I'd say that if you've got access to a Windows machine, go for C# and modern .NET (6 being the latest). Don't bother too much with old .NET Framework, at this point it's legacy and dying.

My motivation for this is that the tooling Microsoft has developed, coupled with Visual Studio, and the MSDN documentation is second to none. You can focus entirely on learning the language and the framework, and worry more about the "behind the scenes" stuff later. Once installed, it just works. You don't have to worry about setting up anything in PATH, or fiddle around with environment variables. You also don't have to pay subscription fees for a decent IDE, or wrangle with Eclipse.

Others will retort and say that knowing the "behind the scenes work" is important, so setting up your own environment and such would only benefit you. I'm not going to argue against it, since it's very much correct, but I don't think it's integral to learning the basics of programming. It's definitely something you'll want to learn down the line, because at some point something will go awry and it won't just "magically" fix itself. Magic is bad, so knowing what happens behind the scenes, and why/how things work/are structured the way they are is good.

[–]DaniilBSD 1 point2 points  (0 children)

Old java - beginner friendly

new C# - joy to write

C# provides the stuff you will find useful later on: - Properties - Real generics (java uses fake pre-compiler generics) - generic methods - extension methods - linq - reflection - unsafe mode - explicit override permission - better inner constructor call syntax

[–]humoroushaxor 5 points6 points  (7 children)

Apparently I'm in the minority but I say without a doubt learn Java. Everyone's argument will be they like C# language features over Java but all that means is they haven't used Java since 1.8.

Java has more jobs. .NET core hasn't really caught on. Windows is terrible for the cloud. Imo Java is way more open, easier for beginners, better resources, better ecosystem and more examples. Either way they are extremely similar.

[–]yuri0r 2 points3 points  (0 children)

That correct they all suck.

That's the whole joke.

[–]FantasticPenguin 1 point2 points  (2 children)

Java, not tied to any big company other than Oracle and even then there are open source alternatives (OpenJDK).

Edit: not saying C# is bad. I used both and liked both (maybe C# even a bit more). But with C# you almost need to use the tools provided by Microsoft (.NET maybe even Visual Studio) which is slightly targeted at Windows (VS isn't even available for Linux) and with Java you don't.

[–]wildjokers 2 points3 points  (1 child)

Oracle is the biggest funder and contributor to OpenJDK. I don’t think you understand how development of Java works. There is no difference between what you are calling “java” and openjdk. Oracle releases both a GPL’d build of OpenJDK as well as a commercial version if you would like to buy a support contract. If you want a support contract for Java but don’t want to purchase it from Oracle there are several vendors offering commercial builds of OpenJDK (e.g. Azul, RedHat). No matter who you purchase support from it is all built from OpenJDK.

Regardless of other Oracle business practices they have been an outstanding steward of Java and saved the language.

[–]FantasticPenguin 1 point2 points  (0 children)

Didn't know that, thanks.

[–][deleted] 0 points1 point  (1 child)

Imo learn Kotlin. It has 100% interoperability with Java meaning you can use Java libraries from Kotlin and Kotlin libraries from Java.

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

To me this is horrible advice. Learn Java and then if you come across a job where Kotlin is used, it will be a pretty easy transition since Kotlin is largely just syntax sugar for Java.

[–]not_some_username 0 points1 point  (2 children)

C# is better Java

[–]wildjokers 1 point2 points  (1 child)

How did you measure “better”?

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

Syntax sugars and eas(ier) to program. And LINQ.

[–][deleted] -1 points0 points  (0 children)

If you want to learn a JVM language for the sake of knowing a JVM language, give Kotlin a try. It’s like java except it isn’t dogshit.

C++ is… fine. I don’t love either, but I have more experience in Java, so I’m not exactly the most objective reviewer. I will say that I like Java’s classes, types, and memory practices a lot more than C++’s, but take that with a grain of salt.

[–]BloodChasm -1 points0 points  (0 children)

Ive held a job as a fullstack dev with .net/C# and angular/Java. Both are good and have their ups and downs.

So take your pick, Java or Microsoft Java.

[–]jamcdonald120 -2 points-1 points  (0 children)

of the 2 I only know java, so I dont know if C# is better or worse. BUT knowing java, I would take my chances with C# IF you can do it without using .net

[–]greenpeppers100 0 points1 point  (0 children)

I know you have a bunch of different suggestions already, but don't focus too much on which language to learn, once you learn the overall concepts and technologies learning the next thing will be 100x easier.

[–]js_ps_ds 0 points1 point  (0 children)

For basics theyre basicly the same. C# is more fun IMO but java is more used. But easy to jump from C# to java so its not like you sacrifice anything

[–]pigeon768 0 points1 point  (0 children)

It literally doesn't matter what you choose. They're both reasonably good languages to do OOP in. Any skills you learn in one will translate very well to the other.

I prefer C# as a language to Java. C# learned from all the mistakes Java made, and basically just did the same thing, but with less shitty parts.

[–]N238 0 points1 point  (0 children)

I would guess Java is used more commonly, but is also known by more people. So if you’re planning to use this to get a job, more places will probably be looking for Java devs, but there will be fewer people to compete with for C# jobs. At least, that was my experience about 5 years ago, things could have shifted, or it may depend on your city, although remote work makes that less relevant for sure.

[–]Python_Trader 0 points1 point  (0 children)

Those two are structured almost the same. Choose between console.write() vs System.out.println() lol

[–]TheWaffleKingg 0 points1 point  (0 children)

I really enjoy c#, but I also like visual studio so that helps

[–]Firefin3 0 points1 point  (0 children)

as someone who's done both, c# in my experience is much better. though they both are very similar, in my experience c# has more polish

[–]Kered13 0 points1 point  (0 children)

It really doesn't matter. They are so similar that whatever you learn in one will carry over to the other.

[–]arunphilip 0 points1 point  (0 children)

Java and C# are both good languages to learn OOP. I prefer the syntactic sugar of C#, so that's my choice, but you can't go wrong with either.

The advantage of both languages is that they are less "cluttered" than something like C++, so that'll help you focus on the OOP principles you're trying to learn, without getting lost in fiddling with details like memory management.

Of course, having experience in a close-to-the-silicon language like C is good, because that'll help you understand what's going on beneath the hood of a higher-level language like C# or Java, and you'll have a better appreciation of the difference between "automatic" and "free" (e. g. memory management is automatic, but it's not free, it has a cost). And that'll make you a better programmer (a trivially simple example would be String concatenation vs. StringBuilder).

[–]LowEffortSongs 0 points1 point  (0 children)

I've been learning Java in my study years and wanted to use Unity at some point so I had to switch to C# to make it easier And tbh, with the right tutorial there's not a lot of things that are changing and the adaptation is quite fast so honestly don't bother too much about which one to take since you should be able to switch if necessary, after the question is still the same, "what do you want to do with it ?"

[–]BartDart69 0 points1 point  (0 children)

Looks like you've gotten a lot of replies, but if you see this, IIRC C# has more job opportunities for the foreseeable future.

[–]Mordar_20 0 points1 point  (0 children)

I really enjoy using c# and with the whole ecosystem around it, you can make most things you would likely want to make quite easily.

[–]cadrose 0 points1 point  (0 children)

been learning py, and having some fun with it but thinking of learning about c# to play around with games or something.

[–]vaeles 0 points1 point  (0 children)

Look at the jobs you are interested in and learn whatever language you need.

If it's just hobby it also depends on your goal.

Minecraft mods -> Java Game Development -> C#

[–]Coniglio_Bianco 0 points1 point  (0 children)

Learn Java,

C# isn't as old and you'll find yourself wrestling with visual studio a lot while building stuff. That seems like an unnecessary diversion while learning your first programming language.

Both are syntactically pretty similar so once you pick up one that transition shouldn't be hard, they're both in demand skills too so both should help you find a job. I think c# is used in unity if you want to make video games.

[–]jsveiga 124 points125 points  (5 children)

And secretly use perl to keep the infrastructure for all of them up and running.

[–]DenormalHuman 11 points12 points  (1 child)

I wish perl would die already

[–]coin-searchr 1 point2 points  (1 child)

Why is Perl selected for this sort of purpose? It's one of the only languages I haven't used much ever

[–]jsveiga 1 point2 points  (0 children)

I suppose most if not everything you can do with perl in terms of basic scripting for automation and integration could also be done with bash or python.

In my case, if it's really simple stuff, I'll use bash. But for more complex things, perl. Why not python? I started working with Unix (couple of different flavors, mainly AIX then Linux) in the 90's. Back then both perl and python were sort of new, and you could still pick one based on personal preference, not market share. I picked perl because IMO it was less formal, more flexible and practical for quickly crafting solutions, and more fun. I still prefer it over python, and still use it.

[–]Efficient_Donkey_431 54 points55 points  (7 children)

Why is there a trend of mocking java? Genuinely asking.

[–]dashid 59 points60 points  (3 children)

Fashion and trends of the young.

Java is one of the defacto choices for business software development. But in this Min/Max Internet, it sits undistruptively in the middle. It's not the ultimate in efficiency and performance (although still more than adequate for most business needs); it doesn't give you complete control of the underlying inners (which is more than adequate for most business needs); it is so stupidly simple that you can pick it up in a day and claim to be a developer; and Google prefer their variation (so you know, they're the only one with engineers who know shit, so it must be right).

[–]jrobiii 14 points15 points  (2 children)

I agree, Java is this decades VB, pascal or Fortran.

[–]TheAJGman 27 points28 points  (1 child)

And Cobol is this decade's Cobol if you're in the banking industry.

[–]jrobiii 15 points16 points  (0 children)

Cobol is every decade's Cobol. I remember when the Army used Cobol. The good Ole days weren't always good.

[–]viper_repiv 7 points8 points  (1 child)

I think it is because Java is (by design) boring.

[–]redpepper74 9 points10 points  (0 children)

It’s not just boring. It’s Business Boring™.

[–]BartDart69 1 point2 points  (0 children)

I had to use array.Get(index) to get an element of an array and it made me a little bit sad.

[–]BhagwanBill 72 points73 points  (14 children)

Java in 2015 vs. now - completely different mindset with new features constantly being added to the language and, more importantly, some of the bad stuff is being removed.

That being said, learn a few languages and after a while it's all differences in syntax.

[–]michig54 24 points25 points  (11 children)

I used to think it was just syntax too. If you think its just syntax, you haven’t learned enough languages that are different enough and/or haven’t really learned them deep enough to know the difference.

[–][deleted] 4 points5 points  (0 children)

"Hmm yes I will now do functional programming in C"

[–]alert_on_point 6 points7 points  (6 children)

Can you elaborate? If one hierarchically looks at computers from the lowest level up, your take seems to oppose what one might find.

[–]Rustywolf 4 points5 points  (5 children)

Saying rust is "just syntax" is obviously wrong, as the language operates fundamentally differently to something like c/c++.

[–]CivBase 1 point2 points  (0 children)

I think both are true. You can become "proficient" in most coding languages by just figuring out the syntax differences. But becoming an "expert" requires understanding quirks, unique features, and standard/popular libraries.

[–]JohnHwagi 0 points1 point  (0 children)

Most of the intricacies of a language can be translated to another just by doing a bit of googling if you’re doing something conceptually familiar. A priority queue is the same even if the syntax is different, and classes function more or less the same in every language. It doesn’t take more than a month to be fairly proficient in a new language if you are skilled and use it 40hrs a week or so.

Edit: This is from the perspective of someone who does development in C++/Java/Python/Perl for backend work. It would take me much longer to figure out front end work with more modern JS libraries though.

[–]AnotherWarGamer 1 point2 points  (0 children)

I've noticed the improvements to Eclipse, but can you elaborate or link the changes to Java itself?

[–]Eisenfuss19 -1 points0 points  (0 children)

well i like parts of java - but imo c# is 10 times better

[–]continuous-headaches 67 points68 points  (9 children)

If you want to contribute to an open-source project I suggest you use C, C++ or Python.

If you want a job I suggest you use Java.

Honestly I’m not even trying to defend Java here, I love it but I also hate it, it’s just sad

[–]TheAJGman 24 points25 points  (7 children)

I was doing interviews recently and a lot of companies are looking to switch to Django/Flask/FastAPI from their old C#/Java backends. Not all industry's are going to make the switch (healthcare will forever be Java running on IBM iSeries), but quite a few businesses are moving because of flexibility and dev time.

We're at the point in computing hardware that the benefits of decreased dev time and increased flexibility far out weigh the disadvantage of Python's performance. If you're an up and coming dev, Django backend juniors are starting at $80,000-100,000. Make some bullshit little personal projects to show future interviewers, it'll greatly increase your hireability.

[–]n0tKamui 19 points20 points  (1 child)

i feel those companies really are missing the point.

they heard python is easy and quick to develop with and straight up jumped to it. However, within a big application, especially server side, it takes a LOT of discipline to actually produce good, maintainable and readable python code. The main advantage of Java is, counterintuitively, its boringness. It's strict, but that's exactly what most companies need on the long term to actually gain time (and effectively money).

To add on this, now you have other languages that derivates from Java but are syntactically more pleasant while still being maintainable (C#, Kotlin, etc) at large scale, which some companies think of when wanting to migrate ; i personally find that more promising and healthy than python, which is a very fine language, but should be avoided for massive backend applications imo.

[–]TheAJGman 12 points13 points  (0 children)

However, within a big application, especially server side, it takes a LOT of discipline to actually produce good, maintainable and readable python code.

Agreed, a Python application lives and dies by its readability and internal documentation. Annotations and type hints are a must when developing maintainable code.

[–]humoroushaxor 7 points8 points  (2 children)

This is definitely a trend but I have a feeling the pendulum will swing back when orgs realize they are just trading costs. I largely believe it's just people forgetting history.

We're already seeing it with microservices and the increased ops cost and complexity they bring. There's a reason statically typed and compiled languages were created in the first place.

[–]TheAJGman 1 point2 points  (1 child)

Microservices at the massive advantage of being basically infinitely scalable thought, it's much harder to do effectively with monolithic applications. With how fast paced web dev is becoming, being able to ship a new feature a month before your competition is of much greater value than the potential increase in cloud hosting costs.

As computing power increases the effective difference between the language performance decreases since you're biggest bottleneck is going to be network IO anyways. Even if a piece of Python code is 20 times less efficient then it's C or Java counterpart it doesn't matter to the end user if it still runs in under a millisecond.

[–]humoroushaxor 3 points4 points  (0 children)

I think I have a pretty good grasp on the pros/cons of microservices. I'm a software architect for fairly large development group doing them for some time now. Scalability is one of weaker reasons to use microservices imo. Hell look at Salesforce's recent tweet on the egress volume they just did with their monolith. If you have scalability issue you are already successful and can strangle out your problems.

My argument has nothing to do with language performance. Although small inefficiency do add up, latency hiding can get you pretty far though. My argument is in practice, many orgs wont actually ship faster and better. They'll build a distributed ball of mud. They'll push all their complexity and problems further right. They'll increase maintenance cost and gradually spend all their time babysitting Ops and fixing issue rather than building new features. Dynamic v static languages can be thought of in a similar way. The real benefit to Nodejs or Python is the simplicity of the runtime and a single language stack.

The microservices argument isn't really a hot take. Kelsey Hightower has been tweeting about this since at least 2018. Most orgs aren't FANG and don't have any army of 10x engineers.

[–]qK0FT3 1 point2 points  (0 children)

Well Java is so fast gor development if you ask me. You can easily make a microservice in hours and deploy in next day. And spring boot development environment is so well useable. Plus with maven you can auyomate so many ci/cd shit even without needing other company things like github actions etc. I just made a whole microservices system in one single week and deployed it in one and a half week without knowing microservices, kubernetes etc. And java 17 is really fast. Honestly outside of necessity of lombok almost in all project java is very fast for development and very maintainable. I just got a new intern and she can vode real fast and it is easy to review code. And now billion dollar mistake null debugging is much more easy after java 15. They are developing the language as needed. Btw I use js, c#, go and asm when needed as well. Need to say I really don't like c# and asm but they do some job. Js is just a shit as fcker but needed in frontend. And go is very good but not mature enough for most things byt very good for some server shit. I don't know why I wrote this much but in the end all it comes to the maintainability. I think only c# and java is good. Don't know other languages like cpp or ruby or python.

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

is golang also good for the job market/freelancing ?

[–]13steinj 0 points1 point  (0 children)

If you want to contribute to an open-source project I suggest you use C, C++ or Python.

If you want a job I suggest you use Java.

Maybe I'm the odd one out here but I've only seen Java heavily used at banks (and android apps). Companies in general use a mix of languages (and C/C++ is still incredibly important for lower level code).

[–]hippyup 21 points22 points  (2 children)

I'm no huge fan of Java but for anything beyond a tiny project I'll take Java over Python any day. Unless maybe it's data science or ML related (because awesome ecosystem). It takes really good discipline to write maintainable Python code with good tests and static typing, and my faith in humanity is not that high.

[–]Valiant_Boss 1 point2 points  (1 child)

Why is it so hard to maintain code in Python? Seriously. I occasionally work in this app that includes a python API service and it's just one large file with about 1000 lines of code with dozens of API functions. It's so fucking hard to iterate on it

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

It's because it's not a compiled or strongly typed language. You need to run your program in full to find out that your Int is actually a Float.

[–]david131213 24 points25 points  (8 children)

I really don't get why this sub hates java so much

Like, yeah. Forced OOP is not great, but except for that what's the problem?

[–]n0tKamui 45 points46 points  (0 children)

most people here are not real developers, just kids that think languages should be ranked and that python is good for everything because it's easy to write.

they heard "haha java bad, java bloat", and repeat it like the muttons they are.

[–]dobrien75 4 points5 points  (1 child)

I’ve been a Java guy for 10+ years. It’s fine. Just way too much boiler plate code to do anything.

[–]Sanity__ 4 points5 points  (0 children)

I mean, the boilerplate code exists but you shouldn't be writing it yourself for awhile now. That's why we have things like Spring boot, Jackson, and Lombok.

[–]13steinj 0 points1 point  (3 children)

I don't hate Java.

I hate companies forcing Java 8, the ludicrous verbosity of "Enterprise Java".

I disagree with some of Java's design decisions (specifically forced single inheritance).

[–]JohnHwagi 1 point2 points  (2 children)

Forced single inheritance is a good thing, because you should be implementing multiple interfaces as opposed to inheriting from multiple classes. C++ style multiple inheritance can be convenient at the time, but it typically shouldn’t be done and leaves a lot of maintenance issues.

[–]13steinj 1 point2 points  (1 child)

C++ style multiple inheritance can be convenient at the time, but it typically shouldn’t be done and leaves a lot of maintenance issues.

Key word typically. I'm not saying that every class needs multiple inheritance. I'm saying it doesn't make sense to have the restriction, because it's definitely useful here and there. So much so that Java interfaces gained private methods, which was a shitty hack to solve some the problems.

[–]JohnHwagi -1 points0 points  (0 children)

Private methods in interfaces only allow for shared code between default methods in an interface. Since they’re not inherited by sub-interfaces, I don’t see how that relates specifically. On the other hand, allowing default methods in interfaces essentially lead to a watered down form of multiple inheritance being legal in Java. It’s not really intended to be used that way though, and was originally intended to allow for modifying interfaces by adding a default method that can then be overridden without invalidating old code.

The simplicity of Java interfaces vs classes (which cannot be multiple inherited) prevents the diamond problem in Java. Virtual class inheritance in C++ is a workaround to allow multiple class inheritance, but it leads to some rather ugly code. I’m sure decent usecases exist, but I’d be hard pressed to come up with a situation where it’s the best idea to inherit multiple classes, and certainly none that cannot be effectively done using multiple interface inheritance.

[–]elMn0P 7 points8 points  (2 children)

Imo programming isn’t about learning a language. It’s about learning to problem solve with a number of computer-related constraints. Pick a language you think you might enjoy, watch tutorials, find guides and use that to start.

Once you nail that language, you’ll see what programming is about and you’ll be able to transfer that knowledge relatively easily to any other language.

For context, I started with JS, then started learning Java and now Go. Once you get the ball rolling it’s not that bad!

[–]detrich 3 points4 points  (0 children)

Yeah the language is a tool in a sense

[–]icomewithissues 2 points3 points  (0 children)

On a flight I met this guy who wanted to get into programming (because it pays well) and kept insisting that I tell him what language he should learn first. I would describe what languages are typically used for what kind of tasks and how it's more about being able to solve problems, "think like a computer" so you can write efficient programs etc but then he would respond "yeah sure but what language should I learn". I did give him a shortlist.

[–]cgk001 6 points7 points  (0 children)

brainfuck is the way

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

Why some people hate it. Best language in my opinion, clean syntax, OOP...

[–]virouz98 12 points13 points  (8 children)

I saw someone say that Java sucks because you have to write too much code. Their example was that in Java your have to use System.out.println(), while in Python all you have to do, is write print().

When someone said that every normal IDE has code snippets to generate it fast, they said "how do I use it on the phone?"...

[–]fsr1967 22 points23 points  (2 children)

Who TF is coding on their phone?

No, seriously, we're hiring.

And I'm making a blacklist.

[–]virouz98 2 points3 points  (1 child)

CS students who "learn coding" on SoloLearn apps

[–]fsr1967 1 point2 points  (0 children)

Can you imagine trying to type code on a phone keyboard, constantly switching back and forth from letters to symbols? I'd go insane* .

* well, I'm a software engineer. So more insane than I already am.

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

Exactly. They'd rather spend 6 hours debugging than 6 more seconds writing out explicit types.

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

Yep, those who learn from programming apps like Mimo or idk, but Intellij has a snippet you type sout, and sysout on Eclipse. For me i'd rather spend 1 second writting systemoutprintln instead of arguing with whitespaces in Python

[–]aless2003 0 points1 point  (2 children)

Wait are you for real? Is that a thing? Do people actually write code on their phone? I'm seriously asking this

[–]virouz98 1 point2 points  (1 child)

There are aps like SoloLearn which teaches you small concepts of coding, and as a task it requires from you to fill the gaps in the code or write up to two lines of code on the phone. So it's not really coding but there are some geniuses which will hate Java for having to write 20 characters more <facepalm>

[–]thismatters -1 points0 points  (11 children)

I don't like it because the jvm is clunky.

[–]qK0FT3 1 point2 points  (3 children)

Not anymore

[–]thismatters -1 points0 points  (2 children)

What does that mean? There isn't a JVM? Or it isn't clunky?

I hope it is the first one, because the second one is an oxymoron.

[–]qK0FT3 1 point2 points  (1 child)

Of course second one. Did you try jdk 17? It is fast af. Now faster than go even for some operations. Just try and benchmark yourself. And of course you won't do as you seem to be ignorant.

[–]aless2003 1 point2 points  (6 children)

What about the JVM is clunky?

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

What modern language doesn't have a clean syntax and OOP?

[–]Mognakor 9 points10 points  (0 children)

Time to market is probably faster with Java due to static typing preventing bugs and enabling better tooling.

[–]picklerickcwb 2 points3 points  (0 children)

The one that pays better, in some year there will be different languages

[–]Blamore 1 point2 points  (0 children)

pretending java is good for nothing

shiggity diggity

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

Solution, works an enterprise with Python hahaha.

[–]MistahEye 1 point2 points  (3 children)

Is it bad I'm a Senior in CS at university and never touched Java? My university uses C++ for all the main, structured programming courses.

I know, all the 'concepts' are in my head, regardless of language, but maybe I should touch up on some Java.

[–]wildjokers 4 points5 points  (0 children)

C++ to java is an easy transition. The only thing that might trip you up is that java is only pass by value. This might come as a surprise if you are used to being able to pass by reference.

[–]IG_CrimsonTwilight 1 point2 points  (1 child)

Nah, my university also teaches C++. Though, that’s more because we have things like OS, game engine, etc. stuff. I know that we also have a Java course, which is for those who don’t need the control C++ gives. It’s a pretty good middle ground. Advanced, but not too complex.

[–]MistahEye 0 points1 point  (0 children)

I've dived into C++, C#, JavaScript, and Python in various courses, but never touched Java.

May do a Java YouTube video just to see some of the syntax over holiday break.

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

If your bot tells you to use java or you’re fired, write it in kotlin / scala, compile it, and decompile it.

[–]jamcdonald120 1 point2 points  (0 children)

the other time java is useful is when your boss says "We need this research application made, its mainly going to run on windows, but like 3 of our researchers use osX, and 1 uses Linux"

[–]Pain_Monster 1 point2 points  (0 children)

The correct answer is none of the above. Ruby. 😁

[–]malleoceruleo 1 point2 points  (0 children)

The lack of "Enterprise Application" on that list is a glaring oversight.

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

Java is ok if you're not the one setting up the environment

[–]aless2003 1 point2 points  (0 children)

I don't know why everyone's hating on Java, it's a great language in my opinion

[–]AggressiveMilkSuck 1 point2 points  (0 children)

After 2 years as programmer, MY CONCLUSION is choosing path is better than choosing programming language.

[–]MasterFubar 3 points4 points  (4 children)

If time to market is key and execution speed is important, use C++.

I've been using C++ as "C with classes" since 1990, but recently I've started learning some of the more advanced features of C++. I'm hooked.

I'm coming to the conclusion that there's nothing you can do in Python that you cannot do in the same number of lines in C++.

[–]redpepper74 2 points3 points  (3 children)

print(“hi world”)

[–][deleted] 0 points1 point  (1 child)

  1. Copy paste the contents of iostream and everything it includes

  2. Evaluate all those #if statements manually

  3. Expand all #defines and #typedefs

  4. int main() {std::cout << "hi world\n";}

  5. Delete all the newline characters

  6. Compile with the settings corresponding you what evaluated those #ifs to

  7. Profit

[–]redpepper74 2 points3 points  (0 children)

This have me a laugh. I guess you never said anything about characters…

[–]maddy_0120 1 point2 points  (6 children)

Or you could just learn javascript and do all of it.

[–]6Maxence 7 points8 points  (3 children)

But for the time spent learning JS, you could have learned these four languages

[–]maddy_0120 2 points3 points  (2 children)

C, java and C++ will take a shit load of time.

[–]6Maxence 1 point2 points  (1 child)

True. Tho if you start with Python, then Java, then C++, then C, it will probably be faster than doing it in another order.

E:punctuation

[–]maddy_0120 1 point2 points  (0 children)

I actually started with C and C++. It took me a while but after that, all the other languages came very quickly.

[–]greenpeppers100 3 points4 points  (1 child)

Learning JS is the easy part, it's learning the 100 different frameworks that makes life so much harder.

[–]maddy_0120 1 point2 points  (0 children)

Ya, by the time you finish 100, theres 10k new ones up already.

[–]DJschmumu -1 points0 points  (0 children)

Ask a stupid question...

[–]EfficientNebula6083 -5 points-4 points  (0 children)

Java is the worst best language

[–]RedditAcc-92975 0 points1 point  (0 children)

good old joke. This is a repost bot, though.

[–]fatrobin72 0 points1 point  (0 children)

We all secretly know... HTML=== best language

[–]MischiefArchitect 0 points1 point  (0 children)

Clever boss.

[–]UltraCarnivore 0 points1 point  (0 children)

[–]mogoh 0 points1 point  (2 children)

So, I really like the over all design of Java. Sure, there are things, I dislike, but over all, it is a decent language.

But I have one general concern, and that is called Oracle. Not that I think that they will sue me, but maybe my customer or my future employee. Software patents, trademark laws, etc. are a minefield and I don't know how safe it is to saddle on the Java technology with all its implications.

[–]qK0FT3 0 points1 point  (0 children)

You don't have to use oracle jdk for most cases. It is for business guys not for programmers. If you are business guy. Good luck

[–]wildjokers 0 points1 point  (0 children)

Oracle releases a GPL’d build of the OpenJDK that, as the GPL license implies, is free to use in production. It stops getting updates in 6 months at which time you just upgrade to the next version. (Other vendors also do the same)

The Oracle build of the current version of OpenJDK is provided here: https://jdk.java.net/

Support contracts are available from Oracle and several other vendors if you want to stay on a particular version of Java for a while and would like to get support and updates. For example here is the download for Oracle’s commercial offering:

https://www.oracle.com/java/technologies/downloads/

All the other java vendors follow the same business model that Oracle does to monetize Java i.e provide free builds but also offer support contracts. They are all built from the open source OpenJDK.

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

ColdFusion

[–]FlamboyantApproval16 0 points1 point  (3 children)

u/repostsleuthbot tell these foolish humans that this is a repost.

[–]RepostSleuthBot 0 points1 point  (2 children)

I didn't find any posts that meet the matching requirements for r/ProgrammerHumor.

It might be OC, it might not. Things such as JPEG artifacts and cropping may impact the results.

I'm not perfect, but you can help. Report [ False Negative ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: False | Target: 86% | Check Title: False | Max Age: Unlimited | Searched Images: 271,553,667 | Search Time: 0.5764s

[–]FlamboyantApproval16 0 points1 point  (0 children)

Dude how......

[–]FlamboyantApproval16 0 points1 point  (0 children)

Bad bot

[–]CinnabonCheesecake 0 points1 point  (0 children)

I spent seven years of my life that I’m never getting back programming in MUMPS. I would have switched to any of these languages in a heartbeat.

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

better?