Help - Search - Members - Calendar
Full Version: Does Gamemaker Teach Bad Coding Practices?
Game Maker Community > General > The Community
Pages: 1, 2, 3, 4
flexaplex
QUOTE (Dangerous_Dave @ Oct 21 2009, 09:53 PM) *
I don't think it's a good idea to only allow 3D, mplay and DLLs if the code action is in the event by default. Experts want to use GM how they decide, not how they are told.

What do you mean? It would have exactly the same functionality. It would just be there be default which is more convenient for most expert users, it is not there at the moment so it doesn't confuse beginners using DnD.
weckar
Exactly: it makes no difference. If we continue to respect GM as the common denominator, the stepping stone to all programming, we have to stay supportive of emulation of all the syntaxes programming languages use. It is because we could try every option in GM that we are able to adapt to whatever challenge is thrown at us, synta wise, in other programming languages. It is because we have the raining of interpreting each other's code. You wish to take that away?
Dangerous_Dave
QUOTE (flexaplex @ Oct 22 2009, 09:57 AM) *
What do you mean? It would have exactly the same functionality. It would just be there be default which is more convenient for most expert users, it is not there at the moment so it doesn't confuse beginners using DnD.

Some expert users use DnD. But I wrongly assumed you were talking about the often requested feature of replacing the DnD area with a code editor when you switch to an "expert" mode, instead of having a code action.

QUOTE (weckar @ Oct 22 2009, 09:59 AM) *
Exactly: it makes no difference. If we continue to respect GM as the common denominator, the stepping stone to all programming, we have to stay supportive of emulation of all the syntaxes programming languages use. It is because we could try every option in GM that we are able to adapt to whatever challenge is thrown at us, synta wise, in other programming languages. It is because we have the raining of interpreting each other's code. You wish to take that away?

If you are forced to use a C syntax in GM, and want to learn Delphi later, you are far better off having learnt the C syntax than you are having been allowed to use anything you wanted. If you learn one properly, you wont have any trouble switching to another. It makes no difference which one you choose, as long as your choice isn't "all of them".
weckar
I suppose our learning methods do differ... mine is by recognition. As stated, most people's programming styles here do resemble an existing language. Therefore, by learning to interpret their coding, I basically gain the basic skills to read that language.
flexaplex
QUOTE (Dangerous_Dave @ Oct 21 2009, 10:05 PM) *
Some expert users use DnD. But I wrongly assumed you were talking about the often requested feature of replacing the DnD area with a code editor when you switch to an "expert" mode, instead of having a code action.

I specific didn't suggest that to avoid an off topic debate about it (though I do actually think that would be better), I didn't really want to go into exact specifics about what would be in an expert mode.
Frederick
QUOTE
I do not believe that Game Maker specifically "teaches" anything by itself.

I agree.

I don't believe GML is a good programming language to start with. I recommend Java or C++.
Dangerous_Dave
QUOTE (flexaplex @ Oct 22 2009, 10:10 AM) *
I specific didn't suggest that to avoid an off topic debate about it (though I do actually think that would be better), I didn't really want to go into exact specifics about what would be in an expert mode.

I like the idea of it being a preference rather than included in an expert mode. Advanced and expert modes should add things, not change them.
weckar
in that case, shouldn't a optional syntax checker suffice? In that case we could set it to the syntax model we pleased and still be conform.
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 10:17 AM) *
in that case, shouldn't a optional syntax checker suffice? In that case we could set it to the syntax model we pleased and still be conform.

I doubt that adding more than one would be worth it, but yes an optional one. When on, it checks strictly against a decided syntax, when off it checks like we have it now. As long as it's on by default, I'm happy with that (and I also decided it should be called a compatibility mode several posts back).
weckar
well if there's more than one, people like me won't lose their tool, and people like you will find pleasure in that instead of thousands of random and sometimes mid-code changing syntaxes, there would only be a handful of consistent ones. everybody wins.
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 10:37 AM) *
well if there's more than one, people like me won't lose their tool, and people like you will find pleasure in that instead of thousands of random and sometimes mid-code changing syntaxes, there would only be a handful of consistent ones. everybody wins.

If there's more than one, it solves but one of many problems. Game Maker uses GML, and GML should have one syntax, as most languages do. This way when someone asks for the code to do something, we don't have to say "which syntax mode are you in", we just tell them the code for the only syntax mode.
Revel
GML was the first programming I learned. I do not believe that it teaches "bad coding practices" because I learned many other programming languages afterwards quite easily. The only thing I believe to be "misleading" is the fact that GM can use a single = for comparison where other languages usually use == for comparison.


