I don't have a problem with long sub names themselves, though that one looks absurd. I can imagine using that sub, but it should apparently be broken into two subs, at least, if it's doing two things (delivering emails, delivering section types). deliver_emails_for_products would be a wrapper around deliver_emails, if it's delivering separate emails for several products (maybe I misunderstand it).
deliver_section_types_for_users_that_havent_received_email would wrap around deliver_section_types:
Actually, this sub doesn't really deliver any email (the code that does so is not in the lexical scope of that sub). It gathers information about email to send, then calls send_email_to_user_if_not_already_sent().
sub deliver_emails_for_products_and_section_ types_for_users_that_have_not_already_re ceived_email { ...
}
It seems like there's a good joke here; something about how great domain-specific languages are and how "rails with rubies would make this so easy you guys"... but it's too early in the morning for me.... see, however complex that method is, the method name reads like English! Fantastic!
Please more code! (Score:1)
Re: (Score:1)
could be worse (Score:1)
rjbs
long sub names (Score:1)
I can imagine using that sub, but it should apparently be broken into two subs, at least,
if it's doing two things (delivering emails, delivering section types).
deliver_emails_for_products would be a wrapper around deliver_emails,
if it's delivering separate emails for several products (maybe I misunderstand it).
deliver_section_types_for_users_that_havent_received_email
would wrap around deliver_section_types:
sub deliver_sectio
Re: (Score:1)
That sub has fourteen positional arguments.
Re: (Score:1)
“If you have a procedure with 10 parameters, you probably missed some.” —Alan J. Perlis, Epigrams on Programming
Haha (Score:1)
sub deliver_emails_for_products_and_section_ types_for_users_that_have_not_already_re ceived_email {
...
}
It seems like there's a good joke here; something about how great domain-specific languages are and how "rails with rubies would make this so easy you guys"
Re: (Score:1)