Deprecated: Function create_function() is deprecated in /home/customer/www/neverforum.com/public_html/fmpbo/include/parser.php on line 811

1 (edited by Elviz 2007-05-11 21:39:39)

Topic: Getting rid of the *_0 naming for contest replays

Currently, when an existing contest replay in the Nevertable (say, cE01xyz) is replaced with a better replay by the same player, the new replay will get a name such as cE01xyz_0. For example, at the time of writing, 13 of my 40 contest records have names ending with _0 or _1.

Since Neverball 1.4 does not like replay file names that are longer than eight characters, such replays would have to be manually renamed before they can be watched. Users who don't know about this limitation might wonder why the Replay screen looks screwed up. (It happened to me a couple of months ago...) Moreover, nice replays smile should not have ugly file names yikes .

While there may be several freestyle records (and several old records), there is at most one current best time/most coins record per player and level. This means that getting rid of the *_0 naming for those records should be possible. What do you think?

2 (edited by parasti 2007-01-19 23:22:19)

Re: Getting rid of the *_0 naming for contest replays

Well, I've been under the impression that it's a necessary evil, mostly because it hasn't been fixed yet.  But if all that is needed to get someone fix it is to say that it's broken, that's what I say.  smile

By the way, the code is available publicly, so if you're familiar with that sort of thing you might as well send in a patch.

3

Re: Getting rid of the *_0 naming for contest replays

parasti wrote:

By the way, the code is available publicly, so if you're familiar with that sort of thing you might as well send in a patch.

I believe Elviz is talking about when we upload records, the "Nevertable system" appends a "_x" to the filename we submitted. I don't think the code for that is publicly available, though, so it's gotta be shino or mym that does something to change it.

4 (edited by parasti 2007-01-20 00:59:24)

Re: Getting rid of the *_0 naming for contest replays

Dave wrote:
parasti wrote:

By the way, the code is available publicly, so if you're familiar with that sort of thing you might as well send in a patch.

I believe Elviz is talking about when we upload records, the "Nevertable system" appends a "_x" to the filename we submitted. I don't think the code for that is publicly available, though, so it's gotta be shino or mym that does something to change it.

Then again...  I'm afraid I don't know of alternative topics I could've confused this one with to respond in such a seemingly informed manner.  smile


Warning: count(): Parameter must be an array or an object that implements Countable in /home/customer/www/neverforum.com/public_html/fmpbo/include/parser.php on line 814

5

Re: Getting rid of the *_0 naming for contest replays

parasti wrote:

But if all that is needed to get someone fix it is to say that it's broken, that's what I say.  smile

I think Elviz was trying to see if this had already been addressed and/or was something that other people thought was a problem.

For those that aren't familiar enough with the technologies involved, identifying bugs and helping gauge community demand for getting them fixed are valuable ways of supporting/contributing to a project.

Cheese
==========
cheesetalks.net

Deprecated: Function create_function() is deprecated in /home/customer/www/neverforum.com/public_html/fmpbo/include/parser.php on line 756

6 (edited by Elviz 2008-11-13 16:28:55)

Re: Getting rid of the *_0 naming for contest replays

In the absence of a change to the Nevertable code, an administrator (mym perhaps? wink ) could let the administration tool do what it does and then step in afterwards and manually remove the _0 thing. Would that be possible? I know it's a bit of extra work.
kao128

parasti wrote:

By the way, the code is available publicly, so if you're familiar with that sort of thing you might as well send in a patch.

Then again...  I'm afraid I don't know of alternative topics I could've confused this one with to respond in such a seemingly informed manner.  smile

Thanks for the link, parasti. I wasn't aware that the Nevertable code was open source, too. In order for me to write and test patches, I'd probably need a Subversion plug-in for Eclipse and a local Nevertable installation first, though.

7

Re: Getting rid of the *_0 naming for contest replays

A fellow Eclipse user
smile

I've not used Eclipse for PHP (from what I can tell, the Nevertable's entirely PHP) before.
Are you using PHPeclipse?

Cheese
==========
cheesetalks.net

8 (edited by Dave 2007-01-21 01:58:17)

Re: Getting rid of the *_0 naming for contest replays

Elviz wrote:

I wasn't aware that the Nevertable code was open source, too.

I wasn't either, obviously.

I guess it is appropriate to quote one of my favorite threads titles ever : "parasti is aware"

9

Re: Getting rid of the *_0 naming for contest replays

I've never had a moment of doubt in that I'm special somehow.  tongue

Seriously though, I recall seeing an announcement by shino here at the forum.  I think it was recent.  Can't seem to find it now, though.

10

Re: Getting rid of the *_0 naming for contest replays

I agree with you Elviz, and better automatic rename system could be done.
Doing it by hand may be be too much work for me smile
Shino is the one who can do something for that.

11

Re: Getting rid of the *_0 naming for contest replays