I also believe it depends on how you program. Ever since I started using GML, I naturally used general programming structure:

CODE
if (foo==true)
{
game_end();
}

I cant imagine anyone wanting to code without any sort of structure because then it just gets messy:

CODE
if foo=true then game_end()
makerofthegames
QUOTE (NakedPaulToast @ Oct 21 2009, 01:07 AM) *
What needs to improve is not the application of syntax, but the application of critical thinking, problem solving, debugging skills. Members here are not interested in actually learning proper programming, they may think they are, but they're not. They are looking for a quick solution instead of developing experience.

If you know a way to change child DNA, tell us right away. whistle.gif
weckar
QUOTE
If there's more than one, it solves but one of many problems. Game Maker uses GML, and GML should have one syntax, as most languages do. This way when someone asks for the code to do something, we don't have to say "which syntax mode are you in", we just tell them the code for the only syntax mode.


meh... good point, I have to admit... Though if that really is your goal, I don't think I'll surprise you by saying it's too late for that. People who don't like it will keep using older versions of GM, not having the function, still posting questions regarding it.

No, the only logical implementation I see is as a suggestive learning tool, something my sugegstion does a wonderful job at. (And ofcourse there could be a 'default' suggested syntax).

Quite frankly, I think the fact that hardly anyone knows how to assign constants and uses globals instead is a more pressing problem.

EDIT: put in quote for readability
johnjoe
why complicate the matter?

QUOTE
Do you want to develop computer games without spending countless hours learning how to become a programmer? Then you've come to the right place. Game Maker allows you to make exciting computer games, without the need to write a single line of code. Making games with Game Maker is a lot of fun.


again, if it is intended to assist users to create a game up to an extent that writing a single line of code isn't neccessary then why would yoyogames complicate the matter by comverting the language interpretation into something complex?

the amount of crap in this topic is astonishing.
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 10:45 AM) *
meh... good point, I have to admit... Though if that really is your goal, I don't think I'll surprise you by saying it's too late for that. People who don't like it will keep using older versions of GM, not having the function, still posting questions regarding it.

Or they will switch it off. The new, strict syntax should already be one of the syntaxes already supported. If someone wants a code, the new strict syntax will still work in the recent previous versions of GM, and if they post a question that involved incorrect syntax there are plenty of people around who can answer them, and maybe even put them straight at the same time. If you don't like the new syntax, switch on compatibility mode and code how you like, but if it is strict by default then most newcomers will learn properly and enjoy the strict syntax.

QUOTE
No, the only logical implementation I see is as a suggestive learning tool, something my sugegstion does a wonderful job at. (And ofcourse there could be a 'default' suggested syntax).

I think I'd rather a suggestive code editor. I don't much like the idea of several allowed syntaxes.

QUOTE
Quite frankly, I think the fact that hardly anyone knows how to assign constants and uses globals instead is a more pressing problem.

Memory is cheap.
johnjoe
QUOTE
If you don't like the new syntax, switch on compatibility mode and code how you like


having multiple interpretation for gml implies more workload for the gm runner to converse with your 'syntax'.

question: IQstim, what if yoyogames implements a list of pseudo syntax and convert each individual function into gml when the project is being compiled?

i wouldn't put my bet exactly that yoyogames would invest their time for such.
weckar
the runner can stay the same... I really really think we agree on most points Dave, except for what the final use of this should be: Broad learning or learning to work with a sytax per se (which includes the inherent advantage of universal code, yes)
Dangerous_Dave
QUOTE (IQstim @ Oct 22 2009, 10:54 AM) *
having multiple interpretation for gml implies more workload for the gm runner to converse with your 'syntax'.

Sure does, but it's for compatibility reasons. I'm happy to drop the current syntax and just have the strict one, but I doubt many others share this view.

QUOTE (weckar @ Oct 22 2009, 10:57 AM) *
the runner can stay the same...

The runner checks syntax currently. Mostly at run time, I think, rather than real time. So it shouldn't have any significant speed problems, but it can't stay the same.

QUOTE
I really really think we agree on most points Dave, except for what the final use of this should be: Broad learning or learning to work with a sytax per se (which includes the inherent advantage of universal code, yes)

