Removing debug task

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Removing debug task

taher
Hi Jacques, all,

I noticed that you added a task called debug in the master build script. It
is not working because the syntax is incorrect (should be "ofbizDebug", not
"ofbiz ofbizDebug".

However, I recommend removing this task and let developers use the
ofbizDebug directly. Why? because ofbizDebug activates the debugger on
everything (--test --load-data --shutdown --start --help) So it helps
developers in debugging any scenario. If you keep the debug task then
developers might not be aware that they have these different combinations
of debugging options available.

Taher Alkhateeb
Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

Jacques Le Roux
Administrator
Hi Taher,

I agree, and thanks for the details! It was a WIP, I knew it was not the right way but did not have time to do it right.

You know what? I'm lazy, especially when typing on my keyboard ! :)

So I love the Gradle possibility of using shortcuts. For instance with my local g.bat cover for gradlew.bat I created, I only type "g ta" to list the
tasks, etc.

The problem with prefixing patterns with ofbiz, as in ofbizDebug, ofbizSecure, ofbizBackground, ofbizBackgroundSecure is you can't benefit from shortcuts.

I sincerely see no points using the ofbiz prefix for patterns, we know it's OFBiz ;)

So why not having rather the patterns named debug, secure, background, backgroundSecure ;) (I got not ideas to shorten backgroundSecure, not a big
deal I guess)

I just tried renaming the patterns everywhere in OFBiz and it works like a charm (at least for debug instead of ofbizDebug that I just used), so we get:

Rules
-----
Pattern: clean<TaskName>: Cleans the output files of a task.
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.
Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts belonging to a configuration.
Pattern: ofbiz <Commands>: Execute OFBiz startup commands
Pattern: debug <Commands>: Execute OFBiz startup commands in remote debug mode
Pattern: secure <Commands>: Execute OFBiz startup commands pre-loading the notsoserial Java agent
Pattern: background <Commands>: Execute OFBiz startup commands in background and output to console.log
Pattern: backgroundSecure <Commands>: Execute OFBiz startup commands in background (secure mode) and output to console.log

The ofbiz pattern by itself makes sense since it's used with the start options, that's why I created the lazy start and stop cover tasks

Opinions, before I commit my tiny changes (including "debug task" revert)?

Jacques

Le 12/08/2016 à 12:21, Taher Alkhateeb a écrit :

