Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

answering questions  RSS feed

 
fred rosenberger
lowercase baba
Bartender
Posts: 12529
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something has been bothering me... I tend to hang out in the beginners forums, and try to answer questions for people when i can/have time. But i wonder what other rancher's opinion is on the following:

If somebody posts a question like "How do i do XXX using an array?", what is the best way to answer them?

a) "You can do it THIS way",
b) "You shouldn't use an array, but a linked list (or whatever)"
c) "You could do it THIS way, but a Hashmap is better because..."
d) post the solution in code (ok, i know this isn't the best, but i still see it done)
e) some other way

My thoughts are that beginners are usually so overwhellemned that B and C both tend to freak people out. They've managed to get this far on their own, and it almost works, and they are rightly proud of what they've done. Now they ask a question for a little bit of help, and they're being told (in their minds) that their code stinks and should be re-written.

On the other hand, people do come here to learn. Should i encourage them to continue designing something in a 'not so great' way, just to get it to work? Do i owe it to them to explain it that while they're design will work in this case, if they had to scale it up to 100 or 100,000 times bigger it would be a catastrophic failure?

I'm interested in what other people think, or if there is a general guidline (other than "Be Nice", which is a GREAT rule).
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tell them how to do it in line with what they already have, then add a remark about how it would be better done some other way (and give reasoning).

Gives them the satisfaction that they did do it right as well as something to think about.
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Jeroen, but for a different reason. A lot of the questions in the beginner forum are academic in nature so they won't have a great deal of say in choosing the implementation.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!