Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Give me the code. who cares what it does! 1

Status
Not open for further replies.

onpnt

Programmer
Dec 11, 2001
7,778
US
I've been seeing more and more code postings lately and that has seemingly bothered me. What are the new members (or old) gaining by asking a question and getting a code post for the fix without a discussion on what the fix was, why it was needed and more so how to NOT do it again and again in the future.

I know some may get irritated by wordy posts to questions but this is not just a help forum in "do my work" so I can go on to the next error but more so help me and help me understand what it is I did wrong.

I feel this topic is justifiable in Where IT is going because as Tek-Tips seemingly grows every day that means Tek-Tips has more and more a impact on who is out there and what the gain in knowledge from day to day problem solving situations is. This doesn't stop here either. Open source has seemingly come to the point of no explanation also. There are far too many scripts out there that are "click here to download" this script. OK! So how does this thing work? Who cares, it does something cool and makes me look good!

So what do you think? Are the explanations not as important as I seemingly have thought them to be and am I just blowing smoke out of my ears for nothing? Should it be known that posting code answers without a slight learning explanation in there, is not the way we what to do things? How do you think this is going to effect the future programmers of this field?
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
I couldn't agree more, although I must admit I have been guilty of this a couple of times myself.

At the end of the day the distinction between those who have asked "how, and why?" and those who ask no questions will be great and wide.
 
I have seen this as well. I think it's mostly because companys don't want to hire coders who are top notch (and dollar) right now. They prefer to use beginners who can muddle their way though to solve the problem.

When it comes to code-getting, I've seen 2 clans.
1) the noob, who isn't interested in the HOW, just getting a solution is good enough. Typically students trying to finish a homework assignment, and grunt coders who don't care about their work, they just want it done so they get paid.

2) the seasoned coder who know the ins and outs, but can't quite solve the problem. He cares about the HOW, but has the experiance that he can gleam that info from example code. He/She isn't likely to use the exact code given, but will look it over to see what it's doing, and possibly see the real solution in the code, or get the inspiration needed.

most of the time when I'm asking a question, it's because I've already done the initial analysis, and know what has to be done, but just can't figure out a good way to solve the problem, or I'm new to the technology and can't find a good tutorial to help me along. Either way, a quick block of code from someone with experiance in that area will usually be enough to get me going. I don't think I've ever just pasted the code into my program. One current example is I'm trying to figure out how to use XML in a PHP script. I've found a couple tutorials that didn't help me, so I posted asking how to do it. A long block of description would be useful, but if someone posted the code that does basically what I need, I can study that up and figure out my solution from that.
 
I am #2, sometimes I just need an example to complete it. It is sometimes hard to explain and people use different terms. Code doesn't change (much). How can you say you are a programmer if all you do is copy code? There is a term for those people (I think), script kiddies. I will admit, I don't know JavaScript and I just copy and hack, but I don't do that for my real programs. Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
onpnt:

I see Tek-Tips as an insight exchange and repository. I figure if the authors of the site had wanted all this to be a code snippet archive, they would have implemented some mechanism for filing code snippets -- let's face it, the FAQ archives are not really good for that purpose.

So when I read a question, I am constantly trying to decypher where the questioner's insight has failed him, and try to help him fill in the missing pieces. But without writing novels at the same time.

As a general rule, I redflag every post which explicitly asks for code. The popup window for redflagging lists one possible reason for the flag as "lazy students posting their homework" -- I interpret that as including "lazy programmers asking me to work on their project for them".

So far, Tecumseh has agreed with me on a large majority of those flags. Want the best answers? Ask the best questions: TANSTAAFL!
 
I am actually wanting to build a code archive. Not for homework goers, but for examples of how to implement something or show a new concept. I don't know when it will be completed, but the hostname is programmerskb.org. Do you guys think it would be a nice archive to have? A knowledge base to go to, to look up code examples, etc. Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
Koldark
I think that would be a great idea as long as you include control language in it :)

Please don't misinterpreted my posting. I in no way was referring to what others post. I meant how we reply to them and how we reply to them.

sleipnir214
So when I read a question, I am constantly trying to decipher where the questioner's insight has failed him, and try to help him fill in the missing pieces. But without writing novels at the same time.
I agree a novel is not going to help anyone. I try to keep it short but detailed in explaining what I either have done to fix or write a solution to the problem.

Thanks for every ones thoughts on it.
---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
and of course nothing is complete without the power of direction to any high level language without Control Language. [wink]

Everybody: you have to be a 400 guru to understand that one ---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
more proper term for the heading of this thread should have read
"Give Them the code, who cares what it does!"

So no one else has any feelings or opinions on posts that are peer code with no explanation what so ever.

just a fix for now and then later...a "so I wonder how to do [the same thing]"... question arises.


I was suprised not many added to this

---------------------------------------
{ str = "sleep is good for you. sleep gives you the energy you need to function";
ptr = /sleep/gi;Nstr = str.replace(ptr,"coffee");alert(Nstr); }

 
Unfortunately, it is happening, and I think there are several factors in play.

Note: The following are general observations, and do not necessarily apply to everyone.

On the part of the questioner - He/she probably doesn't care why and how the code works, only that it does. Any why should they, in most cases, the boss probably doesn't care either, the emphasis is on results. It very short term thinking, but unfortunately, that's more common than anyone would care to admit.

On the part of the responder - In many cases (certainly not all), he/she is responding in the manner which most likely get a star. A response which teaches, but requires a little more effort is not as likely to be appreciated as simply handing over the answer.

It also boils down to professionalism (or lack thereof) on both sides. A true professional would not ask for someone else to do their job, nor would they accept posted code on face value. And by the same token, the true professional would not simply provide the answer, but rather would provide direction and/or suggesions. To reference the old adage: Give a man a fish, you feed him for a day, Teach him how to fish, and he can feed himself for a lifetime.

A true professionals would not want a fish, but would rather learn how to fish for themselves, nor would they give away a fish, but should be willing to teach how. Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
That is so right! You get a star for that comment. Too bad I didn't think it up. ;-) Mike Wills
IBM iSeries (AS/400) Programmer
[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top