Cheeseness wrote:

A fellow Eclipse user
smile

I've not used Eclipse for PHP (from what I can tell, the Nevertable's entirely PHP) before.
Are you using PHPeclipse?

I tried it a year or so ago but didn't keep it. Right now when I have to edit a file containing PHP code I just use the plain text editor.

mym wrote:

I agree with you Elviz, and better automatic rename system could be done.
Doing it by hand may be be too much work for me smile

Here's another idea: how about moving the old record from the contest folder to the oldones folder before the new record is moved from incoming to contest? This way there would be no name collision and hence no need to rename the new record.

12

Re: Getting rid of the *_0 naming for contest replays

yes Elviz, you're right? This naming convention was useful before I change the way replay files are organized in diffferent folders. I've written a small lib lib.filemanager.php which handles renaming when a file already exists. By moving the odone file first it would be ok I think.  But not in all cases: see http://www.nevercorner.net/table/index. … ;level_f=2 for example. Freestyle replay are kept in the same folder "contest" as other records, so Dave is able to have two records with the same name, in the folder "contest"... You'll say I can keep freestyle replay in another folder, but that breaks other things. I'll see what I can do to fix that.

And in "oldones" fodler, it's not possible because we keep several records from the same member / same level /same type ...

13

Re: Getting rid of the *_0 naming for contest replays

shino wrote:

But not in all cases: see http://www.nevercorner.net/table/index. … ;level_f=2 for example. Freestyle replay are kept in the same folder "contest" as other records, so Dave is able to have two records with the same name, in the folder "contest"... You'll say I can keep freestyle replay in another folder, but that breaks other things.

Shino, I think that your directory system makes perfect sense, and I agree that there still needs to be some kind of file name disambiguation for freestyle records and old replays, as there can be several of both. Moreover, in some cases there can be multiple replays for the same player/level/record type combination in the 'incoming' folder. I could have sworn parasti mentioned this, too. So my request of losing the _x naming really only applies to current best time and most coins records.

One more suggestion would be to omit the underscore in those cases where a unique file name is needed. Under the current naming conventions, a replay name usually has six or seven characters, for example, fM02dav. In the latter case, adding "_0" would push the file name beyond the eight character limit while appending just "0" or "1" wouldn't. Granted, the underscore does make the separation between the player name and the number a bit clearer, but is it worth it? Then again, perhaps the 1.5 release will make the whole discussion obsolete...

14

Re: Getting rid of the *_0 naming for contest replays

Yeah, so if I just take care of removing a replay file in oldones before copying the new replay file in incoming; it should fix the problem. I'll need to fix current files with _0 by hand, but that's not so big and admin panel allow to do that.

I hope 1.5 will make this discussion obsolete wink

15

Re: Getting rid of the *_0 naming for contest replays

Elviz wrote:

I could have sworn parasti mentioned this, too.

Crap, I thought nobody saw that comment!  smile  Just after posting it I realized that it lacked a point, as I was essentially just saying "yeah, there's indeed a problem", so I deleted it.

16

Re: Getting rid of the *_0 naming for contest replays

Elviz wrote:

I tried it a year or so ago but didn't keep it. Right now when I have to edit a file containing PHP code I just use the plain text editor.

Fair enough. There are other lighter weight svn clients than Subclipse if you're only planing to use Eclipse for svn management.

Cheese
==========
cheesetalks.net

17

Re: Getting rid of the *_0 naming for contest replays

Elviz wrote:
Cheeseness wrote:

A fellow Eclipse user
smile

I've not used Eclipse for PHP (from what I can tell, the Nevertable's entirely PHP) before.
Are you using PHPeclipse?

I tried it a year or so ago but didn't keep it. Right now when I have to edit a file containing PHP code I just use the plain text editor.

(To make this a bit clearer, I tried out the PHPeclipse plug-in but went back to editing PHP files with Eclipse's built-in plain text editor.)

Cheeseness wrote:

Fair enough. There are other lighter weight svn clients than Subclipse if you're only planing to use Eclipse for svn management.

Given that I use Eclipse for various stuff from Java programming to website management, plug-ins such as Subclipse or Subversive would seem like a natural choice when it comes to SVN access.

18

Re: Getting rid of the *_0 naming for contest replays

Elviz wrote:

(To make this a bit clearer, I tried out the PHPeclipse plug-in but went back to editing PHP files with Eclipse's built-in plain text editor.)

Given that I use Eclipse for various stuff from Java programming to website management, plug-ins such as Subclipse or Subversive would seem like a natural choice when it comes to SVN access.

Yeah, in that case it makes sense to use Eclipse.
wink
(At first I was thinking you were looking at using Eclipse just for checking out stuff from SVN repositories. I'm an Eclipse nut and will promote its virtues at every opportunity, but that seemed a bit excessive)

Cheese
==========
cheesetalks.net