What is your most used compiler when you work with C/C++:
Printable View
What is your most used compiler when you work with C/C++:
I generally use gcc. From the command line (hate IDE's).
I prefer IDE's over command line, that's why I use MSVS. They are easy to handle in my opinion. But I'm sure I even dont know about 1% of all its function. Before MSVS, I was using borland.
>> Before MSVS, I was using borland.
I used Borland compilers for many years, and can honestly say they are my favorite to work with. Probably the "fastest" compiler ever built, too.
Moved to General Discussions - a better home for polls. :)
Oh, and MSVC++ 2005 or the most recent version of GCC depending on what I'm doing and on what platform
Ditto. Except I will say "always" instead of "generally". After observing things around cboard, I have to say I have zero temptation to change this. Plus I'm a linux guy, of course, so maybe I don't have that much choice in the matter anyway. Which makes me doubly glad that gcc is gcc.
I won't go off on IDE's beyond saying that while they may be great for professionals I think they are a very bad idea for beginners (again based on observations at cboard) who would be better off using the command line and a decent text editor. Which makes it a shame that some (non gcc) compilers don't give you that choice.
I sincerely disagree, but of course, this is subjective.
I would think beginners are more confused with command lines than with IDEs that does it all for them.
Anyway, I'm an all-around Visual Studio user. I have occasionally used GCC with Code::Blocks, but that's about it.
Btw, Visual Studio is not a compiler; it is an IDE. Visual C++ (and Visual C?) is the compiler(s).
>> Visual C++ (and Visual C?) is the compiler(s).
The actual compiler as invoked from the command line is cl (last time I used it anyway).
Yes, but while being confused by an IDE is no real cause for tears, wanting to be a computer programmer who doesn't use the command line sounds almost oxymoronic. They should be comfortable with CLI *before* they start programming IMO. And I bet if they were, they would not seem to have so much trouble with the IDE.
Ie, if you are a programmer, IMO the IDE is optional, but the command line is not. Sorry.
I don't think the "beginners" to which I referred are command line wizards who have been baffled by a set of drop down menus and a mouse, if you see my subjective opinion ;) More like they are victims of a specific, particular situation on a specific, particular operating system.
Yes, the executable name is cl.exe. But the compiler's actual name is Visual C++ or Visual C.
I don't know. That seems very subjective since you are a Linux user.
I see no problem not knowing CLI if you're just developing normal Windows apps. Most of them do not deal with a lot of CLI stuff.
That also seems very subjective to me.Quote:
Ie, if you are a programmer, IMO the IDE is optional, but the command line is not. Sorry.
I'd say the other way around.
Specific problems? But then would it matter if they are CLI gurus or IDE gurus, or am I way off what you meant here?Quote:
More like they are victims of a specific, particular situation on a specific, particular operating system.
>> Yes, the executable name is cl.exe. But the compiler's actual name is Visual C++ or Visual C.
No, the name of the *package* is Visual C++. The name of the compiler is cl. Just ask the command prompt. :D
Yes, specific problems. You said it yourself:
If that is *all* you are going to do, fair enough. But this disguises the fact that Windows is a specialized environment relative to any other sort of programming, eg embedded, for the web, or if you were to work on a cross platform compiler or language or a database engine or anything that is not just a windows desktop app. All of those things are now going to be problematic for you if you have grown up ignoring the command line and therefore the fundamental basics of what an operating system *really* is (not what a particular OS ended up like on the surface).Quote:
That seems very subjective since you are a Linux user.
I see no problem not knowing CLI if you're just developing normal Windows apps. Most of them do not deal with a lot of CLI stuff.
The "subjectiveness" of linux use is not a parallel to this at all, since while it may not be as widespread on home PC's, it is much more closely related to unix (almost a unix clone) meaning it has a much greater "heritage" in computer science generally. I'm not bashing MS or claiming that ultimately linux is better, just that the MS OS is more of an exception, whereas *nix should be considered "the rule". Witness, this is not about linux users who can't use windows -- they can -- it is about windows users who can't use linux, presuming it is a minor sort of fad, as opposed to a limb of the real elephant, UNIX.
One day in the future, programming may really become moving little icons around with your mouse. But we ain't there yet...
Package as in the pretty cardboard box? :p Cases and points I say!Quote:
No, the name of the *package* is Visual C++. The name of the compiler is cl. Just ask the command prompt.
Learning everything at the same time is a formula for disaster.
Learn the language first (at least well enough to get past all the real beginner mistakes); then you can teach them how to write Makefiles...
But of course, I think before they even get into programming, they should take some OS courses including UNIX & Windows. Then they'll learn how to use the command line and how the OS works.
No. The compiler is called Microsoft C/C++ Optimizing Compiler :)
Just run it on your command prompt.
cl.exe is just an executable name. Could be rocksolid.exe and should still say the truth. Meanwhile Visual C++ is the generic name given to the C/C++ component of the Visual Studio, including the IDE, compiler, linker, and libraries.
Anyways, I use visual C++ and MinGW on windows depending on what i'm doing, and gcc on Linux.
But in all seriousness, those are not exactly easy things to do. They require vast amounts of knowledge and things. Not exactly what the average programmer would touch or think about.
Maybe except for the web, but then again, that might be a special area too... but then again, I don't think you need to know command-lines nevertheless, even for that. I have done PHP programming and I didn't need to know a lot of command-line stuff. Mostly just about variables.
In all seriousness, that comes from the eyes of a Linux user.Quote:
All of those things are now going to be problematic for you if you have grown up ignoring the command line and therefore the fundamental basics of what an operating system *really* is (not what a particular OS ended up like on the surface).
What all operating systems have in common in the kernel.
The layer on top, the GUI layer changes from each operating system.
In Windows, it's all about UI, and in Linux, the focus is on command lines.
I definitely would not call command lines basics for an OS.
I can't agree with that either. Which OS came first or which kernel is used the most, or things like that, doesn't matter. It doesn't matter which OS has the biggest market share either.Quote:
The "subjectiveness" of linux use is not a parallel to this at all, since while it may not be as widespread on home PC's, it is much more closely related to unix (almost a unix clone) meaning it has a much greater "heritage" in computer science generally. I'm not bashing MS or claiming that ultimately linux is better, just that the MS OS is more of an exception, whereas *nix should be considered "the rule".
An OS is an OS. Linux is no different or better than Windows. Just because it has a greater "heritage" doesn't mean it's "the rule". Nor is Windows "the exception". They are two different OSes, that's all. Neither approach is more right, and that means learning about Unix-like environments is not a prerequisite for a programmer IMO.
That's not fair. The main users of Linux aren't casual people, it's people who are into computers, geeks as some may call them. Of course they can use Windows, because just as with Linux, they know how computers work and have the desire to learn computers.Quote:
Witness, this is not about linux users who can't use windows -- they can -- it is about windows users who can't use linux, presuming it is a minor sort of fad, as opposed to a limb of the real elephant, UNIX.
Take a casual user, make him/her learn Linux. Can he/she use Windows later? I doubt it. Seriously.
I would like to see that...Quote:
One day in the future, programming may really become moving little icons around with your mouse. But we ain't there yet...
>> cl.exe is just an executable name. Could be rocksolid.exe and should still say the truth. Meanwhile Visual C++ is the generic name given to the C/C++ component of the Visual Studio, including the IDE, compiler, linker, and libraries.
You mean the package, right?
I'm just being an ass. Ignore me. :D
Gee, but why not?
The more involved with server side programming you get, the more unix you will have to tread. Unless you pick a way that avoids it, which may not be advantageous to the rest of your goals.Quote:
Maybe except for the web, but then again, that might be a special area too... but then again, I don't think you need to know command-lines nevertheless, even for that. I have done PHP programming and I didn't need to know a lot of command-line stuff. Mostly just about variables.
Neither would I. And your average contemporary linux user probably does not use the command line much either. I would call it basic to the process of programming.Quote:
In all seriousness, that comes from the eyes of a Linux user.
What all operating systems have in common in the kernel.
The layer on top, the GUI layer changes from each operating system.
In Windows, it's all about UI, and in Linux, the focus is on command lines.
I definitely would not call command lines basics for an OS.
It's all about abstraction. Considering what a filesystem and directory structure is, the GUI filebrowsers of linux are just as abstract as in windows. A GUI IDE deploys a similiar layer of abstraction , and it is very important to keep in mind that a GUI application in *any* OS makes use of files and other applications thru system calls that are identical to CLI invocations. So even if all you want to do is program GUI apps, you still must have some knowledge of this layer. Like, that it exists and how it works independent of the GUI you are adding on top. You can have a fully functional OS without any GUI, but good luck without a filesystem, etc, and all the other text based things that make it possible. Such as computer code.
Well, as long as you understand that you will be tying your hands with that one, because I've already said, Windows is the exception, not the rule. Again, you are trying to make it sound like a Mac vs. Windows thing, which is a totally different issue. *nix is not "the competition" or just another OS amongst many. It is the industrial and historical base of the entire enterprise.Quote:
Neither approach is more right, and that means learning about Unix-like environments is not a prerequisite for a programmer IMO.
The short answer is yes. It's like learning to ride a tricycle, you won't forget.Quote:
Take a casual user, make him/her learn Linux. Can he/she use Windows later? I doubt it. Seriously.
I think Elysia meant a casual user who has no working knowledge of both Linux and Windows, since this is in response to "it is about windows users who can't use linux". You did not write "it is about Windows users who were Linux users but now can't use Linux". Plus, there should be a qualification of "without learning anew" (or something like that).Quote:
Originally Posted by MK27
GCC via XCode for me. Not a fan of command-line compiling, personally. I always use MSVS if I happen to be using Windows.
I don't know. Too advanced?
If we split programming into casual vs expert, I would think that any casual programmer needs no CLI knowledge. Certainly I have never needed much when coding PHP.Quote:
The more involved with server side programming you get, the more unix you will have to tread. Unless you pick a way that avoids it, which may not be advantageous to the rest of your goals.
I get your point, kind of.Quote:
Neither would I. And your average contemporary linux user probably does not use the command line much either. I would call it basic to the process of programming.
It's all about abstraction. Considering what a filesystem and directory structure is, the GUI filebrowsers of linux are just as abstract as in windows. A GUI IDE deploys a similiar layer of abstraction , and it is very important to keep in mind that a GUI application in *any* OS makes use of files and other applications thru system calls that are identical to CLI invocations. So even if all you want to do is program GUI apps, you still must have some knowledge of this layer. Like, that it exists and how it works independent of the GUI you are adding on top. You can have a fully functional OS without any GUI, but good luck without a filesystem, etc, and all the other text based things that make it possible. Such as computer code.
Filesystems may indeed be a necessity for many things. Yet, I wouldn't say that many programs call other programs, oh no. That's not something that is a pre-requisite, I would say.
Still, even learning a little of filesystem doesn't make you an expert of CLI. Half a step, maybe? I don't know.
Meh. Suppose I'll rest my case on that one.
Again, where it is used or how much it is used doesn't matter.Quote:
Well, as long as you understand that you will be tying your hands with that one, because I've already said, Windows is the exception, not the rule. Again, you are trying to make it sound like a Mac vs. Windows thing, which is a totally different issue. *nix is not "the competition" or just another OS amongst many. It is the industrial and historical base of the entire enterprise.
Linux is not special, nor is Windows.
Learning parts of Unix/Linux is not necessary to become a programmer, nor is it necessary to learn parts of Windows.
I just wish you'd stop putting labels on the operating systems. It looks like you're trying to label Linux at THE OS™ and Windows as the irregular, something deformed.
I honestly don't think so.Quote:
The short answer is yes. It's like learning to ride a tricycle, you won't forget.
Laserlight pointed out pretty well what I meant with that.
The Linux demographic is usually just a smarter category of people who would have little trouble learning Windows. It's not that Linux is superior of better in some way.
If you mean a more expert programmer has more knowledge than a less expert one I suppose I will have to agree. If I mean that there are probably lots of highly skilled programmers around who never use an IDE, but *none* who do not use the command line, then I suppose you will still disagree...
Sure. The first programming I ever did was in BASIC on a Vic 20. Maybe I should have stuck with that...Quote:
Learning parts of Unix/Linux is not necessary to become a programmer, nor is it necessary to learn parts of Windows.
:pQuote:
I just wish you'd stop putting labels on the operating systems. It looks like you're trying to label Linux at THE OS™ and Windows as the irregular, something deformed.
I just meant that Linux is really a very close variation of Unix. The reason it gained popularity in the first place is because people who wanted to use unix at home (generally programmers I guess) now had some choice beside paying $1500 for a commercial *nix, and being bound by the terms of such ownership.
And like it or not, the entire internet, institutional super-computing of all sorts such as scientific research, design, the military, etc. etc. -- all the big tasks most people associate with "computers" besides spreadsheets and video games could not exist without UNIX, and they are still 95% *nix based.
On the other hand, if Windows disappeared overnight the most significant consequence would be that some businesses would have to pull their old typewriters out. Or call Apple.
Quote:
Originally Posted by Mario F.
I mean they are not pre-requisite.
Obviously, if you want to code on Windows, learning Windows first would be a very good idea. But learning Linux before is not needed.
If you wanted to code on Linux, then learning Linux would be a very good idea. But learning Windows is not needed.
This may be so... but it still doesn't make Linux or unix THE OS™, and I don't see what it has to do with this discussion in the first place...Quote:
:p
I just meant that Linux is really a very close variation of Unix. The reason it gained popularity in the first place is because people who wanted to use unix at home (generally programmers I guess) now had some choice beside paying $1500 for a commercial *nix.
And like it or not, the entire internet, institutional super-computing of all sorts such as scientific research, design, the military, etc. etc. -- all the big tasks most people associate with "computers" besides spreadsheets and video games could not exist without UNIX, and they are still 95% *nix based.
On the other hand, if Windows disappeared overnight the most significant consequence would be that some businesses would have to pull their old typewriters out. Or call Apple.
Which was actually about me saying that I think IDE's are bad for beginner's because they are intended for professionals who already know the fundamentals, and implying that it could simply be because of MS VS that anyone would ever end up thinking anything else. I still think it is like wanting to learn to play guitar and so you buy an effects rack and thirteen pedals, because that is what everyone does, right?
Of course, that is not what everyone does, except in maybe in some "peculiar places".
I wouldn't know, since I don't play guitar.
Nevertheless, I don't see command line aimed at beginners. I see IDEs aimed at beginners. All functionality is there with some points and clicks.
And they don't have to worry about specific compiler options and makefiles and compiling all files separately and finally linking them.
Visual Studio isn't just aimed at professionals, you know. It's also aimed at hobbyists.
Hmm. I guess a big part of the reason I see them not aimed at beginners is because, at least in C, if you are a beginner writing projects less than 1000 lines that really only you are going to compile, you don't need any "makefiles" at all!
Of course, if you were using the command line you would just do the simplest thing:
gcc myprog.c
Hardly intimidating, and I bet it happened faster than you can say "deiconify". However, the last time I glanced at (eg) Eclipse, it wanted to produce an entire directory of object files, etc., which then need to be linked, etc. etc. in order to achieve "hello world!" -- no joke, no exaggeration. That implies to me the IDE is really geared toward much bigger things and that the priority in their design was giving pros what they want, not complete newbies what they may or may not need.
I'm not recommending a text editor and the command line because I think it's harder and they must learn it now. I'm recommending it because I think it is all you need and it *should* seem simpler and more intuitive to an intelligent, literate person unless something very strange happened to their mouse wielding minds. Forget the IDE, focus on the code.
I also never recommend linux to normal, casual users, just to be clear, so I am not trying to do away with Windows. But if you are serious about computer programming, I don't understand how you cannot regard a free, open source unix clone as a virtual godsend (because that's what it is!).
So my point is not to make claims about what is ultimately the *best*. I'm just giving a word of positive encouragement to other fledgling programmers out there who might be interested in exploring alternatives and in the history and science of computers sans business and brand names.
Actually, we can divide both compilers and IDEs into two categories: professional and casual.
Eclipse seems to be an IDE aimed solely at professional users.
Visual Studio is an all-around IDE aimed at hobbyists and professionals (with its many editions, as well).
And just to make it clear: while that command line may compile, it doesn't enable all warning messages, for example, which is a bad thing™, so it isn't optimal at all. I would never compile with that.
So your argument doesn't hold there IMO. IDEs do not need to be more difficult than command line compilers.
Subjective, I say.Quote:
I'm not recommending a text editor and the command line because I think it's harder and they must learn it now. I'm recommending it because I think it is all you need and it *should* seem simpler and more intuitive to an intelligent, literate person unless something very strange happened to their mouse wielding minds. Forget the IDE, focus on the code.
I find IDEs because they are simpler and more intuitive than command line compilers.
Firstly, to me, open source has no meaning. I don't care if it's closed or open.Quote:
I also never recommend linux to normal, casual users, just to be clear, so I am not trying to do away with Windows. But if you are a serious computer programmer, I don't understand how you cannot regard a free, open source unix clone as a virtual godsend (because that's what it is!).
I don't want to break apart those programs and go scourging in the source code 99.9% of the time. I only need to be able to use the application. So that would apply to others too, right?
And secondly, while Linux is free, it is totally different from Windows.
They are two different markets which makes this difficult. If there was a free Windows-like clone, too, then it would be a godsend to all programmers, me think. Unfortunately, not everyone likes the approach of Linux, so albeit being free, they stick to Windows.
Now this I agree with.Quote:
So my point is not to make claims about what is ultimately the *best*. I'm just giving a word of positive encouragement to other fledgling programmers out there who might be interested in exploring alternatives and in the history and science of computers sans business and brand names.
To be fair, I have never looked at VS so perhaps I am judging IDE's by a few bad apples. The whole concept still seems like a monstrous hassle to me tho. Generally, my belief about *all* software is that a number of small, discrete components is always better than one megalithic "integrated" anything. Like, I don't use my browser for email, either. But clearly the exact opposite approach has a lot of adherents too.
Oh come on. Let's not be silly. And besides, I did say "if you want (even more) warnings, just add -Wall", didn't I?Quote:
And just to make it clear: while that command line may compile, it doesn't enable all warning messages, for example, which is a bad thing™, so it isn't optimal at all. I would never compile with that.
Sometimes, Elysia, I think you would make a great comic "devil's advocate" type person :p No offence. :p :p
Since the command line would seem to be have been about as easy as it could possibly get, I'm still gonna assert that the purpose of an IDE is *not* to make simple things simpler or easier. It's so your boss can feel justified in not giving you a choice about it, 'cause "that thing does it all!"Quote:
IDEs do not need to be more difficult than command line compilers.
You -- and the devil! :pQuote:
Subjective, I say.
My favourite aspect of the VS newbie is they all seem to require "getch()" at the end of main().
I agree that usually smaller software does things better than one gigantic one.
Although when it comes to IDEs, I have found Visual Studio to be the best I've used so far (although to be fair, I haven't used SlickEdit).
And -wextra and the standard (C99, etc) parameters and pedantic?Quote:
Oh come on. Let's not be silly. And besides, I did say "if you want (even more) warnings, just add -Wall", didn't I?
It seems to me that just hitting a button (ie F7 in case of visual studio) would be faster...
;)Quote:
Sometimes, Elysia, I think you would make a great comic "devil's advocate" type person :p No offence. :p :p
Unless you feel like clicking options instead of typing it out is faster and better.Quote:
Since the command line would seem to be have been about as easy as it could possibly get, I'm still gonna assert that the purpose of an IDE is *not* to make simple things simpler or easier. It's so your boss can feel justified in not giving you a choice about it, 'cause "that thing does it all!"
I never seem to be able to remember command-line arguments for things, yet I can always remember and find myself around GUIs.
I suspect it's because they use Run With Debug (F5), which makes the console disappear when the program is finished.Quote:
My favourite aspect of the VS newbie is they all seem to require "getch()" at the end of main().
Yet, using Run Without Debug (Ctrl+F5) makes the console window stay after the program is finished.
I don't really know why Microsoft chose to do it that way...
But mostly it's just ignorance. A breakpoint in debug mode or run without debug is all that's needed. No need for getch() or anything else, really...
See, this is the part where we learn about writing code rather than how to use someone's else's point n' click interface:
Now I can call this script "F7" and on the command-line:Code:#!/bin/bash
gcc -Wall -std=c99 -pedantic -superoptimize -bioniclinking -maxbugfixx -o $1 ./$1.c
F7 myprog
Some OS's also allow individual users to keep their own environment variables, eg. here's one of mine:
[root~/shell] echo $CGTK
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
Usually, because the cursor does not have to circumnavigate the screen in the process. And every time your hand leaves the keyboard to reach for the mouse, be sure to say "Please, I want carpal tunnel syndrome now more than ever."Quote:
Unless you feel like clicking options instead of typing it out is faster and better.
So, you are a proponent of "The MacDonald's Diet", I imagine as well :pQuote:
;)
Thanks for that. I'm sure I will be passing it on soon! I can even say, "If you are going to use an IDE, at least try the breakdance..."Quote:
I suspect it's because they use Run With Debug (F5), which makes the console disappear when the program is finished.
Yet, using Run Without Debug (Ctrl+F5) makes the console window stay after the program is finished. A breakpoint in debug mode or run without debug is all that's needed.
Looks... complicated, messy and scary.
I'd rather focus on learning how to write code than to write that.
No, that's just you...Quote:
Usually, because the cursor does not have to circumnavigate the screen in the process. And every time your hand leaves the keyboard to reach for the mouse, be sure to say "Please, I want carpal tunnel syndrome now more than ever."
And command line is what? Typedance?Quote:
Thanks for that. I'm sure I will be passing it on soon! I can even say, "If you are going to use an IDE, at least try the breakdance..."
Never heard of that kind of dance, so I'm not sure I can do it...
Just to perhaps offer some perspective, an IDE's build log is just as "complicated, messy, and scary." When you get right down to it every switch has a function, you probably have a friendly manual...
As far as whats good for a beginner, I have to personally admit that I wasn't confused by a CLI setup, once the build process was properly explained to me, and I had used it for a long time, early on in my studies. I don't see the massive problem in other people learning a basic build instruction, such as:
gcc foo.c -o foo -Wall -ansi -pedantic
Refusing to teach something or learn something because it is confusing seems like rather poor reasoning to me too. Why stop at the build process, when programming itself is complicated? If people do not push their boundaries, they become happy in mediocrity.
Though I am curious what exact "observations" MK27 has made from cboard about newbies....
Often, such as Visual Studio, they spew out exactly what the compiler and linker spews out, so using the IDE vs command line here doesn't really matter.
However, Visual Studio has an advantage, since it's able to filter the output into an Error List. I have to give the advantage to the IDE there.
The discussion was if it is better for beginners to use command lines rather than an IDE.Quote:
As far as whats good for a beginner, I have to personally admit that I wasn't confused by a CLI setup, once the build process was properly explained to me, and I had used it for a long time, early on in my studies. I don't see the massive problem in other people learning a basic build instruction, such as:
gcc foo.c -o foo -Wall -ansi -pedantic
Refusing to teach something or learn something because it is confusing seems like rather poor reasoning to me too. Why stop at the build process, when programming itself is complicated? If people do not push their boundaries, they become happy in mediocrity.
At best, I would think they are equal, at least for experienced programmers. For beginners, I definitely recommend an IDE such as Visual Studio.
But this is all subjective...
Usually -- this is deductive and not empirical so I could be quite wrong -- it seems to me that because newbie-X did not have to issue commands to a compiler directly, newbie-X is a little confused about where/what include files are and what (non-standard) switches may be necessary. Hence, newbie-X may even be a little confused about what a filesystem is.
Of course, that could happen using gcc on the command line (it is not as if GNU sends over a team of well-wishers with a welcoming gift, either), but it should be slightly more obvious what the possibilities are there, without such a crazy closet to go thru, and of course, it is very easy to read this demonstrative example:
gcc myprog -lm
meaning the learning curve might be slightly faster w/o the IDE. You can always learn about all that later, and it will probably make that much more sense by then because you will have experience getting more intimate with the compiling process.
GUI debugging is something to be jealous about, tho. I would go for more dedicated debugging tools and less of the "all-in-one" mega-app.
Actually, two of the coolest, most useful programs I've ever seen are both GUI's:
TkCodex
See: text and manpage viewer for linux
;) :p
Well we're not all evangelists of "the one true way."
Well I don't think this is a ........ing in the wind type of discussion, POV based or not.
In the first paragraph, I think you understand what my point was. If it's equally good for beginners to use IDEs and the CLI, then I don't think we should just scoff at the idea of equal time, at least. (For example, using cygwin for part of the term before using something like SlickEdit or what have you.) In formal education, the CLI is often completely ignored because you're using an IDE. They don't really cover what's in the build log. While it seems up to one's prerogative (or fate) whether they use the information present at some point in their professional lives, understanding the build process, and how exactly your tools work are fundamentals.
There's no reason why you can't learn that stuff later too (for specific tools), but life is often inconvenient in that we may wait too long, and a difficult problem arises. I'm left wondering how much is left out of formal education, not because it's unimportant to learn, but simply because there isn't enough time. Ask a professor why s/he isn't teaching item a, and you'll get that sort of response.
I use MSVC and Mingw on Windows. MSVC is fast and Mingw has most of the GNU extensions that I normally abuse when portability isn't a concern.
On Linux, I prefer gcc and the non-commercial version of icc. Intel's compiler is probably my favourite of bunch: The math library is awesome, and it probably outperforms every other compiler out there (Provided you're on an Intel-CPU, I've heard very different opinions from AMD users).
The debate seems a little sterile in my opinion. I apologize for the bluntness. But it's just that everyone is right, you see. I'd go both ways concerning compilers. I think the CLI vs GUI debate is more interesting when discussing other things, like computer maintenance, or the ability to control applications, or user interface advantages/disadvantages.
On the subject of compilers, the apprenticeship strategy may as well dictate either a GUI or a CLI as initial environments with equal results. An hands-on practical approach like that promoted on Accelerated C++ by Koenig and B. Woo, surely benefits from a GUI since the reader doesn't need the aggravation of battling with non-essentials like compiler syntax and build scripts. On the other hand, a bottom-top approach like described in C++ Primer by Lippman et all, benefits from a CLI since it starts at the very basics of programming methodologies.
Assuming they went with a GUI, the question then remains how much beneficial will it be for them to later learn about CLI mode compilation. Sincerely, I have my doubts. Definitely it will always depend on the platform where the development takes place. But... listen to this:
I started to learn about C++ with gcc. After the 1st day I was already looking into IDEs and build script solutions. I'd be nuts if I would waste my time dealing with all the syntax involved. I wanted to learn C++, not gcc. Certainly with time -- and because I still use gcc ostensively -- I ended up knowing more about gcc syntax than I will ever about C++ programming. But after that first day, my true aprenticeship of the programming language was done through a gcc IDE and only much, much later I started looking into Make and other infernal tools, like CMake or GBS.
Ironically I tend to use these tools today by copy-pasting script portions, which essentially means I'm unlearning gcc syntax. Actually forgetting about it. I find myself often resorting to the gcc manual more often than before.
So CLI advantageous? Nah, I don't buy it. Not when it comes to code compilation and application building. Truth is, even when presented with a CLI as the only option, we want to stay as far away from it as we can. From a Linux IDE to Make, all is fair game.
And besides -Wextra (old -W), there's still more stuff to add. My favorite, -Wswitch-default (warns when a switch has no default case).
And there's the -Wno- prefix, which suppresses a warning activated by -Wall or -Wextra. My favorite, -Wno-unused-variable, which comes handy sometimes during debugging builds.
I do appreciate gcc intuitive syntax. I give it that much. Much clearer than Visual C++.
For personal use I use TextWrangler and gcc(OS X 10.4).
Most of the coding I do is at work, where we use cutting edge technologies like Visual Studio 6.0...
But you are not writing C. I think cpjust made a good point: "Learning everything at the same time is a formula for disaster." You could end up just providing the shell script to the beginner, but then the beginner would just be learning how to use someone else's shell script, and in the end that is not much different from learning how to use someone else's point and click interface.Quote:
Originally Posted by MK27
... a total of 152.18% right now
Internet polls sure are trustworthy
It's been discussed before.
Rather than showing how many voters chose something, a multiple choice poll shows how often something was chosen versus the rest. One choice may have been selected 100% of the time, you see.
It's multiple choice.Quote:
Originally Posted by ಠ_ಠ
Ah, don't worry. It was a joke!
I find that instead of learning CLI, a beginner should actually learn the basics of building a program. You don't use a chainsaw without reading its manual first, do you?
When the programmer has learned everything about the build process, then he/she can go about using either CLI or an IDE to do the building, because you're likely to need that information regardless if you're using CLI or IDE to build.
That's my take on the whole CLI is advantageous.
And the poll actually reflects pretty much what we already know... Visual Studio and GCC is the two most popular compiler(s)/IDE(s) on the board.
Don't know what this rubbish about the Visual Studio IDE is about, the topic is about "your most used compiler". Not the fluff that surrounds it :)
I'd say it's like learning to drive, a manual transmission from the start is going to be more advantageous. Feel free to argue Americans ;)
The rubbish was: is it better to launch the compiler through CLI or through your IDE?
For me it's GCC. Nearly always, since I'm working mostly with linux and there ain't much choice here. GCC is not the best compiler out there, but I bet it is the most flexible. It runs on many architectures and OS's, has many optimization options etc. and __attributes__ which are way better than #pragmas that MSVC uses (although I miss them, f.i. to disable a warning).
On Windows, I also use MSVC. Because I believe it is probably "better" (=faster) on Windows machines. But the thing I hate there is its differences. It gives me many warnings that a "normal" compiler shouldn't know. Like "use sprintf_s instead of sprintf". And the worst is the _large_ packages you need to download from Windows (~600 MB for the windows SDK) while struggling with Windows Genuine Advantage even though your system IS not cracked. And of course full with many things you won't need, like .NET examples.
They're not "warnings", it's Microsoft's ploy at overtaking the language. And yes, they do it elsewhere :)
For people suggesting that MSVC is a better optimizer than GCC, my experiences (and many others' in another programming community where many people try different compilers and look for the fastest for their program) say otherwise. It was probably true in the 3.x days of GCC, but GCC 4.x (especially 4.4) has a really good optimizer. I find GCC 4.4 to be at least equal if not better than MSVC on Windows. ICC is slightly faster than both, but costs money (though they have a free Linux version).
I use GCC since it's almost the best in optimization, and the best in just about everything else IMHO (free, open source, portable, feature-rich, well maintained and updated...). If my primary development platform is Windows, I would probably take a closer look at MSVC, though, since Windows is a secondary target of GCC (slower/less frequent updates, not as well integrated, etc).
As for GUI/CLI, I have always used CLI. Went from
to writing a shell scripts to finally using a Makefile.Code:gcc prog.c
I think most people use MSVC because of the IDE, and GCC (including GCC-based IDEs) because of the compiler. Not many people use cl.exe on the command line (or with anything other than MSVC).
I learned on a manual and have a hard time driving an automatic now.
So big deal, you're more at ease with what you learn first(first), and then with what you use most often(later in life/career).
I learned with DevC++ then Code::Blocks as IDEs. Then I switched to a job where I started using gcc, and liked it a lot, so I got very comfortable with it. Now I'm at a job where we're stuck with VS 6.0, and I'm (unfortunately) used to that now, though we'd all really like to upgrade(it'd be a major overhaul of the project).
What happens if you install a no-op (dummy) gear selector?Quote:
I'd say it's like learning to drive, a manual transmission from the start is going to be more advantageous. Feel free to argue Americans
I learned on a manual and have a hard time driving an automatic now.
I learned automatic (have only been driving for a little more than 1 year now), so I don't know anything about manual.
LTO has just been merged to mainline, so 4.5 will do this. This should give C++ programs a really, really nice performance boost.Quote:
Then, is GCC able to inline functions in external source files?
Still, it says a lot about the quality of the optimizer that even without LTO, GCC can currently hold its own against MSVC.
No doubt this is in fact true. As with the "browser wars" they seem to believe being a gigantic distributer means they should create intentional incompatibilities in the hopes that everyone will be afraid of not conforming to MS's "homemade" standards, that only MS products will satisfy since said standards will be subject to random changes and are probably kept as secret as possible.
Of course with the browsers that plan backfired, but I just couldn't trust that kind of people with my compiler, much less my OS...what kind of policy is "anti-portability"?
An interesting consumer parallel. A manual transmission is: 1) more gas efficient 2) easier and less expensive to maintain. I imagine most people who don't know this will just go: "So what? I pay more for gas and maintenance? Whatever...I like auto!"Quote:
Originally Posted by cyberfish
The problem is, it also makes driving slightly harder (or slightly more engaging, perspective), which if we raised the standards of motor vehicle operation, etc, there would probably be slightly less driving. But the goal is to maximize the number of cars on the road at any point in time; it is not to make driving an efficient or even intelligent activity.
Finally:
Wow, so there is something about the nature of VS6 such that your project now depends upon using it? Wonder of wonders! Who could have thought up a feature set like that! Very clever...Quote:
Originally Posted by System_159
Ah, that is really good news.
I seriously doubt it. They made them because they are security wizards and C's library functions are by design so unsecure.
They did it for security, not to create intentional incompatibilities.
No. VS6 is old and lacking in the standards compliant area.
Newer editions are standards compliant, so upgrading will break the code. That is why they don't upgrade.
And don't blame Microsoft. The same thing would happen to any company that used GCC 1.0.
Fair enough, except that I imagine what you mean by "insecure" is that they are prone to be if not used properly. So if the "security improvement" is like, commands that do not allow buffer overflows no matter how dumb the programmer, that is asking to excuse dumb programmers. It is C. It is low level. You do your own memory management. That is what it is for. Otherwise, you might as well use another language.
So that whole spiel sounds a great cover story to me. After all, they cannot actually say, "Oh, we are doing this in the interest of intentional incompatibility on the recommendation of the business division", which is more likely.
Do you mean VS6 used GCC 1.0? I'm not sure if this is such a good comparison otherwise, since GCC 1.0 was obsoleted in like 1989.Quote:
No. VS6 is old and lacking in the standards compliant area.
Newer editions are standards compliant, so upgrading will break the code. That is why they don't upgrade.
And don't blame Microsoft. The same thing would happen to any company that used GCC 1.0.
But it looks to me like VS6 is considerably newer than that!
I used Dev-C++ 4.0 when I was programming on Windows (not 4.9.9.whatever, 4.0, just because I never got around to getting the latest version). It was great for my purposes -- launched fast, allowed multiple instances, supported easy compilation without projects. With larger projects I would start to wish it had proper Makefiles, though. These days if I had to work on Windows I think I might use Code::Blocks, but I didn't know about it at the time.
For anything other than C/C++ (i.e., Perl, text, etc.) I would use SciTE. An ancient version of it, I might add. It's not a bad editor. I just wanted something that launched really fast and supported syntax highlighting.
Between developing extremely simple programs in Dev-C++ and then later on developing rather complicated SDL programs in Dev-C++, I did DOS mode 13h programming in RHIDE. Great fun, I must say, and it's a good thing I was using Windows 98 or I would have missed out on some of it. :)
Then I started using Linux from LiveCDs, and eventually installed it onto my hard drive and used it from there. Sometimes I'd use gedit, though I still find it annoying. kate was my favourite editor for an extremely long time; I still use it for moderately-sized projects. When I was developing xuni, though, kate just wasn't enough for all those files. KDevelop is my editor of choice for larger projects, with easy file switching and function- and class lookup. (And, I discovered recently and couldn't do without, file history -- you can go "back" and "forwards" through files . . . .)
Kind of amusing that I recently installed Windows 95 in qemu and am using RHIDE once more. :)
The funny part is that it does not prevent buffer overflows; it just makes them more obvious to detect. Actually, if they had defaulted to turning those warnings off unless enabled separately, much of the beef against that set of features would be gone, methinks.Quote:
Originally Posted by MK27
It is still pre-standard since it was released before the 1998 version of the standard was finalised.Quote:
Originally Posted by MK27
One other reason to start teaching C/C++ on an IDE instead of command line is that IDE's will teach the students proper code indenting right from the start. You can see how many posts we get where someone posts code with absolutely no indentation at all, and if they would have indented their code they probably would have seen the error themselves...
Microsoft = security wizards? LMAO!!
hmm... but then one could provide the students with a text editor that is able to perform proper indenting.Quote:
Originally Posted by cpjust
>> Why shouldn't it "know" if you use sprintf instead of sprintf_s? That makes no sense. I can understand if you are annoyed by the warning, but you can disable them.
Who wants their compiler telling them what functions should and should not be used? That's just plain annoying. That sort of thing should either be disabled by default, or better yet, be part of the IDE or some other special tool.
They should put more money in extending the standards - waiting for C19 ;-p with a better-organized standard library.
Just because it's C doesn't mean we should create programs that causes buffer overruns.
Functions that help detect these kind of things are not bad things.
Furthermore, just because it's C doesn't mean we have to do everything manually. That's just plain stupid.
No...Quote:
Do you mean VS6 used GCC 1.0? I'm not sure if this is such a good comparison otherwise, since GCC 1.0 was obsoleted in like 1989.
But it looks to me like VS6 is considerably newer than that!
VS6 wasn't very standards compliant (it came out before the first ISO C++ standard, after all), so upgrading to a newer version which is standards compliant will break all the code that works with VS6!
Similarly, if you wrote some code using GCC 1.0 and upgraded to GCC 4.0 later, you would break that code that compiled on GCC 1.0.
This is what I mean, and that's why it's not Microsoft's fault.
Yes, they are very focused on security. One of the biggest actors, actually. Therefore they are security wizards. But note that security wizards doesn't mean least security issues.
Absolutely not. Security comes first.
And I'd love to see compilers complain about the use of gets, too.
Perhaps if the standards committee decided to add some C functions with higher security to the library, Microsoft would remove their own functions, if they can be bothered to spend enough money to upgrade the C compiler. But upgrading the C compiler seems unlikely. It's not really Microsoft's area, it seems.
gcc and g++ warn about gets, at least version 4.2.4.Quote:
Originally Posted by Elysia
GCC (for Linux and Windoze). I too am a command line guy -- My IDE is VIM in mutiple konsole shells!!! (I don't really like VI as I like to be able to do really cool block copies, etc.
Though, when forced to write code in Windoze I do use Code::Blocks.
Andy
Now see, those types of warning should be enabled by default, no?
And if there was an even more secure version of fgets, say, shouldn't the compiler warn about the use of fgets, then?
I think so, and this is exactly what the VS compiler does. The only problem is that I don't think they make it clear it's a non-standard function.
No, since it may well be the case that fgets is used in a way that is secure, whereas the only use of gets that is secure is where the input is guaranteed to be correct, e.g., by the rules of a programming competition for which safe coding is not even a bonus factor.Quote:
Originally Posted by Elysia
I don't think any compiler should "by default" warn about any function still in the standard, altho gcc will by default tell you never to use gets().
It doesn't matter anyway. You just need to know the appropriate switches I mentioned earlier:
and no matter how stupid or new you are everything will be fine.Code:gcc -bioniclinking -maxbugfixx -ultrafast -megaperfect
Plus, every one millionth program compiled with gcc produces this message:
Quote:
Great for you! Less than three errors again!
You can now proceed to http://gnu.org/even_more to receive your free, signed "RMS" beer stein -- made of solid 'pewter!
Do want. Although pewter leads to lead poisoning, if memory serves.Quote:
Great for you! Less than three errors again!
You can now proceed to http://gnu.org/even_more to receive your free, signed "RMS" beer stein -- made of solid 'pewter!
Also I laughed at the whole security wizards thing. Thanks Elysia! It seems a wee contradictory that a bunch of "security wizards" would have so many security problems with their products. Really I don't see how microsoft is any more focused on security than any other company. Calling them security wizards because they tacked on a few warnings in their dev software suggests a very narrow perspective on what security is on the part of the claimant.
Symantec is a 'security wizard'. Microsoft is only starting to take security seriously, and they have a long way to go.
That's one of the functions of an IDE; but a good IDE also highlights code syntax, takes you directly to the lines causing compile errors, lets you debug code, does auto-completion as you type names of functions, has integrated help about classes/functions where you can just click on the name of the class/function and press a key to learn how to use it, shows you the type of a variable when you put your mouse over the variable name... All very useful things to have when programming.Quote:
Originally Posted by laserlight
>> You can now proceed to http://gnu.org/even_more to receive your free, signed "RMS" beer stein -- made of solid 'pewter!
You mean free...as in beer? :D
>> Now see, those types of warning should be enabled by default, no?
Sure and why not warn about the use of void pointers, or malloc, or any other thing that could cause problems? What's next - code formatting advice from the compiler?
"Warning (Line 3114): the use of tabs is considered bad form".
That isn't a compiler's job IMO. It's all about delegation of concerns. Hell, the compiler doesn't even know *a priori* what function you're linking to, so it really has no business making assumptions, anyway.
Along with syntax highlighting, auto indentation is a text editor feature, not something that involves tool integration. Even auto-completion and integrated help, especially where it is limited to the standard library (and perhaps specific other libraries) can be considered pure editor features, to some extent.Quote:
Originally Posted by cpjust
Ah, but Microsoft spits out lots of security releases each month. They're also, while not a security company, very serious about security. They have released a lot of things related to security. Anti-virus tools, anti-malware tools, firewall, etc.
And the "safer" C library functions.
So I think it's fair to call them security wizards since they are very adamant about security.
A compiler should possibly warn if malloc/void* was used in C++, if you ask me. Absolutely not in C, though, since they're integral there.
A compiler is a tool to not only compile your code, but to catch your mistakes too (to a certain extent), so I think it's fair.
That just means that you're easily impressed. Watching microsoft play catch up after so many years of turning a blind eye and depending on third parties to meet the need is like watching a kid finally listen to a parent. And the new functions just have a new, different interface to understand, they don't prevent buffer overflows like an actual run-time environment will; you're kidding yourself. If you really don't need a run-time environment, then don't expect a whole lot of magic cast on your behalf.
Eh, you're missing the point.
Microsoft is concerned about security. Vista was all about security. They promote IE8 because of security, etc.
So it wouldn't strike me as strange that they added "safe" functions.
And btw, they're more like debugging tools than real functions, since they just throw an assertion. And I don't think they're difficult to understand. If you fail to understand them, then you shouldn't call yourself a C programmer.