Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Tab users like to tout that it allows you to use whatever indentation level you like when in reality you just wind up with mixed up tabs and spaces.

    I’ve been programming with tabs for indentation and spaces for alignment for the better part of a decade.

    I’ve never had a single problem keeping things straight in my own code.

    • I've never had a single problem keeping things straight in my own code.

      Its your code and your style, of course it makes sense to you! You could write in rot13'd Swahili and it would still make sense, but only to you.

      Here is the best advice I can give about writing maintainable code: It's not about you. It's about everyone else. Each personal style quirk that others have to puzzle out or adjust to or in any way hampers and frustrates their ability to quickly skim and patch your code loses you patches. T

      • You could write in rot13’d Swahili and it would still make sense

        Oh please. Your argument might hold water if you weren’t talking to someone who is about 17× more obsessed with clarity than the average programmer – and has gotten the compliments to prove that it makes sense to others. (I hate boasting, but for the sake of this argument I need to point out the evidence that it’s not just in my head.)

        It’s not about you. It’s about everyone else.

        When in Rome, I do as t

        • Oh please. Your argument might hold water if you weren’t talking to someone who is about 17× more obsessed with clarity than the average programmer – and has gotten the compliments to prove that it makes sense to others. (I hate boasting, but for the sake of this argument I need to point out the evidence that it’s not just in my head.)

          Don't get so excited, I do silly things too.

          Unfortunately, this is an ad hominem argument essentially saying that because one does A, B and C good things that D must be good as well. While it may improve the probability that D will be a good thing, it does not itself constitute a valid argument. It would be just as wrong of me to try and defend a bad test by pointing at my years of testing experience.

          When the code is mine, I equally expect others to adhere to the style I use.

          Herein lies the problem. While it is good as a contributor to follow the project style and avoid clashing with the rest of the contributors, it is not good as a project to use an odd style. Why? Consider the worst case where each contributor works on N projects. If N projects each have their own style each contributor must learn N styles. They have to rejigger their editor and their brain when switching projects. This, simply put, is drag on the contributors.

          Worse, if your style is in the minority then few contributors will be comfortable with it adding yet more drag. Each new contributor has a higher probability of never having encountered this style before, and it doesn't take much annoyances for a new contributor to decide it's not worth it.

          This doesn't even get into which style is "better". It trumps it, doesn't even let it get started. The coordination concerns are so much more important than any possible benefit either the tab or the whitespace indentation camps could put forward. That's something good project managers learn quickly.

          Consider this. Let's say I finally got around to being comfortable with the Colemak [colemak.com] keyboard layout. Now let's say I want to pair program with others using my machine. Do I leave the keyboard in Colemak? Will this help getting work done with my pair? Will people be more likely to pair with me if I do? No. Even if Colemak is clearly better than QWERTY, it's still awkward and annoying for everyone but me.

          • If N projects each have their own style each contributor must learn N styles.

            Ah, the Python school of thought. I like Perl better.

            • [Hmm, is invoking Python the Perl variation on Godwin's Law?]

              Although the Perl Slogan is There's More Than One Way to Do It, I hesitate
              to make 10 ways to do something. :-)
                              --Larry Wall in

              There is merit in the Python view on style. Like anything else, the key is knowing when to apply a rule and when not to. You don't want to over do it and pave the community flat. You don't want to under do it and wind up with style Balkanization. I think it's perfe