How The 'Code-Off' Began...

Status
Not open for further replies.

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,695
Reaction score
929
First Language
English
Primarily Uses
N/A
What kind of scoring do you mean? One where we can have comments on them? We can probably setup a Google Docs form for a temporary solution until we find or make something ourselves.

Edit:

 

Over-confidence is generally a sign that you don't know enough to recognize when your code isn't optimal. I'm never happy with anything I write, much less release.

(And yes, I realize those comments were just playful banter, but that's a fair point to make anyway.)
Oh don't get me wrong, I pretty much think everything I write is bad. I have a nice little folder of things I really need to redo or fix. For example, my object reinitializer, which has gained a nice little following, has a critical bug in it that I've yet to fix. The nature of the bug involves me needing to completely rewrite it in a different way, but everything I come up with to fix it I just feel is bad, and never works. I usually just feel that the code itself is too ugly to be released itself.

And yes, I do have a notice stating that the script is indeed bugged and should not be used in a production environment until the issue is fixed, but for the time it still serves as a good utility if you just need to reload from a spot you saved in before dding scripts. Your equips and items and such just have a habit of going away.
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
I mean like so that the people judging would give scores on each aspect of the script...

Something like...

- Ease Of Use - 5/10

- Features - 5/10

- Code Efficiency - 5/10

 and then the person with the highest overall score would win. ^_^

That could be best esspecially if there are numerous entries. Rather than people just selecting whos they like best via a poll.
 

Solistra

Veteran
Veteran
Joined
Aug 15, 2012
Messages
593
Reaction score
244
Primarily Uses
Oh don't get me wrong, I pretty much think everything I write is bad.
I wasn't pointing fingers at anyone in particular -- I know you were saying that playfully. I just saw the opportunity to share an important point and decided to do so. :p
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,695
Reaction score
929
First Language
English
Primarily Uses
N/A
Try this and let me know what you think.
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
Important points make the world go round ^_^

And yea man, that looks pretty good. I think it would be best to host the voting on either that site or a very similar one. As long as people can vote, leave comments and score various aspects of the script along with me / the public being able to access the results - preferably the public, then theres no accusations of fixing the results ^_^
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
would there be a way for it be something like...

Script 1 :

Ease of use:

1,2,3,4,5,6,7,8,9,10

Features:

1,2,3,4,5,6,7,8,9,10

Etc..

Script 2 :

Ease of use:

1,2,3,4,5,6,7,8,9,10

Features:

1,2,3,4,5,6,7,8,9,10

Etc..

That way each scoring sections points could be tallied up for a total score. And also give additional feedback for each of the scripts.
 

Cadh20000

Veteran
Veteran
Joined
Sep 15, 2013
Messages
1,830
Reaction score
445
First Language
English
Primarily Uses
Anyway, it seems as though doing over a few weeks is best for most people. I think, for this first one at least, we should begin at the end of this month, with a two week period for writing the script. a 1 Week Period for people to judge the scripts - then a 1 week period to vote for the next script to be written - or something like that.

Maybe someone with a more organized mind has some good ideas for how it should flow?
If this is to become a regular thing, I suggest that have a thread for each month where suggestions can be made for the following month's competition. The final week prior to the competition they would be compiled into a poll and people could vote on it but not add new suggestions to the list for that month.

Not quite, but close. Pair programming is more like having someone watch over you as you write your code, asking you about why you're going about certain approaches and offering suggestions. Usually the one watching would be in something of a mentoring position, but not always -- pair programming with a peer can be very effective, as well. It's more about a constant feedback loop: you don't work in a complete vacuum, which makes you consider what you're doing and why you're doing it much more than you would working entirely on your own.

Generally, that tends to lead to better practices and more forethought about what you wish to do.
You could use something like Cloud9, though that would require moving your code from Cloud9 to the Script Editor (or vice versa), which isn't exactly ideal, but could certainly work.
Might I suggest that a way to implement this would be to have a deadline for each day's work and exchange scripts at that time. Then review them and post your questions to other individual to be reviewed and answered prior to starting the next day's work?
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
If this is to become a regular thing, I suggest that have a thread for each month where suggestions can be made for the following month's competition. The final week prior to the competition they would be compiled into a poll and people could vote on it but not add new suggestions to the list for that month.
Yea that will probably be very similar to what will happen - providing that the 'buzz' for this kind of event doesnt die within a few days :p
 

Ruby

Of the Earth
Veteran
Joined
Apr 19, 2012
Messages
1,987
Reaction score
893
First Language
English
Primarily Uses
I mean like so that the people judging would give scores on each aspect of the script...

Something like...

- Ease Of Use - 5/10

- Features - 5/10

- Code Efficiency - 5/10

 and then the person with the highest overall score would win. ^_^

That could be best esspecially if there are numerous entries. Rather than people just selecting whos they like best via a poll.
Ah yes, a little average of the scores would be nice.

Is this a one time thing? Or will it continue over a period of time?

I think this is a fantastic idea, and think that it shouldn't just be limited to them facing you rather than everyone in certain rounds or something to get everyone involved.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,710
Reaction score
2,553
First Language
French
Primarily Uses
Hoooo my wardrobe scene sugestion is pretty popular :3!

By the way every type of code is allow for the rgss? because i am generaly a sprite user :3!
 

Solo

Veteran
Veteran
Joined
Jul 26, 2013
Messages
1,104
Reaction score
154
First Language
English
Primarily Uses
RMVXA
Not to poop on anyone's party, but Moghunter already wrote a Bestiary script. It doesn't log enemies when they're merely encountered, though (they must be defeated).
 

Solistra

Veteran
Veteran
Joined
Aug 15, 2012
Messages
593
Reaction score
244
Primarily Uses
Not to poop on anyone's party, but Moghunter already wrote a Bestiary script. It doesn't log enemies when they're merely encountered, though (they must be defeated).
A "bestiary" is still the best possible option given when it comes to testing how to write good, clean code that also makes use of a decent amount of RGSS3. In addition to that, it's useful, a fairly simple problem to solve (with a number of interesting solutions), and could easily be written in a week.


Also, I honestly don't think Moghunter is a good example to follow.
 

Solo

Veteran
Veteran
Joined
Jul 26, 2013
Messages
1,104
Reaction score
154
First Language
English
Primarily Uses
RMVXA
A "bestiary" is still the best possible option given when it comes to testing how to write good, clean code that also makes use of a decent amount of RGSS3. In addition to that, it's useful, a fairly simple problem to solve (with a number of interesting solutions), and could easily be written in a week.
I concede.

Also, I honestly don't think Moghunter is a good example to follow.
May I ask why? I'm not asking in Moghunter's defense, I just want to know why.
 
Last edited by a moderator:

Mouser

Veteran
Veteran
Joined
Aug 19, 2012
Messages
1,246
Reaction score
264
First Language
English
Primarily Uses
A "bestiary" is still the best possible option given when it comes to testing how to write good, clean code that also makes use of a decent amount of RGSS3. In addition to that, it's useful, a fairly simple problem to solve (with a number of interesting solutions), and could easily be written in a week.

Also, I honestly don't think Moghunter is a good example to follow.
I don't know, I could think of loads of things to test writing good clean code.  Implementing some solid data structures, anything with random numbers where you can force an even spread (the rand the computer gives you isn't evenly distributed by a long shot). An efficient path-finding algorithm. Good AI (even not-stupid AI).