The aim of GM isn't to teach users all syntaxes, in fact for most people it need only teach them one: it's own. But it's current syntax can be confusing. So many things that are different but make no difference (= or == for comparison, ;, then, etc). Having more than one can be just as confusing. If you want to learn C syntax, learn C. If you want to learn python syntax, learn python.
weckar
as the current runner can interpret nearly all syntaxes, I can't see why limiting the syntaxes we are able to write should affect it in the slightest.

By the way, now that we've stumbled upon the very relevant subject: what is the aim of GM?
stinkoman_sd2008
You can't really say that GM "teaches" bad programming practices. It's really the user's choice as to how they want their syntax to be in GM. However, it definitely doesn't enforce strict practices. I feel that it can be a good introduction to programming, as long as people don't expect to just copy & paste their GML and change a few commands and have it work in another language.

Also, weckar, the aim of GM is to enable anyone to make their own games, even if they have no prior experience.
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 11:10 AM) *
as the current runner can interpret nearly all syntaxes, I can't see why limiting the syntaxes we are able to write should affect it in the slightest.

Because if we don't make the runner check the stricter syntax, there's no point in implementing it.

QUOTE
By the way, now that we've stumbled upon the very relevant subject: what is the aim of GM?

As stinkoman_sd2008 said, it's to allow people with no programming experience to make games. The stricter syntax, contrary to what many think, actually helps people learn code.
weckar
hmmm... Maybe if it had a mentor module (actually pointing out why something is wrong instead of just blatantly stating it is) I would agree...
commander of games
QUOTE (flexaplex @ Oct 21 2009, 03:51 PM) *
The only things I would probably put in expert mode are 3D, mplay and DLLs. Just to help hinder nooblings trying to use things they don't understand. Expert mode could of course have additional functionality like the 'execute a piece of code' action being in events by default, named arguments etc. Stricter syntax goes along with these also, as I said most more advanced members will actually prefer a stricter interpreter as it's easier to check proper syntax then.

All these things will actually ultimate help beginners, they might just not agree (realise) it. It's not 'unfair' as I saw someone put, they can still use the functions once they learn to code properly. Going back to my pool analogy it might be exciting and cool to go in the deep end, but if you can't swim well it's not really a good idea.

That post is disturbing. I use DLLs all the time(like 39dll), if you were limited to using those ONLY in expert mode, I would flame everyone who agrees with that ideas pants off. And I imagine many noobs would say "this sucks, I give up!" if they encountered an error that had simething to do with the syntax they used.

Who in the hell cares about coding perfecty!? Not I, and probobly not many others!

Also just for the record, GM is not focused on expert users, it is focused on everyone! These comments about making stuff "more convienant" for expert users are starting to get on my nerves, did you EVER take into consideration the noobs at programming!? They dont want to learn C++ so they use GML because it doesnt have to be perfect! So just shut up(no offense)and leave GML the way it is!
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 11:17 AM) *
hmmm... Maybe if it had a mentor module (actually pointing out why something is wrong instead of just blatantly stating it is) I would agree...

The reason it's easier is because it's less confusing. One way to do each.

As for a mentor module, that's really hard to implement, though it would be easy to add suggestions to the error messages.
For example:
Error, variable doesn't exist:
Did you declare it?
Is there an instance of the object in the room?

Error, can't compare arguments:
Game Maker can't compare a string and a real value.
Use string(...) to convert a real to a string, or use real(...) to convert a string to a real value (number).



The second one is easier to give exact reasoning because there are only two data types in Game Maker (generally), but there are lot's of these errors where you can have educated guesses at what caused them.

QUOTE
That post is disturbing. I use DLLs all the time(like 39dll), if you were limited to using those ONLY in expert mode, I would flame everyone who agrees with that ideas pants off.

Most reasonable people would just switch to expert mode.

QUOTE (commander of games)
And I imagine many noobs would say "this sucks, I give up!" if they encountered an error that had simething to do with the syntax they used.

What an ignorant statement. They already get plenty of syntax errors. Then they learn from them. It's easier to learn if all of hte code samples they are learning from are the same, and if there's only one way to do a particular thing.

QUOTE
Who in the hell cares about coding perfecty!? Not I, and probobly not many others!

But you probably don't care if your signature is over 150px tall either, but that doesn't mean we should allow signatures over 150px tall.

QUOTE
Also just for the record, GM is not focused on expert users, it is focused on everyone! These comments about making stuff "more convienant" for expert users are starting to get on my nerves, did you EVER take into consideration the noobs at programming!? They dont want to learn C++ so they use GML because it doesnt have to be perfect! So just shut up(no offense)and leave GML the way it is!

