C,C++,Fortran,Java: better to learn them in linux or windows?

  • Fortran
  • Thread starter deltapapazulu
  • Start date
  • Tags
    Linux Windows
In summary, either OS should work fine for a beginner programmer, but I recommend using GNU MinGW on Windows because it is a more versatile and portable environment.
  • #1
deltapapazulu
84
12
I need to learn C, C++, and Fortran, and Java and am thinking of just ditching Vista and installing Ubuntu.

Attempt to sell me on or against doing this. The only reason I have ever used windows is for gaming but i don't game much any more and am only mostly going to be on my home system to learn programming for the next year.
 
Technology news on Phys.org
  • #2
Either should be fine.

Personally, there's a very satisfied feeling I get when I use linux to code, especially in C/C++.

But Windows is good, too. If you're just learning for the first time, I might suggest you stick with Windows and go for the Microsoft C++ express edition, any Java IDE, etc.

You could go either way.
 
  • #3
Why don't you just install both OS?
 
  • #4
You paid a descent sum of money for a Windows Vista license, so why would you erase it?

My recommendation would be to use both OS's.

If it is a powerful computer, you can install and run Linux in a virtual machine at pretty close to the same speed (minus good graphics support).

If not, you can repartition your computer, and install Linux, and boot to the OS of your choosing.

If you just want to learn UNIX there are a few other options too, such as the UNIX subsystem that is included in professional versions of Windows, UNIX emulators such as cygwin, and x-window emulators.
 
  • #5
I think it's better to use the GNU compiler that comes with Linux rather than through some IDE (Visual Studio, Netbeans, ect.). The reason being that you will spend more time learning to actually program rather than learning how to use the IDE. You'll also have a better idea of what is going on underneath the hood because you won't have to interface with an IDE. That being said, GNU compilers are available on both Linux and Windows (MinGW). Also, the Java compiler from Sun Microsystems is the best(and the standard) even though it is not GNU. Either OS should be fine. If you go with GNU MinGW on Windows, be sure to use a text editor such as Notepad++ or Crimson Editor. There is also some value to knowing an IDE, although I think it will slow youdown if you won't to go deep into programming. For one or two three credit courses this might not make much difference.
 
  • #6
I'm going to have to disagree. A beginning programmer is unlikely to benefit from having to explicitly manage the compile/link/build process, let alone set up and maintain his build environment!

I haven't really observed Visual C++ or Eclipse getting in your way -- I'm not sure what you're thinking when you reference spending time learning the IDE instead of learning to program. The only awkwardness I've noticed is that in MSVC you have to remember to end your programs with cin.get() (or getchar()) to keep the console window from vanishing.

But it's not just the fact they are IDE's -- Visual C++ and Eclipse (for java, at least) offer exceptionally good editors. Even when I was using Cygwin/g++ to do my compiling/building, I still used MSVC to do my editing. Additionally, I don't expect a beginner to be able to use a debugger that isn't part of an IDE.
 
  • #7
Hurkyl said:
I haven't really observed Visual C++ or Eclipse getting in your way -- I'm not sure what you're thinking when you reference spending time learning the IDE instead of learning to program. The only awkwardness I've noticed is that in MSVC you have to remember to end your programs with cin.get() (or getchar()) to keep the console window from vanishing.

There are of course many ways of doing this. My preferred method for console apps is just

Code:
#ifdef (_MSC_VER)
    system("PAUSE");
#else
    double tmpVar;
    std::cin >> tmpVar;
#endif

    return 0;

Nice and portable.

Hurkyl said:
But it's not just the fact they are IDE's -- Visual C++ and Eclipse (for java, at least) offer exceptionally good editors. Even when I was using Cygwin/g++ to do my compiling/building, I still used MSVC to do my editing.

MSVC is, without any shadow of a doubt, the best C++ editor by miles. For that reason alone I'd encourage a new programmer to use it.
 
  • #8
It doesn't really matter on which platform you learn to program but Linux is a better choice because most the necessary are included (or if not freely available).
 
  • #9
It's funny, I was born and raised on the Unix side, and for me
AUMathTutor said:
Personally, there's a very satisfied feeling I get when I use linux to code, especially in C/C++.
it's the opposite : I get a very satisfied feeling when I find where to click under MS :biggrin:
 
  • #10
The biggest problem I have with windows is the price. Just compare the price of one windows license and the price for linux. There is simply no comparison: linux is free while windows is the pay-your-pants-of OS.
Plus if linux is a better choice (Referring to secutity and stability, etc) linux is way better for any person, esp. for devs.

But if windows makes you happy, is the best choice for you.
 
  • #11
There is a reason why linux is a great platform for programing and that is because most people who use it love programming. If you are serious about coding, I would recommend getting a linux partition but keep in mind that linux != windows, it isn't just going to be a vista with added features. Almost everything that a linux user uses is free (in the sense of freedom), so you can take a look at the code and edit and learn.

