ID:294104
 
I would like to submit the old Bwiki article "The Code" as a Dream Makers article. It would be extremely helpful for all, if even one new programmer took a look at this, or we could link them to this.

Here is the link for the wayback machine- http://web.archive.org/web/*/http://bwicki.byond.com/ ByondBwicki.dmb?TheCode

TheCode
"Can anyone give me the battle code?" (Replace battle with GM, teleport, saving, DBZ , racing games, Mystic Journey, Seika, Battle of Evermore, MMORPG/RPG or anything else)

Hello people new to BYOND. The above statement is the worst thing to ask on the Forums. Let me give you a couple of reasons:

The code - That statement is too general. No one can give you *the* code without seeing the whole source to your game first (and I'm quite sure you don't want to give it out). There are very few codes so general that it fits in all games without modifications. So please, for the benefit of everyone: Don't ask for *The* code. It doesn't exist. Same goes with a code.

Also remember, that asking for *a* code on the forums is like asking for *a* bread in a bakery! Or asking for *a* people! - O-matic

Instead, do like the renowned Lesbian Assassin suggests: "If you'd like to see some ways other people have implemented GM codes, or some ready-made examples you could incorporate into your game, take a look at the links on the left [on the BYOND home page]... Libraries and Demos in particular might have some good ones."

Or you can ask like this on the forum: "I'm trying to implement magic in my game. I have a fireball icon and now I'm interested in knowing how to code a verb that creates a fireball next to the magic user, and then he/she can click on a target and the fireball will travel there. How can I do that?"

Do you notice the difference? Very specific. That is a good advice on the Forums. Be specific.

And remember, the Help files in Dream Maker rock! -GaZoot

Very good advice. Also keep in mind that even if you have a specific problem you're trying to tackle, there is no specific "code" for it; there are many, many different approaches, each with their own pros and cons (though some have many more cons than pros). Think of coding languages like written or spoken language--the same idea can be expressed in different manners for different purposes. The two questions:

"Excuse me, I need to relieve myself. Could you be so kind as to direct me to the lavatory?"

and

"Where's the crapper?"

both ask essentially the same thing but in very different ways. One is more polite, but the other, while rude, gets the question out in a lot less space. When you're working on some code, you'll want to try to figure out different ways to solve the same problem and look at the merits of each. At first, you'll probably end up doing things in a "bad" way quite a bit, but if you start looking at different ways to do the same thing in a better, more efficient way, you'll find yourself getting better at coding. -Leftley

On the word itself, I'd just like to point out that "a code" doesn't even make sense when referring to program code. "I want a code for a battle system," says Joe Newbie. Joe knows there are lots of ways of doing it, so he doesn't say "the", but "a" is wrong too. "Code" is not a singular word; not in this context anyway. What he wants is "some code", or "a snippet of code". (Okay, maybe not a snippet. A battle system is more complex than that.) - Lummox JR

Even though we say not to ask for code, you'll often get some code as an answer. This may be confusing, but we give you code for a specific reason: it's the best way to get across what we're trying to say. The code you receive will normally be written in such a way as to illustrate what is happening in the program. When we say "don't copy and paste this", what we mean is that you should read through the sample code until you understand it, and then write your own code that will work in your own game, because most of the time our code will not work in your game. The simple reason is that we don't know how your game works. We assume, for example, that the best way to talk about a basic combat system is in terms of hp; but your game may not use hp, it could use body point, 'pl', or any other imaginable system. The only thing that is guaranteed to work well with your game is something you write. -- IainPeregrine

Not to mention that asking for A/THE CODE makes you look like a HelpVampire, which is not a good thing to be labeled as.
I would disagree with this article on various phrases personally. For example, spoon-feeding somebody with a code snippet and expecting that very person not to copy and paste is illusionary and proven to fail on a daily base.

If you want to submit an article to the Dream Maker's guild, you'll have to join the guild and submit the article, which will be reviewed.
In this special case, you might want to post on the Community forum instead.