Andre:
> I like verbose code that is full of comments.
Ah yes, comments are good! But comments do not make code verbose.
Terse code can be heavily commented, and vice versa.
Commenting is not closely related to my issue, nor perhaps to yours.
Me:
> But there's an even bigger danger than the o
I like verbose code that is full of comments. I often have to revisit code that
has been made by me five or even ten years ago, and usually never touched again
since then. I need to be able to understand it without relying on my memory
from way back when. That is why I often prefer code that is
For my part, I call a function and put the result into a variable. I try not to
nest fucntions because I cannot easily tell what the result of each function
is, making it harder to troubleshoot, and also to read my own code! For that
reason my code is fairly verbose.
Bob S
> On Apr 14, 2021,
On 14/04/2021 21:01, Ralph DiMola via use-livecode wrote:
Good question... I'm thinking it's the same reason that with strict compilation
enabled a variable in a repeat loop does not have to be declared as a script
local. If it is declared as a script local no shadow error occurs. A handler
Me:
>> The biggest code is the most repetitive and least modular!
Jacqueline:
> Not always, but often. I try to aim for the smallest code base,
> so I think the contest should be to solve a complex problem
> with the least amount of code.
Yes, but not brevity for its own sake! Rather for mai
to:use-livecode-boun...@lists.runrev.com] On Behalf Of
Alex Tweedly via use-livecode
Sent: Wednesday, April 14, 2021 3:39 PM
To: use-livecode@lists.runrev.com
Cc: Alex Tweedly
Subject: Re: On the dangers of automated refactoring
On 14/04/2021 10:23, Andre Garzia via use-livecode wrote:
> That is the m
On 14/04/2021 10:23, Andre Garzia via use-livecode wrote:
That is the main issue, the code was using the wrong hungarian-lite prefixes.
You’d see something like
on myHandler pDataA
…
end myHandler
But, lo and behold, on top of the script there would be something like
local pDa
On 4/13/21 4:07 PM, Curry Kenworthy via use-livecode wrote:
The biggest code is the most repetitive and least modular!
Not always, but often. I try to aim for the smallest code base, so I think the contest should
be to solve a complex problem with the least amount of code.
--
Jacqueline Lan
Thanks Andre
I enjoyed putting the library together though at the time unit testing and
LiveCode just don’t go together. Personally I find developing with tests gives
me peace of mind about my code.
As for refactoring, normally defined as the process of improving code without
changing it’s be
That is the main issue, the code was using the wrong hungarian-lite prefixes.
You’d see something like
on myHandler pDataA
…
end myHandler
But, lo and behold, on top of the script there would be something like
local pDataA
Now, is that an argument to a handler? a script-local? It de
Safety boots are a must for developing safe code.
> On 13 Apr 2021, at 16:48, Bob Sneidar via use-livecode
> wrote:
>
> It's nothing short of a miracle that the shot didn't go INTO your foot. :-)
>
> Bob S
>
>
>> On Apr 13, 2021, at 03:05 , Andre Garzia via use-livecode
>> wrote:
>>
>> L
> On 13 Apr 2021, at 16:28, Mark Wieder via use-livecode
> wrote:
>
> Ouch. Don't do that.
I agree, that was not my decision. I maintaining this code but I’m not the
original developer.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Pl
Andre:
> Often in LiveCode (and most programming languages to be honest)
> we go coding for a long while and then realise that our code
> need extensive refactoring. We may have repeated a pattern over
> and over again and discovered that we need to change every
> instance of them, or something
On 4/13/2021 2:39 PM, Mark Wieder via use-livecode wrote:
On 4/13/21 8:37 AM, Paul Dupuis via use-livecode wrote:
I find revRefactor (which adds a Refactoring sub-menu under the Edit
menu of the IDE Script Editor) to be a tool that I personally would
like to see better integrated into the IDE.
On 4/13/2021 12:06 PM, Bob Sneidar via use-livecode wrote:
How do you find that? Github?
Don't remember how I found it - I think an announcement by Mark to the
list, but, yup, Github:
https://github.com/mwieder/revRefactor
___
use-livecode mailing
On 4/13/21 9:48 AM, Richard Gaskin via use-livecode wrote:
Andre Garzia wrote:
> What I didn’t realise was that there was variable shadowing happening
> in which handler arguments were named with the same name as script-
> local variables, my smart replacing removed those arguments because
>
On 4/13/21 8:37 AM, Paul Dupuis via use-livecode wrote:
I find revRefactor (which adds a Refactoring sub-menu under the Edit
menu of the IDE Script Editor) to be a tool that I personally would like
to see better integrated into the IDE.
Paul - thanks for the kind words there.
I took most of yo
It was actually more the mis-application of Hungarian-lite. I think it
compiled with strict enabled.
Sent from my iPhone
> On Apr 13, 2021, at 12:50 PM, Richard Gaskin via use-livecode
> wrote:
>
> Andre Garzia wrote:
>
> > What I didn’t realise was that there was variable shadowing happen
Andre Garzia wrote:
> What I didn’t realise was that there was variable shadowing happening
> in which handler arguments were named with the same name as script-
> local variables, my smart replacing removed those arguments because
> there was no need to redeclare the script-local vars. I didn’t
How do you find that? Github?
Bob S
> On Apr 13, 2021, at 08:59 , Paul Dupuis via use-livecode
> wrote:
>
> On 4/13/2021 11:52 AM, Bob Sneidar via use-livecode wrote:
>> We should have a contest: Who has the biggest code base. Mine's pretty big,
>> but I doubt it's the biggest.:-)
>>
> ~ 8
On 4/13/2021 11:52 AM, Bob Sneidar via use-livecode wrote:
We should have a contest: Who has the biggest code base. Mine's pretty big, but
I doubt it's the biggest.:-)
~ 83,000 lines of Livecode script, not counting 3rd party library stacks
(Wordlib, Spreadlib, lclSpell, ChartMaker) and some c
We should have a contest: Who has the biggest code base. Mine's pretty big, but
I doubt it's the biggest. :-)
Bob S
> On Apr 13, 2021, at 03:48 , David Bovill via use-livecode
> wrote:
>
> I’d be interested to understand the nature of the gazillion stack project to
> see how it compares to
It's nothing short of a miracle that the shot didn't go INTO your foot. :-)
Bob S
> On Apr 13, 2021, at 03:05 , Andre Garzia via use-livecode
> wrote:
>
> Let me tell you folks a recent story in which I tried to do exactly that and
> shot myself on the foot.
__
I find revRefactor (which adds a Refactoring sub-menu under the Edit
menu of the IDE Script Editor) to be a tool that I personally would like
to see better integrated into the IDE. This plugin was done by Mark
Wieder and is not an official part of the LiveCode IDE, but it is one
place, I would
On 4/13/21 3:05 AM, Andre Garzia via use-livecode wrote:
What I didn’t realise was that there was variable shadowing happening in which
handler arguments were named with the same name as script-local variables
Ouch. Don't do that.
I end up spending most of my coding life refactoring existing
There is a test framework in the GitHub repository:
https://github.com/livecode/livecode/tree/develop/tests
Didn’t really see documentation on it, but I’m sure it could be documented and
used to generate a robust unit test of our own projects. Plenty of examples
there on use, just nothing on h
I can't speak for others, but I can personally vouch for the authenticity of
that statement 😊
On 2021-04-13, 12:12 PM, "use-livecode on behalf of Andre Garzia via
use-livecode" wrote:
I bet many here never used a unit testing library.
___
Peter,
This is neat!
I also have a small test library, but mine is way less complete than yours. I
never released it because it was quite incomplete.
Maybe writing a tutorial or doing a small screencast showing it working might
help people understand why it is important. I bet many here never
Hi Andre
> On 13 Apr 2021, at 18:05, Andre Garzia via use-livecode
> wrote:
>
> We don’t even have unit testing libraries so that we can make sure our code
> works as expected.
I published a simple unit testing library on GitHub but it din’t get any
traction - https://github.com/PeterWAWood/
Hence the value of crowd-funding a version of the LiveCode language for the
Graalvm.
I spend a great deal of my time in LiveCode refactoring and renaming handlers.
I’ve done this not so much because it is useful to my productivity, but because
I see a method in the madness of spaghetti code tha
Hi Folks,
I’ve recently read that long thread that almost got people banned and will not
comment on it. What I want to comment on is about the kernel of the activity
that was mentioned there: refactoring.
Often in LiveCode (and most programming languages to be honest) we go coding
for a long w
31 matches
Mail list logo