Can you train a pig to walk on walls and ceilings? :)
Ralph Unden
Posts
-
And another kitten makes 3... [modified: added pic] -
Txtspk...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.
-
Voice Recognition - "Rick"When you say Rick, I say roll...
-
Window's most useful feature..?I never got the S-Video out to work on my laptop with Ubuntu 6.06.
-
Window's most useful feature..?The usage of more than one monitor... :-)
-
Window's most useful feature..?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)
-
Method exit points vs. indentationThank 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.
-
Method exit points vs. indentationIn 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.
-
Female to male gift giving for dummies.Books always make great gifts. (And who, in 2007, does not have an Amazon wishlist??)