04: FINDing your Way Around

This is a temporary forum setup for the purpose of discussing the EMC standards
Locked
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

Ptirhiik wrote:> Nuttzy : really, I can only requote what I wrote
I do appreciate your writing it again and explaining the background more in detail. The previous posts contained other issues so it is much easier to now address just this one issue. I have quickly read your post and have some answers. But I want to take the time to read your reply more carefully and take the time to make sure my reply is as well written as you deserve. I really do appreciate it. But I will reply now to one thing...
And at the end, you guys are explaining me I can't set the comments I want to appear in the scripts (whatever they are), and that of course can't be accepted from my programmer's point of view. Comments through a developpement is the first indicator of the quality of this developpement : I won't trust a script without any comments, and my first move is to add the missing comments in order to find the logical bugs that are everytime presents in those kind of scripts, and believe me, I have always found some in those cases, even on my own scripts.
I 100% agree with the importance of documenting code. I'm sure you've looked through the EM code and seen that it is heavily commented (probably 15% of all lines!). This is why EM has no problems with comments and will always accept comments in their native form as the author writes them. I am talking about the kind of comments that document what the code is doing. No special adjustments need to be made.

I'm sure you understand this, but it seems like you keep bending this point so it is not accurate. The fact of the matter is that EM only has trouble with comments when good size chunks of code are reinserted back into the source. I think we can agree on this and I ask you to restrict your arguements to this fact.

I will respond to the is_auth example hopefully tonight.

Thanks again,
-Nuttzy :cool:

Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 04: FINDing your Way Around

Post by Ptirhiik »

> GP : on the three points you are wrong :
- here you are telling me I can't set the comments I want, whatever it is.
- for commented codes, I have already experienced it with categories hierarchy, and it's migration from v1 to v2, probably the one which moves the more code.
- for going back to a previous state, just refer to the discussion @ phpBB.com, I won't redo it there till a specific topic (or forum) won't be opened there : what you are suggesting is simply impossible in a reliable way :).


> ET : you forget a mod has to be fully installable at hand : nobody has to be tied with a tool, whatever it is. The tool hasn't to interfer with the way the code is written : if the code is A and has to go to B, the tool has only to be able to get from A to B, not to interfer on what B has to be, nor A has to be. There you are only discussing on what A and B should be, where we are talking on the receipe to go from A to B. Keep this in mind ;).

Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

Oh, one other quick note, I never once said EM needs to "manage" the comments containing code. It only needs to know they exist. I've suggested several times now a compromise of inserting just a couple characters to let EM know. I don't recall ever getting a reply to this compromise.

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site

Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 04: FINDing your Way Around

Post by Ptirhiik »

Why adding extra code (that are not yet present in the board parc), as you have already // as code to identify them ? That's the response I gave you (although it wasn't explicitely linked to the ask ;)).

