ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Everyone still feeling comfortable coding in php?

May 22, 2008 5:01am

Subscribe [9]
  • #1 / May 22, 2008 5:01am

    xwero

    4145 posts

    There is a series of love/hate articles circulating. They all come together in the blog post on Coding horror : PHP Sucks, But It Doesn’t Matter.

    I think the love/hate feelings are the strongest with people that know multiple programming languages. If you only know php i think you find the language easy to work with but you got to have encyclopedic knowledge of all it’s functions if you want to tap in the true potential of php.

    What are the thoughts about this on the CI forum?

  • #2 / May 22, 2008 5:26am

    pickledegg2

    157 posts

    I think they’ve all got too much time on their hands…

  • #3 / May 22, 2008 5:49am

    Michael Wales

    2070 posts

    If you only know php i think you find the language easy to work with but you got to have encyclopedic knowledge of all it’s functions if you want to tap in the true potential of php.

    Exactly. On the web side of things alone I know, extensively, PHP, Python, and Ruby. All of these I feel comfortable in (although I prefer PHP) but I have to refer to the documentation quite a bit. I usually know the name of the function I want, for that particular language, but can never remember the syntax (order of parameters, etc).

    I find myself way more comfortable within PHP than anything else though - it’s the language I have known the longest of the three and it’s documentation is infinitely better than the other two.

    One of the primary arguments against PHP is that large applications become “cluttered messes.” I don’t seem to have that problem and I don’t think anyone else that takes the MVC pattern to heart does either… regardless of the language.

  • #4 / May 22, 2008 1:36pm

    Symcrapico

    18 posts

    One of the primary arguments against PHP is that large applications become “cluttered messes.” I don’t seem to have that problem and I don’t think anyone else that takes the MVC pattern to heart does either… regardless of the language.

    I think that if an application becomes a “cluttered messes”, it is mainly due to the people who made it, not because of the language itself. I almost do exclusively PHP and it bothers me to see a lot “.asp’s” on many relatively large and complex websites that I’m asked to work with or rebuild.

    Can you guys show me a list of medium to big websites that uses PHP.

  • #5 / May 22, 2008 3:15pm

    smashingred

    8 posts

    I am not a programmer but I have talked to many a proggie who has pointed out the very same thing, that the quality of the app is totally dependent on the quality of coder and not language. That being said some theoretically a compiled app will run faster than an interpreted lang if all things were equal but PHP can be used with caching mechanisms, fast servers, distributed content and optimizations that will perform as well as a compiled language if done correctly. Etsy.com is a huge site and seems to have little problems and its written in PHP. Some sites can use a combination of C and PHP or Python and PHP but those people thought about the best solution for the project and scalability as well as scaling and balancing.

    As PHP matures it will become a more and more OO language and there may be performance improvements as time goes on. As an example, Twitter is written on Ruby and is bursting at the seams (this may be as a result of RoR and not Ruby but would this have happened if it was written by the same team in PHP, likely.

    As we all know PHP is easy to learn and hard to master. Well, some people know this.

  • #6 / May 22, 2008 3:38pm

    tobben

    94 posts

    I see no problems with PHP. I think the question is how one uses the tool.

    All I know is that my ASP-buddies don’t talk so loud anymore that PHP cant handle large sites, after the rise of facebook, youtube, flickr, myspace etc etc.

    Sites that handles quite well.. and I’ll bet they have hundreds of users every year!

  • #7 / May 22, 2008 3:40pm

    Tom Glover

    493 posts

    I see no problems with PHP. I think the question is how one uses the tool.

    All I know is that my ASP-buddies don’t talk so loud anymore that PHP cant handle large sites, after the rise of facebook, youtube, flickr, myspace etc etc.

    Sites that handles quite well.. and I’ll bet they have hundreds of users every year!

    Don’t you mean daily!

  • #8 / May 22, 2008 6:36pm

    Dam1an

    2385 posts

    PHP was the first programming language I learnt, and as with all languages, there are many thing i love about it, and many things I dislike/prefer the implementation in other languages.
    I think the problem with many people is onl knowing the one language, and then complaining its not working to well, such as trying to create a desktop application, it can be done, but you’d be better of with something like C or java.

    At the end of the day, its up to you to pick the language thats best for the given application, and a lot of the time, thats PHP for me.

    It reminds me of a quote (can’t remember where, but goes something like this…
    “If you pick the lancguage before the project, you’ll have to reinvent some wheels”

  • #9 / May 23, 2008 3:03am

    xwero

    4145 posts

    “If you pick the lancguage before the project, you’ll have to reinvent some wheels”

    Doesn’t

    Pick up a language for a project, then you will reinvent some wheels

    sounds better 😊

    I don’t think that is not necessarily a bad thing. If it’s a personal project it can be a good motivator. If it’s a professional project it means the development time will be longer but you will search for the easiest tools to get the job done and i think that is more important for a tool then if it’s build to near perfection. Once you get past the learning stage, years not hours or days or months, you will see the true potential of the language.

    Now that we are quoting
    “less code is more beauty”
    😉

  • #10 / May 23, 2008 4:21am

    Dam1an

    2385 posts

    Now that we are quoting
    “less code is more beauty”
    😉

    And yet a lot of these large companies measure your output based on the number of lines of code you produce, whats wrong with them?!?!?!

    Theres a whole artivle somewhere discussing this, but I can’t seemt to find it

  • #11 / May 23, 2008 9:31am

    anonymous65551

    222 posts

    I’ve known companies that pay per line of code.  It’s just not smart to do these days.  Some people can produce 50 lines of sloppy code in the same time that someone else would produce 5 well thought out lines of code that do the same thing more efficiently.  Paying per line of code just encourages bad coding habits.

    Back on topic…

    I have done programming in Basic, C, C++, Pascal, Assembly, and a few other minor languages.  I picked up PHP less than a year ago and never looked back.  They are all useful and necessary at times, but for different circumstances and environments.  I only use Basic on a programmable calculator. 

    I love PHP.  It doesn’t do everything I want (changing content on a page without a refresh), but I love the fact that I can integrate PHP, HTML, and javascript into a project and do pretty much anything and everything.  It’s awesome.  For web applications, I would not consider doing it any other way.  I love PHP, and Ajax is quickly becoming my friend.

  • #12 / May 23, 2008 10:23am

    xwero

    4145 posts

    Which company pays per line? I want to apply for a job there 😊 Maybe we should do a little test and see who can write a hello world with the most lines without undoing manipulations 😉

  • #13 / May 23, 2008 10:27am

    jacksonj04

    1 posts

    I’m comfortable with PHP (And prefer it for a lot of projects) due to its ubiquity - every server on the planet can have PHP ready to go very quickly, something I can’t say for ASP or Ruby.

    I do, however, feel the codebase is becoming increasingly kludgy due to every function imaginable finding its way in somewhere with no consistency between names, parameter order etc. but I hope this is something that PHP6 will start to correct

  • #14 / May 23, 2008 1:32pm

    Nick Husher

    364 posts

    When I first learned PHP, my position was, “It’s better than Perl, but not as good as C#.NET” In other words, good, but not great. PHP has grown a lot since the early versions, and it really shows. Debugging PHP is like doing brain surgery with fork, there’s a lot of strange transformation functions (turn this associative array into independent variables!?) that add a lot of power, but tend to obscure the program flow.

    Then I (re)learned Javascript and realized that just because a feature exists in a langauge doesn’t mean it needs to be used. Javascript is full of lots of little bad decisions that can be worked around or ignored. Just because the “with” keyword exists doesn’t mean I have to use it.

    When I got back to PHP, I realized that it’s much the same thing. PHP places much of the responsibility to write clear programs on the programmer rather than taking that responsibility upon itself. Java is an example of a langauge that tries very hard to always be at least mediocre code—it may not be compact, but a coder has to go out of his way to obfuscate things—which hurts the language, in my opinion.

    I would love to see PHP move toward a java-esque libarary include system. If not from a performance standpoint, from a sanity standpoint. It’s so much easier to debug and compartmentalize errors when you know where the error is coming from exactly with a clear stack trace.

  • #15 / May 24, 2008 1:16am

    Developer13

    574 posts

    I love PHP.  I’ll probably use PHP until every single bit of life is gone from it.

    A M$ .net guy I work with told me the other day that PHP is dead.  I really didn’t know what to say because I couldn’t fathom where he was coming from with that statement… then he asked me if I thought PHP was going to be around in 20 years.

    Jesus.  If you’re looking that far into the future for the next mainstay technology then you’re constantly going to be looking… besides, I doubt M$ is going to be around in 20 years in the capacity they are today.  I work with *what works* today.  Tomorrow?  Heck, I dunno.  I go with the flow!  Well, sort of, anyway.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases