5 ms·
"If you are writing a script that is more than 100 lines long, you should probably be writing it in Perl instead." This is true, especially of Python scripts.
by HocusLocus 7y ago
"If you are writing a script that is more than 100 lines long, you should probably be writing it in Perl instead."
This is true, especially of Python scripts.
- RHSeeger 7y agoThat way, it will never be rewritten again; because nobody will be able to read it. Edit: Getting some downvotes, so to clarify, I am indeed saying that concerting something from Python to Perl has a high likelihood of making it for less maintainable. I get that people can write good perl. As someone who has had to maintain perl in the past; the fact is that it's far more common for the end result to be horrible perl. I have some issues with Python, but it is FAR more maintainable than perl.
- bsder 7y agoLet me drag this to something concrete: if you are interviewing, it is almost impossible to pass an amateur "Perl screen". Every single person who doesn't use Perl every day, professionally knows a different subset of Perl. This is one of the few times where being more knowledgeable than the interviewer is also a problem. You will write something, and the interviewer will question you on it because he has never seen it. I finally solved this problem by bringing one of my personal programs written in Perl and also rewritten in Python so we could talk about it. Now, the interviewer is in MY subset of Perl AND can't argue because I have working Perl code in front of him. This was back in the 1990's when everybody in VLSI design expected you to know Perl. Because of this "different subset" issue, if you want to maintain a Perl script, you have to basically know the entire language. This is what makes maintaining Perl scripts so difficult. This "different subset" problem is the whole reason I left the Perl ecosystem back in 1996(!) at the height of Perl's popularity and never looked back.
- cosmojg 7y agoAs an experienced Perl programmer, what's your opinion of Raku? Is it a worthwhile replacement or too little too late?
- redis_mlc 7y ago> As an experienced Perl programmer, what's your opinion of Raku? Perl5 still works fine, and is maintained. > Is it a worthwhile replacement or too little too late? False dichotomy - see above.
- DonHopkins 7y agoIt's been too little too late for many years, while it was still named Perl 5 for so long.
- frank2 7y agoRaku is the new name for Perl 6, not Perl 5.
- asveikau 7y ago> This is one of the few times where being more knowledgeable than the interviewer is also a problem I have actually found that is pretty much always a problem. If you pull out something the interviewer is unfamiliar with they will often assume you are full of it. I have had such people refuse perfectly good explanations for things they haven't heard of because they assume incompetence before that possibility.
- laumars 7y agoThat's a sign of a bad interviewer and thus also an indicator of potential bad management. I'd take those experiences as a blessing rather than a curse.
- cookiecaper 7y agoIndeed. I've "failed" interview screens because the reviewer's Python installation was broken, and rather than reading the traceback and realizing this, they just assumed the candidate's code was broken. Last I knew, that position was still open almost a year after the fact.
- arbie 7y ago> back in the 1990's ... everybody in VLSI design expected you to know Perl. Has this changed at all?
- bsder 7y agoDunno. I finally left VLSI design because it was effectively a career dead end. Sense a trend? :) While I still regard myself as a vastly better VLSI designer than programmer, my ability to wrangle software the whole way from assembly language on a chip to just shy of the top of a full web stack pays far better than my ability to wrangle transistors. And, in my opinion, attacks far more interesting problems.