Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Ralph Unden

@Ralph Unden
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • And another kitten makes 3... [modified: added pic]
    R Ralph Unden

    Can you train a pig to walk on walls and ceilings? :)

    The Lounge php visual-studio com

  • Txtspk...
    R Ralph Unden

    Is it really used by the lazy? I figured it was to shorten the language by shaving off some characters to fit more information into a short message.

    The Lounge question

  • Voice Recognition - "Rick"
    R Ralph Unden

    When you say Rick, I say roll...

    The Lounge testing collaboration beta-testing question learning

  • Window's most useful feature..?
    R Ralph Unden

    I never got the S-Video out to work on my laptop with Ubuntu 6.06.

    The Lounge com question

  • Window's most useful feature..?
    R Ralph Unden

    The usage of more than one monitor... :-)

    The Lounge com question

  • Window's most useful feature..?
    R Ralph Unden

    I guess Windows multimonitoring capabilities are fairly nice, uncomplicated and usually just work. (Compared to the xorg.conf tweaking you have to go through with Linux)

    The Lounge com question

  • Method exit points vs. indentation
    R Ralph Unden

    Thank you for your replies. I agree on your points of view regarding methods should usually have a return type. By the way I don't think return types and exceptions exclude each other. Especially when a method has a return type that is not a standard variable like bool or int but an object of some kind, I prefer to throw an exception instead of returning null when the method fails. However, I don't think it really matters for the exit point vs. indentation question, even though exceptions would also be exit points. Anyways, I disregarded that for the sake of simplicity.

    IT & Infrastructure question visual-studio

  • Method exit points vs. indentation
    R Ralph Unden

    In the back of my head, I have some rule that says each method should have exactly one entry point and exactly one exit point. I don't remember the context/relevance though. So my question: Which one of the two artificial examples below would you prefer and why? Method with one entry/exit point with indentation:

    void SomeMethod()
    {
    int foo = bar();
    int foofoo = barbar();
    if (foo >= 0)
    {
    // some more actions on foo.
    if (foo * foofoo <= 2000)
    {
    // some more stuff.
    }
    }
    }

    Or multiple exit points with no indentation:

    void SomeMethod()
    {
    int foo = bar();
    int foofoo = barbar();
    if (foo < 0) return;
    // some more actions on foo.
    if (foo * foofoo > 2000) return;
    // some more stuff.
    }

    Please ramble away... // Edit: Typo.

    IT & Infrastructure question visual-studio

  • Female to male gift giving for dummies.
    R Ralph Unden

    Books always make great gifts. (And who, in 2007, does not have an Amazon wishlist??)

    The Lounge tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups