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 »

I gotta go. I'll respond later in the week. I do think there are very simple work arounds to everything you suggest but I don't have time to go 10 round right now ;)

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

BTW, please don't think I'm getting annoyed or anything. The more EM is scrutinized the better it will be and it will become more widely accepted ;) So comments are always welcome. I just have limited time :(

-Nutttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
netclectic
Registered User
Posts: 17
Joined: Wed Mar 13, 2002 3:08 pm
Location: Glasgow
Contact:

Re: 04: FINDing your Way Around

Post by netclectic »

I think i would have to agree with Ptirhiik on the point of FIND starting from the beginning of the line. It should not require whole lines, but it should require to be from the start of the line. I believe that is the way that most mod authors would use it in their mod scripts and also that is the way most mod installers (manual installers of the human variety) would understand it to work.

I really don't see the need to do a FIND on a small snippet from the middle of a line, that's what IN-LINE FIND is for after all.
User avatar
A_Jelly_Doughnut
Registered User
Posts: 1780
Joined: Wed Jun 04, 2003 4:23 pm

Re: 04: FINDing your Way Around

Post by A_Jelly_Doughnut »

I agree with Netclectic and Phitiirk.

Basically what Nuttzy has been preaching is "find the minimum for uniquity". A MOD I just finished a MOD where this would have been unique:

Code: Select all

;

	$passwd_sql = '';
would work, but it is not user friendly.

Code: Select all

include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);

	$passwd_sql = '';
would have been much better (but I didn't use either one of these examples)
A_Jelly_Doughnut
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

And what if the beginning of the line has changed? What if the SQL statement has changed near the beginning? What if a MOD changed rowspan value at the beginning of the line? What if someone rejiggled an IF statement? Then you are doomed to fail if you are forcing EM to include these non-unique items for no reason. We need minimum uniqueness and forcing the inclusion of the front of the line all the way until you reach the unique fragment is a recipe for disaster.

On the other hand, if you are concerned about people doing manual installations (a practice who's days are numbered anyway) then they can easily read the notes you put in your MOD script for that command.

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

I really want to put an end to this thinking right now. Time to let the code do the talking. This is a VERY POPULAR line from viewtopic.php

Code: Select all

//
// Go ahead and pull all data for this topic
//
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*,  pt.post_text, pt.post_subject, pt.bbcode_uid
	FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt
	WHERE p.topic_id = $topic_id
		$limit_posts_time
		AND pt.post_id = p.post_id
		AND u.user_id = p.poster_id
	ORDER BY p.post_time $post_time_order
	LIMIT $start, ".$board_config['posts_per_page'];
...if anything gets put in front of u.username, then you fail. If another table is added in front of POSTS_TABLE then you fail. If the WHERE line is modified then you fail. If the ORDER BY is rejiggled theb you fail. If the LIMIT is modified then you fail.

MINIUM UNIQUENESS, PEOPLE!!!!!! If the crap doesn't need to be searched for then don't search for it!

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
netclectic
Registered User
Posts: 17
Joined: Wed Mar 13, 2002 3:08 pm
Location: Glasgow
Contact:

Re: 04: FINDing your Way Around

Post by netclectic »

I can see a Mexican stand off coming ;)

I see what you're saying, i think regardless of how it's done it's never going to be 100%, you can't please all the people all the time (as they say).

Certainly the path of least resistance is going to be 'minimum uniqueness', less prone to failure in the ever expanding world of the mod crazy EM enthusiasts :P
Ptirhiik
Registered User
Posts: 144
Joined: Sun Apr 06, 2003 12:29 pm

Re: 04: FINDing your Way Around

Post by Ptirhiik »

So you suggest to write the FIND like this one ? :

Code: Select all

,  .*
. U
.
This is perfectly unique.

And don't consider those kind of blind modification is a good way to proceed : it will just drives you to un-understandable mods, and won't let any chance to fix a functional comflict.

You have also to consider that some mods have to fail, and are writing in this way in order to avoid functional comflict with other particular mods.

At this time, I can't agree with the definition you give to the FIND statement : at this point at see no use for it, IN-LINE is just the same.
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

I'm not forcing people to exclude the front of the line. It's the Author's call. If the Author thinks it will work fine without chopping up the line, then there is nothing here preventing him from doing that. Maybe once the MOD Team has validated a few hundred MODs to be EMC then some logical refinements may come about and more people will see what I am saying.

So I was not telling people they "can't" do anything but people were indicating that EM should be forced to accept the start of the line. You are saying to sacrifice installablity over readablity and I'm telling you that is cooky talk! If you want to quote the entire lines do so in the comment! What is the problem?

Stop calling it "IN-LINE FIND". IN-LINE FIND is for a single line and FIND is for locating a block of lines based on unique elements of the lines.

Lastly, my priority is to design an installer with the maximum effectiveness at installing MODs while still perserving the ability of users to install manually. Anything that impairs the ability of EM installing MODs is not negotiable unless there is a darn good reason (cause everything is negotiable with me ;)). Case is closed unless you have a reason that destroys manual installs or creates a serious automation conflict.

-Nuttzy :cool:
SpellingCow.com - Free spell check service for your forums or any web form!
My Other Site
Nuttzy99
Registered User
Posts: 927
Joined: Fri Aug 03, 2001 7:09 am
Contact:

Re: 04: FINDing your Way Around

Post by Nuttzy99 »

BTW, you should probably delete that ridiculous example you are quoting. Never did I make such a suggestion and you are being completely uncompromising and unfair with that type of rhetoric.

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