in reply to Do good Perl practices carry over to other coding?

If your Meditation is indeed asking "should we be as concerned with following good practices with our (X?HT|X)ML markup as with our Perl code?" then I absolutely agree. We should follow good practices in anything we do. If not, at least make a note along the lines of "this HTML is messy and ad-hoc. Use at your own peril."

But if, as perrin also mentions, your Meditation is asking "should we use the 'latest HTML tricks' whenever possible?" then I might tend to disagree. Using tricks and using good common sense are completely different things. Perhaps I should have replied directly to him, but I think this is applicable to the main topic as well.

My basic point is that common sense and good practice matter, no matter what your task (unless, of course, one of the requirements of your task is to throw common sense and good practice out the window, and accomplish it by any means necessary). If you can't apply them to the thing you're doing, perhaps you should stop doing it..

  • Comment on Re: Do good Perl practices carry over to other coding?

Replies are listed 'Best First'.
Re: Re: Do good Perl practices carry over to other coding?
by bradcathey (Prior) on Jan 20, 2004 at 22:24 UTC
    I've enjoyed reading all the replies here, but revdiablo makes a couple of important distinctions.

    My original intent in this mediation falls somewhere between "should we follow good practices in whatever code we right?" and "shouldn't we be using the most up-to-date methods for HTML mark-up as we would do in Perl?". However, I never said "tricks." XHTML and CSS are not tricks, they are new standards and options for newer browsers, the myriad of incompatibilities and bugs notwithstanding (IMHO,in a perfect world, CSS would be a non-brainer). I would never suggest "the latest" over the one that makes the most sense for the application.

    I am now building sites that are table-less, for instance, but never at the expense of the design, functionality, deadline, or budget. If I can do it, and it works in the right browsers, I find CSS faster, cleaner, and easier.

    It didn't take me long after coming to PM to realize that my Perl code was terrible. And since then I have learned tons about making it better, on all counts. I feel that the monks here really push themselves as Perl coders, and to make things work. Shouldn't we push ourselves even if it's "lowly" HTML?

    Update: Added quotes to "lowly"--I don't think it's lowly, but serious coders might.

    —Brad
    "A little yeast leavens the whole dough."
      Shouldn't we push ourselves even if it's lowly HTML?

      Hmm. Your phrasing strikes a chord in me somewhere. The answer is a resounding yes. As the old adage goes, "anything worth doing is worth doing well". But what makes HTML "lowly"? Is it that it's not a programming pursuit?

      I believe that the fundamentals of good programming practice (simplicity, clarity, generality as the tpop mantra goes) have more to do with the programmer than the language they are programming in. If it's these "best practices" that you were referring to in your OP, then again, certainly they should carry over to other areas of your life (even non-programming ones). For instance, many programmers have highly organized minds that can cut right through the chaff to the heart of a problem. This ability has more to do with their general problem solving skills than with how they chose to implement a solution. (though how to implement a solution might be an interesting sub-problem)

        For instance, many programmers have highly organized minds that can cut right through the chaff to the heart of a problem.

        Which is something that drives most women crazy.

        Well maybe in a few years I'll unlearn this habit and will be able to spend some time with 'em in the chaff.

        Jenda
        Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
           -- Rick Osborne

        Edit by castaway: Closed small tag in signature

      Shouldn't we push ourselves even if it's lowly HTML?

      Absolutely. I didn't mean to imply using that clean, semantic markup and CSS for layout were "tricks." I was simply quoting perrin's reply. I agree with you completely. To me, writing good HTML is important. Using CSS when applicable is important. Tables should be used to store tabular data, not to position elements. Using tables for layout is, in my opinion, something like using map in void context: it works, and sometimes that's all that matters, but it's really not the best in terms of style.