Philosophy of programming... or why'd they do that?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Philosophy of programming... or why'd they do that?

Marc Pinnell-3
Hey all,

Working on moving a client to a new server. Part of the move involves several older lasso sites that predate my involvement with this client. One piece involves a directory full of files that get executed by Scheduled Lasso Events. In looking at the files I am find this type of structure (with proper coding of course, just a quick shorthand):

head
/head

body
        create tag
                do some database updates (including having login/password hard coded)
                do some file manipulations/movement
        /tag
        execute tag
/body

So, my question is why would you do it that way? Is there something about doing it this way that is more secure (can't imagine that) or faster? Why not just do a normal page with the lasso code. Why the extra overhead of the tag. There is nothing else on these pages except the tag build and call.

Marc


Marc Pinnell
1027 Design
PO Box 990872
Redding, CA 96099-0872
530.941.4706
fax: 866.232.5300
www.1027Design.com


#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Philosophy of programming... or why'd they do that?

stevepiercy
If the files are run by a scheduled event, there's no reason for
HTML around it.  Who's going to see it?

As far as the Lasso code, does the function have the same name
and purpose for each file?  If so, then the function could be
pulled into a separate file and loaded in Lasso startup or library.

In general, when I have something that I can define as a type or
method, I put it in Lasso startup or library.  It keeps me from
repeating myself, gives me something for which I can write
tests, and yields a performance boost over spaghetti code.

--steve


On 8/6/14 at 11:00 AM, [hidden email] (Marc
Pinnell) pronounced:

>Hey all,
>
>Working on moving a client to a new server. Part of the move
>involves several older lasso sites that predate my involvement
>with this client. One piece involves a directory full of files
>that get executed by Scheduled Lasso Events. In looking at the
>files I am find this type of structure (with proper coding of
>course, just a quick shorthand):
>
>head
>/head
>
>body
>create tag
>do some database updates (including having login/password hard coded)
>do some file manipulations/movement
>/tag
>execute tag
>/body
>
>So, my question is why would you do it that way? Is there
>something about doing it this way that is more secure (can't
>imagine that) or faster? Why not just do a normal page with the
>lasso code. Why the extra overhead of the tag. There is nothing
>else on these pages except the tag build and call.
>
>Marc
>
>
>Marc Pinnell
>1027 Design
>PO Box 990872
>Redding, CA 96099-0872
>530.941.4706
>fax: 866.232.5300
>www.1027Design.com
>
>
>#############################################################
>Attend the Lasso Developer Conference 2014!
>October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
>http://www.lassosoft.com/LDC-newmarket-2014
>
>#############################################################
>
>This message is sent to you because you are subscribed to
>the mailing list Lasso [hidden email]
>Official list archives available at http://www.lassotalk.com
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy              Website Builder              Soquel, CA
<[hidden email]>               <http://www.StevePiercy.com/>

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Philosophy of programming... or why'd they do that?

Tim Taplin
In reply to this post by Marc Pinnell-3
I've seen similar coding many times. And it usually means that someone heard that they should put their code into tags, but didnt quite comprehend the whole custom tag or type concept and left them being redefined on every page load.

Sometimes, it was intended to be an incremental development step before putting the definitions into library files for startup, but never got completed.

If you start cleaning any of the code up, keep an eye out for "tags" which reference variables from within the page scope which are not explicitly passed into the tag or type.


Tim Taplin
On Aug 6, 2014, at 12:00 PM, Marc Pinnell <[hidden email]> wrote:

> Hey all,
>
> Working on moving a client to a new server. Part of the move involves several older lasso sites that predate my involvement with this client. One piece involves a directory full of files that get executed by Scheduled Lasso Events. In looking at the files I am find this type of structure (with proper coding of course, just a quick shorthand):
>
> head
> /head
>
> body
> create tag
> do some database updates (including having login/password hard coded)
> do some file manipulations/movement
> /tag
> execute tag
> /body
>
> So, my question is why would you do it that way? Is there something about doing it this way that is more secure (can't imagine that) or faster? Why not just do a normal page with the lasso code. Why the extra overhead of the tag. There is nothing else on these pages except the tag build and call.
>
> Marc
>
>
> Marc Pinnell
> 1027 Design
> PO Box 990872
> Redding, CA 96099-0872
> 530.941.4706
> fax: 866.232.5300
> www.1027Design.com
>
>
> #############################################################
> Attend the Lasso Developer Conference 2014!
> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
> http://www.lassosoft.com/LDC-newmarket-2014
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Philosophy of programming... or why'd they do that?

Marc Pinnell-3
In reply to this post by stevepiercy
No the functions are all unique. That's what I found so weird about it.

Marc


On Aug 6, 2014, at 12:28 PM, Steve Piercy - Website Builder <[hidden email]> wrote:

> If the files are run by a scheduled event, there's no reason for HTML around it.  Who's going to see it?
>
> As far as the Lasso code, does the function have the same name and purpose for each file?  If so, then the function could be pulled into a separate file and loaded in Lasso startup or library.
>
> In general, when I have something that I can define as a type or method, I put it in Lasso startup or library.  It keeps me from repeating myself, gives me something for which I can write tests, and yields a performance boost over spaghetti code.
>
> --steve
>
>
> On 8/6/14 at 11:00 AM, [hidden email] (Marc Pinnell) pronounced:
>
>> Hey all,
>>
>> Working on moving a client to a new server. Part of the move involves several older lasso sites that predate my involvement with this client. One piece involves a directory full of files that get executed by Scheduled Lasso Events. In looking at the files I am find this type of structure (with proper coding of course, just a quick shorthand):
>>
>> head
>> /head
>>
>> body
>> create tag
>> do some database updates (including having login/password hard coded)
>> do some file manipulations/movement
>> /tag
>> execute tag
>> /body
>>
>> So, my question is why would you do it that way? Is there something about doing it this way that is more secure (can't imagine that) or faster? Why not just do a normal page with the lasso code. Why the extra overhead of the tag. There is nothing else on these pages except the tag build and call.
>>
>> Marc
>>
>>
>> Marc Pinnell
>> 1027 Design
>> PO Box 990872
>> Redding, CA 96099-0872
>> 530.941.4706
>> fax: 866.232.5300
>> www.1027Design.com
>>
>>
>> #############################################################
>> Attend the Lasso Developer Conference 2014!
>> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
>> http://www.lassosoft.com/LDC-newmarket-2014
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy              Website Builder              Soquel, CA
> <[hidden email]>               <http://www.StevePiercy.com/>
>
> #############################################################
> Attend the Lasso Developer Conference 2014!
> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
> http://www.lassosoft.com/LDC-newmarket-2014
>
> #############################################################
>
> This message is sent to you because you are subscribed to
> the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

Marc Pinnell
1027 Design
PO Box 990872
Redding, CA 96099-0872
530.941.4706
fax: 866.232.5300
www.1027Design.com


#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Philosophy of programming... or why'd they do that?

Marc Pinnell-3
In reply to this post by Tim Taplin
That makes sense. Incidentally, nothing is passed to the tag. It is simply called with no input. Everything is hard coded inside.

marc


On Aug 6, 2014, at 12:45 PM, Tim Taplin <[hidden email]> wrote:

> I've seen similar coding many times. And it usually means that someone heard that they should put their code into tags, but didnt quite comprehend the whole custom tag or type concept and left them being redefined on every page load.
>
> Sometimes, it was intended to be an incremental development step before putting the definitions into library files for startup, but never got completed.
>
> If you start cleaning any of the code up, keep an eye out for "tags" which reference variables from within the page scope which are not explicitly passed into the tag or type.
>
>
> Tim Taplin
> On Aug 6, 2014, at 12:00 PM, Marc Pinnell <[hidden email]> wrote:
>
>> Hey all,
>>
>> Working on moving a client to a new server. Part of the move involves several older lasso sites that predate my involvement with this client. One piece involves a directory full of files that get executed by Scheduled Lasso Events. In looking at the files I am find this type of structure (with proper coding of course, just a quick shorthand):
>>
>> head
>> /head
>>
>> body
>> create tag
>> do some database updates (including having login/password hard coded)
>> do some file manipulations/movement
>> /tag
>> execute tag
>> /body
>>
>> So, my question is why would you do it that way? Is there something about doing it this way that is more secure (can't imagine that) or faster? Why not just do a normal page with the lasso code. Why the extra overhead of the tag. There is nothing else on these pages except the tag build and call.
>>
>> Marc
>>
>>
>> Marc Pinnell
>> 1027 Design
>> PO Box 990872
>> Redding, CA 96099-0872
>> 530.941.4706
>> fax: 866.232.5300
>> www.1027Design.com
>>
>>
>> #############################################################
>> Attend the Lasso Developer Conference 2014!
>> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
>> http://www.lassosoft.com/LDC-newmarket-2014
>>
>> #############################################################
>>
>> This message is sent to you because you are subscribed to
>> the mailing list Lasso [hidden email]
>> Official list archives available at http://www.lassotalk.com
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>
> #############################################################
> Attend the Lasso Developer Conference 2014!
> October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
> http://www.lassosoft.com/LDC-newmarket-2014
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>  the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

Marc Pinnell
1027 Design
PO Box 990872
Redding, CA 96099-0872
530.941.4706
fax: 866.232.5300
www.1027Design.com


#############################################################
Attend the Lasso Developer Conference 2014!
October 1-3, 2014 at Treefrog HQ, Newmarket, Ontario, Canada
http://www.lassosoft.com/LDC-newmarket-2014

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>