Computer Association of SIUE - Forums

CAOS Forums => Questions and Answers => Topic started by: Phillip Ray II on 2010-09-08T21:27:55-05:00 (Wednesday)

Title: g++ vs Visual Studio
Post by: Phillip Ray II on 2010-09-08T21:27:55-05:00 (Wednesday)
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.
Title: Re: g++ vs Visual Studio
Post by: Brent Beer on 2010-09-09T00:26:06-05:00 (Thursday)
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.
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-09T00:26:21-05:00 (Thursday)
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.  :-)
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-09T00:27:22-05:00 (Thursday)
Brent, last I checked, I can make a C/C++ program in Visual Studio in just one file.  :-)  A bit of hyperbole, eh?
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-09T14:17:39-05:00 (Thursday)
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. 
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-09T17:30:56-05:00 (Thursday)
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. 
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-09T22:43:18-05:00 (Thursday)
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.
Title: Re: g++ vs Visual Studio
Post by: Mark Sands on 2010-09-12T22:14:38-05:00 (Sunday)
I made this for you:

(http://images.memegenerator.net/Disregard/ImageMacro/2563848/Disregard-Visual-Studio-Use-Clang.jpg)

http://clang.llvm.org/
Title: Re: g++ vs Visual Studio
Post by: Adam C on 2010-09-13T09:13:56-05:00 (Monday)
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.
Title: Re: g++ vs Visual Studio
Post by: Adam C on 2010-09-13T09:14:11-05:00 (Monday)
Also, Marksands, that made my day.
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-13T09:32:07-05:00 (Monday)
VS is quite a strict, compliant compiler.  What are the specific problems with it?

Also, LLVM is good.
Title: Re: g++ vs Visual Studio
Post by: 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" 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.
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-13T11:32:39-05:00 (Monday)
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.
Title: Re: g++ vs Visual Studio
Post by: Adam C on 2010-09-13T12:14:02-05:00 (Monday)
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
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-13T12:23:38-05:00 (Monday)
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.  
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-13T12:38:52-05:00 (Monday)
Adam:  I agree entirely.  314 was the point that I came to the realization that I knew nothing, and that if I wanted to learn these things it would have to be done on my own. 
Title: Re: g++ vs Visual Studio
Post by: Phillip Ray II on 2010-09-13T13:52:52-05:00 (Monday)
During my CS 150 class today my teacher kept stressing the fact that although Visual Studio will help you in lots of ways, don't come to rely on those because all of his in-class tests are written and those tools will not be available. He said students in the past have complained that they shouldn't have to take a written test without the tools they are taught to use while coding during class.

I feel like it would help students greatly to start out using a text editor and seperate tools for debugging and compiling to help them understand the process and what each individual tool does. Afterwards, if they want to use Visual Studio that should be fine, but it shouldn't be required.
Title: Re: g++ vs Visual Studio
Post by: Adam C on 2010-09-13T14:10:34-05:00 (Monday)
You've nailed it precisely. I've never understood why its done this way. I've taken CS courses at two other colleges and at both of them, low level courses explicitly disallowed the use of an IDE, not the other way around.
Title: Re: g++ vs Visual Studio
Post by: djb on 2010-09-13T19:43:50-05:00 (Monday)
Gents,

I've been reading this thread with some interest. As some of you may know, I have (and plan to continue to) conduct research in the Computer Science Education field. In particular, my "specialty" has been 'novice programmers'. To date, the work I have done focuses on issues related to conveyance of concepts, and what skills novice programmers bring to the classroom (in hopes of using that to an advantage in teaching CS concepts).

The discussion of tool chain for novice programmers has been studied by some educators. There is no consensus found in the research literature that I am aware of. I have my biases, but one can teach/learn programming concepts (novice level programmers) using any reasonable tool chain (let's not debate what is reasonable right now -- give me a break, and keep reading).

I have taught intro CS programming at (five) other universities using other tool chains. I've been in labs with students struggling with Linux command line, vim, and gcc. I've been in labs with students struggling with other tools as well. While you can argue for one tool chain or another based on some subset of qualities; in the end, each has it's draw backs.

For the champions of Linux in this audience, I suspect you've long since repressed the struggles you had with learning simple things, like how to exit vim and what a 'bus error' really is. I also suspect that you are not the average student. You have probably coded for money and learned things on your own. Both admirable qualities, and qualities I wish that all CS majors possessed, but, alas ....

I would also like to point out that the focus in the early programming courses is on problem solving and programming concepts. Programming itself is a vehicle toward learning the basic logical concepts. The intro courses are not focused on a particular tool chain anymore than necessary. Having students use the tool chain of their choice in the course would create support nightmares, not just for grading assignments that compile with one, but not another; but also in being able to conduct class and answer questions. Imagine and instructor (in class or lab): "If you are using XXX, then type this, but if you are using YYY then type this, and if you are using ZZZz ..." ZZZzzzzzzzzz will be the sound (even more than it may be already) in the classroom if you are constantly trying to pay attention for the right conditional which tells you when to listen.

I have been open to students developing using alternative tools and alternative platforms. Even at the 300 level when I don't have to worry about mis-communication issues (yeah right), there are problems that arise in the variety of submissions. Adam C, you might recall when you were docked points because your code running in Windoze environment would crash, but didn't in OSX. We talked and I verified, but that was time spent on my part allowing flexibility.

I would argue (as I alluded to above) that students should learn new languages and tool on their own. We can't possibly deliver your education and training, too. You can take care of the training - learn new languages and tools on your own. These are the things that will distinguish you in the job search. Not because you know the right tools, but because you can learn new tools.

Do you really think a BS CS will teach you everything you need to know over the span of your career?

(musical interlude while you think about that question..... use your imagination or iPod ..... for me it's ColdPlay )


How many years would you like to spend getting a degree?

(musical interlude while you think about that question..... use your imagination or iPod ..... this time it's RUSH)



Could the CS department do a better job? You bet. We are working on that.

There are new courses on the drawing board, and it's likely that in the next few years (as they are rolled out in sequence) there will be a complete renovation of 100 and 200 level courses. One of the 200-level courses under consideration would introduce students to Linux and other languages (but not new tool chains, sorry). I'm intentionally avoiding specifics to avoid the religious arguments regarding language choice, etc.


(taking this a bit further down the road)

Computing is a unique field. Though there was earlier conceptual work, computing as an academic field/department is only about 50 years young. Our curricula tend to change significantly every decade. Compared to Math, Sociology, Economics, ... any other degree program on campus, including Engineering ... Computing is the most dynamic field. Some of the same Physics, Math, and engineering textbooks I studied from 20+ years ago are still being used. We, as a department, are a little behind, but we are making efforts to become current.

As I said before, people can learn to program with any reasonable tool chain. Back in the 80s, a punch card system was somewhat reasonable, and people still learned to program. I missed learning to program with punch cards by one year. My reasonable tool chain was a FORTRAN compiler and a linker. I used a dumb terminal on a slow time-share system.

What from my Freshman CS course is still relevant?

The concepts of documentation, making code readable, debugging techniques, and basic logic constructs of procedural programming. I learned a lot of other stuff on my own.

I apologize for the rambling nature of this message. I will spend the time I could have used making this message more readable to work on the new courses Freshmen, in years to come, will benefit from. So, in a sense, you are like the Freshman class before mine who learned to program on punch cards. (I bet they were a tough bunch).

-djb
Title: Re: g++ vs Visual Studio
Post by: Adam C on 2010-09-13T20:02:12-05:00 (Monday)
Yes, you have been one of the professors that, in my experience has been the most willing to work with us on alternate toolchains, I very clearly remember that incident (back in 340 if I'm not mistaken). You're certainly right about many things in your post and I'm really just glad that someone in the faculty is taking the time to evaluate the situation and put some thought into it.

Obviously you're never going to be able to please all of us with our favorite language/scm/toolchain/os etc. I think the most important takeaway is not the particular systems that are eventually selected so much as to instill the idea that there are many, equally viable alternatives, each of which has their own benefits and drawbacks. Once people are made to realize the existence of all the alternatives, then the impetus is on them to teach themselves as they see fit. That's what I did and its worked well for me, and many of my peers.

I think the most succinct definition of the problem is when I see 100 and even 200 level students call Visual Studio C++ as if they think those two things are one and the same or that one begets the other.

Thanks for listening to us whine, I really do appreciate knowing that someone is listening!
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-13T20:09:08-05:00 (Monday)
+1 djb!  That message definitely comes from experience.  As mine has grown in the field, I, too, have begun to see things much more like that.  I don't get so caught up in tool chain specifics (for the most part) anymore when I just want to apply concepts and get the job done.  Needless to say, I still deliberate on the tool chains when I'm trying to think about what can be better in the workplace or my programming "on-the-side".
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-14T09:02:43-05:00 (Tuesday)
Quote from: djb on 2010-09-13T19:43:50-05:00 (Monday)
There are new courses on the drawing board, and it's likely that in the next few years (as they are rolled out in sequence) there will be a complete renovation of 100 and 200 level courses. One of the 200-level courses under consideration would introduce students to Linux and other languages (but not new tool chains, sorry). I'm intentionally avoiding specifics to avoid the religious arguments regarding language choice, etc.

Not to be the one to start any language wars or take this thread off topic (read:  I'm about to start some language wars and take this thread off topic), but I found MIT's Intro to Programming using Python Course(http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2008/ (http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2008/)) on their Open Courseware site to be excellent.  I just figured I'd toss it out there in hopes that someone working on these courses could save themselves some time and effort by reusing some of the material.  

Quote from: djb on 2010-09-13T19:43:50-05:00 (Monday)
What from my Freshman CS course is still relevant?

The concepts of documentation, making code readable, debugging techniques, and basic logic constructs of procedural programming. I learned a lot of other stuff on my own.
Also, I've finally gotten around to reading "The Pragmatic Programmer".  I must ask, why isn't this book required reading for one of the 100 or 200 level courses?  Throughout the text I've found myself in a constant state of "I wish I would have read this when I was just starting out".  Granted, some mentions of specific applications are dated, but the majority of the material concerning industry best practices remains as relevant today as ever.  It just seems so packed with knowledge that will remain useful for years to come. 
Title: Re: g++ vs Visual Studio
Post by: Adam C on 2010-09-14T11:06:51-05:00 (Tuesday)
The Pragmatic Programmer is one of the 3 best programming books that I've ever read. It should be required reading for anyone even considering writing code for a living. Best of all, its platform/language/toolchain agnostic for the most part.
Title: Re: g++ vs Visual Studio
Post by: thatguy on 2010-09-14T14:49:01-05:00 (Tuesday)
Real programmers use butterflies.
Title: Re: g++ vs Visual Studio
Post by: Brent Beer on 2010-09-16T19:09:27-05:00 (Thursday)
Quote from: thatguy on 2010-09-14T14:49:01-05:00 (Tuesday)
Real programmers use butterflies.

what does...that even mean?
Title: Re: g++ vs Visual Studio
Post by: thatguy on 2010-09-16T19:56:30-05:00 (Thursday)
Quote from: Brent Beer on 2010-09-16T19:09:27-05:00 (Thursday)
what does...that even mean?

(http://imgs.xkcd.com/comics/real_programmers.png)

Alt text:  Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-16T22:22:46-05:00 (Thursday)
I'm glad I use emacs.  Gotta love that C-x M-c M-butterfly.  Sometimes it doesn't work and you have to do C-u 2048 C-x M-c M-butterfly though.  It's all a bit random.
Title: Re: g++ vs Visual Studio
Post by: bouvier on 2010-09-17T10:12:40-05:00 (Friday)
I'm taking the appropriate (imnsho) from the this forum. I'll look at the Pragmatic Programmer. BTW, I like getting suggestions for improvement from people (even you). I may not accept your suggestion, but it invariably causes me to think about what we are doing.

Python? There are many factors to consider when selecting a language for a course. Just one of those factors is the available resources. I can't help but wonder, if an instructor (department, ... whatever) simply took an freely-available source and re-presented it to students, would the students feel cheated? I've thought I could teach that iPhone programming class by turning on a projector and getting the right iTunesU video to show on the right day.

Easy for me.
Value for students?

One could argue that is what we do with textbooks, but since students don't read textbooks, it probably isn't obvious to the average student.


Which takes this thread further afield than butterflies (maybe) ... what is the role of the University in a information-is-free society (not that we are there, yet)?

(I do like butterflies. Especially in a far field.)
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-17T13:11:53-05:00 (Friday)
I wasn't really talking about using the video for the course.  I was thinking more along the lines of using the structure of the course.  That is of course working under the assumption that a course and its associated materials are thoroughly planned out before the Professor gives his/her first lecture. 

One of the reasons I like sites like Khan Academy, MIT OpenCourseware, Academic Earth, and others is the fact that if I don't understand a concept I can just rewind it a bit and watch it again.  I think the future of the University will almost require tapping into some of those same benefits of technology. I know most SIUE professors will abhor the concept of recording their lectures, but it would be beneficial to the education process.  This would be especially true in courses that you know will not be offered again anytime soon, such as your client/server course or the Unix Programming course. I would be very interested in the information that is shared in both of these courses, but schedule issues prevented it. 

As far as reading the books goes, at least in my case, I read the text from books that seem less like reference material and more like a teaching aide.  Just like I don't sit down and read an encyclopedia, I won't sit down an read a listing of what each individual bit in the header of an ATM packet signifies.  When it seems like a majority of the material in a course textbook is written this way, I tend to stop reading the book altogether pretty quickly.  Books that are written with an attempt at being interesting as opposed to purely informational have far more educational value for me at least.  Unfortunately, I think these are looked down upon in academia because they're not as objective.
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-17T15:04:45-05:00 (Friday)
I hear Reading for Dummies is interesting and written in an interesting way as all the Dummies books try to be.
Title: Re: g++ vs Visual Studio
Post by: Robert Kennedy on 2010-09-17T15:54:55-05:00 (Friday)
and if we were studying material that is covered by the "for dummies" series, your point might be relevant. 
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-18T01:03:45-05:00 (Saturday)
http://www.amazon.com/Beginning-Programming-Dummies-Wallace-Wang/dp/0470088702

Boom, baby!
Title: Re: g++ vs Visual Studio
Post by: Gregory Bartholomew on 2010-09-20T08:07:08-05:00 (Monday)
Quote from: William Grim on 2010-09-18T01:03:45-05:00 (Saturday)
http://www.amazon.com/Beginning-Programming-Dummies-Wallace-Wang/dp/0470088702

Boom, baby!

[lightbox url=http://caos.cs.siue.edu/gallery2/d/1720-2/mike_grim_after_winning_prize.jpg caption="Mike Grim after Winning a Prize" set=g2image](http://caos.cs.siue.edu/gallery2/d/1721-2/mike_grim_after_winning_prize.jpg)[/lightbox]
Title: Re: g++ vs Visual Studio
Post by: William Grim on 2010-09-20T09:16:17-05:00 (Monday)
Those skills are undeniable.  I have them.