php vs python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Max M

    #46
    Re: php vs python

    Jerry Stuckle skrev:
    Ivan Illarionov wrote:
    I repeat. The language has nothing to do with it. Good programmers
    write good code. Lousy programmers write bad code.
    That is simply not true!

    The languag has a lot to do with what you can do in any given time.

    You can write good code in a bad language. But it will take lot more
    time. And so it will not be done.

    Your argument, if it was true, would mean that I could just as well
    write a blog in c or even assembler, and still write optimal code.


    php is a terrible language and I cringe whenever I have to use it. In
    fact I have turned down many jobs because they were written in php. It
    is simply to frustrating.


    --

    hilsen/regards Max M, Denmark


    IT's Mad Science

    Comment

    • Ivan Illarionov

      #47
      Re: php vs python

      On Mon, 26 May 2008 10:11:22 +0200, Max M wrote:
      Jerry Stuckle skrev:
      >Ivan Illarionov wrote:
      >
      >I repeat. The language has nothing to do with it. Good programmers
      >write good code. Lousy programmers write bad code.
      >
      That is simply not true!
      >
      The languag has a lot to do with what you can do in any given time.
      >
      You can write good code in a bad language. But it will take lot more
      time. And so it will not be done.
      >
      Your argument, if it was true, would mean that I could just as well
      write a blog in c or even assembler, and still write optimal code.
      >
      >
      php is a terrible language and I cringe whenever I have to use it. In
      fact I have turned down many jobs because they were written in php. It
      is simply to frustrating.
      I want to cite Paul Graham on this topic:

      "it's all based on one unspoken assumption, and that assumption turns out
      to be false. The pointy-haired boss believes that all programming
      languages are pretty much equivalent. If that were true, he would be
      right on target. If languages are all equivalent, sure, use whatever
      language everyone else is using.

      But all languages are not equivalent, and I think I can prove this to you
      without even getting into the differences between them. If you asked the
      pointy-haired boss in 1992 what language software should be written in,
      he would have answered with as little hesitation as he does today.
      Software should be written in C++. But if languages are all equivalent,
      why should the pointy-haired boss's opinion ever change? In fact, why
      should the developers of Java have even bothered to create a new language?

      Presumably, if you create a new language, it's because you think it's
      better in some way than what people already had. And in fact, Gosling
      makes it clear in the first Java white paper that Java was designed to
      fix some problems with C++. So there you have it: languages are not all
      equivalent. If you follow the trail through the pointy-haired boss's
      brain to Java and then back through Java's history to its origins, you
      end up holding an idea that contradicts the assumption you started with.

      So, who's right? James Gosling, or the pointy-haired boss? Not
      surprisingly, Gosling is right. Some languages are better, for certain
      problems, than others. And you know, that raises some interesting
      questions. Java was designed to be better, for certain problems, than C+
      +. What problems? When is Java better and when is C++? Are there
      situations where other languages are better than either of them?"
      and so on at


      I tend to share PG's opinions on the subject (though I think that Python
      is superior to Lisp :-).

      The argument that "the language has nothing to do with it" is an old
      pointy-haired boss argument. I doubt that a person who think this way can
      be a really good programmer.

      Ivan

      Comment

      • Michael Fesser

        #48
        Re: php vs python

        ..oO(Ivan Illarionov)
        >On Sun, 25 May 2008 17:09:43 -0400, Jerry Stuckle wrote:
        >Not at all. I do it every day.
        >>
        >And BTW - yes, I write Python, also. But I find I can write better,
        >faster code in PHP.
        >
        >I find I can write better code in Python. Maybe it's just a matter of
        >personal preference?
        Exactly.
        >Do you write PHP?
        >I did. And I hated it very much.
        See, for me it's the other way round. I really hate Python syntax.
        I only touch it for scripting Paint Shop Pro or if some third-party
        Python script lacks proper documentation and I have to wade through
        the sources to find the informations I need.

        So where does this leave us? Nowhere. A language is just a tool and a
        tool is just as good as the one who uses it. This was said often enough.

        If you hate PHP, that's OK, but it doesn't make PHP a bad or even
        inferior language.

        Micha

        Comment

        • Curtis

          #49
          Re: php vs python

          Paul Rubin wrote:
          notbob <notbob@nothome .comwrites:
          >Well, that's my actual question, then. Is php really so bad I'm just
          >wasting my time? Or is it really the quickest way to blog functionality?
          >
          php is very easy to get started with and some big sites have been
          written in it. There is lots of low cost php hosting available. It
          is not as good a language as Python. However, Python's advantages are
          strongest in more complex projects. For simple stuff, php is frankly
          less hassle just because of its wide deployment and that extensive
          function library that the blog post your quoted described as a bad
          thing. Python's libraries are not bad, but php's are more intensely
          focused on web apps and includes what you need as part of the standard
          build. With Python, if you want a database adapter or web template
          framework, you have to choose between a bunch of different ones and
          download and configure it which often involves head scratching when
          the auto-install stuff hits some quirk of your system. With php, it's
          all right there when you flip the switch.
          >
          Knowing lots of languages is good for you. php is probably your
          quickest route to getting a rudimentary web app running. Python
          is a longer term project. Do both.
          PHP is more than capable for handling large projects, not just small
          scripting jobs. However, Paul's right about PHP being more driven
          toward web development, where as Python may be better for different
          types of apps.

          Even then, I think your first reply was best, it just comes down to
          what you have more fun writing. Both languages are equally capable of
          getting the job done.

          --
          Curtis

          Comment

          • Jerry Stuckle

            #50
            Re: php vs python

            Curtis wrote:
            Paul Rubin wrote:
            >notbob <notbob@nothome .comwrites:
            >>Well, that's my actual question, then. Is php really so bad I'm just
            >>wasting my time? Or is it really the quickest way to blog
            >>functionality ?
            >>
            >php is very easy to get started with and some big sites have been
            >written in it. There is lots of low cost php hosting available. It
            >is not as good a language as Python. However, Python's advantages are
            >strongest in more complex projects. For simple stuff, php is frankly
            >less hassle just because of its wide deployment and that extensive
            >function library that the blog post your quoted described as a bad
            >thing. Python's libraries are not bad, but php's are more intensely
            >focused on web apps and includes what you need as part of the standard
            >build. With Python, if you want a database adapter or web template
            >framework, you have to choose between a bunch of different ones and
            >download and configure it which often involves head scratching when
            >the auto-install stuff hits some quirk of your system. With php, it's
            >all right there when you flip the switch.
            >>
            >Knowing lots of languages is good for you. php is probably your
            >quickest route to getting a rudimentary web app running. Python
            >is a longer term project. Do both.
            >
            PHP is more than capable for handling large projects, not just small
            scripting jobs. However, Paul's right about PHP being more driven toward
            web development, where as Python may be better for different types of apps.
            >
            Even then, I think your first reply was best, it just comes down to what
            you have more fun writing. Both languages are equally capable of getting
            the job done.
            >
            --
            Curtis
            Not true. PHP is quite capable of writing large, non-web based
            projects. While it's non-browser based display capabilities are
            somewhat lacking (although there are third party libraries which help a
            lot), I've written some pretty complicated batch scripts in the past.

            --
            =============== ===
            Remove the "x" from my email address
            Jerry Stuckle
            JDS Computer Training Corp.
            jstucklex@attgl obal.net
            =============== ===

            Comment

            • Curtis

              #51
              Re: php vs python

              I V wrote:
              On Sun, 25 May 2008 21:41:09 -0400, Jerry Stuckle wrote:
              >The the good programmers are able to adapt to the language and make the
              >most of whatever language they're using. The result is good code. OTOH,
              >poor programmers I have known have found all kinds of excuses - from the
              >language itself to lack of requirements, to anything else they can
              >blame, except the real root of the problem.
              >
              That's true - but I wonder if there might not be differences at the
              margins. Some languages (and, which is not quite the same but not easy to
              fully distinguish either, the communities around some languages) may
              encourage mediocre programmers to produce slightly more or less mediocre
              programs.
              >
              Some features of Python (the one that really stands out for me is not
              default-initializing variables on first use; the comparatively clean
              standard library might be another), and some features of the Python
              community (which, IME, has more members more explicitly committed to
              writing clean code) I think do make Python a better environment for us
              mediocre programmers.
              If you set PHP to show notices, it will tell you of such cases.
              However, the way I learned good programming practice was talking with
              other programmers, and trying different languages. I think if you have
              a real desire to write good code, and work at it, you can accomplish
              your task, regardless of the language.

              However, there is definitely a prevalent amount of poorly written PHP
              on the Web, so it can be easy for a newcomer to pick up some bad
              practices. This isn't a fault of the design of the language, though.
              But maybe I'm wrong - I've never been paid to write Python programs,
              whereas I have been paid to write PHP, so I might just be projecting my
              frustrations with work onto the language. I've also not used PHP5 much in
              anger, which does look to be a lot nicer than earlier versions.
              Yeah, PHP5 is awesome, and PHP4 is dead/dying.

              --
              Curtis

              Comment

              • Curtis

                #52
                Re: php vs python

                Jerry Stuckle wrote:
                Curtis wrote:
                >Paul Rubin wrote:
                >>notbob <notbob@nothome .comwrites:
                >>>Well, that's my actual question, then. Is php really so bad I'm just
                >>>wasting my time? Or is it really the quickest way to blog
                >>>functionalit y?
                >>>
                >>php is very easy to get started with and some big sites have been
                >>written in it. There is lots of low cost php hosting available. It
                >>is not as good a language as Python. However, Python's advantages are
                >>strongest in more complex projects. For simple stuff, php is frankly
                >>less hassle just because of its wide deployment and that extensive
                >>function library that the blog post your quoted described as a bad
                >>thing. Python's libraries are not bad, but php's are more intensely
                >>focused on web apps and includes what you need as part of the standard
                >>build. With Python, if you want a database adapter or web template
                >>framework, you have to choose between a bunch of different ones and
                >>download and configure it which often involves head scratching when
                >>the auto-install stuff hits some quirk of your system. With php, it's
                >>all right there when you flip the switch.
                >>>
                >>Knowing lots of languages is good for you. php is probably your
                >>quickest route to getting a rudimentary web app running. Python
                >>is a longer term project. Do both.
                >>
                >PHP is more than capable for handling large projects, not just small
                >scripting jobs. However, Paul's right about PHP being more driven
                >toward web development, where as Python may be better for different
                >types of apps.
                >>
                >Even then, I think your first reply was best, it just comes down to
                >what you have more fun writing. Both languages are equally capable of
                >getting the job done.
                >>
                >--
                >Curtis
                >
                Not true. PHP is quite capable of writing large, non-web based
                projects. While it's non-browser based display capabilities are
                somewhat lacking (although there are third party libraries which help a
                lot), I've written some pretty complicated batch scripts in the past.
                >
                Yeah, I see I may have spoken too soon. When I think about it, the PHP
                extensions available do cover a lot of ground. I've played around with
                php-gtk in the past, but nothing major.

                To clarify: what I meant to say is that php is especially well suited
                for web development, I didn't mean that it wasn't capable of doing
                non-web based development.

                --
                Curtis

                Comment

                • AnrDaemon

                  #53
                  Re: php vs python

                  Greetings, Ivan Illarionov.
                  In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                  >As I've said before - good programmers can write good code in any
                  >language.
                  Yes, they can. But it may be harder to do for them in one language and
                  easier in another.
                  It's obvious lie. If you have clear mind and you know language you're using,
                  there are absolutely NOTHING can deny you to write clear code.
                  Even using forth postfix notation, I have no problem writing good code, it's
                  as easy as writing bad code. And yes, I do see the difference.


                  --
                  Sincerely Yours, AnrDaemon <anrdaemon@free mail.ru>

                  Comment

                  • Ivan Illarionov

                    #54
                    Re: php vs python

                    On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                    Greetings, Ivan Illarionov.
                    In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                    >
                    >>As I've said before - good programmers can write good code in any
                    >>language.
                    >
                    >Yes, they can. But it may be harder to do for them in one language and
                    >easier in another.
                    >
                    It's obvious lie. If you have clear mind and you know language you're
                    using, there are absolutely NOTHING can deny you to write clear code.
                    Even using forth postfix notation, I have no problem writing good code,
                    it's as easy as writing bad code. And yes, I do see the difference.
                    No. Language does matter.

                    Comment

                    • Ivan Illarionov

                      #55
                      Re: php vs python

                      On Wed, 28 May 2008 01:32:24 +0000, Ivan Illarionov wrote:
                      On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                      >
                      >Greetings, Ivan Illarionov.
                      >In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                      >>
                      >>>As I've said before - good programmers can write good code in any
                      >>>language.
                      >>
                      >>Yes, they can. But it may be harder to do for them in one language and
                      >>easier in another.
                      >>
                      >It's obvious lie. If you have clear mind and you know language you're
                      >using, there are absolutely NOTHING can deny you to write clear code.
                      >Even using forth postfix notation, I have no problem writing good code,
                      >it's as easy as writing bad code. And yes, I do see the difference.
                      >
                      No. Language does matter.
                      I want to add
                      TROLL WARNING:
                      this message is cross-posted between comp.lang.pytho n and comp.lang.php
                      Let's stop.

                      Comment

                      • Jerry Stuckle

                        #56
                        Re: php vs python

                        Ivan Illarionov wrote:
                        On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                        >
                        >Greetings, Ivan Illarionov.
                        >In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                        >>
                        >>>As I've said before - good programmers can write good code in any
                        >>>language.
                        >>Yes, they can. But it may be harder to do for them in one language and
                        >>easier in another.
                        >It's obvious lie. If you have clear mind and you know language you're
                        >using, there are absolutely NOTHING can deny you to write clear code.
                        >Even using forth postfix notation, I have no problem writing good code,
                        >it's as easy as writing bad code. And yes, I do see the difference.
                        >
                        No. Language does matter.
                        Not for a good programmer. Only for half-assed ones.

                        --
                        =============== ===
                        Remove the "x" from my email address
                        Jerry Stuckle
                        JDS Computer Training Corp.
                        jstucklex@attgl obal.net
                        =============== ===

                        Comment

                        • Ivan Illarionov

                          #57
                          Re: php vs python

                          On Tue, 27 May 2008 21:47:55 -0400, Jerry Stuckle wrote:
                          Ivan Illarionov wrote:
                          >On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                          >>
                          >>Greetings, Ivan Illarionov.
                          >>In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                          >>>
                          >>>>As I've said before - good programmers can write good code in any
                          >>>>language.
                          >>>Yes, they can. But it may be harder to do for them in one language
                          >>>and easier in another.
                          >>It's obvious lie. If you have clear mind and you know language you're
                          >>using, there are absolutely NOTHING can deny you to write clear code.
                          >>Even using forth postfix notation, I have no problem writing good
                          >>code, it's as easy as writing bad code. And yes, I do see the
                          >>difference.
                          >>
                          >No. Language does matter.
                          >
                          Not for a good programmer. Only for half-assed ones.
                          No. Language does matter

                          Comment

                          • Jerry Stuckle

                            #58
                            Re: php vs python

                            Ivan Illarionov wrote:
                            On Tue, 27 May 2008 21:47:55 -0400, Jerry Stuckle wrote:
                            >
                            >Ivan Illarionov wrote:
                            >>On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                            >>>
                            >>>Greetings, Ivan Illarionov.
                            >>>In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                            >>>>
                            >>>>>As I've said before - good programmers can write good code in any
                            >>>>>language .
                            >>>>Yes, they can. But it may be harder to do for them in one language
                            >>>>and easier in another.
                            >>>It's obvious lie. If you have clear mind and you know language you're
                            >>>using, there are absolutely NOTHING can deny you to write clear code.
                            >>>Even using forth postfix notation, I have no problem writing good
                            >>>code, it's as easy as writing bad code. And yes, I do see the
                            >>>difference .
                            >>No. Language does matter.
                            >Not for a good programmer. Only for half-assed ones.
                            >
                            No. Language does matter
                            Only to half-assed programmers. Good programmers can write good code in
                            any language they know.

                            Ever seen good assembler? It can be done - really! Also fortran,
                            cobol, forth... the list goes on.


                            --
                            =============== ===
                            Remove the "x" from my email address
                            Jerry Stuckle
                            JDS Computer Training Corp.
                            jstucklex@attgl obal.net
                            =============== ===

                            Comment

                            • Ivan Illarionov

                              #59
                              Re: php vs python

                              On Tue, 27 May 2008 22:27:40 -0400, Jerry Stuckle wrote:
                              Ivan Illarionov wrote:
                              >On Tue, 27 May 2008 21:47:55 -0400, Jerry Stuckle wrote:
                              >>
                              >>Ivan Illarionov wrote:
                              >>>On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                              >>>>
                              >>>>Greetings , Ivan Illarionov.
                              >>>>In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                              >>>>>
                              >>>>>>As I've said before - good programmers can write good code in any
                              >>>>>>languag e.
                              >>>>>Yes, they can. But it may be harder to do for them in one language
                              >>>>>and easier in another.
                              >>>>It's obvious lie. If you have clear mind and you know language
                              >>>>you're using, there are absolutely NOTHING can deny you to write
                              >>>>clear code. Even using forth postfix notation, I have no problem
                              >>>>writing good code, it's as easy as writing bad code. And yes, I do
                              >>>>see the difference.
                              >>>No. Language does matter.
                              >>Not for a good programmer. Only for half-assed ones.
                              >>
                              >No. Language does matter
                              >
                              Only to half-assed programmers. Good programmers can write good code in
                              any language they know.
                              >
                              Ever seen good assembler? It can be done - really! Also fortran,
                              cobol, forth... the list goes on.
                              Yeah,
                              mov eax, Jerry
                              mov killfile, eax

                              Comment

                              • Jerry Stuckle

                                #60
                                Re: php vs python

                                Ivan Illarionov wrote:
                                On Tue, 27 May 2008 22:27:40 -0400, Jerry Stuckle wrote:
                                >
                                >Ivan Illarionov wrote:
                                >>On Tue, 27 May 2008 21:47:55 -0400, Jerry Stuckle wrote:
                                >>>
                                >>>Ivan Illarionov wrote:
                                >>>>On Wed, 28 May 2008 05:10:20 +0400, AnrDaemon wrote:
                                >>>>>
                                >>>>>Greeting s, Ivan Illarionov.
                                >>>>>In reply to Your message dated Monday, May 26, 2008, 04:47:00,
                                >>>>>>
                                >>>>>>>As I've said before - good programmers can write good code in any
                                >>>>>>>language .
                                >>>>>>Yes, they can. But it may be harder to do for them in one language
                                >>>>>>and easier in another.
                                >>>>>It's obvious lie. If you have clear mind and you know language
                                >>>>>you're using, there are absolutely NOTHING can deny you to write
                                >>>>>clear code. Even using forth postfix notation, I have no problem
                                >>>>>writing good code, it's as easy as writing bad code. And yes, I do
                                >>>>>see the difference.
                                >>>>No. Language does matter.
                                >>>Not for a good programmer. Only for half-assed ones.
                                >>No. Language does matter
                                >Only to half-assed programmers. Good programmers can write good code in
                                >any language they know.
                                >>
                                >Ever seen good assembler? It can be done - really! Also fortran,
                                >cobol, forth... the list goes on.
                                >
                                Yeah,
                                mov eax, Jerry
                                mov killfile, eax
                                Stoopid troll. But we already know you can't write good code. No
                                surprise there.

                                --
                                =============== ===
                                Remove the "x" from my email address
                                Jerry Stuckle
                                JDS Computer Training Corp.
                                jstucklex@attgl obal.net
                                =============== ===

                                Comment

                                Working...