At least some of the above could be used in some of the options given (I should've jumped in this thread sooner to suggest some. There's always next month ;) ).

Whose going to judge the 'clean code' part? Open to everybody? That's a crap shoot if ever there was one.
 

Solistra

Veteran
Veteran
Joined
Aug 15, 2012
Messages
593
Reaction score
244
Primarily Uses
May I ask why? I'm not asking in Moghunter's defense, I just want to know why.
Sure. Actually, just because you asked, I started up my VM so I could take a close look at some of Moghunter's code, considering I originally said that simply based off of my initial reactions to seeing some of it, which isn't really specific enough for me to answer your question.

So I'm looking at the Atelier "Master Demo" now -- in particular, the "Monster Book", since that seems the most relevant at the moment.

Basically, while Moghunter seems to know generally how to write... programmatically, they don't seem to show much understanding of Ruby or how Ruby itself operates. Their code technically works, but it's inefficient and ultimately doesn't show much ability to understand how and why to design an approach -- rather, it operates everything very bluntly, which tends to make the solutions rigid.

As a fantastic example of what I mean by this, here's a small bit of the code from the "Monster Book" script:

for i in 0...$game_system.bestiary_defeated.size comp += 1 if $game_system.bestiary_defeated != nilendThis is wildly inefficient and shows a lack of knowledge about one of the most basic features of Ruby: iterators. Basically, for loops are iterators on training wheels (and with different lexical scoping, but that's not usually relevant in most cases). In this particular example, it's causing far more array indexes than are actually necessary to perform the operation needed.

Code:
$game_system.bestiary_defeated.each { |enemy| comp += 1 unless enemy.nil? }
I'd also be remiss if I didn't point out that the code is around 600 lines and could easily be half of that, and even then could be made far more modifiable and extensible. Personally, I'd redesign almost every single element of it.
I don't know, I could think of loads of things to test writing good clean code.  Implementing some solid data structures, anything with random numbers where you can force an even spread (the rand the computer gives you isn't evenly distributed by a long shot). An efficient path-finding algorithm. Good AI (even not-stupid AI).
None of those suggestions make use of everything I mentioned -- in fact, most of them completely work around RGSS3 entirely (except the path-finding algorithm). Those seem more like general programming exercises than ones with RPG Maker scripting in mind.

