commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?

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

commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?

Philippe Mouawad-2
Hello,
Since version 3.6 of commons-lang3, RandomStringUtils has been deprecated
following introduction of commons-text.

Looking at current 1.1 version (and even snapshot 1.2) I wonder if it's not
too early for deprecation.

RandomStringUtils was very simple and intuitive to use. I don't remember I
ever had to think when using it :-)

RandomStringGenerator is nice in terms of API and much more powerful for
advanced usage, but it looks to me much more complex to use for simple,
average cases:

   - RandomStringUtils.random ? => Is this the equivalent
   - new RandomStringGenerator.Builder()
                  .filteredBy(CharacterPredicates.LETTERS)
                  .build();
      - I don't get exactly the same results ? Is it due to Unicode chars ?
      - RandomStringUtils.randomAlphabetic(count) => new
   RandomStringGenerator.Builder()
               .withinRange('0', 'z')
               .filteredBy(CharacterPredicates.LETTERS,
   CharacterPredicates.DIGITS)
               .build().generate(count)

What about use cases when count and source chars are configurable :

   - RandomStringUtils.random(count, chars)
   - => Are we supposed to build each time the generator ?

Is it as efficient in terms of CPU and memory usage as RandomStringUtils
equivalent ?

Sorry if my questions are stupid.

Thanks

Regards
Reply | Threaded
Open this post in threaded view
|

Re: commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?

Amey Jadiye
Hello Philippe,

Looking at similar kind of demand we are thinking to execute below plan, I
think it will be good for your expectations.

http://markmail.org/message/azxw4nai7fs2laas

Regards,
Amey

On Sun, Sep 3, 2017 at 6:26 PM, Philippe Mouawad <[hidden email]>
wrote:

> Hello,
> Since version 3.6 of commons-lang3, RandomStringUtils has been deprecated
> following introduction of commons-text.
>
> Looking at current 1.1 version (and even snapshot 1.2) I wonder if it's not
> too early for deprecation.
>
> RandomStringUtils was very simple and intuitive to use. I don't remember I
> ever had to think when using it :-)
>
> RandomStringGenerator is nice in terms of API and much more powerful for
> advanced usage, but it looks to me much more complex to use for simple,
> average cases:
>
>    - RandomStringUtils.random ? => Is this the equivalent
>    - new RandomStringGenerator.Builder()
>                   .filteredBy(CharacterPredicates.LETTERS)
>                   .build();
>       - I don't get exactly the same results ? Is it due to Unicode chars ?
>       - RandomStringUtils.randomAlphabetic(count) => new
>    RandomStringGenerator.Builder()
>                .withinRange('0', 'z')
>                .filteredBy(CharacterPredicates.LETTERS,
>    CharacterPredicates.DIGITS)
>                .build().generate(count)
>
> What about use cases when count and source chars are configurable :
>
>    - RandomStringUtils.random(count, chars)
>    - => Are we supposed to build each time the generator ?
>
> Is it as efficient in terms of CPU and memory usage as RandomStringUtils
> equivalent ?
>
> Sorry if my questions are stupid.
>
> Thanks
>
> Regards
>



--

---------------------------------------------------------------------

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?

Philippe Mouawad
Thanks for your answer.

On Sunday, September 3, 2017, Amey Jadiye <[hidden email]> wrote:

> Hello Philippe,
>
> Looking at similar kind of demand we are thinking to execute below plan, I
> think it will be good for your expectations.
>
> http://markmail.org/message/azxw4nai7fs2laas
>
> Regards,
> Amey
>
> On Sun, Sep 3, 2017 at 6:26 PM, Philippe Mouawad <[hidden email]
> <javascript:;>>
> wrote:
>
> > Hello,
> > Since version 3.6 of commons-lang3, RandomStringUtils has been deprecated
> > following introduction of commons-text.
> >
> > Looking at current 1.1 version (and even snapshot 1.2) I wonder if it's
> not
> > too early for deprecation.
> >
> > RandomStringUtils was very simple and intuitive to use. I don't remember
> I
> > ever had to think when using it :-)
> >
> > RandomStringGenerator is nice in terms of API and much more powerful for
> > advanced usage, but it looks to me much more complex to use for simple,
> > average cases:
> >
> >    - RandomStringUtils.random ? => Is this the equivalent
> >    - new RandomStringGenerator.Builder()
> >                   .filteredBy(CharacterPredicates.LETTERS)
> >                   .build();
> >       - I don't get exactly the same results ? Is it due to Unicode
> chars ?
> >       - RandomStringUtils.randomAlphabetic(count) => new
> >    RandomStringGenerator.Builder()
> >                .withinRange('0', 'z')
> >                .filteredBy(CharacterPredicates.LETTERS,
> >    CharacterPredicates.DIGITS)
> >                .build().generate(count)
> >
> > What about use cases when count and source chars are configurable :
> >
> >    - RandomStringUtils.random(count, chars)
> >    - => Are we supposed to build each time the generator ?
> >
> > Is it as efficient in terms of CPU and memory usage as RandomStringUtils
> > equivalent ?
> >
> > Sorry if my questions are stupid.
> >
> > Thanks
> >
> > Regards
> >
>
>
>
> --
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [hidden email] <javascript:;>
>
> For additional commands, e-mail: [hidden email]
> <javascript:;>
>


