Java: Learning to programme in

Creag

The Boar's Rock
Joined
May 19, 2009
Messages
39,690
It's between Java and Python....

I rank Delphi and VBA as equivalent criminal acts. Change my mind.

Java has issues but it makes some great concepts accessible to the novice. It's a great starter language as long as part of the learning is what to avoid.
Not going to change your mind. It is the only language that is being taught in her school. While I appreciate that there are better programming languages to learn, we must make the most of the opportunity and use it as a stepping stone to what she ultimately wants to be.

Nonetheless, your input is appreciated :)
 

animal531

Expert Member
Joined
Nov 12, 2013
Messages
1,886
From a learning perspective, any computer language is great... as long as it’s C.

Actually learning basic C means she'll almost immediately be able to pick up either Java or C#. Also translating Delphi's basic syntax to basic C/C#/Java will also not be that difficult.

Check online on udemy for courses, they have some really good ones for any language.
 

cguy

Executive Member
Joined
Jan 2, 2013
Messages
6,785
Actually learning basic C means she'll almost immediately be able to pick up either Java or C#. Also translating Delphi's basic syntax to basic C/C#/Java will also not be that difficult.

Check online on udemy for courses, they have some really good ones for any language.
Yeah, I was only half joking. C would set someone up well for the long term trajectory (by virtue of actually seeing how things work under the hood), however, in this case, the OP is constrained by the languages allowed for the course. I would take Java because of the strong typing and the fact that it’s actually in use today (unlike Delphi (well,mostly)).

My matric project was done in mostly C, ASM, and a bit of Pascal - fortunately, nobody complained that it wasn’t 100% Pascal.
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
6,314
Both dynamic languages (Python/Ruby) and static languages (Java/C) have problem spaces they excel in and I highly recommend pickup one of both.

Java and Python would be my choices based on the number of career opportunities and libraries available.

Longer story:

I would highly recommend Java as a starting point. Knowing it really well means you can transition to other JVM based languages and every large software company has Java code running somewhere if not for the majority of their software (aka, Google, Amazon, etc. Facebook being a notable exception)

C# is popular also but mostly for smaller industries where paying for Microsoft licenses and a closed ecosystem is seen as an advantage. Meaning you don't need to make any choices because the choices have been pre-selected for you. But there is no doubt that most large companies steer well clear of C# simply because they prefer the flexibility that Java and similar provides (for example Google released their own version of Java, so did Amazon, etc. I can talk on this for a long while)

C is needlessly complicated and C++ even more so. In fact as someone with a LOT of software engineering experience, I actually prefer C over C++ for projects simply because of the quality of code people produce using C++ (For example Arduino :sick:). And yes I write a lot of C and C++ code, so this isn't just because I'm a delicate developer that isn't hardcore (lots of contributions to Github for things I like, ie. 3d printers, etc.)

JVM/.NET/C/C++ all share very similar dialects so once you know one of them well, you can transfer incredible easily.

I would also highly recommend picking up a scripting language, ie. Ruby/Python.

Personally (and a lot of my co-workers feel the same) I think Python/Ruby/etc., just like any dynamic language becomes a mess very quickly for any kind of serious application. You need practically 100% test coverage or you can't really run it in production with confidence. Static checking goes a long way which you obviously can't get in dynamic languages nescessitating basically 100% test coverage. (The number of times we've had bugs like syntax errors in exception handling code, etc. that you only discover when it is needed)

That said, those languages are PERFECT for solving dev-ops or background worker type tasks that you usually do with scripts. For example we have services running Python/Ruby to emit metrics from databases, clean up database tables, etc. They start with cron jobs and they are super simple, one or two files. That is the perfect problem to solve using a dynamic language (IMO).

Of course there are companies building entire stacks on Python (ouch) and a lot of non-tech industries rely on it because of the simplicity of a dynamic language. But in most serious software situations it poses a lot of risk for the long term health of your service (and possible a huge technical debt with a future financial cost to migrate to a static solution; here is looking at twitter and facebook)
 
Last edited:

Ancalagon

Honorary Master
Joined
Feb 23, 2010
Messages
17,828
Not going to change your mind. It is the only language that is being taught in her school. While I appreciate that there are better programming languages to learn, we must make the most of the opportunity and use it as a stepping stone to what she ultimately wants to be.

Nonetheless, your input is appreciated :)
That is the most important point, and not something that she can decide at her age.