I honestly think that the bestiary is the best possible script given the options that have been given in terms of being the most pertinent all-around while making use of multiple areas of RGSS3, and I think that's a good starting point for something "challenging."

Whose going to judge the 'clean code' part? Open to everybody? That's a crap shoot if ever there was one.
I'm opinionated enough to do that entirely on my own, thank you very much.
 
Last edited by a moderator:

Galenmereth

I thought what I'd do was
Veteran
Joined
May 15, 2013
Messages
2,207
Reaction score
1,936
First Language
English
Primarily Uses
RMMV
Hmm, this looks interesting. I might be a challenger :3
 

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,339
Reaction score
2,502
First Language
Binary
Primarily Uses
RMMV
Ah yes, a little average of the scores would be nice.

Is this a one time thing? Or will it continue over a period of time?

I think this is a fantastic idea, and think that it shouldn't just be limited to them facing you rather than everyone in certain rounds or something to get everyone involved.
Thanks for your thoughts ^_^

Judging by how popular this idea seems to be - it will most likely be a regular event. Also, from the amount of interest shown. It seems as though its going to be more 'face the community' than 'face Dekita'.

If you can write code and want to get better at that, then I would encourage you to enter. Chances are that every one of the script entered will be written completely differently. Then you can see how others approach the same issue.

At least some of the above could be used in some of the options given (I should've jumped in this thread sooner to suggest some. There's always next month ;) ).

Whose going to judge the 'clean code' part? Open to everybody? That's a crap shoot if ever there was one.
Yea, if you have any suggestions for scripts that could be written for this kind of event, feel free to share them. I am sure that there will be at least be another couple of this type of thing over the next few months as I really do want to challenge myself and this seems like it could be the way to do so.

Yea, I agree that if everyone can judge the code then, most likely, the majority of marks in that category will have been given by people with inadequate knowledge. :/

Ideally, we would want a panel of script writers to judge the code and a panel of non scripters to judge the scripts 'ease of use' with both panels getting to score on the scripts features. At least I think that would be best.

Until an ideal panel has been established, this kind of thing will have to do ^_^

...

As a fantastic example of what I mean by this, here's a small bit of the code from the "Monster Book" script:

for i in 0...$game_system.bestiary_defeated.size comp += 1 if $game_system.bestiary_defeated != nilendThis is wildly inefficient and shows a lack of knowledge about one of the most basic features of Ruby: iterators. Basically, for loops are iterators on training wheels (and with different lexical scoping, but that's not usually relevant in most cases). In this particular example, it's causing far more array indexes than are actually necessary to perform the operation needed.
Code:
$game_system.bestiary_defeated.each { |enemy| comp += 1 unless enemy.nil? }

Would this be more / less / the same in terms of efficiency ?

comp = $game_system.bestiary_defeated.compact.inject(0) { |r, e| r += 1 if e }I think more, but I could easily be wrong ^_^

Hmm, this looks interesting. I might be a challenger :3
Feel free to join in - the more people who partake, the more code each of us will be able to compare against :)
 

Solistra

Veteran
Veteran
Joined
Aug 15, 2012
Messages
593
Reaction score
244
Primarily Uses
Would this be more / less / the same in terms of efficiency ?

comp = $game_system.bestiary_defeated.compact.inject(0) { |r, e| r += 1 if e }I think more, but I could easily be wrong ^_^
It's about the same. The best is what I intentionally didn't mention, which is this:

comp = $game_system.bestiary_defeated.compact.size...which you should have seen considering your approach just then. ;) Edit: The reason I didn't mention it, by the way, is mostly due to the point I was making about iterators; that still stands for a very substantial part of the code I looked at in Moghunter's demo, along with a number of other coding practices that are less than ideal in Ruby.
 
Last edited by a moderator:
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Profile Posts

The most rewarding part of making custom body character parts is absolutely not making the masks work. Somebody please put me out of my misery.
Any commercial devs here ever mess with Gamejolt? Been contemplating making my games available there but don't know if it's worth the effort or not.
Social distancing taught me of how much of not a loner I am. Dammit, I miss seeing my friends...
Happy 4th of July all. Anybody have plans? Mine here is staying home away from the virus. Still a nice 3 day weekend.
The project I am working on is going great at the moment. I'm hoping everyone is having as successful a time as I am. :)

Forum statistics

Threads
99,257
Messages
963,543
Members
130,845
Latest member
its-a-sheep234
Top