> Hi Jacques, all,
>
> I noticed that you added a task called debug in the master build script. It
> is not working because the syntax is incorrect (should be "ofbizDebug", not
> "ofbiz ofbizDebug".
>
> However, I recommend removing this task and let developers use the
> ofbizDebug directly. Why? because ofbizDebug activates the debugger on
> everything (--test --load-data --shutdown --start --help) So it helps
> developers in debugging any scenario. If you keep the debug task then
> developers might not be aware that they have these different combinations
> of debugging options available.
>
> Taher Alkhateeb
>

Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

taher
I see no problem in this renaming. It makes things shorter and nicer.
However, please make sure to update all references in README.md in the
entire file.

If you make this renaming, may I suggest then to remove the start and debug
tasks?

On Fri, Aug 12, 2016 at 2:20 PM, Jacques Le Roux <
[hidden email]> wrote:

> Hi Taher,
>
> I agree, and thanks for the details! It was a WIP, I knew it was not the
> right way but did not have time to do it right.
>
> You know what? I'm lazy, especially when typing on my keyboard ! :)
>
> So I love the Gradle possibility of using shortcuts. For instance with my
> local g.bat cover for gradlew.bat I created, I only type "g ta" to list the
> tasks, etc.
>
> The problem with prefixing patterns with ofbiz, as in ofbizDebug,
> ofbizSecure, ofbizBackground, ofbizBackgroundSecure is you can't benefit
> from shortcuts.
>
> I sincerely see no points using the ofbiz prefix for patterns, we know
> it's OFBiz ;)
>
> So why not having rather the patterns named debug, secure, background,
> backgroundSecure ;) (I got not ideas to shorten backgroundSecure, not a big
> deal I guess)
>
> I just tried renaming the patterns everywhere in OFBiz and it works like a
> charm (at least for debug instead of ofbizDebug that I just used), so we
> get:
>
> Rules
> -----
> Pattern: clean<TaskName>: Cleans the output files of a task.
> Pattern: build<ConfigurationName>: Assembles the artifacts of a
> configuration.
> Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts
> belonging to a configuration.
> Pattern: ofbiz <Commands>: Execute OFBiz startup commands
> Pattern: debug <Commands>: Execute OFBiz startup commands in remote debug
> mode
> Pattern: secure <Commands>: Execute OFBiz startup commands pre-loading the
> notsoserial Java agent
> Pattern: background <Commands>: Execute OFBiz startup commands in
> background and output to console.log
> Pattern: backgroundSecure <Commands>: Execute OFBiz startup commands in
> background (secure mode) and output to console.log
>
> The ofbiz pattern by itself makes sense since it's used with the start
> options, that's why I created the lazy start and stop cover tasks
>
> Opinions, before I commit my tiny changes (including "debug task" revert)?
>
> Jacques
>
>
> Le 12/08/2016 à 12:21, Taher Alkhateeb a écrit :
>
>> Hi Jacques, all,
>>
>> I noticed that you added a task called debug in the master build script.
>> It
>> is not working because the syntax is incorrect (should be "ofbizDebug",
>> not
>> "ofbiz ofbizDebug".
>>
>> However, I recommend removing this task and let developers use the
>> ofbizDebug directly. Why? because ofbizDebug activates the debugger on
>> everything (--test --load-data --shutdown --start --help) So it helps
>> developers in debugging any scenario. If you keep the debug task then
>> developers might not be aware that they have these different combinations
>> of debugging options available.
>>
>> Taher Alkhateeb
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

taher
Also another note Jacques, if things are a WIP, I suggest not to commit
before testing functionality. I know we are in trunk, but at least
committing working code is better than fixing it after a commit.

On Fri, Aug 12, 2016 at 2:25 PM, Taher Alkhateeb <[hidden email]
> wrote:

> I see no problem in this renaming. It makes things shorter and nicer.
> However, please make sure to update all references in README.md in the
> entire file.
>
> If you make this renaming, may I suggest then to remove the start and
> debug tasks?
>
> On Fri, Aug 12, 2016 at 2:20 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi Taher,
>>
>> I agree, and thanks for the details! It was a WIP, I knew it was not the
>> right way but did not have time to do it right.
>>
>> You know what? I'm lazy, especially when typing on my keyboard ! :)
>>
>> So I love the Gradle possibility of using shortcuts. For instance with my
>> local g.bat cover for gradlew.bat I created, I only type "g ta" to list the
>> tasks, etc.
>>
>> The problem with prefixing patterns with ofbiz, as in ofbizDebug,
>> ofbizSecure, ofbizBackground, ofbizBackgroundSecure is you can't benefit
>> from shortcuts.
>>
>> I sincerely see no points using the ofbiz prefix for patterns, we know
>> it's OFBiz ;)
>>
>> So why not having rather the patterns named debug, secure, background,
>> backgroundSecure ;) (I got not ideas to shorten backgroundSecure, not a big
>> deal I guess)
>>
>> I just tried renaming the patterns everywhere in OFBiz and it works like
>> a charm (at least for debug instead of ofbizDebug that I just used), so we
>> get:
>>
>> Rules
>> -----
>> Pattern: clean<TaskName>: Cleans the output files of a task.
>> Pattern: build<ConfigurationName>: Assembles the artifacts of a
>> configuration.
>> Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts
>> belonging to a configuration.
>> Pattern: ofbiz <Commands>: Execute OFBiz startup commands
>> Pattern: debug <Commands>: Execute OFBiz startup commands in remote debug
>> mode
>> Pattern: secure <Commands>: Execute OFBiz startup commands pre-loading
>> the notsoserial Java agent
>> Pattern: background <Commands>: Execute OFBiz startup commands in
>> background and output to console.log
>> Pattern: backgroundSecure <Commands>: Execute OFBiz startup commands in
>> background (secure mode) and output to console.log
>>
>> The ofbiz pattern by itself makes sense since it's used with the start
>> options, that's why I created the lazy start and stop cover tasks
>>
>> Opinions, before I commit my tiny changes (including "debug task" revert)?
>>
>> Jacques
>>
>>
>> Le 12/08/2016 à 12:21, Taher Alkhateeb a écrit :
>>
>>> Hi Jacques, all,
>>>
>>> I noticed that you added a task called debug in the master build script.
>>> It
>>> is not working because the syntax is incorrect (should be "ofbizDebug",
>>> not
>>> "ofbiz ofbizDebug".
>>>
>>> However, I recommend removing this task and let developers use the
>>> ofbizDebug directly. Why? because ofbizDebug activates the debugger on
>>> everything (--test --load-data --shutdown --start --help) So it helps
>>> developers in debugging any scenario. If you keep the debug task then
>>> developers might not be aware that they have these different combinations
>>> of debugging options available.
>>>
>>> Taher Alkhateeb
>>>
>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

Jacques Le Roux
Administrator
In reply to this post by taher

Le 12/08/2016 à 13:25, Taher Alkhateeb a écrit :
> I see no problem in this renaming. It makes things shorter and nicer.
> However, please make sure to update all references in README.md in the
> entire file.

I said in "I just tried renaming the patterns everywhere in OFBiz" ;)

