OT: Java or C++?

cometazzi

Friend of Leo's
Silver Supporter
Joined
Dec 3, 2019
Posts
2,054
Location
Wisconsin, Das Land von Käse und Bier
This is really OT, but I know there are at least a handful of software developers here. Ideally a software dev will know multiple languages (like all us guitarists that know multiple styles).

My question is if I should spend time learning Java or C++

Helpful information: I'm not new to programming. I did BASIC on my Commodore 16 in the 80s, learned C in the late 90s and have since dabbled in Perl, Python, Java and C++ to some extent (not in that order). I've probably got equal time into both Java and C++, but I'd say I got just past the 'beginner' and touched on the 'intermediate' level in both before the time ran out. I've always enjoyed programming, but something has always got in the way of putting a couple year's worth of dedicated time. Mostly it's been girlfriends and school. Both will be gone forever in a few months.

Java is easier to learn, but also verbose and beholden to an evil corporation (Oracle). Seems like it has better employment potential.

C++ isn't owned by anyone (though it still boils down to available compilers). I like how it's lower level and compiles to a native executable (no JVM to run it). Some say it's harder to learn.

Software devs of TDPRI with experience in either or both, what would you suggest I put my time and effort into? If you have *other* suggestions, I'm all ears.
 

middy

Friend of Leo's
Joined
Apr 28, 2010
Posts
4,435
Age
51
Location
MSP
C++ for system development. If you’re going to be a software engineer working on things like operating systems, games, commercial software like web browsers or office suites, embedded software, etc. These guys are often top developers and there aren’t that many of them relatively speaking.

The average programmer working on internal business software, or web applications is much more likely to use Java.
 

green_henry

Tele-Meister
Gold Supporter
Joined
Nov 2, 2013
Posts
460
Location
Pleasant Hill, CA
C++ for system development. If you’re going to be a software engineer working on things like operating systems, games, commercial software like web browsers or office suites, embedded software, etc. These guys are often top developers and there aren’t that many of them relatively speaking.

The average programmer working on internal business software, or web applications is much more likely to use Java.
Good distinction.

I work for a software company, and from an apps standpoint, I would have to say: Java
 

bgmacaw

Poster Extraordinaire
Joined
Feb 11, 2006
Posts
9,985
Location
Near Athens GA USA
I guess the thing I failed to mention is that I'm in my upper 40s now, so I might be disqualified from software development as a career.

Only if you want to work for a Big Tech company or a hip start-up. There are a lot of in-house IT departments that don't have age, and other, biases. That's why I've worked in the IT departments of logistics and manufacturing sector companies for the past 12 years or so, with a few side contracts in marketing.

So far as the job market goes, it's best to have some flexibility in languages and the ability to learn new things quickly. I've worked with dozens of different languages, frameworks and database systems over my 30+ year career. In my current job, I work with VB6, VB.NET, C#, JavaScript/NodeJS and Java along with different frameworks for each as well as SQL Server and Progress databases. Which one I work with depends on what Agile stories I'm assigned to in a Sprint.

