| Article: |
Technologies to Watch: A Look at Four That May Challenge Javas Development Dominance | |
| Subject: | Not maintainable or english | |
| Date: | 2005-10-21 09:11:50 | |
| From: | greg_barton | |
|
Response to: Not maintainable or english
|
||
|
To your example, how about: use the red and yellow bowls for ketchup and mustard.
|
||
Showing messages 1 through 3 of 3.
-
Not maintainable or english
2005-10-24 06:56:44 Bruce A. Tate |
[Reply | View]
Then red and yellow bowls for ketchup and mustard, respectively. Parallel assignments are useful here because you're eliminating the need for a temporary variable, and thus quite useful. To me, it's more expressive and elegant. -
Not maintainable or english
2005-11-03 12:50:13 evoke [Reply | View]
With no offense intended, the 'to me' portion of your ending remark is illuminating, and reveals a major weakness of the use of parallel assignments in general. Secondarily there's a proounced use in the overly simple examples of strong cultural bias.
When your team is diverse and includes someone from a country where, Murphy forbid, they store ketchup in purple bottles and mustard in red bottles, it's expressive and elegant indeed...
It's similiar to contriving that blue and pink pay phones are for boys and girls. And forgetting that pay phones in some Asian countries are uniformly pink... Nice...
Try thought experimenting that your wife has asked you to help at cooking dinner by leaving a stickypad note specifying the parallel assignment of: add salt and butter to the fish and potatoes, respectively. Which, you, of course, like all men magically competent in the kitchen are going to know which is for which, or was it for both, or aren't potatoes supposed to have both eventually and which first. Etc. A recipe for disaster, or perhaps oddly flavored dish.
How about the more realistic example of: associate daily level yield and straight line amortizations to the payment and monthly balence schedules. Because you know automatically which are for which, right. Right ??
(And all of your maintainence coders are going to know too ?? Or does your team not include anyone from other cultures, or maintainence coders, or domain experts who crossed over to be junior level coders, etc.)
As far as Java is concerned, I find that parallel assigments feel much like nesting tertiary operators. You can do it, but you frelling shouldn't.
It's like scribbling down a paragraph or chapter of a novel in shorthand under the influence of inspiration or efficiency. It's ok for protoypes or personal projects, but you wouldn't pass raw shorthand, or mostly text with bits of shorthand interspersed, to your test readers or editors.
Please stop using parallel assignments - I'm tired of fixing the bugs you're doing so causes later.




I have to agree with this sentiment. COBOL anyone?
I've seen the "Englishness" of ruby (and Rails) mentioned a in various places as a Good Thing, but isn't this sort of a narrow view to be taking in today's world? Sure, English is still the lingua franca of the computing world, but surely all those native Hindi and Chinese speakers don't find English-like grammar to be nearly so intuitive.
It's interesting to note in this context that ruby was designed by a Japanese guy. Good thing it didn't come out looking like Engrish ;)