Re: New Module

2009-05-03 Thread Aristotle Pagaltzis
* Jonathan Rockway j...@jrock.us [2009-05-03 08:00]:
 * On Sat, May 02 2009, Aristotle Pagaltzis wrote:
  Yeah, if there are thousands of other programmers using a
  module, then its name can be pretty much anything.
 
  If more or less the only marketing it has is search.cpan.org
  results page, then most potential users will miss it unless
  its name is descriptive and based on keywords someone might
  actually use to search for something like it.

 This is why Perl people should blog more.

Agreed, that helps up to a point. But you can’t natter on about
*every* module at the same level of noise. Plus, the number of
Perl programmers who don’t mingle with the community and won’t be
reached by blog buzz dwarfs the community core; for them, only
the slow trickle of mindshare among peers will work. (Actually,
s/Perl// – it’s true of all programming communities.) But it’s
them who give Perl coin in corporate environments, not the core
community directly.

Basically I think that irrespective of other marketing efforts,
the Zen of Comprehensive Archive Networks remains valid.

Ultimately I think the smaller and more focussed a module, the
more sense it makes to name it neutrally and descriptively. For
complex packages, a more googlable name is more useful, since
their mindshare flows from different channels.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/


Re: New Module

2009-05-03 Thread Chris Dolan

On May 3, 2009, at 6:54 AM, Aristotle Pagaltzis wrote:


* Jonathan Rockway j...@jrock.us [2009-05-03 08:00]:

This is why Perl people should blog more.


Agreed, that helps up to a point. But you can’t natter on about
*every* module at the same level of noise.


I vehemently agree.  At the risk of derailing this thread, I'll  
digress to say the Iron Man blogging competition has actually made me  
read fewer posts -- my initial impression was that the quality of a  
post was lower if it mentioned Iron Man in the first sentence.


If you blog because you are inspired to say something important to the  
community, then I want to read it.  If you blog every time you release  
a module, or just because mst told you to, then you are just lowering  
the signal-to-noise ratio.


High S/N means optimizing quality/quantity.  Jonathan's simply-stated  
opinion pushes to increase the denominator, which may help increase  
the visibility of the community but hurts inside the community.


Chris



Puzzling error from cpan testers

2009-05-03 Thread Bill Ward
For my module Number::Format I am getting a strange result from cpan testers
that I can't replicate.  See this error report...
http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3560533.html

#   Failed test 'pi with precision=6'
#   at t/round.t line 18.
#  got: 3.141593
# expected: 3.141593

#   Failed test 'precision=-2'
#   at t/round.t line 24.
#  got: 123500
# expected: 123500
# Looks like you failed 2 tests of 16.
t/round.t 

Here are the test cases in question:

cmp_ok(round(PI,6), '==', 3.141593, 'pi with precision=6');

cmp_ok(round(123456.78951, -2), '==', 123500,   'precision=-2' );

Since it's using '==' it shouldn't be possible to get those errors, right?
Anyone have any thoughts?


Re: Puzzling error from cpan testers

2009-05-03 Thread Andy Armstrong

On 3 May 2009, at 20:07, Bill Ward wrote:
For my module Number::Format I am getting a strange result from cpan  
testers that I can't replicate.  See this error report...

http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3560533.html

#   Failed test 'pi with precision=6'
#   at t/round.t line 18.
#  got: 3.141593
# expected: 3.141593

#   Failed test 'precision=-2'
#   at t/round.t line 24.
#  got: 123500

# expected: 123500
# Looks like you failed 2 tests of 16.
t/round.t 
Here are the test cases in question:

cmp_ok(round(PI,6), '==', 3.141593, 'pi with  
precision=6');


cmp_ok(round(123456.78951, -2), '==', 123500,   'precision=-2' );

Since it's using '==' it shouldn't be possible to get those errors,  
right?  Anyone have any thoughts?



Yeah, that's floating point. There can be a difference between the two  
values that's too small to display but big enough to make them non- 
equal. '==' is /always/ risky with FP values.


You should instead check for the value being within an acceptable range.

--
Andy Armstrong, Hexten



Re: Puzzling error from cpan testers

2009-05-03 Thread Bill Ward
On Sun, May 3, 2009 at 12:18 PM, Andy Armstrong a...@hexten.net wrote:

 On 3 May 2009, at 20:07, Bill Ward wrote:

 For my module Number::Format I am getting a strange result from cpan
 testers that I can't replicate.  See this error report...
 http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3560533.html
 [...]Since it's using '==' it shouldn't be possible to get those errors,
 right?  Anyone have any thoughts?



 Yeah, that's floating point. There can be a difference between the two
 values that's too small to display but big enough to make them non-equal.
 '==' is /always/ risky with FP values.

 You should instead check for the value being within an acceptable range.


Do you think I should change it to use eq in the test?


Re: Puzzling error from cpan testers

2009-05-03 Thread David Golden
On Sun, May 3, 2009 at 3:07 PM, Bill Ward b...@wards.net wrote:

 For my module Number::Format I am getting a strange result from cpan
 testers that I can't replicate.  See this error report...
 http://www.nntp.perl.org/group/perl.cpan.testers/2009/03/msg3560533.html

 #   Failed test 'pi with precision=6'
 #   at t/round.t line 18.
 #  got: 3.141593
 # expected: 3.141593

 That's my report.  Perl is compiled with -Dusemorebits (64int-ld) and is
thus using long doubles.  That tends to trip up direct comparisions of
floating point.

For floating point comparison, I usually recommend Test::Number::Delta.
However, given that your module is about formatting stuff, maybe the best
approach is forcing string comparison.

From a quick test -- using 'eq' instead of '==' in your modules passes tests
on my system.

-- David


Re: New Module

2009-05-03 Thread Aristotle Pagaltzis
* Chris Dolan ch...@chrisdolan.net [2009-05-03 16:25]:
 If you blog because you are inspired to say something important
 to the community, then I want to read it. If you blog every
 time you release a module, or just because mst told you to,
 then you are just lowering the signal-to-noise ratio.

 High S/N means optimizing quality/quantity. Jonathan's
 simply-stated opinion pushes to increase the denominator, which
 may help increase the visibility of the community but hurts
 inside the community.

I don’t know that it’s that simple. The Iron Man thing has caused
a lot of personal weblogs to pop up and there’ve been plenty of
genuinely interesting posts in them.

Regards,
-- 
Aristotle Pagaltzis // http://plasmasturm.org/