Frankly, it doesn't matter too much at this point what she decides to learn first. Java, C++, C#, Python - same difference. The more programming languages you learn, the faster you can learn programming languages.

For instance, let us say that her objective was to make as much money as possible. She would ideally study computer science, mathematics and statistics. Majoring in computer science and possibly applied mathematics, and then doing a masters degree maybe in applied mathematics. She could then move to New York or London, work for a hedge fund, and earn a pile of money. With a ceiling higher than any other programming job there is.

But the important point is, if she is being hired as a graduate, they won't care if she has only basic C, C++ or Python knowledge. It won't matter. Graduates aren't expected to already know how to program well.

And you can change the above based on what her goals are (make a difference to the world?), and change the language accordingly. When you are young, and just starting out, it really doesn't matter too much.

I will also say that I don't think learning C makes Java or C# easier to learn. Yes, the syntaxes are similar, but the build systems are so vastly different that it doesn't matter much. Java has classloaders and other weird stuff, C# has its assembly binding redirects and manifests. C/C++ has its various compilers and linkers, and the question of whether you use dynamic or static linking (licensing affects this), and you have to think about memory allocation. In other words, it may look similar, but it is VERY different in how it actually works.

However, with that being said, I think it is easier if you start with the hard stuff (C/C++) and then move to the easier stuff (Java/C#). Teach her about bit shifting in C++ and the fun that can be had with it! Or have her debug a memory leak in a C++ program using old style pointers - that's always fun.
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
6,314
I think it is easier if you start with the hard stuff (C/C++) and then move to the easier stuff (Java/C#).
In university we did Java/C# and then had a "hardcore" "design patterns" course that forced us to use C++

A lot of people failed because "C/C++ is incredible hard" and "hardcore". Frankly I found it to be the easiest and most useless course I had done (and so did a lot of my friends)
A) because they wasted so much time on C/C++ instead of the actual design patterns.
B) most of the people that struggled were from engineering side of campus with basically no software experience, so their lack of understanding was more extensive than just C/C++

Overall C/C++ is really not complicated at all if you already understood in Java/C#/etc. the fact that there are primitives and everything else is using pointers (implicitly) to objects in either stack or heap & if you understand how memory is segmented.

Additionally C++ adds complexity of not implicitly using virtual functions which IMO is a huge pain (and frankly something that rust and likes of Java do much better). Frankly I don't see what the big fuss is.

If you want to learn about coding, C/C++ won't offer you anything other than bogging you down in how memory is laid out and how call stacks work. Frankly not something that is a priority and you can figure that out once you get the coding down because it will make MUCH more sense at that point.
 

Napalm2880

Expert Member
Joined
Mar 8, 2007
Messages
2,439
Java and Python would be my choices based on the number of career opportunities and libraries available.
Not a software developer but I've been in the software testing and business analyst space both locally and internationally and this would be my choice as well.
 

MC_raw

Member
Joined
Oct 28, 2020
Messages
12
If you go with Java, this course is amazing. Java I is all about the fundamentals and Java II takes a closer look at OOP principles.

It's entirely free, highly rated and maintained by University of Helsinki's CS dept. Cannot go wrong.
 

Hamster

Resident Rodent
Joined
Aug 22, 2006
Messages
37,206
Yeah, but I bet that out of the top 10%, less than 50% don’t know C.
I suppose if one aspiration is to be one of the top 10 developers one better learn C then :D

My aspiration is to be one of the top 10 lazy people taking an afternoon nap on a boat somewhere in the Mediterranean
 