>
> If you make this renaming, may I suggest then to remove the start and debug
> tasks?

Why? I prefer, it's more intuitive and I feel a continuity with "legacy", to type start and stop rather than ofbiz and "ofbiz --shutdown" :p

Jacques

>
> On Fri, Aug 12, 2016 at 2:20 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Hi Taher,
>>
>> I agree, and thanks for the details! It was a WIP, I knew it was not the
>> right way but did not have time to do it right.
>>
>> You know what? I'm lazy, especially when typing on my keyboard ! :)
>>
>> So I love the Gradle possibility of using shortcuts. For instance with my
>> local g.bat cover for gradlew.bat I created, I only type "g ta" to list the
>> tasks, etc.
>>
>> The problem with prefixing patterns with ofbiz, as in ofbizDebug,
>> ofbizSecure, ofbizBackground, ofbizBackgroundSecure is you can't benefit
>> from shortcuts.
>>
>> I sincerely see no points using the ofbiz prefix for patterns, we know
>> it's OFBiz ;)
>>
>> So why not having rather the patterns named debug, secure, background,
>> backgroundSecure ;) (I got not ideas to shorten backgroundSecure, not a big
>> deal I guess)
>>
>> I just tried renaming the patterns everywhere in OFBiz and it works like a
>> charm (at least for debug instead of ofbizDebug that I just used), so we
>> get:
>>
>> Rules
>> -----
>> Pattern: clean<TaskName>: Cleans the output files of a task.
>> Pattern: build<ConfigurationName>: Assembles the artifacts of a
>> configuration.
>> Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts
>> belonging to a configuration.
>> Pattern: ofbiz <Commands>: Execute OFBiz startup commands
>> Pattern: debug <Commands>: Execute OFBiz startup commands in remote debug
>> mode
>> Pattern: secure <Commands>: Execute OFBiz startup commands pre-loading the
>> notsoserial Java agent
>> Pattern: background <Commands>: Execute OFBiz startup commands in
>> background and output to console.log
>> Pattern: backgroundSecure <Commands>: Execute OFBiz startup commands in
>> background (secure mode) and output to console.log
>>
>> The ofbiz pattern by itself makes sense since it's used with the start
>> options, that's why I created the lazy start and stop cover tasks
>>
>> Opinions, before I commit my tiny changes (including "debug task" revert)?
>>
>> Jacques
>>
>>
>> Le 12/08/2016 à 12:21, Taher Alkhateeb a écrit :
>>
>>> Hi Jacques, all,
>>>
>>> I noticed that you added a task called debug in the master build script.
>>> It
>>> is not working because the syntax is incorrect (should be "ofbizDebug",
>>> not
>>> "ofbiz ofbizDebug".
>>>
>>> However, I recommend removing this task and let developers use the
>>> ofbizDebug directly. Why? because ofbizDebug activates the debugger on
>>> everything (--test --load-data --shutdown --start --help) So it helps
>>> developers in debugging any scenario. If you keep the debug task then
>>> developers might not be aware that they have these different combinations
>>> of debugging options available.
>>>
>>> Taher Alkhateeb
>>>
>>>

Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

Jacques Le Roux
Administrator
In reply to this post by taher
Yep, will do, waiting for other opinions before...

Jacques


Le 12/08/2016 à 13:28, Taher Alkhateeb a écrit :

> Also another note Jacques, if things are a WIP, I suggest not to commit
> before testing functionality. I know we are in trunk, but at least
> committing working code is better than fixing it after a commit.
>
> On Fri, Aug 12, 2016 at 2:25 PM, Taher Alkhateeb <[hidden email]
>> wrote:
>> I see no problem in this renaming. It makes things shorter and nicer.
>> However, please make sure to update all references in README.md in the
>> entire file.
>>
>> If you make this renaming, may I suggest then to remove the start and
>> debug tasks?
>>
>> On Fri, Aug 12, 2016 at 2:20 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>>> Hi Taher,
>>>
>>> I agree, and thanks for the details! It was a WIP, I knew it was not the
>>> right way but did not have time to do it right.
>>>
>>> You know what? I'm lazy, especially when typing on my keyboard ! :)
>>>
>>> So I love the Gradle possibility of using shortcuts. For instance with my
>>> local g.bat cover for gradlew.bat I created, I only type "g ta" to list the
>>> tasks, etc.
>>>
>>> The problem with prefixing patterns with ofbiz, as in ofbizDebug,
>>> ofbizSecure, ofbizBackground, ofbizBackgroundSecure is you can't benefit
>>> from shortcuts.
>>>
>>> I sincerely see no points using the ofbiz prefix for patterns, we know
>>> it's OFBiz ;)
>>>
>>> So why not having rather the patterns named debug, secure, background,
>>> backgroundSecure ;) (I got not ideas to shorten backgroundSecure, not a big
>>> deal I guess)
>>>
>>> I just tried renaming the patterns everywhere in OFBiz and it works like
>>> a charm (at least for debug instead of ofbizDebug that I just used), so we
>>> get:
>>>
>>> Rules
>>> -----
>>> Pattern: clean<TaskName>: Cleans the output files of a task.
>>> Pattern: build<ConfigurationName>: Assembles the artifacts of a
>>> configuration.
>>> Pattern: upload<ConfigurationName>: Assembles and uploads the artifacts
>>> belonging to a configuration.
>>> Pattern: ofbiz <Commands>: Execute OFBiz startup commands
>>> Pattern: debug <Commands>: Execute OFBiz startup commands in remote debug
>>> mode
>>> Pattern: secure <Commands>: Execute OFBiz startup commands pre-loading
>>> the notsoserial Java agent
>>> Pattern: background <Commands>: Execute OFBiz startup commands in
>>> background and output to console.log
>>> Pattern: backgroundSecure <Commands>: Execute OFBiz startup commands in
>>> background (secure mode) and output to console.log
>>>
>>> The ofbiz pattern by itself makes sense since it's used with the start
>>> options, that's why I created the lazy start and stop cover tasks
>>>
>>> Opinions, before I commit my tiny changes (including "debug task" revert)?
>>>
>>> Jacques
>>>
>>>
>>> Le 12/08/2016 à 12:21, Taher Alkhateeb a écrit :
>>>
>>>> Hi Jacques, all,
>>>>
>>>> I noticed that you added a task called debug in the master build script.
>>>> It
>>>> is not working because the syntax is incorrect (should be "ofbizDebug",
>>>> not
>>>> "ofbiz ofbizDebug".
>>>>
>>>> However, I recommend removing this task and let developers use the
>>>> ofbizDebug directly. Why? because ofbizDebug activates the debugger on
>>>> everything (--test --load-data --shutdown --start --help) So it helps
>>>> developers in debugging any scenario. If you keep the debug task then
>>>> developers might not be aware that they have these different combinations
>>>> of debugging options available.
>>>>
>>>> Taher Alkhateeb
>>>>
>>>>

Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

Jacopo Cappellato-5
In reply to this post by Jacques Le Roux
On Fri, Aug 12, 2016 at 1:58 PM, Jacques Le Roux <
[hidden email]> wrote:

> ...

Why? I prefer, it's more intuitive and I feel a continuity with "legacy",
> to type start and stop rather than ofbiz and "ofbiz --shutdown" :p
>
> Jacques


My preference is to design and implement a set of tasks that is as clean,
lean and consistent as possible rather than trying to blend the new tasks
with the "legacy flavor"; while the "legacy flavor" may initially help
old-time adopters already used to the previous style, on the other hand it
could increase the initial learning curve for new adopters.

Jacopo
Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

taher
I agree Jacopo. Less is more.

This also has to do with the philosophy that simple != easy. These "lazy"
commands are nice but they have a price as they add to the complexity. Now
if you change something you need to change other things to keep the system
functional. You also confuse your users when you have many ways to achieve
the same result.

I also think we are introducing convenience too early. We just introduced
gradle recently and we did not even remove all the libs yet nor did we
introduce a plugin system. It's just way too early to start shoving more
and more.

Historically OFBiz suffered from being overly complex with a fat code base.
Why? it is exactly because of simple things like this one. Imagine this
small tangling of code happening thousands of times everywhere in the code
base, what do you get? you get the complexity we are suffering from right
now. That is why many times I get very afraid when touching code because I
just don't know what am I going to break next.

Taher Alkhateeb

On Saturday, 13 August 2016, Jacopo Cappellato <
[hidden email]> wrote:

> On Fri, Aug 12, 2016 at 1:58 PM, Jacques Le Roux <
> [hidden email] <javascript:;>> wrote:
>
> > ...
>
> Why? I prefer, it's more intuitive and I feel a continuity with "legacy",
> > to type start and stop rather than ofbiz and "ofbiz --shutdown" :p
> >
> > Jacques
>
>
> My preference is to design and implement a set of tasks that is as clean,
> lean and consistent as possible rather than trying to blend the new tasks
> with the "legacy flavor"; while the "legacy flavor" may initially help
> old-time adopters already used to the previous style, on the other hand it
> could increase the initial learning curve for new adopters.
>
> Jacopo
>
Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

Jacques Le Roux
Administrator
I have no problems reverting start and stop tasks since we will rename the ofbizDebug and ofbizBackground patterns to debug and background and the
secure patterns will be removed.

I'll then happily run locally OFBiz using "g o", etc.

Both are removed at r1756269, with the soon useless debug task

Jacques


Le 13/08/2016 à 11:58, Taher Alkhateeb a écrit :

> I agree Jacopo. Less is more.
>
> This also has to do with the philosophy that simple != easy. These "lazy"
> commands are nice but they have a price as they add to the complexity. Now
> if you change something you need to change other things to keep the system
> functional. You also confuse your users when you have many ways to achieve
> the same result.
>
> I also think we are introducing convenience too early. We just introduced
> gradle recently and we did not even remove all the libs yet nor did we
> introduce a plugin system. It's just way too early to start shoving more
> and more.
>
> Historically OFBiz suffered from being overly complex with a fat code base.
> Why? it is exactly because of simple things like this one. Imagine this
> small tangling of code happening thousands of times everywhere in the code
> base, what do you get? you get the complexity we are suffering from right
> now. That is why many times I get very afraid when touching code because I
> just don't know what am I going to break next.
>
> Taher Alkhateeb
>
> On Saturday, 13 August 2016, Jacopo Cappellato <
> [hidden email]> wrote:
>
>> On Fri, Aug 12, 2016 at 1:58 PM, Jacques Le Roux <
>> [hidden email] <javascript:;>> wrote:
>>
>>> ...
>> Why? I prefer, it's more intuitive and I feel a continuity with "legacy",
>>> to type start and stop rather than ofbiz and "ofbiz --shutdown" :p
>>>
>>> Jacques
>>
>> My preference is to design and implement a set of tasks that is as clean,
>> lean and consistent as possible rather than trying to blend the new tasks
>> with the "legacy flavor"; while the "legacy flavor" may initially help
>> old-time adopters already used to the previous style, on the other hand it
>> could increase the initial learning curve for new adopters.
>>
>> Jacopo
>>

Reply | Threaded
Open this post in threaded view
|

Re: Removing debug task

taher
Mentioning in this thread as well (already mentioned) that I removed
ofbizSecure and ofbizBackgroundSecure in r1756305 with details in OFBIZ-7951

On Sat, Aug 13, 2016 at 4:54 PM, Jacques Le Roux <
[hidden email]> wrote:

> I have no problems reverting start and stop tasks since we will rename the
> ofbizDebug and ofbizBackground patterns to debug and background and the
> secure patterns will be removed.
>
> I'll then happily run locally OFBiz using "g o", etc.
>
> Both are removed at r1756269, with the soon useless debug task
>
> Jacques
>
>
> Le 13/08/2016 à 11:58, Taher Alkhateeb a écrit :
>
>> I agree Jacopo. Less is more.
>>
>> This also has to do with the philosophy that simple != easy. These "lazy"
>> commands are nice but they have a price as they add to the complexity. Now
>> if you change something you need to change other things to keep the system
>> functional. You also confuse your users when you have many ways to achieve
>> the same result.
>>
>> I also think we are introducing convenience too early. We just introduced
>> gradle recently and we did not even remove all the libs yet nor did we
>> introduce a plugin system. It's just way too early to start shoving more
>> and more.
>>
>> Historically OFBiz suffered from being overly complex with a fat code
>> base.
>> Why? it is exactly because of simple things like this one. Imagine this
>> small tangling of code happening thousands of times everywhere in the code
>> base, what do you get? you get the complexity we are suffering from right
>> now. That is why many times I get very afraid when touching code because I
>> just don't know what am I going to break next.
>>
>> Taher Alkhateeb
>>
>> On Saturday, 13 August 2016, Jacopo Cappellato <
>> [hidden email]> wrote:
>>
>> On Fri, Aug 12, 2016 at 1:58 PM, Jacques Le Roux <
>>> [hidden email] <javascript:;>> wrote:
>>>
>>> ...
>>>>
>>> Why? I prefer, it's more intuitive and I feel a continuity with "legacy",
>>>
>>>> to type start and stop rather than ofbiz and "ofbiz --shutdown" :p
>>>>
>>>> Jacques
>>>>
>>>
>>> My preference is to design and implement a set of tasks that is as clean,
>>> lean and consistent as possible rather than trying to blend the new tasks
>>> with the "legacy flavor"; while the "legacy flavor" may initially help
>>> old-time adopters already used to the previous style, on the other hand
>>> it
>>> could increase the initial learning curve for new adopters.
>>>
>>> Jacopo
>>>
>>>
>