Linux also has excellent documentation. Any software that has a free license is also likely to have good documentation accompanying it. Linux offers a great amount of libraries you can use. For example for a gui you have the choice of Qt, GTK, wxWidgets etc..

Personally, I don't like Ubuntu. It kills the *nix philosophy and it is a very broken distro. I personally use Gentoo but you should do more research and find a distro that is right for you. As for an IDE, I use makefiles and vim (along with ctags). Even if you decide not to use a linux distro I recommend that you try vi (or some clone). It is very nice to code in.
 
  • #12
I've found linux is ridiculously efficient at using a system's resources, which is the main reason I was attracted to it. I took an old pentium 4 with about 512 MB ram (which I would have thrown in a dumpster by now since windows XP was incredibly slow) and installed ubuntu. For web browsing, e-mail, and a little bit of c++ coding in my courses, that computer is now perfect. It runs smoothly and performs basic tasks well. I guess XP and Vista were just too demanding.

If you have any kind of older computer like that available to you, why not load ubuntu on that and leave your windows machine alone for the time being? Then you can have a computer for development, and keep one for gaming which you won't have to reboot every time you want to play (just in case you get bored).

And I'm not using any IDEs on the linux machine, even though I'm a beginner. I'm somewhat familiar with Microsoft visual studio and Bloodshed on windows, but I feel like right now (at the intro level) there's no difference between the IDE and using a text editor and terminal to finish coursework. I can just write extra stuff into my code if I want to see what particular function produces, and comment it out before I turn assignments in.
 
Last edited:
  • #13
I would not recommend you switch to linux for this reason.

Although gcc/g++ is an excellent compiler for C/C++, it's not an IDE, and everyone I know who uses it with makefiles and long commandlines ends up being highly disorganized and wasting tons of times. In contrast, MSVC is the best IDE, and has a great compiler too, which is often much faster than g++.

Java is cross platform, I hate Java but I hear Eclipse is a popular compiler, and that's cross platform. Fortran I don't know, but I highly doubt there is any advantage to using Linux.

In general the only advantage to using Linux is an increased feeling of egotism due to all the additional problems you will be forced to overcome just in order to get basic functionality on par with windows. This will make you feel like a true system programmer...although it won't get your work done any faster.
 
  • #14
junglebeast said:
I would not recommend you switch to linux for this reason.

Although gcc/g++ is an excellent compiler for C/C++, it's not an IDE, and everyone I know who uses it with makefiles and long commandlines ends up being highly disorganized and wasting tons of times. In contrast, MSVC is the best IDE, and has a great compiler too, which is often much faster than g++.

Java is cross platform, I hate Java but I hear Eclipse is a popular compiler, and that's cross platform. Fortran I don't know, but I highly doubt there is any advantage to using Linux.

In general the only advantage to using Linux is an increased feeling of egotism due to all the additional problems you will be forced to overcome just in order to get basic functionality on par with windows. This will make you feel like a true system programmer...although it won't get your work done any faster.

Another advantage is learning how to deal with UNIX programming. A good amount of the high performance computers used in scientific fields to deal with complex problems that require significant processing power run on some flavor of UNIX (or in Linux's case, UNIX-like OS).

But, I tend to agree. For someone who is just learning, using Visual Studio presents significantly less headaches.
 

Related to C,C++,Fortran,Java: better to learn them in linux or windows?

1. Is it necessary to learn C, C++, Fortran, and Java in Linux?

No, it is not necessary to learn these programming languages exclusively in Linux. They can also be learned in Windows or any other operating system. However, Linux is a popular choice among developers due to its open-source nature and availability of various development tools.

2. Are there any major differences in learning these languages in Linux versus Windows?

While the languages themselves remain the same, the development environment and tools may differ between Linux and Windows. For example, Windows has its own integrated development environment (IDE) called Visual Studio, while Linux has various text editors, command-line tools, and IDEs like Eclipse and NetBeans.

3. Which operating system is better for learning these languages?

This is a matter of personal preference. Some developers prefer Linux for its flexibility and command-line tools, while others prefer the user-friendly interface of Windows. Both operating systems have their own advantages and can be used effectively for learning these languages.

4. Can I switch between Linux and Windows while learning these languages?

Yes, you can switch between operating systems while learning these languages. However, it may require some adjustments in terms of the development environment and tools used. It is recommended to choose one operating system and stick with it to avoid any confusion.

5. Are there any resources or tutorials specifically for learning these languages in Linux?

Yes, there are many resources and tutorials available online for learning these languages in Linux. These include official documentations, online courses, and community forums. It is also helpful to join online communities or attend meetups to connect with other developers and learn from their experiences.

Similar threads

  • Programming and Computer Science
Replies
7
Views
775
  • Programming and Computer Science
Replies
5
Views
1K
  • Programming and Computer Science
Replies
27
Views
15K
  • Programming and Computer Science
Replies
8
Views
2K
  • Computing and Technology
Replies
5
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
2
Replies
58
Views
3K
  • Computing and Technology
Replies
7
Views
832
  • Programming and Computer Science
Replies
2
Views
2K
Back
Top