|more useful options|
Re: Why I learn a language.by theorbtwo (Prior)
|on Feb 24, 2003 at 22:04 UTC||Need Help??|
I learnt perl because I had to get somthing done, and I thought the best way to do it was with perl, if I have to answer in one sentance.
If I don't, I'd like to tell a bit of a story. During high school, I started a compony with my best friend. We were going to do web hosting. The time came to write the scripts to do little small-account hosting as part of our web site -- that is, http://www.rtweb.net/~account/. We wanted to have easy-to-use web-based forms for the users to work with. I told him that I wasn't good enough a programmer to do it, and he got somebody else. Months later, they had a falling-out over who owned the code. I was called in to maintain it. It was written in perl. I learned the perl I needed to change the things that needed changed. A few months later, we expanded into computer sales, and needed an online store. I looked around, and the best thing to do it with seemed to be written in perl. A few months later, I had it set up how we liked it. But we needed, over time, for it to do more and more, so I learned more and more perl. We needed to do more and more with the hosting scripts, as user requests came in for more features. Eventualy, I found out that the scripts the other guy had written were absolute crap (and I don't use the term lightly). They were full of security bugs -- there was no checking of pathnames, for example. While there was code to verify if the password was correct, and it was called, the results were ignored. We had fun messing with the site of the guy who had written the code orignialy...
Anyway, now that I think back on it, though I've tried half-heartedly, I havn't learned another language since then, really. When I come across problems, I can almost always better solve them by learning more perl then by learning another language. (I've learned some Pascal, but I've never used it except when forced by the fact that the course I was taking was Pascal-based. I've learned a little Java for the same reason -- though that was really more a recollection of Java I'd learned before.)
Nowadays, whenever possible, I don't even use other languages when most people would think I'd have to -- I write Excel spreadsheet macros in Perl, by writing only the VB neccesary to call out to a worker function in perl.
(I really should learn at least C and Java better... but I'm not very good at motivating myself to do so.)
BTW, as to wanting my code to just work or to be good code, it really depends a lot on who I'm coding for, what the situation is like (if there's time pressure), and what my mood is.
Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).