Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: tinkering with base64 encoding

by temporal (Pilgrim)
on Jun 14, 2012 at 22:15 UTC ( #976316=note: print w/ replies, xml ) Need Help??


in reply to Re: tinkering with base64 encoding
in thread tinkering with base64 encoding

Whoa! By far the most hostile reply that I've ever gotten on PerlMonks.

Maybe I should add that I also thought I'd learn something by rolling my own.

Anyway, now that we've established that I'm not so efficient in regard to my use of time - what about my code?

Strange things are afoot at the Circle-K.


Comment on Re^2: tinkering with base64 encoding
Re^3: tinkering with base64 encoding
by sauoq (Abbot) on Jun 15, 2012 at 00:41 UTC
    Whoa! By far the most hostile reply that I've ever gotten on PerlMonks.

    What was hostile about it? I certainly didn't mean for it to be so.

    And you needn't misinterpret my thoughts as a judgment on how you decide to spend your time. It's your time.

    What I was calling into question was your rationale. It would be unfortunate if someone rather less experienced read your well-written node and took away the notion that rolling your own is a good thing to do when you are writing a one-off, especially when exactly the opposite would probably be better advice.

    Maybe I should add that I also thought I'd learn something

    Another fair reason.

    what about my code?

    I haven't looked at it. I'd really just use the two line fix I've already mentioned. ;-)

    -sauoq
    "My two cents aren't worth a dime.";
Re^3: tinkering with base64 encoding
by CountZero (Bishop) on Jun 15, 2012 at 06:06 UTC
    I do not think that response was hostile. It just pointed out how to be more efficient. If that hit a touchy spot with you, perhaps the response was indeed correct. :)

    And if you want to have a look at another one's code for doing base64, look at the source for MIME::Base64::Perl.

    It is much more clean and short than your code, mainly because it uses the "u" template in its pack and unpack functions to first encode/decode the data to uuencode standard (which is very close to base64) and then, after doing some cleanup, uses tr to replace the uuencode characters by base64 characters in a one-to-one replacement. Fast, clean and easy to maintain.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (13)
As of 2014-12-19 17:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (90 votes), past polls