--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?

Philippe Mouawad
In reply to this post by Amey Jadiye
Hi Again,
What is the expected schedule for this plan ?
Will it be available in commons-text-1.2 ?

Thanks

On Sun, Sep 3, 2017 at 4:28 PM, Amey Jadiye <[hidden email]> wrote:

> Hello Philippe,
>
> Looking at similar kind of demand we are thinking to execute below plan, I
> think it will be good for your expectations.
>
> http://markmail.org/message/azxw4nai7fs2laas
>
> Regards,
> Amey
>
> On Sun, Sep 3, 2017 at 6:26 PM, Philippe Mouawad <[hidden email]>
> wrote:
>
> > Hello,
> > Since version 3.6 of commons-lang3, RandomStringUtils has been deprecated
> > following introduction of commons-text.
> >
> > Looking at current 1.1 version (and even snapshot 1.2) I wonder if it's
> not
> > too early for deprecation.
> >
> > RandomStringUtils was very simple and intuitive to use. I don't remember
> I
> > ever had to think when using it :-)
> >
> > RandomStringGenerator is nice in terms of API and much more powerful for
> > advanced usage, but it looks to me much more complex to use for simple,
> > average cases:
> >
> >    - RandomStringUtils.random ? => Is this the equivalent
> >    - new RandomStringGenerator.Builder()
> >                   .filteredBy(CharacterPredicates.LETTERS)
> >                   .build();
> >       - I don't get exactly the same results ? Is it due to Unicode
> chars ?
> >       - RandomStringUtils.randomAlphabetic(count) => new
> >    RandomStringGenerator.Builder()
> >                .withinRange('0', 'z')
> >                .filteredBy(CharacterPredicates.LETTERS,
> >    CharacterPredicates.DIGITS)
> >                .build().generate(count)
> >
> > What about use cases when count and source chars are configurable :
> >
> >    - RandomStringUtils.random(count, chars)
> >    - => Are we supposed to build each time the generator ?
> >
> > Is it as efficient in terms of CPU and memory usage as RandomStringUtils
> > equivalent ?
> >
> > Sorry if my questions are stupid.
> >
> > Thanks
> >
> > Regards
> >
>
>
>
> --
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [hidden email]
>
> For additional commands, e-mail: [hidden email]
>



--
Cordialement.
Philippe Mouawad.
Reply | Threaded
Open this post in threaded view
|

Re: commons-lang3: Too early to deprecate RandomStringUtils in favor of RandomStringGenerator ?

Amey Jadiye
Yes.

Regards,
Amey

On Sun, Sep 3, 2017 at 9:06 PM, Philippe Mouawad <[hidden email]
> wrote:

> Hi Again,
> What is the expected schedule for this plan ?
> Will it be available in commons-text-1.2 ?
>
> Thanks
>
> On Sun, Sep 3, 2017 at 4:28 PM, Amey Jadiye <[hidden email]> wrote:
>
> > Hello Philippe,
> >
> > Looking at similar kind of demand we are thinking to execute below plan,
> I
> > think it will be good for your expectations.
> >
> > http://markmail.org/message/azxw4nai7fs2laas
> >
> > Regards,
> > Amey
> >
> > On Sun, Sep 3, 2017 at 6:26 PM, Philippe Mouawad <[hidden email]>
> > wrote:
> >
> > > Hello,
> > > Since version 3.6 of commons-lang3, RandomStringUtils has been
> deprecated
> > > following introduction of commons-text.
> > >
> > > Looking at current 1.1 version (and even snapshot 1.2) I wonder if it's
> > not
> > > too early for deprecation.
> > >
> > > RandomStringUtils was very simple and intuitive to use. I don't
> remember
> > I
> > > ever had to think when using it :-)
> > >
> > > RandomStringGenerator is nice in terms of API and much more powerful
> for
> > > advanced usage, but it looks to me much more complex to use for simple,
> > > average cases:
> > >
> > >    - RandomStringUtils.random ? => Is this the equivalent
> > >    - new RandomStringGenerator.Builder()
> > >                   .filteredBy(CharacterPredicates.LETTERS)
> > >                   .build();
> > >       - I don't get exactly the same results ? Is it due to Unicode
> > chars ?
> > >       - RandomStringUtils.randomAlphabetic(count) => new
> > >    RandomStringGenerator.Builder()
> > >                .withinRange('0', 'z')
> > >                .filteredBy(CharacterPredicates.LETTERS,
> > >    CharacterPredicates.DIGITS)
> > >                .build().generate(count)
> > >
> > > What about use cases when count and source chars are configurable :
> > >
> > >    - RandomStringUtils.random(count, chars)
> > >    - => Are we supposed to build each time the generator ?
> > >
> > > Is it as efficient in terms of CPU and memory usage as
> RandomStringUtils
> > > equivalent ?
> > >
> > > Sorry if my questions are stupid.
> > >
> > > Thanks
> > >
> > > Regards
> > >
> >
> >
> >
> > --
> >
> > ---------------------------------------------------------------------
> >
> > To unsubscribe, e-mail: [hidden email]
> >
> > For additional commands, e-mail: [hidden email]
> >
>
>
>
> --
> Cordialement.
> Philippe Mouawad.
>



--

---------------------------------------------------------------------

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]