Can we afford bad code on

If you have a regular look on, you will have noticed a certain newcomer around here who keeps posting uncommented Perl scripts. I don't mind a noob asking stupid questions. Heck, I don't even think that noobs can ask stupid questions. But can the Perl community afford to have really bad code on a domain named ''?

Just asking.


Yes, it can.

We want to encourage people to use Perl and talk about Perl. A "no bad code on your blog" rule would make that very difficult.

I think the ideal would be that you could provide constructive comments and alternatives if someone does post 'bad code'. Offer links to Modern Perl and Perl Best Practices even if there isn't time to look at the details maybe?

Help the noob(s) to become the next guru(s). is for the community - at all levels. 'bad code' with helpful comments makes it easier for the next noob to learn from the previous mistakes.

I think the real question we should be asking is if we can afford pictures of cute babies on What is next?!?!? Cats with poor grammer?

One of the biggest plagues on the Perl codebases of the world is the abundance of bad code, bad recommendations, and bad practices that are readily available at the top of every google search. I've seen it infect every codebase at every job I've ever had, and I bet we all have.

However, we must all recognize that the mistakes we find in one blog post are likely to be the same mistake another newcomer will want to make. Allowing and encouraging participation by everyone on this site not only helps our community grow larger and stronger, but they provide some great teachable moments!

Allowing and even encouraging newcomers to post "bad code" (or more politely, "their beginning attempts to solve problems") can be a great thing... with one gigantic caveat:


Coincidentally (or not, since i was probably reacting to the same set of posts) just this morning I sent somebody an email encouraging them to open up comments on their posts to allow others to share their experience, corrections, alternative viewpoints, warnings, etc.

So perhaps a discussion is in order about whether b.p.o should prevent authors from disabling comments? One-way communication channels have their place in the word, but do we want b.p.o to be one of those places?

@Stevan: it's all good. She's a cute future Perl programmer :)

Unless I missed it, the blogger in question hasn't said why he's posting. Maybe he's just getting started -- or found these code samples somewhere -- and would appreciate some constructive criticism. (I thought I saw comments on one of them, but maybe he's disabled them since.) There's a lot that could be said about them that'd be useful for the beginner, from security issues to style and readability. Some of my code from 15 years ago probably didn't look much different; we all have to start somewhere.

On the other hand, maybe he's posting them because he thinks they're good code others can use. In that case, criticism -- no matter how kindly done -- might discourage him and drive him away from perl; but leaving really bad code stand on a site isn't a good answer either. Maybe there doesn't have to be a "comments required" policy, but if a blogger posts bad (or potentially harmful) code and doesn't allow discussion, the site admins should reserve the option of removing his blog.

I'd suggest not to shoot anyone before he's been asked what he's doing. ;)

I sent him an email asking why his comments are disabled and what his purpose in posting is. Let's see what he says. :)

There is already tons of bad code on hosts ending in or being the biggest offender, I'm guessing).

If you are going to call out someone publicly, use his name and link to the post that offends you. Have some respect. There's a person on the other side, whether you like it or not.

I don't want to make rules for other people or what they put in their blog (most of you wouldn't make it past moderation if so). Most of everything you are ever going to read is going to be crap, even if it is "right". A lot of what anyone writes is going to be crap, even if it is "right". Get used to it. It's how it is, how it is always going to be, and will never change. The only effective response is one that doesn't ignore that reality.

If the Perl community is so fragile that we're afraid of someone posting some "bad" code, we're already fucked. But, we're not that fragile and we've survived much worse.

Hi, confuseAcat. If I understand you correctly, you’re saying that this blog should be forbidden in some way. I’m totally against that; I think there’d need to be a really good reason for us to take down someone’s blog (libel, obscenity, etc), not just “I wouldn’t have written that code”. For that matter, I don’t agree with the premise that readers expect to stand for the whole of and the community it represents. We all know what a blog is, right? Personal opinions except where otherwise indicated.

Then there’s the question of whether users should be required to enable comments. That’s not as odd a position; and certainly I agree that blogs are typically more valuable when they have comments enabled. But I don’t think it’s actually reasonable to force users to put in the necessary gardening work on their comments, if they don’t want to.

Fundamentally, as with CPAN, it all comes down to this idea: if we restrict what people can do, then we might reduce the amount of behaviour we don’t want (“I dislike your code”), but we also risk reducing the amount of behaviour we do want (“thanks for writing that great blog post!”).

That’s my view of the matter, anyway, but I’ll also note that the consensus both here and among the other admins seems to agree with me.

Mr. Confuseacat, quiet. Do not be afraid to say my name.
I deleted all my code, my bad code. I did it for passion not for work.
I love perl for its fantastic community, but you and people like you fail to understand things a blog and what a community. The comments were disabled only for a day and I had already rehabilitated. But your post will take me away from here because I do not want to deal with people who do not deserve a community as beautiful as that of perl. Instead of posting useless things you do something for this community, I take off the noise. This is my last message, I do not want to deal with people like you. Goodbye.

Two problems:

1) Bad code is in the eye of the beholder.

2) Who among us hasn't written bad code?

Well, confuseAcat, it looks like you successfully removed that terrible blight. Great work! I look forward to your detailed critiques of any code I post here in the future.

Look what we did... Oh well.

To, I hope you're not too discouraged and still doing Perl wherever you are right now. It's a fun and great language. And in fact, the community is much better now than it used to be, despite your particular experience here. Trust me.

Cats with poor grammer?
ITYM grammar. :)

Thank you all for your support. I plan to go to continue to learn perl and my posts are back online, All constructive comments are welcome. A community is made ​​to grow together.
See you on the blog! ;)

Leave a comment

About confuseAcat

user-pic Random observations that may in some way be related to Perl.