There are three kinds of actuaries: those who can count, and those who can't.
That is what lots of people think, but it is not how I was taught Java®. It is really easy to get into a procedural style because procedural programming looks like school algebra. And many people find it very difficult to get out of a procedural style.Julian West wrote:. . . Campbell: One doesn't start programming learning classes and OOP principals first; one begins with the basics: variables, conditional statements, and flow-control. "Parts of speech" precedes "composition". . . .
Campbell Ritchie wrote:
That is what lots of people think, but it is not how I was taught Java®. It is really easy to get into a procedural style because procedural programming looks like school algebra. And many people find it very difficult to get out of a procedural style.Julian West wrote:. . . Campbell: One doesn't start programming learning classes and OOP principals first; one begins with the basics: variables, conditional statements, and flow-control. "Parts of speech" precedes "composition". . . .
Julian West wrote:
Right, wrong, or indifferent, this doesn't help the person asking for it.
Saying, "that's wrong" and offering nothing else helps nobody.
I also think it wasn't what I said. Also I didn't notice that Junilu had split off the post about teaching until after I posted here.Junilu Lacar wrote:. . . That's debatable. . . .
Norm Radder wrote:With line 7 how do you know that the method accepts a null value for argument? Not all methods will. So that technique requires some studying of the API doc or testing to see if it works.
The code on line 2 should always work.
Norm Radder wrote:With line 7 how do you know that the method accepts a null value for argument? Not all methods will. So that technique requires some studying of the API doc or testing to see if it works.
The code on line 2 should always work.
You got me there. I try to always be safe. Trying to optimize every statement to be the best way can make coding more time consuming and perhaps induce errors because the attempted solution isn't always safe.do the clunky but safe thing
Norm Radder wrote:I try to always be safe. Trying to optimize every statement to be the best way can make coding more time consuming and perhaps induce errors because the attempted solution isn't always safe.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |