• Welcome to Computer Association of SIUE - Forums.
 

g++ vs Visual Studio

Started by Phillip Ray II, 2010-09-08T21:27:55-05:00 (Wednesday)

Previous topic - Next topic

Phillip Ray II

I am a new transfer student to SIUE and am enrolled in CS 150 (Intro to Computing II). Our C++ we submit must compile in Visual Studio as that is what the instructor is using. Is it like this in all CS classes at SIUE? I am a long time linux user and have never had any experience with Visual Studio. Many of my programs I have developed, using vim + gcc, give me a ton of errors when I try to compile in Visual Studio. I thought I would just keep developing in linux and then fix any errors Visual Studio found when I was completed, but now I think I should be developing in Visual Studio full time. The amount of time I've wasted having to figure out why my application crashes unexpectedly while compiling fine in Visual Studio has been monumental. Ugh... Sad face.

Brent Beer

This post has been the best birthday present i've ever received.

Yeah, Visual studio blows (IMO), but allows for a nice baseline for everyone who uses windows to compile programs who are used to it (it's covered heavily in CS140). Linux isn't used in classes here, but believe me i wish it were. Sure, windows has it's place but to me (and im guessing you) there's just something natural about programming in a text editor, and the code that runs, that gets built, the entire system being just that one file...not 15 or 16 extra files and folders made from visual studio for an un-necessary small program.

That aside, I'm suppose to tell you to go to Greg's office up in 2024 if you have any issues with visual studio. You can do that still, but what I'm going to tell you is to email me, and get ahold of me for this week. or next week early.
>8{(

William Grim

Most of the lower level courses use Visual Studio.  When you get to higher level courses, it really depends on the professor or course topic of interest.  Having said that, I've done a lot of both, and my opinion is that Visual Studio has the superior compiler.  Anyway, in the real world, you'll be using both (or hopefully LLVM+frontend in place of the aging GCC architecture); so, might as well learn them.  :-)
William Grim
IT Associate, Morgan Stanley

William Grim

Brent, last I checked, I can make a C/C++ program in Visual Studio in just one file.  :-)  A bit of hyperbole, eh?
William Grim
IT Associate, Morgan Stanley

Robert Kennedy

Quite honestly, I've felt that this is SIUE's greatest shortfall.  They really love their Visual Studio and .NET so much that many people have no idea that alternatives exist until their Junior or Senior year.  I would suggest learning the differences between the compilers and how to write code that runs smoothly on both.  If you have any desire to be a c++ developer, you're going to have to learn it eventually...what better time than college. 

Robert Kennedy

Making another post since modifying is for chumps.  Each professor does things differently, so just make sure to ask at the beginning of each semester.  IIRC Bouvier and Wang probably won't have a problem with you submitting a makefile and source code.  Socratis, Ehlman, White, and Yu will likely want you to make sure it compiles in VS.  No clue on Klein, Tetzner, Ehlman, Fujinoki, Stefik, or Mayer. 

William Grim

I agree people should be learning several development methodologies in college.  I do not, however, think it's a problem that they concentrate on primarily one system in the early years.  I think it would be a mistake to go into too many areas right away.  The point of the core courses is to teach C++, not Visual Studio or GCC.  Those are just tools when the students should really be getting good with the language(s).

If you ask me, what SIUE teaches regarding VS is just a drop in the bucket.  They really do just concentrate on the core knowledge base that the students will need (fine in my opinion).  If SIUE was really spending its time teaching VS, it would really be teaching how to use VS for locating areas of code needing optimization in one way or another and slacking on the language(s) itself.  VS has lots of tools for optimization/debugging/etc take quite a bit of skill to use.
William Grim
IT Associate, Morgan Stanley

Mark Sands

Mark Sands
Computer Science Major

Adam C

This was by far my largest complaint with SIUE too. Many professors are inflexible and expect projects turned in as visual studio solutions. This is of course absurd. Visual Studio's compiler (and to be honest, all of Microsoft's development tools) are wildly inferior to those what's available on POSIX platforms. GCC is a much stricter compiler than Microsoft's and that alone makes it a better teaching tool. Not naming any names but from talking to people the biggest barrier to switching to a more reasonable dev environment is that some of the professors in the department don't want to/are too lazy to learn which is fairly sad imo.

I wrote most of my programs using VIM and the GCC compiler and then ported them over to Visual Studio at the end. Its a great disservice that we are taught what is ostensibly the worst development stack right out of the gate. Keep fighting the good fight, maybe they'll change it if they get enough student backlash. I know I asked every professor if we could turn in programs not as Visual Studio projects even if I already knew the answer, just to try and make a point.

