Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Re: Math::MagicSquare::Generator

by Juerd (Abbot)
on Jan 27, 2002 at 22:08 UTC ( #141953=note: print w/ replies, xml ) Need Help??


in reply to Re: Math::MagicSquare::Generator
in thread Math::MagicSquare::Generator

I made Math::MagicSquare::Generator last night, just because I couldn't sleep and couldn't stop thinking about magic squares. Years ago, we had an assignment at school to create a simple 3x3 magic square. That hounted me for weeks. After several weeks, I gave my teacher a piece of paper with an 11x11 magic square and he was impressed. Last night, I created a 5x5 magic square in my head, with no paper. While doing that, I realised I was thinking in terms of Perl code. I then wrote a module called Math::MagicSquare (on my laptop - no Internet connection (yes, the same laptop that has a 802.11b connection, but the Internet connection was down :)) in one go. The next morning, I checked CPAN to see if there already was a module. And there was - Just like you did, I thought it could generate and check, and I was kind of disappointed that I had re-invented a wheel. Its source was a mess, so I decided to not read, but use the code. Reading the documentation gave me the answer: it was just a checker. I chose to name my module after what it does, hoping the difference would be obvious - I renamed it to Math::MagicSquare::Generator, added documentation and uploaded it to CPAN after checking thoroughly if a module already existed.

We both made the same mistake, and perhaps Math::MagicSquare::Checker would have been a better name for the existing Math::MagicSquare module, but it's too late for that now.

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$


Comment on Re: Re: Math::MagicSquare::Generator
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://141953]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-09-23 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls