Actuarial Outpost
 
Go Back   Actuarial Outpost > Actuarial Discussion Forum > Software & Technology
FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions



Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old 06-27-2008, 11:15 AM
Phil's Avatar
Phil Phil is offline
Site Supporter
Site Supporter
 
Join Date: Sep 2001
Location: not on board the Enterprise
Posts: 5,667
Default

Sorry, I'm not doing a good job with the above. I mean to say that if, say, 4 or more possibilities out of 8 can occur, then it's probably best to create sections for all 8 possibilities, just for the sake of completion and so the reader can track all possibilities.

If only one or two out of the 8 situations can occur, then simple cut-out cases would be simpler to read and to program. Thanks.
Reply With Quote
  #42  
Old 06-27-2008, 11:32 AM
campbell's Avatar
campbell campbell is offline
Mary Pat Campbell
SOA AAA
 
Join Date: Nov 2003
Location: NY
Studying for duolingo and coursera
Favorite beer: Murphy's Irish Stout
Posts: 83,756
Blog Entries: 6
Default

It's good to cover all bases like that - but in the "can't happen" cases, I'd put in code that pops up a message: "HEY! Cats & dogs living together! Mass hysteria! You screwed up the code!"

It's good to have a "junk" case to catch everything else, and send a message. I'd treat it like an error, and I definitely want all errors flagged.
__________________
It's STUMP

LinkedIn Profile
Reply With Quote
  #43  
Old 06-27-2008, 11:54 AM
JMO's Avatar
JMO JMO is offline
Carol Marler
Non-Actuary
 
Join Date: Sep 2001
Location: Back home again in Indiana
Studying for Nothing actuarial.
Posts: 37,428
Default

Handling errors is one of the hardest parts. (Be sure to talk about this in your article. )
__________________
Carol Marler, "Just My Opinion"

Pluto is no longer a planet and I am no longer an actuary. Please take my opinions as non-actuarial.


My latest favorite quotes, updated Apr 5, 2018.

Spoiler:
I should keep these four permanently.
Quote:
Originally Posted by rekrap View Post
JMO is right
Quote:
Originally Posted by campbell View Post
I agree with JMO.
Quote:
Originally Posted by Westley View Post
And def agree w/ JMO.
Quote:
Originally Posted by MG View Post
This. And everything else JMO wrote.
And this all purpose permanent quote:
Quote:
Originally Posted by Dr T Non-Fan View Post
Yup, it is always someone else's fault.
MORE:
All purpose response for careers forum:
Quote:
Originally Posted by DoctorNo View Post
Depends upon the employer and the situation.
Quote:
Originally Posted by Sredni Vashtar View Post
I feel like ERM is 90% buzzwords, and that the underlying agenda is to make sure at least one of your Corporate Officers is not dumb.
Reply With Quote
  #44  
Old 06-27-2008, 12:20 PM
Old Timer's Avatar
Old Timer Old Timer is offline
Member
SOA AAA
 
Join Date: Sep 2001
Location: The Great East
Posts: 1,982
Default

Quote:
Originally Posted by campbell View Post
"HEY! Cats & dogs living together!"
RN
__________________
Life is chaos personified.
Reply With Quote
  #45  
Old 06-27-2008, 01:01 PM
Ron Weasley's Avatar
Ron Weasley Ron Weasley is offline
Member
CAS AAA
 
Join Date: Oct 2001
Studying for naught.
Favorite beer: Butterbeer
Posts: 8,623
Default

Quote:
Originally Posted by carryme View Post
Using continue is not my style. It is a mechanism to avoid nested if statements.
So, avoiding nested if statements is your style. Avoiding GOTO statements, even in a limited case, is my style. A language must contain either nested ifs or GOTOs, but their is no technical (compiler) reason to include both.
Reply With Quote
  #46  
Old 06-27-2008, 01:18 PM
carryme's Avatar
carryme carryme is offline
...:illllllli:..
 
Join Date: Feb 2005
Posts: 1,955
Default

Quote:
Originally Posted by Ron Weasley View Post
So, avoiding nested if statements is your style. Avoiding GOTO statements, even in a limited case, is my style. A language must contain either nested ifs or GOTOs, but their is no technical (compiler) reason to include both.
Let's put it this way:

With your argument you could also claim that ELSE is there just because of the demand not the need. Would you call using ELSE just a difference in style?!
Reply With Quote
  #47  
Old 06-27-2008, 01:19 PM
carryme's Avatar
carryme carryme is offline
...:illllllli:..
 
Join Date: Feb 2005
Posts: 1,955
Default

By the way, if VB had "continue" and another syntax for error handling, I couldn't see myself using GOTO at all. So using GOTO is not my style.
Reply With Quote
  #48  
Old 06-27-2008, 01:30 PM
campbell's Avatar
campbell campbell is offline
Mary Pat Campbell
SOA AAA
 
Join Date: Nov 2003
Location: NY
Studying for duolingo and coursera
Favorite beer: Murphy's Irish Stout
Posts: 83,756
Blog Entries: 6
Default

And we only need NAND to get all possible logical results.... I have no problem with language redundancy if it helps structure the concept of program well.

But just because a language's standard allows a feature doesn't mean it's a good idea to use it. Pascal was built so as to preclude "bad practices" (well, GOTO at least), but I think it was more looked upon an educational tool as opposed to being a real development language.

Then you go to the opposite extreme, like with Perl, where you can do all sorts of things in unreadable code - people wanted maximum flexibility and so they developed a language that did that. I like doing quick and dirty string processing with Perl, but for things other people need to read, I use VBA, because it's easier to figure out what I'm doing, though it's not nearly as efficient.
__________________
It's STUMP

LinkedIn Profile
Reply With Quote
  #49  
Old 06-27-2008, 02:05 PM
GadgetGeek's Avatar
GadgetGeek GadgetGeek is offline
Note Contributor
SOA AAA
 
Join Date: Sep 2001
Location: I'm here, where are you?
Studying for a way to escape
College: Illinois College ('87)
Favorite beer: Stag
Posts: 11,154
Default

Speaking of indenting...lets go off on another tangent...
Never mind...I'll go off and start a poll.
__________________
Some people are like slinkies. Mostly useless, but provide amusement when pushed down the stairs.

Last edited by GadgetGeek; 06-27-2008 at 02:09 PM.. Reason: Poll now exists
Reply With Quote
  #50  
Old 06-27-2008, 02:05 PM
Steve Grondin Steve Grondin is offline
Member
SOA AAA
 
Join Date: Nov 2001
Posts: 6,368
Default

Quote:
Originally Posted by GadgetGeek View Post
Here is how I handle a similar situation.
Code:
if me.ckboxA = vbchecked then
  process_checkboxB
endif
if me.ckboxB = vbChecked then
  process_checkboxB
endif
 
sub process_checkboxA()
  do stuff
end sub
 
sub process_checkboxB()
  do different stuff
end sub
.
Did you do this just to see if we are asleep?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 04:06 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
*PLEASE NOTE: Posts are not checked for accuracy, and do not
represent the views of the Actuarial Outpost or its sponsors.
Page generated in 0.20396 seconds with 9 queries