Adam C

Also, Marksands, that made my day.

William Grim

VS is quite a strict, compliant compiler.  What are the specific problems with it?

Also, LLVM is good.
William Grim
IT Associate, Morgan Stanley

Brent Beer

Yeah the problem with visual studio is that, yes we're learning c++ not visual studio, but if that were truly the case shouldn't we be able to turn in a makefile with our c++ program and tell the teacher "here, this is all you need" not some large folder with a debug folder, archaic files with weird extensions on them? Some are really just looking for the .exe and if they dont find it, well they freak out because they don't know what to do.

Sure, a GUI debugger was nice when i didn't know anything and wanted it easy. But when i finally made a switch to vim/gcc, i learned what my error statements were saying and where my problems were at. It felt more native and like it was ME making the mistakes, ME learning... not visual studio trying to teach me and stifling my learning.
>8{(

William Grim

Quote from: Brent Beer on 2010-09-13T09:36:36-05:00 (Monday)
Yeah the problem with visual studio is that, yes we're learning c++ not visual studio, but if that were truly the case shouldn't we be able to turn in a makefile with our c++ program and tell the teacher "here, this is all you need"

Well, not really.  They are using Windows computers with Visual Studio.  I don't see why you can't get away with nmake.exe though since Visual Studio includes it.

Quote from: Brent Beer on 2010-09-13T09:36:36-05:00 (Monday)
Sure, a GUI debugger was nice when i didn't know anything and wanted it easy. But when i finally made a switch to vim/gcc, i learned what my error statements were saying and where my problems were at. It felt more native and like it was ME making the mistakes, ME learning... not visual studio trying to teach me and stifling my learning.

I suppose this is subjective then.  I actually like it when my debugger can lay things out graphically on my large monitors and help me manage multithreaded code in a more intuitive way than a CLI.  I also like being able to look at performance statistics and other things in a graphical way, because it just makes sense.  Also, I think everyone learns what their error statements mean (or should, if they plan on succeeding), no matter the tool.  :)

I've used and continue to use GCC, GDB, Emacs, and all those things on a regular basis.  However, with the workload I usually have, I like making anything easier that can be made easier, and Emacs/Vim (used it tons as well) doesn't cut it as a tool for helping you work on large amounts of foreign code in any reasonably efficient manner.  IMO, Emacs/Vim have their uses, but large-scale development is not one of the greatest uses cases for them.
William Grim
IT Associate, Morgan Stanley

Adam C

#13
I think you're right in that it comes down to personal preference. I tend to use Vim for almost all development, even large scale, and it works for me, but if someone wants to use VS that's their choice. I think however, disallowing this sort of choice is the crux of the problem. If the school wants to use the Microsoft stack in class, fine, but don't force people to use it at home.

Its entirely possible to make it through the CS program here never knowing that alternatives exist. I would bet most students here don't actually even understand the distinction between Visual Studio, the Linker, and the Compiler, or know that you can use alternate methods. Most students here probably can't use make, ant, maven or any build system other than visual studio and most of them have never touched a command line. When I took 314, we had to spend time discussing how to ssh into a server and scp a file over! Like, with printed handouts and everything...... That's a 300 level class, basic command line familiarity should be a given at that point!

Different jobs require different tools and insisting on using Windows and Visual Studio is very much like insisting that a Carpenter use only a hammer. What methods and tools a programmer uses to achieve the ultimate goal are a matter of personal choice as a reflection of the task at hand. Part of completing any job efficiently is having the right tool for that job, and limiting the tool choice as a matter of policy is annoying at best, and harmful at worst.

edit: grammar

Robert Kennedy

Large-Scale development is also not a phrase that can describe anything you do at SIUE with the possible exception of a select few senior projects.  Furthermore, I learned the book definition of a compiler, linker, etc... when I was in CS111.  However, I never understood what those things actually meant until I stopped using Visual Studio due to the fact that they are all so tightly coupled into one application.  My understanding of what a compiler actually does was "one of the things that is performed when I click the green arrow".  Also, like Brent said, as a newb developer you tend to spend a lot of time blaming the IDE due to the fact that you simply have no clue what's going on behind the scenes when you click that run button.  

Don't get me wrong, I definitely understand the need for tools like Visual Studio in industry.  However, I feel that there is more actual Comp Sci material that can be learned from using a small editor and a terminal.