The Artima Developer Community
Sponsored Link

Java Answers Forum
Bill Please take Action on the laziness involved in Code Posting

10 replies on 1 page. Most recent reply: Oct 26, 2005 1:51 AM by Kondwani Mkandawire

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 10 replies on 1 page
Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Bill Please take Action on the laziness involved in Code Posting Posted: Oct 17, 2005 2:20 AM
Reply to this message Reply
Advertisement
Here is a suggestion to enforce coding style. With respect to the fact
that most of us who tend to reply to Qs in the Java Forum, are actually
reasonable enough to surround our code with appropriate java and pre-tags,
I suggest the following to discourage Newbies from posting eligible code.

if(textPosted contains "{" and "}")
    if(!curlyBracket1 preceededWith "[java]")&&(!curlyBracket2 suffixed with
)
user.setStrike(strike+1)

// You can set this to 3 or 5 etc...
Email email = null;
if(user.getStrike() == 3)
email = new Email();
email.setMessage("You are Posting a Java Code Snippet");
email.setMessage(email.getMessage()+"\n You now have "+user.getStrike()+
"strikes ensure that you"
+" follow instruction on posting with pre or java tags");
email.setMessage(email.getMessage()+"\n the next post you attempt without
proper code formatting will lead to suspension of your Artima account");
Message.sendUser(this.getUsr, email)
[/java]

I think this would discourage goof-balling and trolling.

Kondwani


Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 17, 2005 2:23 AM
Reply to this message Reply
Oops, I guess that puts me at strike one. Lets try that again.

if(textPosted contains "{" and "}")
    if((!curlyBracket1 preceededWith "[java]")&&(!curlyBracket2 suffixed with))
        user.setStrike(strike+1)
 
// You can set this to 3 or 5 etc...
Email email = null;
if(user.getStrike() == 3){
    email = new Email();
    email.setMessage("You are Posting a Java Code Snippet");
    email.setMessage(email.getMessage()+"\n You now have "+user.getStrike()+
                                        "strikes ensure that you"
                                       +" follow instruction on posting with pre or java tags");
    email.setMessage(email.getMessage()+"\n the next post you attempt without
    proper code formatting will lead to suspension of your Artima account");
    Message.sendUser(this.getUsr, email);
}

Trevor Hatcher

Posts: 10
Nickname: newbie05
Registered: Oct, 2005

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 17, 2005 7:33 AM
Reply to this message Reply
The idea is good if this forum were restricted to advanced users only. Some people have legitimate questions to help improve their skill. I am new and will include myself in that group, however I was slammed for being lazy and writing poor code after spending five days researching how to write the code and another 5+ hours writing a single line of code so it would work with my program. Hopefully,in time the code will come faster. To help, why not show people the proper syntax when you can't understand what is written simply don't reply until they learn to write code you can help them with.

Trevor Hatcher

Posts: 10
Nickname: newbie05
Registered: Oct, 2005

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 17, 2005 7:39 AM
Reply to this message Reply
> Sorry,
GRAMMAR ERROR:
The idea is good if this forum were restricted to advanced
> users only. Some people have legitimate questions to help
> improve their skill. I am new and will include myself in
> that group, however I was slammed for being lazy and
> writing poor code after spending five days researching how
> to write the code and another 5+ hours writing a single
> line of code so it would work with my program.
> Hopefully,in time the code will come faster. To help, why
> not show people the proper syntax. when you can't
> understand what is written simply don't reply until they
> learn to write code you can help them with.

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 17, 2005 7:57 AM
Reply to this message Reply
Indenting lines ones code is a simple context, there are
simple instructions on how one can make his/her code
more legible on the right of the text box you use to type
your question/code. It is continually annoying to keep
screaming the same crap over and over.

What is so difficult to understand about embedding
your code in java-tags? Even if you don't indent it,
atleast some of us with eye problems will be able to
pickup on the Java Key words because of the different
font color.

Its a brilliant idea, and it weeds out the lazy jokers,
furthermore, it will enforce neat style of code writing.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 19, 2005 9:31 AM
Reply to this message Reply
Hi Kondwani,

Settle down. :) I do understand your dissatisfaction with those posts that are of the "Plz hlp, thx..." genre that just have a simple homework assignment typed in verbatim (if badly) with the author trying to claim that it is something else, like work or "research." In such cases I think it is fine and good fun to offer silly answers. However, I don't think it is necessary to get too caustic and aggressive, or insulting in the answer.

There are cases where people simply don't notice the "Formatting Your Post" box. It is pretty easy to not notice the sidebars of a web page, since that is often where the ads are. It can be an automatic response. You really have to consciouly slow yourself down and explore sometimes. If someone doesn't notice it the first time, it isn't because they are lazy or stupid; it may be they are more focused on the problem they are trying to solve.

In answering questions with unformatted code, I think the best first step is to request someone to repost using the tags and good indentation, without being rude about it. It is pretty easy to save a little text blurb (or even a little collection of them) in a file, so you can just copy/paste it instead of retyping it. Something like this:

It is really hard to read unformated code. Please repost your question with the code indented normally, using the tags in the Formatting Your Post box. You see that box to the right when you are making the post. In particular the java tag will give your code nice syntax highlighting (even for code that isn't really Java, but is reasonably similar, like C++ or C#). You need to make sure the indenting is correct yourself (the tags won't do that). Finally, before clicking the Post Message button, try the Preview button to make sure it looks good. If you do this, your chances of getting good helpful answers are greatly increased.

And then, if they don't pay attention to that suggestion, you can just ignore the thread.

We are asking these (often first-time) question posters to be courteous. Therefore, it is incumbent upon us to show courtesy at the outset. If that doesn't work, then it is time to rip 'em apart. But even that should be done in a tongue-in-cheek fasion, as opposed to simply being vicious.

What do you think?

Trevor Hatcher

Posts: 10
Nickname: newbie05
Registered: Oct, 2005

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 19, 2005 10:46 AM
Reply to this message Reply
Matt,
Thank you for your level headedness. you were very correct when you said it is easy to miss the formatting instructions along the side.

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 20, 2005 1:03 AM
Reply to this message Reply
Does make sense but there are a lot of scenarios in which I have made that
request diplomatically and it has been ignored. Most notably this one
scenario where someone rudely demanded that I forward them pseudo code
to their email account. I think there is only one type of language that
a certain type of people understand. Rudeness reciprocated usually makes
for a great 10 minute coffee break - that's all in good fun though.

Though I'll attempt to go the diplomatic approach for the next few weeks.

Tapan kumar Rath

Posts: 18
Nickname: papuni
Registered: Sep, 2005

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 20, 2005 8:32 AM
Reply to this message Reply
After the first post I kept reading it because I thought I will get some good coding about filtering etc.But if its gonna be a war of the words then it should be named grudge forum or should it be war forum

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 20, 2005 2:48 PM
Reply to this message Reply
> scenario where someone rudely demanded that I forward them
> pseudo code

One thing I've learned is that not everyone is a native English speaker, and sometimes the language that they grew up speaking doesn't translate well to English, in particular when asking for help. Apparently Hindi, if I understand correctly, doesn't have the same structure and so someone who normally speaks Hindi, trying to ask for help in English, comes across as demanding.

That said, it's hard not to react to the perception. Interestingly enough, in a number of the seminars I've taken a lot of the work is spent on understanding your reaction to people who typically are native English speakers, when they attempt "normal" communication. We have a hard enough time with that, it seems.

Kondwani Mkandawire

Posts: 530
Nickname: spike
Registered: Aug, 2004

Re: Bill Please take Action on the laziness involved in Code Posting Posted: Oct 26, 2005 1:51 AM
Reply to this message Reply
> After the first post I kept reading it because I thought I
> will get some good coding about filtering etc.But if its
> gonna be a war of the words then it should be named grudge
> forum or should it be war forum

Next time pay attention to the topic wise guy!!

Flat View: This topic has 10 replies on 1 page
Topic: Setting Locations Previous Topic   Next Topic Topic: JAva Application and JDBC Oracle 10g connection problem

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use