I can't wait until you get a girlfriend (hypothetical, obviously) . She will try to change you (as they do) and you will yell "shut up and leave me the way I am", even though you know she has a point and you are better off doing what she says if you are to get anywhere in life.
weckar
well, Yeah. If there were to be only one syntax, those problems would be more frequent. But I could agree if such a system of 'educated guesses' was in place.
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 11:26 AM) *
well, Yeah. If there were to be only one syntax, those problems would be more frequent. But I could agree if such a system of 'educated guesses' was in place.

The thing is, no one would try to code with "then" if it wasn't allowed, unless they had previous experience in another language. If this was the case, they would easily learn that they must miss out the "then". Things wouldn't actually be harder to learn, and errors would likely not be more prevalent.
weckar
Ofcourse that's the case with new users... Veteran users, on the other hand, may find themselves running into errors that weren't there before all the time.
commander of games
Oh my god dangerous_dave, that thing about the girlfriend is the most insulting thing I have EVER had said to me! mad.gif That will NEVER happen(me getting a girlfriend), to me that kind of sh*t is completly disgusting! If anyone EVER says anything like that to me again, I will flame the f***in' sh*t out of them! mad.gif
Dangerous_Dave
QUOTE (weckar @ Oct 22 2009, 11:39 AM) *
Ofcourse that's the case with new users... Veteran users, on the other hand, may find themselves running into errors that weren't there before all the time.

But as veteran users, they will enable compatibility mode or learn the new syntax (which as veteran users they would hve likey seen before).

QUOTE (commander of games @ Oct 22 2009, 11:43 AM) *
That will NEVER happen, me getting a girlfriend

