Thread: Beyond Fundamental C++ - Experience

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Beyond Fundamental C++ - Experience

    Hi.
    I often post questions about C++ status relative to other programming languages as well as how to get specific programming working under C++.

    I want to switch direction for once and ask about good programming technique. I am at a point where programming with C++ is no longer intimidating unless it involves something that requires creating an entirely new data structure.

    How do you define good programming technique?

    Ultimate, the better the programming technique including program design, the more efficient the final program will operate. Furthermore, the program file should be smaller while undoubtedly producing the same result. I often find myself implementing if/else, while/do while and using bool as a "count" to manage the if/else and loops. In terms of effective programming, is that good practice? Do not get me wrong. I use only what is required and nothing more. It is just that sometimes the section of the program I work on need that kind of technique. I would like inputs from experience programmer about implementations that increase performance.

    Last, I read Deitel & Deitel C++ How to Program and Accelerat C++ by Andrew Koenig and Barbara E. Moo quick because it is such a short book. I prefer Deitel & Deitel C++ How to Program because it is a complete book. I have never come across a more complete and effective C++ book such as C++ How to Program. Nonetheless, I find Koenig and Moo implementing more involved programming techniques such as using more STL in function parameters, returning STL and lastly calling functions within functions. Maybe these technique seems different because of the way Koenig and Moo wrote their book when. They seems to like everything compact.

    Kuphryn

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    in order to see what is good practice, see what is not...

    there actually are obfuscated C/++ coding contests, believe it or not... granted those are exaggerated cases of bad coding... but it brings up the major point of readability... have you ever come across someone's source that was poorly documented and had no whitespace? not fun is it? practice makes perfect... we'll all be Salem one day...
    hasafraggin shizigishin oppashigger...

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Thanks.

    Is there a benchmark for program optimization (execution and processing time)?

    Kuphryn

  4. #4
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    so far as execution/processing... you could use the profiler that comes with your compiler... [most i'd imagine have them...] what's your compiler? also, using lint [tho i've never actually...] helps further with more problems after the syntax [which is what the compiler reports]... what's your setup?
    hasafraggin shizigishin oppashigger...

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Hi.

    I am using VC++ 6 under XP.

    Kuphryn

  6. #6
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    oh, in that case... i have no idea what you'd go about in doing... i use DJGPP... however i am certainly sure that there are conventions for doing a profile under such a developed compiler system such as MSVC6... check your manuals, or you could wait here and see, as many of us use it... maybe you could repost in the windows board, as your likelyhood for getting a VC user might be greater... but, now that you are looking for a profiler, rephrase your request so us mods wouldn't flame you for crossposting... sounds good? okay!

    hth...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming opportunities! (Midway Games, Inc)
    By Midwayrecruiter in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 08-20-2008, 11:02 AM
  2. What is one year of experience?
    By medievalelks in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 06-04-2008, 08:56 AM
  3. Are You An Experienced Programmer? Do You Like Football/soccer? (uk)
    By Mark Smulders in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 06-28-2007, 01:53 AM
  4. Printing in XP using C
    By j2005 in forum C Programming
    Replies: 16
    Last Post: 03-07-2006, 06:34 AM
  5. 32-bit ASM or COM :: Experience
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 10-04-2002, 12:39 PM