[edit] I think the solution that fit the best all the needs is :
a find shouldn't achieve on an explicit commented line, as long as the find statement itself doesn't include the comment tag ( // ). You will be so able to handle quite all states of code.

User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: 04: FINDing your Way Around

Post by -=ET=- »

Ptirhiik wrote:> ET you forget a mod has to be fully installable at hand nobody has to be tied with a tool, whatever it is. The tool hasn't to interfer with the way the code is written if the code is A and has to go to B, the tool has only to be able to get from A to B, not to interfer on what B has to be, nor A has to be. There you are only discussing on what A and B should be, where we are talking on the receipe to go from A to B. Keep this in mind ;).
I don't forget anything, I simply take care not to ask to create a B that will loose EM in the next MOD installation, that's all and that's important.
Nuttzy99 wrote:It only needs to know they exist. I've suggested several times now a compromise of inserting just a couple characters to let EM know.
Sure it may works but as it "seems" that EM will need to duplicate code lines for unstallation for each MOD (I don't know, I didn't work on it, it's just what I remember of your discution on phpBB.com on this subject), you will have in each files the code lines duplicated by the MOD author + the code lines duplicated by EM + the modified code lines! 8O

I can't imagine the phpBB files after such an installation for Categories hierarchy with all it's current REPLACE WITH :(
Eternal newbie

Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 04: FINDing your Way Around

Post by Ptirhiik »

> ET : before willing to emit any judgement of value on the resulted code, I think you will have to take a look at it : there you are starting to be insultive :evil:

User avatar
-=ET=-
Registered User
Posts: 214
Joined: Mon May 26, 2003 1:35 pm
Location: France

Re: 04: FINDing your Way Around

Post by -=ET=- »

I have, and really don't see where I could be "insultive" as you said :(

I've just said that this will create twice code lines in comments, where is the insult? 8O
Eternal newbie

LLKwerv
Registered User
Posts: 81
Joined: Mon May 26, 2003 5:27 pm
Location: Wherever I am.
Contact:

Re: 04: FINDing your Way Around

Post by LLKwerv »

Um, just a thought, but during EM installation, why can't it simply remove the one line?
hello

User avatar
GPHemsley
Registered User
Posts: 1617
Joined: Fri Apr 18, 2003 4:01 am
Location: Long Beach, NY
Contact:

Re: 04: FINDing your Way Around

Post by GPHemsley »

[quote=\"LLKwerv\"]Um, just a thought, but during EM installation, why can't it simply remove the one line?[/quote]
Obviously, you have completely missed the point of this discussion. :roll:

LifeIsPain
Registered User
Posts: 5
Joined: Wed Jun 18, 2003 3:47 pm

Re: 04: FINDing your Way Around

Post by LifeIsPain »

Please note, I started writing the following 8 hours ago, but my net connection died, so it just stayed here. As such, some has been discussed, but there are some important points
______________________________
IMO

Code: Select all

#---[ FIND ]----
// $is_auth =
is unique, and

Code: Select all

#---[ FIND ]-----
$is_auth =
is also unique, and doesn't adress the same line at all.

....

And at the end, you guys are explaining me I can't set the comments I want to appear in the scripts (whatever they are), and that of course can't be accepted from my programmer's point of view. Comments through a developpement is the first indicator of the quality of this developpement I won't trust a script without any comments, and my first move is to add the missing comments in order to find the logical bugs that are everytime presents in those kind of scripts, and believe me, I have always found some in those cases, even on my own scripts.
Those lines are not unique, and Nuttzy has really addressed this. I cannot for the life of me understand why you are so incistant on this (not telling you to stop, but your arguments don't stand up IMO). You may make any comment you want, as long as it isn't a comment duplicating the code from all I can tell. If you want to make the comment

Code: Select all

// LifeIsPain needs a life
That won't stop the MOD from being EMC, I would still validate it, and the world would be happy (but you may see your name in some code of mine if you were to say that...). Comments on the functionality of code are very much so needed. Commenting out old code is not something that shows the code is good. There are many cases where this just is not practicle. IN-LINE actions don't need to have the full line pasted as a comment in the MOD file. If EM does this, that is another story, but it isn't something a MOD author will need to do. Let me give you some code from my Set Poster MOD (that the person who wanted me to make the code never paid me like he said he would, but that is beside the point)

Code: Select all

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
{postrow.IP_IMG}

#
#-----[ IN-LINE FIND ]------------------------------------------
#
{postrow.IP_IMG}

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 {postrow.SETPOSTER_IMG}
This is, IMO, a good example of the need for not searching for the begining. The full line is (in subSilver)

Code: Select all

<td valign=\\\\"top\\\\" nowrap=\\\\"nowrap\\\\">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
Now with the exception of a template that would use {postrow.IP} instead, this works just great, is unique, and allows for the template designer to do whatever they want.

Now onto the idea of comments. What would be the purpose of commenting out vanilla code as part of the MOD, and then adding changes after this? This causes redundancy and more of a headache. I understand using comments to remove a feature, allowing some other MOD to go through and modify this feature (but not have it take effect) but we still have issues. It is better, IMO, just to remove the code at let EM handle it. Consider the following case

Code: Select all

$bobman .= $retort . ' j00 R d4 sUkc';
Now ignore the usage of language in the code, that is beside the point. Consider someone wants to remove this from happening, and so changes the above to the following

Code: Select all

//$bobman .= $retort . ' j00 R d4 sUkc';
Now some other MOD wants to go through and add a slam to the above right after the $retor. So they do the following

Code: Select all

#-----[ FIND ]-----
$bobman .= $retort

#-----[ IN-LINE FIND ]-----
$retort

#-----[ IN-LINE AFTER, ADD ]-----
 . $slam
This will fail using your methods, as the line would start as //$bobman instead of simply $bobman.

As such, lines must not be dependant on if there is a // in front or not.

Locked