Markd

Expert Member
Joined
Oct 8, 2009
Messages
1,086
I'm not a programmer and in school I only had very basic programming classes which were extracurricular! Anyway, when I started studying a BCom at UNISA, the 1st year stuff covered Delphi as well. Delphi for me was good to get a basic understanding of some of the core principles of programming, which carried over quite nicely when I picked up a Java book several years later and started learning that. Currently I make basic games and apps in Unity as a hobby, and to do that I've been learning C#. C# has been easy to pick-up based on learning Java.

I've learnt these languages not for the sake of learning the language but mainly because it was a means to achieve my initial goal (build an app, make a program of some sort, or launch a game on the Google Play store). Back when I started I dont think you could get a community edition of C# like you can now, and Java was 'free'. But everything is free these days, particularly for students.

As far as corporate go, MANY are very much aligned to Microsoft and C# etc (mine is), and others seem to favour Java from what I've seen. At the end of the day though it would be good to try and get an understanding on what your kid actually wants to do/build/achieve, and take it from there. Things can get out of hand quickly though if you have a biggish goal and next they'll be wanting to learn SQL, Apache etc.. As a non-programmer/hobbiest, I enjoy C# the most.
 

cguy

Executive Member
Joined
Jan 2, 2013
Messages
6,785
If you want to learn about coding, C/C++ won't offer you anything other than bogging you down in how memory is laid out and how call stacks work. Frankly not something that is a priority and you can figure that out once you get the coding down because it will make MUCH more sense at that point.
I agree that learning to code before learning the ins and outs of the nuts and bolts makes sense, however, at the same time, C/C++ are still relatively high level, so it’s not really bogging one down.

The bigger issue is that many who learn the languages that abstract much of the workings away never return to these fundamentals, which leads to a career less cognizant of the underlying software/hardware. This is fine of course, since many (most even) jobs/projects do not require developers to have a deep understanding of the underlying details. It’s just a useful (and lucrative) tool to have in the toolbox, especially when having to write performant code.
 

John_Phoenix

Expert Member
Joined
Jul 8, 2017
Messages
1,087
My first-born is learning Delphi in school. 90+ in grade 11. This is what is taught in the Model C schools, so I am told.

My first-born is keen to learn Java, as Java seems to be what the private schools are teaching?

1. Are there any online courses (or otherwise) that you can recommend (paid or free)?

2. How easy is it to learn Java?

Any other thoughts or ideas would be well-received. TIA :)

Please, for the sake of your childs' future employment don't waste his / her time teaching them more delphi.

One of the main reasons delphi / java is taught in schools is because Corps pay big money to government (Microsoft / Oracle, and Sun Microsystems back in the day) to be the language of choice.

Do your child a massive favour and point them in the direction of Python / C# or Go.

At grade 11 level, delphi has been a waste of time for 2 years already.

Start with Python, it's fun to learn, a generalist language (a language that is used in many fields, to accomplish many tasks, from graphics to data science & data visualisation, to machine learning and artificial intelligence)

C# is used in games and on the Web

And Go is used in modern fintech. (Think Luno, Tyme bank, Nedbank Avo etc...)

Java locks you in, delphi is dead in the industry (unless he/she wants to work at maintaining a legacy system at a fintech house somewhere)

Set you kid up with the tools they need for tomorrow, not the toolbox of the 1990s.
 

Gnome

Executive Member
Joined
Sep 19, 2005
Messages
6,314
So, one billion devices, all of them running jvm... Fck I can see the future now, cybernetic implants with a nag screen or a notification that you need a different version of jdk... to run this jar... :laugh:
Well I'm more laughing because C# you mention above is what I call a lock-in. Not really sure I follow the Java part.

But that said, desktop Java is dead and has been for a long time. Server Java doesn't show nag screens, unless God forbid you are actually running a Windows server :sick:
And most embedded devices run C/C++ or Android which in turn uses a model that doesn't work on Jars at all (nor JVM really)
 
Top