About Me

My photo
I'm a colonist who has declared war on machines and intend to conquer them some day. You'll often find me deep in the trenches fighting off bugs and ugly defects in code. When I'm not tappity-tapping at my WMD (also, known as keyboard), you'll find me chatting with friends, reading comics or playing a PC game.

Wednesday, January 9, 2008

Out with the old stuff, Teach the new stuff

I've always wanted to talk about coding in schools, especially C++. I see many schools and colleges that portray to teach C++, but in reality teach the C-style of coding. I find this approach unacceptable. For example, many courses (even MCA) talk about character arrays when in reality the syllabus should be dealing with std::string. As if that weren't bad enough...

I've also noticed that many educational institutions use archaic compilers for C++ coding. This, in my opinion, is infinitely worse. Even if a student wanted to code correctly, he would not be able to do so. The most commonly used C/C++ compiler is Borland's Turbo C++ 3.0 compiler. This compiler does not conform to the C++ '98 standard. A very simple example of this is the boolean data type which the standards approve of but Turbo C++ does not support it. The truth is that Turbo C++ is an obsolete compiler and Borland themselves do not work on it anymore. Continuing to use such a compiler will ensure that you never learn anything that is industry standard. There are quite a few non-commercial compilers that are standards compliant.
1. The MinGW (Minimalistic GNU for Windows) compiler for Windows.
2. GCC (GNU Compiler Collection) for almost every platform.

If you are a student and don't want the hassle of bothering to download and configure a particular compiler for your IDE, then I recommend these IDEs:
1. Microsoft Visual Studio Express Edition
Its the most professional free IDE out there. Of course, it only works under Windows and comes with the Microsoft Compiler.
2. Code::Blocks
I really love this IDE and the best part is that it works on Windows, Linux and now even the Mac OS. It also supports a variety of compilers.
3. Bloodshed Dev C++ 5.0
A great IDE for students. It comes in two flavours - one with the MinGW compiler and another without any compiler. Dev C++ is also exclusively for Windows.
4. Geany
Geany is a newcomer to the scene and I've really noted it for supporting several languages and being extremely light-weight. Geany is also being actively developed for multiple OS platforms.
5. Finally, if you work on Linux, I recommend either KDevelop or Anjuta. I now use Code::Blocks as a standard IDE for both Windows and Linux, though.

If you're going to do stuff, then you have to do it right.


Midhun Harikumar said...

Hey i heard that the C++ specifications have been updated as theres been some work between ANSI and ISO to standardize that. Can u tell about the advantages that this standardisation has brought to the language and the programmers.

Then theres new 32 bit windows vesrion of Borland Compiler, Borland C++ 5.2. Its not too bad but since im using it for sometime i never had a chance to test other compilers. Please test and review this compiler as well.

Keep Blogging

Regards, mhk ---------->

Angelo said...

Yes, Borland C++ 5.0 upwards are fairly recent versions and hence, they adhere to the current C++ standards. This compiler is being supported by Borland and you can be sure that they will quickly adapt to any change in the standards (which I expect to see by 2009).