Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Whether there is anything wrong with "random" code in posts  RSS feed

 
Paul Clapham
Sheriff
Posts: 22264
38
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jon ninpoja wrote:it was just an example


There's really no point in making up random stuff as "examples" and then asking questions about them. Try to remember that computer programs are produced for a purpose. In other words somebody who knows what that purpose is should be able to discuss the program in a reasonable way. When you have code which is just random stuff without a purpose then it's not possible to discuss why the random stuff is that way and not some other way.

 
jon ninpoja
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok paul will do so in future...thanks
 
Robert D. Smith
Ranch Hand
Posts: 221
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:
jon ninpoja wrote:it was just an example


There's really no point in making up random stuff as "examples" and then asking questions about them. Try to remember that computer programs are produced for a purpose. In other words somebody who knows what that purpose is should be able to discuss the program in a reasonable way. When you have code which is just random stuff without a purpose then it's not possible to discuss why the random stuff is that way and not some other way.



I know I should let this go, but I can't. 

These kinds of answers just peeve me greatly.  I see a lot of responses similar to this, and they add nothing to the conversation.  It is like being ten years old and asking the teacher how to spell a given word.  I know I don't have tell you the typical answer -- look it up yourself.  If I knew enougha regarding  how to spell it, a) I wouldn't need to ask you and b) I wouldn't need to search for the answer.  The reason for asking is because not enough is known.  These kinds of comments only serve in driving the poster, who is obviously new to Java programming, and posssibly to programing in general. to never ask a second question.

I am not going to address the concept of only using "real problems" as opposed to "examples."  We are humans; we use examples in almost every manner of conversation.

I grew up at the race track.  My dad raced sprint cars, among other things.  I started working with him in the pit area (where the cars hang out between races) when I was twelve, and I sat in the stands and watched almost every week before that.  A race track has a lot of names associated with it, so yes, he could be asking someone for their name.  A race track has an owner, a starter, a pit boss (the poor guy who has to set the lineups), an announcer, and list goes on.  Just saying.

My opinions only.  Your mileage may vary.

Regards,
Robert
 
Campbell Ritchie
Marshal
Posts: 54866
155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are two conflicting opinions here; I can see the merit in both. But I think it more appropriate they be discussed here than in their original location.
 
Henry Wong
author
Sheriff
Posts: 23260
124
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can go either way with this... but here is my opinion...

First, Robert is 100% correct. We were all newbies at some point long ago (or not so long ago for some of us... ). We all asked "lazy" questions at some point. And if we got the rough pushback at the beginning of our "careers", perhaps we would have left this industry long ago. So, let's show a bit of empathy for newbies everyone.

On the other hand, it has to be taken in context.  Apologies to the OP* here, but there doesn't seem to be a way to avoid it...

This isn't a case of a first time poster, who will never post a second. The OP had done this many times in the past. The issue here is... is Paul's response mean? Or is it meaner to allow the OP to develop a reputation of seemingly not caring about composing good questions (arguably right or wrong), and interpreted by the community as not caring about the answer (again, arguably right or wrong), and ... leading to not getting any good answers (or any answers) in the future.

I think this should be taken in context. And I think, like any bad habits, there is a time for "tough love".

Henry


Note: Oops, I forgot that this topic got split -- so the "OP" being referred to here is the Original Poster from the topic that this topic got split off from.

 
jon ninpoja
Ranch Hand
Posts: 291
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Appreciate the defense...but its unnecessary,i am pretty thick skinned LOL!!!

i am here to learn,and i am a noob...and im going to make mistakes...but that doesnt put me off,as i am learning everyday,and i think i have made huge progress in the last few months.
(thanks to all of you on this great site) i dont take offense,i just try to not make the same mistake again.

i think what you guys,should understand about noobs like myself is that in the beginning we have a lot of questions that are not even to do with code...more theory/methodology.
and sometimes we cant put into code examples what we thinking about...like i might have a stupid program that i want to do Z,but to get to Z i need to do X and Y...which I have no idea
what to implement,let alone how...so just bare with us...i have never asked anybody here to ever do code for me,im against that,but sometimes stupid questions to you
are not that obvious to us...so just keep that in mind.

thanks for all the help so far...cant wait till im saying the same things to a noob you guys are ;-)

speak soon!!!
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37034
504
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it depends. Having a short self contained example is great. It is a simplified version of what the poster is struggling with. Similarly, creating a program and asking about a piece of it, makes sense. Or to ask about a behavior.

On occasion, we see a post that looks like this and a question about how the if statement works.


If the poster is asked to make it compile first, he/she replies with "it was just an example." Well yeah. But it is an example that was never compiled/run.
 
Campbell Ritchie
Marshal
Posts: 54866
155
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not quite as bad if they post:-...because at least you can point out they have misread the name of the method.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!