<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix"><font face="Helvetica, Arial,
sans-serif">If I may opine, using POE for an IRC bot is not
overkill. On the other hand, a bash-based, netcat-powered IRC
bot is a beautiful thing.<br>
<br>
This topic brings up some thoughts that might be helpful to
some, so I just got out my soapbox... brace yourselves.<br>
<br>
While respecting the fact that you are free to maintain your own
reasons for approaching code in a manner that conflicts with my
experience, I'm going to share my past and present thoughts on
the matter in the hope that someone reading this from the
archives someday might avoid the same pitfalls that tripped me
up in my days as a hubris-addled beginner.<br>
<br>
The do-everything-myself methodology was my major at the school
of hard knocks for uninformed Perl hackers, graduating class of
1999. The painful practice of assembling even basic
applications from bare atoms of matter might work well for a
hobbyist with unlimited time and no clear goals, but in my case
it proved to be harmful. It wasn't sustainable and didn't scale
to any useful level. I quickly became unhappy in my work
because the approach was deeply flawed. I had to mature as a
programmer. Code reuse was a critical step along the path that
I was still stumbling to find.<br>
<br>
Ultimately I found that my aversion to wheels-already-invented
was damaging me as a programmer. I was holding myself back by
adhering to three unfortunately common misconceptions.
Basically, I thought that:<br>
</font>
<ol>
<li><font face="Helvetica, Arial, sans-serif">If someone else
could do it, I could do it better and faster and therefore
everything needed to be rewritten by <i><b>me</b></i> in
order to be good enough to use in my project<br>
</font></li>
<li><font face="Helvetica, Arial, sans-serif">If someone else
could do it, it somehow made me inferior until I could do
the same thing better. So again, everything needed to be
rewritten by <i><b>me</b></i> so that I could be the best
wheelwright</font></li>
<li><font face="Helvetica, Arial, sans-serif">The use of code
libraries from other programmers, by its very nature, was
going to make my code run slowly. They didn't know what
they were doing. I did.<br>
</font></li>
</ol>
<font face="Helvetica, Arial, sans-serif">Obviously I was younger
then, perhaps a bit stupid, and certainly wrong a lot of
things. Now that I've been using Perl for nearly a decade and a
half, pretty much daily, at some point I started thinking
differently. May I present three finer points of wisdom I've
come to understand:<br>
</font>
<ol>
<li><font face="Helvetica, Arial, sans-serif">If someone else
can do it, that's super awesome! We needn't avoid
participating in the vast pool of freely-available knowledge
that we find in core Perl libraries and CPAN modules. Code
reuse is a virtue. There's great strength in becoming the
beneficiary of someone else's good will, genius and hard
work. Most importantly, we don't need to reinvent wheels
when we could be building warp drives instead</font></li>
<li><font face="Helvetica, Arial, sans-serif">If someone else
can do it, that doesn't diminish me. Given enough time I
know I can come to an intimate understanding of someone
else's "Wheel.pm" source code, <i>but unless it's
absolutely necessary,<b> I'm happy not to</b></i>. My
warp drive prototype is waiting! Who cares about remaking
wheels!</font></li>
<li><font face="Helvetica, Arial, sans-serif">It turns out that
using code libraries written by other brilliant programmers
solves all kinds of speed problems and bottlenecks, and it's
so easily accomplished in the mere minutes it takes to
install the libraries with `cpanm`. Code reuse doesn't
introduce hindrances as a matter of fact. It can actually
help remove and prevent them.</font></li>
</ol>
<font face="Helvetica, Arial, sans-serif">I was much happier and
began to program more effectively when I realized these things.
It's a <i>wonderful</i> thing to know that reusing good code
libraries from other programmers makes my own code less prone to
break when I rocket it down the runway on wheels that have been
tested many, many more times by many, many more geniuses. My
code is more reliable and efficient as an intended consequence,
and in the end I've actually produced a dependable application
instead of another experimental wheel. Just hitch your wagon to
<i><b>that</b></i> warp drive, son.<br>
<br>
<b>THEREFORE THROW</b><b> YE DOWN YOUR WHEELS OF OPPRESSION AND
EMBRACE CODE REUSE!</b> Go create jet packs and time
machines! It's way more fun =)<br>
<br>
--Tommy Butler<br>
<br>
On 10/25/2013 02:01 PM, A.J. Maurin wrote:<br>
</font></div>
<blockquote cite="mid:526AC014.8040602@darkdna.net" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<font face="Helvetica, Arial, sans-serif"> Well BASHing together
an IRC bot out of netcat and quick-and-dirty oneliners of sed
and awk are easy for me, because I'm used to it.<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
Anything beyond a quick one-liner of Perl looks daunting to me.<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
I dislike using standard libraries. To me, it's learning how to
use other people's code. Reinventing the wheel my butt.<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
</font>
<div class="moz-cite-prefix"><font face="Helvetica, Arial,
sans-serif">On 10/23/2013 12:00 PM, John Fields wrote:<br>
</font> </div>
<blockquote
cite="mid:CAL-G4ShO5vTQe+mZV_i8bbh3cjMYwZKesx4vWKdQ=oxU36R56A@mail.gmail.com"
type="cite">
<p dir="ltr"><font face="Helvetica, Arial, sans-serif">Shaun,
<a class="moz-txt-link-freetext" href="Net::IRC">Net::IRC</a> is deprecated. I KNOW! Says try Bot::BasicBot </font></p>
<p dir="ltr"><font face="Helvetica, Arial, sans-serif">Alex,
look at this BasicBot page and let us know how difficult it
looks! Not very compared to BASHing it out. :)</font></p>
<p dir="ltr"><font face="Helvetica, Arial, sans-serif"><a
moz-do-not-send="true"
href="http://blog.rajatpandit.com/2008/02/25/writing-an-irc-bot/">http://blog.rajatpandit.com/2008/02/25/writing-an-irc-bot/</a></font></p>
<p dir="ltr"><font face="Helvetica, Arial, sans-serif">Writing
an IRC bot from scratch in the next Monger meeting sounds
like fun. We can review the random password generator code
progress too. What say Ye? (Futurama Bot reference...
Hehehe)</font></p>
<div class="gmail_quote"><font face="Helvetica, Arial,
sans-serif">On Oct 20, 2013 4:53 PM, "A.J. Maurin" <<a
moz-do-not-send="true" href="mailto:coyo@darkdna.net">coyo@darkdna.net</a>>
wrote:<br type="attribution">
</font>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><font
face="Helvetica, Arial, sans-serif"> ^_^<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
I'm sad that it isn't every week, but I suppose there's a
lot more that at Dallas Makerspace than Hump Day
Mongering.<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
Yeah, people said I was insane for writing that script, a
Bash shell script IRC bot that used netcat.<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
My response was "meow." I can't believe I lost that
thumbdrive.<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
On 10/20/2013 11:30 AM, Tommy Butler wrote:<br>
</font>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><font
face="Helvetica, Arial, sans-serif"> We hold Perl
Mongers on the second Wednesday of each month, so we
will meet next on 11/13/13. It generally works out to be
somewhere around the hump day of each month ;-)<br>
</font> <font face="Helvetica, Arial, sans-serif"><br>
The IRC bot script that's being discussed sounds like
lots of fun!</font><font face="Helvetica, Arial,
sans-serif"><br>
</font></blockquote>
</blockquote>
</div>
</blockquote>
</blockquote>
</body>
</html>