Coding and programming on Linux

super_user_do

Member
Joined
Apr 23, 2022
Messages
65
Reaction score
26
Credits
473
Hello everybody :)
I want to learn some programming languages, especially Java and C. What would you recommend to use for a beginner? How do I compile and execute the code?
 


D

Deleted member 140690

Guest
Online tutorials, you tube demos, or search for
a book on the language you are interested in.
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
4,894
Reaction score
3,524
Credits
35,628
Last edited:

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
433
Reaction score
507
Credits
4,442
Hello everybody :)
I want to learn some programming languages, especially Java and C. What would you recommend to use for a beginner? How do I compile and execute the code?
The C Programming Language (Kernighan & Ritchie) and The Java Tutorial (online here) are the best books to start in my opinion.

The second one has been written for Java 8, and though you would have to get some updates in some language characteristics to make the most from current versions, it’s conceptually very good to start.
 

JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,509
Reaction score
2,144
Credits
10,826
Use any Linux distro you like.
They're all made by programmers, for programmers - all of the programming tools you'll ever need are available in the repos of all disros.

When it comes to compiling and executing code - there are a number of ways to do it.
You can either do it in the terminal using compilers like gcc/g++/clang/clang++, (or javac for java) and use make-files, or a build system like apache-ant, CMake, ninja etc. for building your programs.
And use debuggers like gdb in the terminal for testing/debugging.

Or you can download and install an IDE like Code::Blocks, VSCode, QTCreator, KDevelop for C/C++
Or Eclipse for Java, or Android Studio for Java programming for Android devices.
There are other IDE's available for other languages. It's also worth noting that some IDE's can be used for multiple languages.

An IDE is basically a text editor with a bunch of additional features that allows you to quickly set up a project, it integrates with your compiler/linker (gcc/g++/clang/clang++) and your debugger (gdb) and has other useful functionality. This integration allows you to be able to build, run and debug your programs from inside the IDE. As a beginner - you'll almost certainly want to install an IDE for whatever language you want to learn.

Once you have a better idea of what you're doing in an IDE, you might then decide to try using the compiler directly from the command line and start using make-files, or one of the many build-systems to build from the terminal.

It is definitely worth learning a bit about compiling and debugging your programs using the compiler/linker and debugger in the terminal - if nothing else, it will make you appreciate all of the neat things that an IDE automatically/automagically takes care of for you in the background!
 
OP
super_user_do

super_user_do

Member
Joined
Apr 23, 2022
Messages
65
Reaction score
26
Credits
473
Once you have a better idea of what you're doing in an IDE, you might then decide to try using the compiler directly from the command line and start using make-files, or one of the many build-systems to build from the terminal.
Whats the difference between the two? What IDE would you recommend to an absolute beginner?
 
OP
super_user_do

super_user_do

Member
Joined
Apr 23, 2022
Messages
65
Reaction score
26
Credits
473

SlowCoder

Gold Member
Gold Supporter
Joined
May 2, 2022
Messages
456
Reaction score
314
Credits
3,611
C, C++ and Java are all cross platform, and very well documented and capable. For ease of learning, I would recommend Java > C++ > C.

Sticking with open source, I like Code::Blocks for C/C++, and Eclipse for Java.

If you're ok with proprietary IDEs, and you're familiar with Visual Studio, VSCode isn't a bad environment. However, in Microsoft fashion, VSCode does "call home" and send telemetry by default.
 

gvisoc

Well-Known Member
Joined
May 29, 2020
Messages
433
Reaction score
507
Credits
4,442
@SlowCoder — Visual Studio Code is open source. If you want a version that has the telemetry disabled by default and that it doesn’t uses Microsoft’s Extension marketplace (but an alternative), check Visual Studio Codium (https://vscodium.com/)
 
OP
super_user_do

super_user_do

Member
Joined
Apr 23, 2022
Messages
65
Reaction score
26
Credits
473
C, C++ and Java are all cross platform, and very well documented and capable. For ease of learning, I would recommend Java > C++ > C.

Sticking with open source, I like Code::Blocks for C/C++, and Eclipse for Java.

If you're ok with proprietary IDEs, and you're familiar with Visual Studio, VSCode isn't a bad environment. However, in Microsoft fashion, VSCode does "call home" and send telemetry by default.
Code::Blocks seems fine to me. Do you think I should use another compiler than GCC?
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top