Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #37060 > unrolled thread
| Started by | Silvio <silvio@internet.com> |
|---|---|
| First post | 2017-08-03 23:57 +0200 |
| Last post | 2017-08-08 07:34 -0700 |
| Articles | 6 — 5 participants |
Back to article view | Back to comp.lang.java.programmer
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: A small challenge at beginner's level Silvio <silvio@internet.com> - 2017-08-03 23:57 +0200
Re: A small challenge at beginner's level Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-08-03 18:12 -0400
Re: A small challenge at beginner's level Wayne <wayne@nospam.invalid> - 2017-08-04 04:23 -0400
Re: A small challenge at beginner's level Silvio <silvio@internet.com> - 2017-08-04 23:55 +0200
Re: A small challenge at beginner's level Arne Vajhøj <arne@vajhoej.dk> - 2017-08-07 20:11 -0400
Re: A small challenge at beginner's level lewbloch@gmail.com - 2017-08-08 07:34 -0700
| From | Silvio <silvio@internet.com> |
|---|---|
| Date | 2017-08-03 23:57 +0200 |
| Subject | Re: A small challenge at beginner's level |
| Message-ID | <59839c36$0$1787$e4fe514c@newszilla.xs4all.nl> |
On 03-08-17 12:46, Stefan Ram wrote:
> At one point in my beginner's course, I have only taught:
>
> - literals of types int, double, and String
> (like »2«, »7.6«, and »"abc"«, respectively).
>
> - the operators »+«, »-«, »*« and »/« and
> parentheses »(...)« around expressions.
>
> - method calls of static methods of the
> standard library
>
> and a "program frame":
>
> public final class Main
> { public static void main( final java.lang.String[] args )
> { java.lang.System.out.println( ... ); }}
>
> where an expression can be inserted replacing
> the »...«.
>
> Using only these means, write a Java program that
> will print
>
> You have won.
>
> or
>
> You have lost.
>
> with a probability of about 50 % for each outcome.
> So, whenever the program is started, it will print
> exactly one of those two lines and then terminate.
>
> So, your program must begin with
>
> public final class Main
> { public static void main( final java.lang.String[] args )
> { java.lang.System.out.println(
>
> and end with
>
> ); }}
>
> and in between you may use literals of the types double, int
> and String, the operators »+«, »-«, »*« and »/« and
> parentheses »(...)« and method calls of static methods of
> the Java SE standard library.
>
> (I will not post my own solution here before 72 hours after
> the posting of this post here.)
>
Persisting in using a retarded formatting style is bad enough already.
Forcing it upon students is criminal.
And it is a pointless exercise to boot. Programming is not about
exploring obscurities and extremities but about common sense and good
taste. You are teaching neither. Your students deserve a better teacher.
[toc] | [next] | [standalone]
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Date | 2017-08-03 18:12 -0400 |
| Message-ID | <om06sk$bpc$1@dont-email.me> |
| In reply to | #37060 |
On 8/3/2017 5:57 PM, Silvio wrote:
> On 03-08-17 12:46, Stefan Ram wrote:
>> [... a silly challenge ...]
>
> Persisting in using a retarded formatting style is bad enough already.
> Forcing it upon students is criminal.
>
> And it is a pointless exercise to boot. Programming is not about
> exploring obscurities and extremities but about common sense and good
> taste. You are teaching neither. Your students deserve a better teacher.
Silvio's right. The language supports simpler, more direct,
and much clearer ways to accomplish the given task, and it's just
silly not to use those clearer, more direct, and simpler ways.
"I will remove my own appendix, without anesthesia, using only a
can opener, two teaspoons, and a jar of extra virgin olive oil" --
well, fine, how very clever, but ... why?
When I was young and clever I figured out a way to mimic FORTRAN's
DO loop with something called a "computed GOTO." I boasted of my
cleverness to my teacher, whose lack of enthusiasm betrayed his
near-instantaneous internal translation of "clever" to "stupid."
Don't encourage this sort of cleverness; it's stupid.
--
esosman@comcast-dot-net.invalid
Twelve hundred sixty-six days to go.
[toc] | [prev] | [next] | [standalone]
| From | Wayne <wayne@nospam.invalid> |
|---|---|
| Date | 2017-08-04 04:23 -0400 |
| Message-ID | <om1amq$1cp$1@dont-email.me> |
| In reply to | #37060 |
On 8/3/2017 5:57 PM, Silvio wrote: > > Persisting in using a retarded formatting style is bad enough already. Forcing it > upon students is criminal. > > And it is a pointless exercise to boot. Programming is not about exploring > obscurities and extremities but about common sense and good taste. You are teaching > neither. Your students deserve a better teacher. > Rants such as this should have no place in this forum. Teaching programming is not about the solution to some trivial problem. It is about training students to think in ways that are often unnatural to them. I agree about examples always showing proper style (except when showing why bad styles are harder to read and can mask errors). But teaching innovative problem-solving is not about forcing beginners to learn tons of syntax or forcing them to StackOverflow or the like to copy and paste an answer to a more realistic, non-trivial question. Solving this particular problem is not the point; figuring out how to solve problems is the point. Once the students know more about Java, the examples can include "correct" use of language features and more realistic challenges. I have no doubt the OP is well aware of this and adjusts exercises to the level of their students. If someone doesn't feel the challenge is a useful one, then they should ignore it or suggest a better one. I, for one, would love to steal (er, I meant adopt) some excellent exercises for my students beyond the standard ones like "show all the ways with legal U.S. coins to make change for someone of 45 cents", guess the number, Fahrenheit to Celsius converter, and so on. I encourage instructors to post their exercises: to share, to receive constructive feedback, and to share student reactions and results. -- Wayne
[toc] | [prev] | [next] | [standalone]
| From | Silvio <silvio@internet.com> |
|---|---|
| Date | 2017-08-04 23:55 +0200 |
| Message-ID | <5984ed62$0$1702$e4fe514c@newszilla.xs4all.nl> |
| In reply to | #37064 |
On 04-08-17 10:23, Wayne wrote: > On 8/3/2017 5:57 PM, Silvio wrote: >> >> Persisting in using a retarded formatting style is bad enough already. Forcing it >> upon students is criminal. >> >> And it is a pointless exercise to boot. Programming is not about exploring >> obscurities and extremities but about common sense and good taste. You are teaching >> neither. Your students deserve a better teacher. >> > > Rants such as this should have no place in this forum. > Not in general, I agree. But for Stefan I make an exception. He has a history of asking silly questions about Java peculiarities and edge cases in light of his teaching activities while these are of no interest to anyone but language lawyers and nit-pickers. His already mentioned persistence in using Lisp formatting in Java code is annoying on its own. The fact that he consequently evades any discussion about it makes him look trollish. > Teaching programming is not about the solution to some trivial > problem. It is about training students to think in ways that > are often unnatural to them. I agree about examples always > showing proper style (except when showing why bad styles are > harder to read and can mask errors). But teaching innovative > problem-solving is not about forcing beginners to learn tons > of syntax or forcing them to StackOverflow or the like to copy > and paste an answer to a more realistic, non-trivial question. > > Solving this particular problem is not the point; figuring out > how to solve problems is the point. Once the students know > more about Java, the examples can include "correct" use of > language features and more realistic challenges. I have no > doubt the OP is well aware of this and adjusts exercises to > the level of their students. > > If someone doesn't feel the challenge is a useful one, then they > should ignore it or suggest a better one. I, for one, would love > to steal (er, I meant adopt) some excellent exercises for my students > beyond the standard ones like "show all the ways with legal U.S. > coins to make change for someone of 45 cents", guess the number, > Fahrenheit to Celsius converter, and so on. I encourage instructors > to post their exercises: to share, to receive constructive feedback, > and to share student reactions and results. > I totally disagree. Entry level programmers should be taught as little as possible about the programming language at hand and as much as possible about patterns, algorithms, good style and taste. More experienced programmers who want to pick up a language should be taught by analogy/dissimilarity with other languages. Neither involves easter eggs. Asking people to solve a problem by just using a subset of a language is not only pointless but also creates the illusion that programming is about solving puzzles. I was introduced to programming using Algol 68 and was bothered way too much with the many eccentricities of the language. I used to be a wizard at C (and later on C++) puzzlers and all it brought me was the ability to write code that nobody could understand. You should read more posts from the OP before stating confidence in him.
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2017-08-07 20:11 -0400 |
| Message-ID | <omavir$1vn0$1@gioia.aioe.org> |
| In reply to | #37064 |
On 8/4/2017 4:23 AM, Wayne wrote:
> On 8/3/2017 5:57 PM, Silvio wrote:
>> And it is a pointless exercise to boot. Programming is not about exploring
>> obscurities and extremities but about common sense and good taste. You are teaching
>> neither. Your students deserve a better teacher.
>
> Rants such as this should have no place in this forum.
When posting something to usenet then one should expect
comments. Good or bad or both. Politeness is somewhat
optional.
A comment calling an exercise in Java for bad is definitely
on topic for this group.
And even though it may not the most polite post of the
month, then I don't see it as unusual rude either.
> Teaching programming is not about the solution to some trivial
> problem. It is about training students to think in ways that
> are often unnatural to them.
> But teaching innovative
> problem-solving is not about forcing beginners to learn tons
> of syntax or forcing them to StackOverflow or the like to copy
> and paste an answer to a more realistic, non-trivial question.
>
> Solving this particular problem is not the point; figuring out
> how to solve problems is the point. Once the students know
> more about Java, the examples can include "correct" use of
> language features and more realistic challenges. I have no
> doubt the OP is well aware of this and adjusts exercises to
> the level of their students.
Systematic problem solving is important.
But they will not learn systematic problem solving by this
exercise.
The solutions will require much higher skills than the
trivial but non-compliant ways of doing it. Most likely
none of the students will be able to solve it.
The students will based on this exercise conclude that:
* programing is very difficult
* programming is a kind of black magic where one need
to find obscure features of the language/library
to solve problems
> I, for one, would love
> to steal (er, I meant adopt) some excellent exercises for my students
> beyond the standard ones like "show all the ways with legal U.S.
> coins to make change for someone of 45 cents", guess the number,
> Fahrenheit to Celsius converter, and so on.
Those exercises may be boring, but unlike this one they
actually encourage problem solving:
problem->algorithm (in broad sense)->code
> If someone doesn't feel the challenge is a useful one, then they
> should ignore it or suggest a better one.
There is no rule saying so.
It is allowed to argue that something is bad without providing
a better alternative.
In fact there are not many rules for usenet.
Arne
[toc] | [prev] | [next] | [standalone]
| From | lewbloch@gmail.com |
|---|---|
| Date | 2017-08-08 07:34 -0700 |
| Message-ID | <f14989a6-1fd1-44c9-b045-0a3a4ff8e8a5@googlegroups.com> |
| In reply to | #37064 |
"Rants such as this should have no place in this forum." Censorship such as this has no place in this forum. -- Lew
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web