Saturday, July 08, 2006

10 deadly sins a C++ n00b commits...

I am a passive user of a lot of news groups and communities. I rarely reply and seldom do I ask questions, but I keep an eye open. In case I have a better answer to a question I do jump in, but that is rare.

Of all the groups/communities I'm a member of, C++ groups seems to have the maximum number of flame wars. The reason: People think that the code their compiler compiles is great. Lately I have found myself clenching my teeth and counting till ten after reading a post. Here is my compilation of 10 great sins you can commit while coding in C++ and posting related queries in C++ groups.

  1. Use #include < iostream.h > instead of #include < iostream > : People are not aware of the fact that iostream.h does not provide you with the namespace goodness. They completely trash the warnings generated by any modern compiler. The standards were introduced in 1998...its 2006 people, GET A BRAIN.
  2. Use the old Turbo C++ compiler: Almost all the Indians (I don't know of other people) are taught programming on this compiler. This was just a toy compiler...meant to be a toy compiler. It does not complies with the standards and introduces its own header like conio.h which were never a part of standard C++. There are plenty of free C++ compilers on any imaginable platform. E.g g++, Visual C++ Express, dev C++ etc.
  3. Asking stupid questions like "What will be the output of printf("%d%d%d",++i,i++,++i)" : It obviously depends on the way the parameters will be pushed onto the function stack. The output will be different on different machines. It is really irritating when they ask the same question again and again and are stubborn about an answer just because their compiler gave them that output.
  4. Posting job vacancies: I don't know which part of the sentence "C++ users group" they don't understand.
  5. Posting links: More often than not you will see postings like "Hey check out this cool link" or "awesome video"... I would punch their faces if I could.
  6. BGI graphics: This library was developed for MS-DOS ... I don't know why on earth do universities in India still make students do project on it. Another Turbo C++ induced crap.
  7. int86(): Hail Yashwant Kanetkar for this. Without doubt it was one of the best book for introductory C, but its outdated. Modern operating systems DO NOT provide direct access to the hardware (which was not the case with Win98 and MSDOS).. It might be a good learning tool but thats that. No body uses it professionally. Beginners are all excited about controlling the hardware... turning the keyboard lights, tuning the beeper.. all of us know about that silly function as much as you do so don't expect any help... do expect flames. Also C queries on a C++ group!!!
  8. System( ): this function is like the fail safe. Windows people do system("PAUSE")... new linux programmers do system("clear"). Maybe your executable looks pretty, but its not portable and makes you code less elegant.
  9. Using abusive words: Well this is acceptable sometimes but I have seen queries like... " I have a @#$%%% program which uses some @#$$ library and the damned thing crawls" also some replies like " Who the @#2! you think you are?"... come on guys this is a @#$%$ C++ user group.
  10. n00b questions: E.g "What is a class?", "Who wrote C++?".... Google it out buddy. We are not your tutors.



Tags:,

1 comment:

  1. skif stroustrup had known this, he wouldnt have dared to invent c++!!
    if discussion groups had AI, they would have responded these mails with DAEMON server ...

    ReplyDelete