ID:278382
 
I've just been thinking(which is most likely a bad thing), is anyone else a bit reluctant to insert a code snippet from a library, demo, or someone giving it to you for help, when you dont exactly know how it works? The reason i do this is because if/when something goes wrong in my code, and there's an error inside the snippet i just Copy/Pasted into it, and i DON'T know how to fix it...it just causes a major headache. Help Vamps always want just the code to put their games together like a little puzzle, but never actually want to learn the coding language itself, and when something goes wrong, they whine and cry until someone fixes it for them :/ I mean c'mon, god forbid you have to study the language a little and fix it yourself. Or at least people, when you post snippets, always make sure to include a breif explanation for the critical areas, because whenever im asking for help, i dont want someone to do it for me, i just want an example, and an explanation of how it works, so i learn rather than C/P code all day. Anyways, does anyone else have this same point of view to this potential mess?
A code snippet is not created to be copied and pasted. Ideally, they would be created so you can follow and learn from them - if not, you should ask more questions, we won't bite. As far as libraries - good libraries won't cause errors like that, and if they do (and it concerns the manipulation of a single variable), there should be notes in implementation about how you can fix these "issues".

I agree that most snippets should be commented, but please do not copy and paste these into your code - you won't learn, and your code will always have issues.
What I do is thoroughly read through the code until I understand it and then I improve upon/customize it to re-enforce the knowledge. After this I don't feel reluctant use it in my projects.
I would happily use libraries in my work, that's why they exist. No copying and pasting is required of course, I simply download the library with the pager, and check the box in DreamMaker to include it in my project.

These libraries were designed to offer neat general solutions to all kinds of game development issues, and their use in other projects like my own represents a good use of both my time, and the library developer's time.

Now of course, I may on occasion get an error from inside a library I am using. This however is not nearly as bad as copied and pasted code issues, as I have the library developer around to help me identify the problem (which may be in my code, may be in their library). If it was a library bug, the library developer fixes it and makes a new version of their library.

Here's the beautiful bit: We haven't just fixed one bug in my project, we've fixed one bug in EVERY library user's project, that could be like 200+ bugs fixed in the time it took to fix one bug.

It makes so much sense, I dunno why you wouldn't use libraries on principle.
In response to CauTi0N
I'd go one better on that library matter, if I may. If the library causes an issue for you, or you think it's causing an issue for you, you should be able to seek support from the library developer. Obviously no-one gets it right first time, even library developers.

On BYOND for some reason, libraries are seen as somewhat static pieces of code, that developers just write, release and then forget about. Clearly this is not the case.

As the platform progresses, new features come available that libraries must take into account, and people will find bugs in the library with "use in anger". Even if neither of these somehow come to affect the library, a library using developer should come to expect a certain level of support from the library developer, even if it's not strictly a bug (can I do X with your library?). We expect this from BYOND itself, a library is not much different.

Of course in practice most BYOND libraries are effectively unsupported, and the website doesn't offer any central bug / feature tracking facility for library hubs. But a library developer can provide their own mechanisms for this, and I strongly advise they do so.

Libraries are projects too.
In response to Stephen001
Stephen001 wrote:
Of course in practice most BYOND libraries are effectively unsupported, and the website doesn't offer any central bug / feature tracking facility for library hubs. But a library developer can provide their own mechanisms for this, and I strongly advise they do so.

Very, very true. I'm looking for some kind of feedback system for my library as well, if I ever get around to releasing it. It would be very handy to have something like the Bug Tracker our hubs, though.

Libraries are projects too.

You're really not kidding.
In response to Hiro the Dragon King
I was just kind-of throwing this out here as a healthy conversation. I find it actually quite relaxing having a mildy intellectual discusion with others. Im a fantastic programmer, its just the fact that ive seen so many people asking for others to basically do the hard work for them and so they can get credit for their second rate game, its frustrating. I honestly wonder why people think programming is so hard? Though to most of the more advanced developers, its second nature, so it would be like comparing a rookie at golf to Tiger Woods, of course tiger would call it easy, but others have more trouble :/

Edit: Also thank you to the mod who moved this thread, i originally meant to post here, but a slight mix up happened and it just went from there.
In response to Toadfish
Dumb is of course the interesting one. The concept of "lazy" programmers being good isn't too unusual, and while I can affirm the "dumb" property is also handy, I've never seen anyone else note it. Glad to see it's not just me.
In response to Toadfish
Two roads are set before you, one is long and steep so that is reaches the heavens, the other is short and flat but leads nowhere. The choice is yours.
You must also keep in mind that the person who helps does not know the level of ability of the person that asked for help. Depending on where the original poster's skill is at, there is an appropriate type of response; however, we don't know what that appropriate response level is since we often don't know where the poster is at.

I usually just post in a manner corresponding to my mood. If I'm in the mood to go into painstaking depth, then I will. If not, I'll just post some code.

Generally, it takes someone who is already at least at a mid-level skill range to be able to just skim over the code I write and be able to learn a lesson from it, and for that person this is the proper answer.

Sometimes we can estimate the level of skill of the original poster, and when that is reasonable I generally try to scale the answer appropriately, though sometimes I fail at that. Also, when there are no signs otherwise, you could probably assume a very low skill level since that's where most of our developers are at, but if someone doesn't put in enough effort into their question, I'll just answer however I please.

If someone is very good about asking there question and provides plenty of detail, explains the problem fully and completely, and it is obvious what I need to do for them, then I will generally spend a lot more time making sure the person gets exactly what they want.

One of our problems around here is that people put very little effort into asking their questions. If you want someone to take you seriously and give you exactly what you want, you need to be willing to put in the effort to make it as simple as possible for someone to do so.

I'm not saying that you specifically have this problem, as I don't know one way or the other (if I've read any of your posts, I don't recall what they were like), but it is a general problem on our forum.

I actually asked a question myself recently, so I have an example of what I'm talking about.

(edit)If you click that link, it might anchor to the accepted answer. You might have to scroll up to see the question.(/edit)
http://stackoverflow.com/questions/4057683/ making-an-ast-node-the-lowest-descendent-of-a-recursive-rule

You don't have to be able to understand the content to be able to see the flow of the question. As you can see, I quickly get to the point and ask a question up front. That question obviously needs expounding upon, so I give a code sample and ask the question in the terms of my specific problem. I then explain what exactly I want it to do, I give a simple demonstration, I explain exactly what it is doing instead, give a simple demonstration, then I quickly discuss some of the things I tried to fix it and how they did not work and what they did instead.

I then reiterate my question, asking it succinctly and in the terms of my specific problem this time, now that my problem is well known. Then, last, I give extraneous information which people might ask for if I don't provide it.

Because of the work I put into asking the question, people knew exactly what I wanted, and I got a comment from someone who wanted to compliment me on a well executed question, and I quickly had someone else help me with exactly what I needed.