Code snippets etc...

Discussion in 'C++' started by Suma, Sep 10, 2005.

  1. Suma

    Suma Guest

    Apologies for way OT q
    There are a multitude of ways to code the same logic in C++.
    Are there are some snippets on the book/web library perhaps, that
    reflect / capture really good programming practices (C++)? Are there
    some pieces that you veterans out here have looked at and said "wow
    this is a cool implementation"? Any recommendations ? Books ? URL's?
    some open source modules ?
    This is for an intermediate C++ programmer hoping to broaden one's
    coding skills.My emphasis is more on elegance than raw smarts

    Adv thx
    Suma, Sep 10, 2005
    #1
    1. Advertising

  2. Suma

    Mike Wahler Guest

    "Suma" <> wrote in message
    news:...
    > Apologies for way OT q
    > There are a multitude of ways to code the same logic in C++.
    > Are there are some snippets on the book/web library perhaps, that
    > reflect / capture really good programming practices (C++)? Are there
    > some pieces that you veterans out here have looked at and said "wow
    > this is a cool implementation"? Any recommendations ? Books ? URL's?
    > some open source modules ?
    > This is for an intermediate C++ programmer hoping to broaden one's
    > coding skills.My emphasis is more on elegance than raw smarts


    IMO in programming, one should not be concerned with
    'elegance', however attractive such a notion might be.
    Instead concentrate on clarity (readability), maintainability,
    and robustness.

    Try the books by Scott Meyers (Effective C++, More Effective C++,
    Effective STL), and Herb Sutter (Exceptional C++). They should
    be easy to find with google, and available from most booksellers,
    both online and off.

    Also see the book reviews at www.accu.org

    -Mike
    Mike Wahler, Sep 10, 2005
    #2
    1. Advertising

  3. Suma

    benben Guest

    > IMO in programming, one should not be concerned with
    > 'elegance', however attractive such a notion might be.
    > Instead concentrate on clarity (readability), maintainability,
    > and robustness.


    ....which altogether constitutes elegance...
    benben, Sep 10, 2005
    #3
  4. Suma

    Jim Langston Guest

    "benben" <moc.liamtoh@hgnohneb read backward> wrote in message
    news:4322f792$0$21701$...
    >> IMO in programming, one should not be concerned with
    >> 'elegance', however attractive such a notion might be.
    >> Instead concentrate on clarity (readability), maintainability,
    >> and robustness.

    >
    > ...which altogether constitutes elegance...
    >
    >


    Agreed. When I look at C++ code I can either read it very easy (almost like
    a book) or have to pick over each varible, letter, etc.. to figure out what
    is going on.

    What I tend to do is code something, then go back over it and read it and
    figure out how easy it is will be for me to figure out what I was doing a
    year from now.

    Seriously, one time I revisted a piece of code I had written a year prior
    (this was many many many years ago) and it took me 3 hours to figure out 5
    lines of (my own) code. Since then I've learned.
    Jim Langston, Sep 11, 2005
    #4
  5. Suma

    Suma Guest

    Guys
    Thanks I am aware of both these books - I am looking for something
    different. I am looking for some non trivial implementation than
    snippets of code- For eg a framework like STL for collection classes,
    Document/View architecture in MFC etc - ( I list this because i am
    aware of certain methodologies can "lift") - which is fairly large
    chunks of code. Your mileage may vary but this is the way i would
    prefer to go...
    Suma, Sep 11, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. - Steve -

    Reusing Code Snippets

    - Steve -, Sep 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    417
    Greg Burns
    Oct 1, 2004
  2. Pat

    Where are my Code Snippets?

    Pat, Apr 20, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    389
    Simon Harris
    Apr 23, 2005
  3. Ramprasad A Padmanabhan

    where do I get libraries , snippets etc

    Ramprasad A Padmanabhan, Nov 17, 2003, in forum: C Programming
    Replies:
    1
    Views:
    337
    Morris Dovey
    Nov 17, 2003
  4. Replies:
    14
    Views:
    720
    Flash Gordon
    Nov 20, 2007
  5. Kevin Walzer

    Re: PIL (etc etc etc) on OS X

    Kevin Walzer, Aug 1, 2008, in forum: Python
    Replies:
    4
    Views:
    371
    Fredrik Lundh
    Aug 13, 2008
Loading...

Share This Page