Grammar corrected.
weckar
EDIT: UGH too tired, sorry
flexaplex
edit: never mind
commander of games
It was supposed to have a ( there. I will fix that.

Edit: Fixed. I think I have made my point with that post. Now, back on topic.
9_6
The only point you made so far is that you like to disagree (a lot) without even knowing what you're talking about and that you're acting pretty childish.
I'd like to redirect the 'shut up' you like to give out to people so generously back to yourself.

As for the topic, yeah, gm allows for bad coding habits by allowing such a wide array of possibilities to do things and by being so forgiving.
I see that more as an advantage though as you'll probably know your way around in gml if you have some experience in another programming language like java or c++ or delphi.
Of course that can be 'abused' by people who don't know it better but I don't see that as too much of a problem.
commander of games
I am getting sick of this. Maybe I should just stop commenting in the community forum so I dont get insulted anymore. dry.gif
9_6
Thank you.
NakedPaulToast
QUOTE (commander of games)
If Mark put that in, I would leave GM forever.

QUOTE
If anyone calls me ignorant again I will add them to my "non-friends" list.

QUOTE
If everyone stops that, I will get rid of my imaginary list of non-friends.

QUOTE
if you were limited to using those ONLY in expert mode, I would flame everyone who agrees with that ideas pants off

QUOTE
If anyone EVER says anything like that to me again, I will flame the f***in' sh*t out of them!


Do you realise how childish and quite frankly, nauseating, you sound.

This behavior of if you do this, I'm going to do that, is what you'd expect from a three year old trying to control their parents. Most outgrow it by the time they turn five.

Why do you think anyone gives a crap about what you're gonna do, if they don't act the way you want them to behave? Why must you be so controlling?

It's a good thing forum software doesn't support microphones and web-cams or this topic would be filled with the sound of people gagging, and the visual of people gacking all over the screens, every time you make one of your control freak threats.
C-c-JEC-c-C
I dunno I dont think it does like and see people can tr and use system but in the end if they cant they get another program and learn something else. Because at the end of the day we all have brains. We put fingers on keyboards and do stuff and then stuff comes out. You know, like a machine. So if the machine didn't work trees wouldn't grow. So what are we going to do about it? Well, kids need to learn. Like, if it rains they need to smear the grass with oil. You know how sometimes machines go haywire and they eat grass. Well sometimes that doesn't happen then a red blob appears. Well ,the thing is, you cant stop that. The problem lies in the execution it is too slow. Even if you learn you can't add water to it. It's like trying to eat dust, if you know what I mean. See, the thing is the program is too fast. Too fast at stuff. You know how when you eat sand, it kinda takes the program away. Well that is how it is. Look at a computer. see it beelps and stuff. Well if it didn't bleep how would we know or learn. Sometimes you hvae to go with it. Sometimes you have to simplify. Sometimes you have to have. Have is have. Having what? Yes, something, at least. We have something. Don't complain. it grows. Water it. And the red blob will shine .But soon it will be taken ovver, and what we will have left is death. Now we don't want that. Thanks.
commander of games
mad.gif mad.gif mad.gif NPT, I am reporting you! And FYI, I am not 3, I am almost a teenager!
NakedPaulToast
QUOTE
NPT, I am reporting you! And FYI, I am not 3, I am almost a teenager!


Perhaps you should have said, "If you don't be nice to me, I'm going to report you".
makerofthegames
Coarse trolling is mandatory at the GMC.
Desert Dog
Ahem, this topic has turned from humorous, to slightly embarrassing.

Anyway, I can't see how GM teaches bad coding practices... if anything, it is merely that GM doesn't really teach 'any' coding practice, and since the majority of users have nil programming experience, there practices and habits are just built by trial-and-error, and picking up from examples&tutorials that they read. (sadly, some 'tutorials' have shocking coding habits, which hardly help matters)

So a person who's learning, both GM and coding, via poorly documented 'tutorials', and 'examples' are most likely going to pick up bad coding practices (and bad information, in some cases)

KC LC
This complex issue* is apparently beyond the GMC's maturity level. dry.gif I'll close it so you guys can focus on something else for a while.

I'll re-open it later.


*compared to simultaneously walking and chewing gum






EDIT: I've re-opened the topic.
Let's try to be more civil, and just disregard childish posts.
oddbob0
One of the biggest problems with arguing towards enforcing a standard or as to whether GM should force a specific set of rules more so than it already does, and this does tend to get overlooked a lot, is that it almost (not always) takes for granted that people need or want to move on from GM and/or GML. That, to me, is taking a little bit too much for granted.

As it stands right now, it's an enabler. It enables people who may have little to no interest (like myself I might add) to make games with few roadblocks. It might not have everything I'd like it to, it might have its flaws, glitches and issues along the way but generally it lets me punt out a game pretty darn fast without a steep learning curve and having to stress too much over writing any sort of compliant code. It's pretty darn user friendly for the most part.

I don't care for coding. I never wanted to do the coding part so any route that can cut as much of the worry out of that part is fantastic. There are those who will want to or enjoy the coding part. With GM, they'll have a primer as to the logic and construction required and can go from there to other languages and places, if they've got that far with GML, I doubt it'll be too much worry to move on. The rest of the folks can tootle along happily enough.

With GM being built how it is, it's resulted in the production of hundreds of thousands of games, a lot made by people who wouldn't have made games otherwise. It matters not whether those games are good or not, what's truly important is that people -can- do this.

Ultimately, it doesn't matter if it does or doesn't enforce good coding standards or specific syntax compliance. What matters is the end goal of getting more people writing games. It's pretty easy to forget that but it's something that makes GM and by extension GML worth treasuring and something that should be kept in mind when contemplating specific changes to how it operates. You don't want to place more roadblocks in these folks way when you already have a package that enables so many people to get stuff done, if anything, you want to assist in removing as many roadblocks as possible instead. That way, more great things can happen.

Worrying about whether it teaches bad coding practice should really be the bottom of the list of concerns in my opinion.
e_barroga
QUOTE (KC LC)
succumb? laugh.gif I think a better expression would be "accept standards"

No, I chose succumb because that is what most people complaining about standards make it like. "accept" just doesn't describe the pain that they seem to having.

I can guarantee everyone that Game Maker's non-restrictive syntax will never fade.
LSnK
I didn't have any difficulty using C++ after starting with GML.

The most important concept to understand in programming is the logical structure that underlies it. Once you 'get it' learning the peculiarities of each language is quite easy.

I don't think coding practises are taught by language syntax. It depends on the person. If you have any brains you aren't going to be coding poorly for long; the reason they're bad practises is because they increase long-term difficulty, readability, reusability, complexity etc.
DPoole
I believe that a forgiving syntax is what GM's all about: ease of use.
KC LC
Guys, give it a rest, OK? I've just edited two posts and removed two others. Don't start the bashing again.
Frederick
QUOTE
Or is it slowing them down by letting them fall into bad coding habits.

How do you call GML bad code habits?
DZiW
Shall we all benefit renaming the topic as
QUOTE
Does Gamemaker Forum Teach Bad Posting Practices?

I wonder?

As far as GML provides (accepts) a few ways of coding, it's rather not free-style, but ambiguous. And if something is not certain then it can surely be of disservice. Thus, IMO Mark needs to put his ax on the helve: either - or. Polling?

Cheers
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.