Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: Recommend It Mod, will it work with Links SQL ?

Quote Reply
Re: Recommend It Mod, will it work with Links SQL ? In reply to
If nothing else, if you follow the comments, and the logic (if you call it that) it will illustrate a whole bunch of links and perl ideas from passing hashes/references to anonymous hashes and subroutines. All sorts of perl "tricks" done in a STRAIGHT FORWARD way.

A really good programmer could take the tricks and do other stuff with them, but I go by the maxim that a "Shortcut is something that saves your time, and wastes everyone elses."

One thing I _do_ know needs done, is the call to &main is a real kludge. It should be broken up into a call to &main then a call to one or 2 other processes, since too much is being done in the "main" that really should only be a create the cgi-object, get the ID record, and then branch by "if posted" or "if not posted" Any one who wants to clean that up, it's sort of obvious.

If you are overly concerned about performance, you need to use optimization tags (to strip the comments and slower code out) or parallel development.

The reason is that when "speed" is a selling feature, you want to design for it, but you need to have code that can be maintained. Often the "tricks" are so obscure they are missed, or may not work in the next release of the compiler. At the very least they slow down the interpretation of the code by those who follow.

I just don't think this script is one where speed counts first of all -- it's by nature a pig of a script. The sendmail or smpt interface is probably the slowest part of this whole thing (maybe the template processing) and any code bloat should be trivial -- or less than trivial -- in comparason.

I'm open to any comments on this, and when people see the code, the terms of the license are to SHARE ANY MODS OR CHANGES or you are in violation of it (sort of a very short GPL license <G> ).

This code is _much_ better than the version I made during the first month, but it's a learning/example code and is definitely NOT pretty. But, there should only be one or two edits in the code file that are needed, and everything else should be done in the templates, which is a good thing --- right? <G> (I might even be able to get that reduced to nothing by the time I release it, since I think the only variables that need to be set are available in Links.pm.) That would make this really plug-n-play and you'd only have to fiddle with your templates.

Oh -- and the one change to count referrals if you want it. There's no way to make that plug-n-play since it needs a database field to be created.








[This message has been edited by pugdog (edited April 12, 2000).]
Subject Author Views Date
Thread Recommend It Mod, will it work with Links SQL ? Laith 8260 Sep 3, 1999, 3:33 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8082 Sep 3, 1999, 4:56 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
Alex 8065 Sep 6, 1999, 9:14 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8110 Sep 7, 1999, 11:06 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8075 Sep 8, 1999, 10:33 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8095 Mar 13, 2000, 8:35 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
phoule 8112 Mar 13, 2000, 8:47 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8100 Apr 1, 2000, 4:00 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8072 Apr 1, 2000, 5:22 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
Clint 8082 Apr 2, 2000, 9:36 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8107 Apr 2, 2000, 1:41 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8092 Apr 2, 2000, 5:28 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8087 Apr 2, 2000, 7:01 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8079 Apr 2, 2000, 10:34 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8116 Apr 3, 2000, 11:41 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8091 Apr 4, 2000, 3:25 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8108 Apr 5, 2000, 8:26 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8182 Apr 9, 2000, 11:03 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8078 Apr 11, 2000, 9:13 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8131 Apr 12, 2000, 2:06 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
Dan Kaplan 8068 Apr 12, 2000, 3:33 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8087 Apr 12, 2000, 10:05 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8087 Apr 12, 2000, 1:34 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 8096 Apr 12, 2000, 10:10 PM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 8073 Apr 13, 2000, 6:12 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
charhua 1553 Apr 13, 2000, 9:53 AM
Post Re: Recommend It Mod, will it work with Links SQL ?
pugdog 1575 Apr 13, 2000, 10:52 AM