As for the 2 languages you mentioned, it depends on the type of work that interests you the most. C++ is mostly used for low level development these days, such as embedded systems, device drivers and services. Front end UI development is relatively rare in C++ these days. Java is more common in general purpose programing and knowing it makes it easier to learn similarly syntaxed C-based languages (JavaScript, C#, Kotlin, Swift, etc.).
 

VintageSG

Poster Extraordinaire
Silver Supporter
Joined
Mar 31, 2016
Posts
5,356
Location
Yorkshire
C++ for system tools that'll be used by the competent.
Java for end user stuff.
C++ for applications.
Perl/MySQL/PHP/Ruby/Python for data handling.
sh/bash/csh are well worth looking into too.


My programming started with Basic/BBC Basic ( -The- best basic dialect ever. I will brook no compromise on this ) before 6502/Z80/ARM assembler ruined my synapses. Forth/C/Perl/SQL (various ) and shell vied with TCL/TK. I never got my head round C++ or Java properly. TCL/TK makes for easy GUI development for applications.

There's too many to contemplate these days.

Install Linux if you haven't already. A VMWare virtual machine will suffice. There's a plethora of programming environments available, and you'd be surprised at just how much of the world runs on Linux these days. It's not tricky to learn *nix basics. Have fun with the Apache and MySQL installs. Grasp those, and the world is your oyster.
Linux also makes access to TCP/IP easy, so there's your distributed software, your monitoring software and server side sandbox too.
 

uriah1

Telefied
Gold Supporter
Joined
Feb 12, 2011
Posts
27,313
Location
Around
I am an old system 36 focus and visual c guy. All this new stuff, including python is over my head.
My wife took fortran in school.
 

AAT65

Poster Extraordinaire
Joined
May 29, 2016
Posts
6,060
Location
West Lothian, Scotland
I like C++ a lot more than Java but I think Java will be easier to earn money from -- including Android app development as well as web development.
Age shouldn't disqualify you if you have the skills! Good luck!
 

Digital Larry

Friend of Leo's
Joined
May 30, 2017
Posts
3,696
Location
Silicon Valley, CA
I learned C at my first job ever, at Ampex, writing code for custom peripherals for commercial video editing systems (Z80 based keyboards and touchscreens). In my spare time, I developed a DOS-based MIDI sequencer (now I'm really dating myself, it was the early 80s). When the compiler vendor (Datalight) came out with a C++ compiler I incorporated some of that into the program.

Fast forward to about 10 years ago I taught myself Java to incorporate another guy's open source library into an application I wrote called "SpinCAD Designer" which is used to develop DSP algorithms for effects pedals. I only used Java because the library had been written in Java.

My kids have both started taking CS classes online at the JC and started by learning some C++.

From the perspective of learning it for fun, my impression is that Java has a more extensively developed set of libraries for different things like displaying "file open dialog boxes", etc. Other than that, no real strong preference one way or the other. The JVM concept (being able to write code that is instantly cross platform) is kinda cool.
 

rcole_sooner

Poster Extraordinaire
Silver Supporter
Joined
Feb 12, 2010
Posts
6,909
Location
Oklahoma City, OK
I've done so many languages over the years, some of which may not even exist anymore.

I'm currently working for a php and javascript (including turbo with a good smathering of React) shop.

Really as you said, learn as many as you can. And not just the languages, but the tools and frameworks too.

This is a great place to learn. https://www.hackerrank.com/
 

DesmoTele

TDPRI Member
Joined
Sep 26, 2018
Posts
93
Location
Texas Gulf Coast
And now for something completely different...Smalltalk.

It's certainly not mainstream and good luck finding a 'real' job using it, but since you say it's for fun and not as a career that shouldn't factor in. Syntax that fits on an index card, 'live' objects, dialects that are open-source and cross-platform, yada yada. Pharo for cross-platform and Dolphin Smalltalk for Windows are easy ways to check it out.

You'll probably find lots of reasons given _not_ to learn/use it (and for a career, they're likely valid) but for my hobby projects it works the way I think and suits me just fine. Texas Instruments can run a billion-dollar fab using it (see ControlWORKS) and JP Morgan and other financial institutions use it on the back end as well, so it'll certainly do anything _I_ need it to do.

But yeah, learn as many paradigms/languages as you can. Procedural, functional, OOP, etc. Just like life, looking at things from different perspectives is a Good Thing.
 

chris m.

Doctor of Teleocity
Joined
Mar 25, 2003
Posts
10,416
Location
Santa Barbara, California
I wrote lots of code in BASIC and FORTRAN when I was doing lots of science. Stats were done in FORTRAN and later with SPSS and Systat. I knew Vax VMS, Harris, and DOS OS’s. Once you understand the basic concepts of things like functions, subroutines, lists, and recursion, I don’t know if it’s worth learning how to do that in other languages unless you need to. Too hard to assimilate and retain unless you’re actively using it. The cool kids doing science all use R nowadays, but as a bureaucratic manager of scientists these days I am clueless about it…
 

beninma

Friend of Leo's
Joined
Mar 17, 2017
Posts
4,241
Location
Earth
I'm a professional software engineer and have been doing it full time for almost 23 years.

I learned C++ before Java, but I would not necessarily recommend learning C++ at this point unless it's strictly hobby.

C++ was kind of a research project.. it has changed dramatically over the years, the industry has always had a super hard time keeping up with it. Constant rewriting of code cause the language changed. And because the language was always a moving target and super complicated the average skill level of everyone writing it was pretty low. In practice many businesses had a very hard time producing high quality software with it. Elite developers did well with it, but as soon as you are making a product that requires a bigger team the quality of your code kind of drops to whoever is the weakest person on the team.

I spent a lot of time getting really good at C++ and even by 2000 the jobs were few and far between. I have almost always worked on Java. I know I would likely love C# but I'd have to transition into the whole Microsoft World.

Python is a good place to start. Javascript has lots of entry level jobs and a relatively short ramp up period. The thing with those two languages is they are very easy to learn at a beginner level but very difficult for teams to write large scale software with.. it's very easy to run into bugs because the languages are less strict with less protection.

Java and C# are good bets, lots of work out there. But maybe start with C or something. It's very valuable to understand how computers actually work, and C is a lot closer to that. The other aspect is the math aspect is extremely important separates the true pros from everyone else. Whatever language you want to work in the important thing is understanding data structures and algorithms.

Mobile software (iOS/Android) is a race to the bottom.. not really a good target, the business opportunities are not great there because the customers want everything free or for $0.99. If you're coming in without a degree and want to get gainful employment Javascript development for web development is probably the way to go. QA jobs are also a good entry place for people without a degree to get their foot in the door. You can go take a boot camp for Javascript and be making really solid money pretty quick.. I know people I've worked with (including one guy who was a guitarist who gave up on a pro career in that) who did that route and was surely making 6 figures within a year or two. He is a smart guy who works like crazy though. Most of the teams I've worked on though if you went and studied Java/C#/C++ and were interviewing for a position on the "back end" it would be vastly harder to get in the door without a degree.
 

BigDaddyLH

Tele Axpert
Ad Free Member
Joined
Sep 1, 2009
Posts
62,077
Location
Kelowna, BC, Canuckistan
Java is easier to learn, but also verbose and beholden to an evil corporation (Oracle). Seems like it has better employment potential.

Just to comment on this... My employer was sued (big time) by Oracle and as a result, they ripped anything Oracle-related out of our code base and tools. We switched to Azul (formerly Zulu), an open source JDK and platform core. So we are still Java-based, but not directly beholden to Oracle. At least, not as far as the lawyers are concerned.
 

rcole_sooner

Poster Extraordinaire
Silver Supporter
Joined
Feb 12, 2010
Posts
6,909
Location
Oklahoma City, OK
How are you liking React?

At my company one group is using it while my group is using Vue. I'm just glad we aren't using Angular.

It is still a huge learning curve for me. Just the tools for the build process and getting it to push to my local dev web server is hit and miss. Certainly is a long was from C programming. I'm way more comfortable with the php. But a lot of our apps are moving the single page apps (SPAs) which are using React. Swagger is the other half of this, which we use as a test tool, to test the endpoints before the SPAs are coded and working.
 

BigDaddyLH

Tele Axpert
Ad Free Member
Joined
Sep 1, 2009
Posts
62,077
Location
Kelowna, BC, Canuckistan
Java is easier to learn, but also verbose and beholden to an evil corporation (Oracle). Seems like it has better employment potential.

I'm meditating on the word verbose. Some verbosity in a programming language isn't necessarily a deal breaker.

If I were to compare two solutions to the same problem, written in two different languages, and try to reduce "which solution is better?" to a single criteria (this a thought experiment, I realise real life is too complex for such reductions) I think I come up with:

"Which is more elegant? Cleaner/Clearer?"

A lot of that is down to the developer, not the language, but the language and its libraries support that.

You could ask which is more robust, more maintainable, more extendable, more efficient... but if the code was handed to me as my future responsibility, I vote clean and clear.
 




Top