Follow Slashdot stories on Twitter


Forgot your password?

Why the Light Has Gone Out on LAMP 443

menion writes to tell us that Cliff Wells has an editorial calling into focus some of the perceived problems with LAMP. Wells calls PHP and MySQL this generation's BASIC citing the Free Online Dictionary of Computing: "BASIC has become the leading cause of brain-damage in proto-hackers. This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously. A novice can write short BASIC programs (on the order of 10-20 lines) very easily; writing anything longer is (a) very painful, and (b) encourages bad habits that will make it harder to use more powerful languages well. This wouldn't be so bad if historical accidents hadn't made BASIC so common on low-end micros. As it is, it ruins thousands of potential wizards a year."
This discussion has been archived. No new comments can be posted.

Why the Light Has Gone Out on LAMP

Comments Filter:
  • It's just a tool (Score:5, Insightful)

    by cerberusss ( 660701 ) on Tuesday June 06, 2006 @06:00AM (#15478318) Homepage Journal
    It's just a tool, for crying out loud. This article says something about PHP, but we have electronic engineers here using Perl. You want to see their scripts? The code looks like baby poo. But who cares? It's just a tool. And it works. Perl suddenly sucks then?

    Of course, the "wizards" will recognize a tool its deficiencies and start using something more appropriate.

    • by mwvdlee ( 775178 ) on Tuesday June 06, 2006 @06:24AM (#15478403) Homepage
      I totally agree; those are just tools, and one should use them for the purpose for which they were created.

      If you want high-performance access to single DB tables (which many webapps do), use MySQL.
      If you want to quickly put together a site because your purpose isn't actually maintaining the site but putting up some content, use PHP.
      If all you want to do is create a simple program to do a one-off task, use BASIC.
      If you want to create a straightforward GUI for a database, use Delphi.

      If you want to do something different, use a different tool. Don't bitch about a screwdriver being a bad tool for painting the walls.
      • by billcopc ( 196330 )
        You lost all credibility in my eyes with that last zinger about Delphi. Delphi six years ago was just another VB, yes. Delphi today is downright scary in its breadth and performance. I haven't written a Delphi app in over a year now but I still swear by it. C++ needs to be taken down a notch or two.. sure it works, as long as you buy all the utilities to fix it :P BoundsChecker, Lint, Purify.. one isn't enough, usually. It's like MS Windows - it works once you throw in Ad-Aware, Spybot, WinRar etc.

        • by mwvdlee ( 775178 ) on Tuesday June 06, 2006 @07:45AM (#15478696) Homepage
          Considering the common wisdom that you'll spend far more time maintaining than developing, a fast development cycle is meaningless.
          • by Angostura ( 703910 ) on Tuesday June 06, 2006 @08:39AM (#15478919)
            Considering the common wisdom that the paying client wants the site ready tomorrow, the cost of the maintenance is something they can start worrying about after they've paid you.
            • by Spacejock ( 727523 ) on Tuesday June 06, 2006 @11:46AM (#15480327) Homepage
              Absolutely. They want something that works NOW and which can improve over time. So what if it takes fifteen keystrokes to find a settings form or the tab order is up the chute? Better than endless promises of a killer app which will be ready Any Day Now, which either never arrives or sucks when it DOES arrive.
              I learnt that lesson as a teenager in the early 80's, thanks to over-hyped computer games which truly sucked when they finally (if ever) arrived. Other speccy users will know exactly which titles I'm referring to.
      • by martinultima ( 832468 ) <> on Tuesday June 06, 2006 @08:21AM (#15478856) Homepage Journal
        Hey, it only took me about ten months of practice before I could paint without scratching up the walls – I say a screwdriver's just fine!
      • Re:It's just a tool (Score:5, Interesting)

        by Ronin Developer ( 67677 ) on Tuesday June 06, 2006 @11:19AM (#15480107)
        "If you want to create a straightforward GUI for a database, use Delphi."

        That's a rather limited view on a very powerful tool. But, your statement is accurate as your final sentence indicates.

        As a software engineer, I speak a variety of programming languages rather fluently. In the 90's, the choice in the business community was clear - C++ or Visual Basic. Then, a new tool came along and challenged that view - Delphi.

        I have been now been programming in Delphi as my primary language since version 1.0 was released. Delphi was not the name of the language - Delphi was and IDE coupled with their version of an O-O PASCAL. While the language syntax is based on PASCAL (hence structured and somewhat verbose), it provided a tremendous amount of power and reliability."Mission Critical" applications became possible because of Dephi's exception handling constructs. I wrote applications in D1-D3 that simply would not break (try that with VB) - Windows (3.1,95/98 were the limitations). It provided excellent database connectivity, exception handling, RTTI, an extensible IDE and, more importantly, an excellent component model that ultimately became the basis for Jave Beans. That same component model provided opportunities for many 3rd party vendors to become successful.

        Borland did have the right idea when they created Kylix for Linux - essentially Delphi for Linux. However, they blew the marking and pissed off the OSS developers. But, it is what it is. I would have loved to see them utilize GCC as the backend - oh well.

        What do I use Delphi for today? I create mission critical services for the public safety sector. They integrate our company's core product (also written in Delphi) with systems and devices utilized by law enforcement. Our clients, as a general rule, are Windows shops - hence we chose the best tool for that environment. That tool was Delphi combined with some of the powerful 3rd party tools out there (like advanced NT service frameworks, Oracle connectivity tools, and TCP/IP and middle-ware technologies).

        Delphi has evolved to the .Net environment as well (although I don't utilize that functionality). However, in an world where .NET is pervasive, being able to leverage code and components written in Delphi for .NET with out .NET tools is an good thing.

        Borland has had their uphill battles to fight - they weren't Microsoft and they irked the OSS/Linux community through bad marketing decisions. Too bad.

        Is Delphi the best language or tool out there? Probably not - but it is far more capable than most developers have given it credit for. And, I will miss it and the Borland influence when Borland finally sells off their IDE line.

        Well, that's my $0.02 worth.



    • we have electronic engineers here using Perl. You want to see their scripts? The code looks like baby poo
      Don't worry, once they grow up a bit they'll be able to make one liners.
    • by nlago ( 187984 ) on Tuesday June 06, 2006 @08:39AM (#15478925)
      Perl suddenly sucks then?

      Not "suddenly", you know... ;-)

    • by hey! ( 33014 )
      It's just a tool, for crying out loud. This article says something about PHP, but we have electronic engineers here using Perl. You want to see their scripts? The code looks like baby poo. But who cares? It's just a tool.

      Well, true.

      But we live in a world where people don't seem to be very good at making distinctions. As, for example, in the difference between a screwdriver and a chisel.

      Part of this is the fault of salesman, who want you to buy their product as the one true tool for everything, and part of t
  • Unfinished rant (Score:3, Interesting)

    by Tx ( 96709 ) on Tuesday June 06, 2006 @06:07AM (#15478337) Journal
    at least 3/4 of the so-called LAMP (Linux, Apache, MySQL, PHP) stack are under vigorous attack by many, myself included. Why?

    Notice the guy says 3/4 here. Notice how he then goes on to criticise only MySQL and PHP. So what was the third item he was going to criticise, Apache or Linux (either would seem strange)? Seems to me he hasn't even finished his own rant.

    This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously.

    Well, I'm a great fan of Delphi-style object-pascal, maybe using it has brain-damaged me, or maybe it doesn't bear too much resemblance to original pascal, I don't know. Then again, my first exposure to any sort of programming was BASIC on the ZX81, so maybe I'm a lost cause :(.
    • Re:Unfinished rant (Score:2, Insightful)

      by mdfst13 ( 664665 )
      "So what was the third item he was going to criticise, Apache or Linux"

      He says that he doesn't like Apache either. Just not as much as he dislikes PHP/MySQL.
    • Re:Unfinished rant (Score:2, Insightful)

      by Haeleth ( 414428 )
      Well, I'm a great fan of Delphi-style object-pascal, maybe using it has brain-damaged me, or maybe it doesn't bear too much resemblance to original pascal, I don't know.

      The latter, I suspect. The original Pascal had some mind-numbingly dumb "features", like fixed-length strings.

      No, I don't mean just fixed-length buffers like bad C. I mean fixed-length strings. If you wanted to store a five-character string in a variable declared as a 10-character string, you had to pad it out manually with spaces.

  • by drspliff ( 652992 ) on Tuesday June 06, 2006 @06:08AM (#15478342)
    Ahah, to an extent I agree with this.

    On a day to day basis I'm dealing with systems written by other people, which are held together by duct tape, spit and good-will. PHP is a productive language, just as to a C/C++ developer Python/Ruby etc. is also productive and can lead to very good results.

    The problem is when you get pseudo-programmers writing code which uses 'magic_quotes_gpc' as a safety net among other things, and come PHP 6 the 'shit will hit the fan' when everybody realises that with this automatic escaping functionality isn't there any more and their web applications are open for the world to abuse.

    I think MySQL should be kept out of the question as it's more coincidence that it ended up being a PHP bed fellow, when PostgreSQL could've been in with a chance given the right circumstances.

    At the end of the day bad programmers will write bad code, it's just easy to learn languages (such as Basic and PHP) means they can write more bad code a lot quicker with (arguably) more negative impact when it folds in on it'self.

    Just my $0.02.
    • by SolitaryMan ( 538416 ) on Tuesday June 06, 2006 @06:47AM (#15478468) Homepage Journal
      At the end of the day bad programmers will write bad code, it's just easy to learn languages (such as Basic and PHP) means they can write more bad code a lot quicker with (arguably) more negative impact when it folds in on it'self.
      The real problem is that those easy-to-learn-but-crappy languages got expanded. If they were still small and allowed bad programmers (read: non-programmer) to write some simple apps, I wouldn't mind and I would've hailed their developers. But now these languages are getting bigger and bigger, causing bigger and bigger problems.
      • by tbannist ( 230135 ) on Tuesday June 06, 2006 @09:36AM (#15479280)
        Personally, I prefer that the bad codes of the world work on a language that's easy to read and isn't compiled. Fixing their garbage in C was a huge pain in the ass. The article's author however is a complete and utter tool. He hates a language because he despises the people who use. Wow, how levelhead and informed.

        I understand his point that it's easy to write bad code for PHP. However, only a total idiot would think that it's not easy to write bad code for any language. By all means, let's move all the pseudo pogrammers over to his beloved Python, then he'll have to hate it and find something else to love.

        At the most basic point his argument fails because it's not motivated by logic or reason, but by visceral emotional prejudice. Guess what, nobody should care how you feel about PHP or MySQL.
        • PHP ain't "easy to read" by any stretch of the imagination. Thousands of functions in the core, a retarded sort of type system apparently inspired by Visual Basic which provides no clues as to what type you're actually working with, and wonderful action-at-a-distance-y "references" that really aren't? That's not so good. Complain all you like about Perl (I know you will) -- but it's possible to write clean, maintainable Perl code for any task if you're so inspired. Easy things easy, hard things possible, an
        • Some colleges are replacing BASIC with Python as the beginner's programming language.

          The workforce will have plenty of bad Python code-monkeys before you know it.
    • One thing you can do is set error reporting to full in a .htaccess and then take a look at your site. It will bitch about calling strange variables, missing quotes, assumptions you have made, reliance on bad features and quite a bit more.
    • PostgreSQL could've been in with a chance given the right circumstances.

      That's unlikely, since LAPP is such a crappy acronym.

    • it'self.

      Perhaps someone should invent magic_apostrophe_gpc.
    • by /ASCII ( 86998 ) on Tuesday June 06, 2006 @07:44AM (#15478690) Homepage
      Exactly. The main problem is that incompetent programmers are producing horrible code. Some of the choices made by PHP (magic quotes, no database abstraction, register globals) make it too easy to take the wrong shortcuts, meaning that to some _small_ degree, PHP does encourage bad coding practices. But belive me, if all the PHP coders of the world where using Rails, the incompetent programmers would quickly find various ways to break and abuse Ruby as well. The first thing that would happen is that they would _completely_ ignore the MVC-model. They would _only_ put code into the rhtml template files and ignore the rest of the tree. In the end, it would only be a small improvement over PHP.

      PHP is a rather boring C-like language, with some semi-serious issues w.r.t. library consistency (compare the call signatures of the various sleep functions), backwards compatibility (PHP3 uses [] for string access, PHP5 uses {}, PHP6 will use [] again...) and possibilities to shoot yourself in the foot (Magic quotes, safe mode, etc.). It is by no means perfect, but I really don't think comparing it to BASIC is fair. Not only does PHP force you to use functions instead of gotos (thogh a special goto-like syntax will probably be added in PHP6), PHP also has a mostly sane Object model, complete with a sane reflection interface, inheritance and everything.

      And don't even get me started on MySQL. People talk about ACID, transactions and other high level concepts, but real-world PHP-programmers don't even use joins or subselects. Look at the big, famous open source PHP projects like Joomla and various Forum software. You'll find that the coders generally do multiple selects instead of a single join. They even write loops where they do two or three selects per lap in the loop where a single joined query would be enough. This isn't mysql's fault, mysql has supported joins for a s long as I've used it. This is purely a case of incompetent coders.

      So in the end, the tools that are most popular get the blame for the fact that people don't know how to use them. *meh*
    • PostgreSQL could've been in with a chance given the right circumstances.

      PostgreSQL lost out because while MySQL was becoming popular, postgres was difficult to install, difficult to maintain, and even more poorly documented than MySQL. These days they're on about equal footing in these areas (MySQL documentation is still laid out dramatically better than postgres though - amusingly either one is better than SQL Server, whose documentation tells me to use tools that do not exist though I did a full install) but MySQL has the momentum.

      A lot of Open CMSes decided to use MySQL instead of initially writing a compatibility layer and targeting it. This is one thing that's stopped me from developing my own CMS, I'm too lazy to deal with the database abstraction and refuse to do it without abstraction. Since I am stuck with IIS/ASP/SQL Server and refuse to use VBscript, I would very much like to have a wholly different CMS written in Jscript. No such beast seems to exist, not that I blame anyone for not developing for IIS/ASP.

      For my own purposes, I host on linux and use whatever I feel like. Right now I have a bunch of content in drupal, but it will be trivial to pull out if I want to migrate later, since it's all just SQL. Huzzah!

  • Bah! (Score:5, Insightful)

    by greg1104 ( 461138 ) <> on Tuesday June 06, 2006 @06:10AM (#15478348) Homepage
    If you're ruined simply by programming in BASIC, you never were a potential wizard.
    • Re:Bah! (Score:3, Insightful)

      by SQL Error ( 16383 )
      Too true.

      Basic had goto and gosub, rather than procedures and functions? No decent data structures? No proper error checking?

      Welcome to how computers actually work.

      Sure it doesn't scale. But it's a good thing to learn about that sort of problem early, because every language and programming tool has scaling problems.

      A wizard can do wizard stuff in Basic. A non-wizard is a non-wizard whether he's equipped with Common Lisp or Smalltalk or Objective-C or Algol.

      Basic didn't ruin thousands of potential wizar
  • by unity100 ( 970058 ) * on Tuesday June 06, 2006 @06:12AM (#15478360) Homepage Journal
    I dont see any lights going out. In the software area i am working in, ecommerce, lamp is becoming the framework at an increased rate, mainly because of oscommerce and its variants. In community/publishing sector, nuke, mambo, phpbb variants rule the day, and it is impossible to track mods and additions coming out every day.

    All else talk is crap, as the experience shows otherwise.

    Plain bullshit rant.
  • by D4C5CE ( 578304 ) on Tuesday June 06, 2006 @06:13AM (#15478363)
    C, on the other other hand, automagically infuses them with impeccable programming style.

    Of course, as we all know... ;-)

  • The other guy we had some fuckwit here saying "I don't like Basic and would like to recommend that we, as an organisation, don't use it, only I'm utterly ignorant about anything vaguely technical so can someone with an irrational grudge against software products per se please provide a few irrelevant criticisms", and now this. Basic, like any other language, is a tool - a means to an end. Sometimes it's the best one, and no amount of "religious" wailing and gnashing of teeth is going to change that. Get ov
    • When, exactly, would BASIC be the best tool for a particular job?


      The only time I can think of is if you just can't find anyone that knows how to program...
    • Yes programming languages are tools. That cheap potmetal wrench at the flea market is also a tool. The needle-nosed pliers at the dollar store (whose working surfaces don't quite mesh) are a tool. We are discussing the merits of tools here. Some tools suck. If you don't want to hear from craftsmen who care about their software tools, Slashdot is probably not the site for you.
  • BASIC? (Score:5, Insightful)

    by Phroggy ( 441 ) * <.moc.yggorhp. .ta. .3todhsals.> on Tuesday June 06, 2006 @06:23AM (#15478394) Homepage
    Admittedly PHP sucks [], but isn't comparing it to BASIC a little harsh?

    Sure, it's easy to write crap code in PHP if you don't know what you're doing. It's considerably harder to write crap code (that actually works) in C if you don't know what you're doing. So everyone should use C, so people who don't know what they're doing can't write code? I don't think so.

    If you do know what you're doing, you can mostly use good design and practices in PHP - not as well as other languages like Perl (and I assume Ruby and Python), but a hell of a lot better than BASIC which, if I remember correctly, doesn't support local variables, short-circuit evaluation [], passing arguments to subroutines and returning values, and plenty of other things I can't think of at the moment - let alone OOP. PHP at least tries. On top of that, languages like PHP have functionality built-in or readily available to deal with things like XML, databases and network I/O, so you don't have to write all of that code yourself.

    I'm thinking anyone who compares PHP to BASIC either doesn't know BASIC, or doesn't know PHP.
    • PHP at least tries. (to do OOP).

      Here exactly lies the problem: you either do, or you don't. Trying is not good enough. I've used PHP4/5 several times in the past and I was continually baffled by the way PHP (mis)handles OOP (like constructor overloading or reflection). It is as if the developers of PHP said at one point: 'hey, lets add OOP since that is a really good programming paradigma', but forgot that the language at first was conceived (not designed) to be iterative.

      This not only shows in the sloppy
      • Re:BASIC? (Score:5, Insightful)

        by tomhudson ( 43916 ) <barbara.hudson@b ... u d s o n . c om> on Tuesday June 06, 2006 @09:28AM (#15479205) Journal

        Weak typing, poor/nonexistent scoping rules and worse yet, auto-vivifying variables, are the big points of irritation.

        Having said that, if you avoid trying to use all the "features" of php, and just use it for what it was intended for - web pages (remember, PHP originally stood for "Personal Home Page"), its "good enough" 99% of the time.

        I used to write CGIs in c/c++, but I wouldn't want my stuff to share a server with someone else's c CGIs if they've only had, say, 5 years of programming experience. A badly written/implemented c CGI can bring the whole machine down. A badly written php cgi will "just" time out.

        So let everyone use the "P" glue scripting language of their choice - Perl, PHP, Python ... whatever floats your boat.

        Besides, there's one argument that should carry more weight with slashdotters than any other: More pr0n is served up by the Apache and the P languages than any other solution: specificially, the Netcraft confirms that largest pr0n site in the world is running FreeBSD/Apache/1.3.28 (Unix) PHP/4.3.6.

    • Re:BASIC? (Score:3, Funny)

      by PCM2 ( 4486 )
      It's considerably harder to write crap code (that actually works) in C if you don't know what you're doing.
      Wow ... now I just feel old. I thought it would be a few more years before I started meeting coders who had never even heard of pointers before.
  • Anyone recall this? 8223&from=rss []

    Are you more concerned about the methodology of your webserver, or rock solid stability?

    Apache is portable, scalable and stable. When BASIC came about, much better programming languages existed. BASIC was in fact the wrong approach in many ways. It ruined the way programmers thought. It was weak and cumbersome. It was also painfully straightforward and not in the least bit modular (not until QBasic at the very least)
  • Because everybody's using WIMP:

  • This is silly (Score:5, Insightful)

    by DarkHelmet ( 120004 ) * <`ten.elcychtneves' `ta' `kram'> on Tuesday June 06, 2006 @06:32AM (#15478428) Homepage
    Of all the reasons he lists PHP for being a bad idea, he lists that "code" is mixed with markup. So what, ASP does this too. It's even possible to do this in Perl. Why not attack PHP for some of the things that make it really annoying.

    1. Until PHP 4.2.0, REGISTER_GLOBALS was set to ON, meaning that variables from a GET, POST or COOKIE are automatically defined as variables. Insert rules about how globals are evil here.
    2. Classes in PHP4 are horribly broken. They don't have destructors, for instance. PHP5 is better, but the install base of 5 is so low that writing software means having to appeal to PHP4 and 5. What's PHP4's general solution to not having a destructor? Register_shutdown_function(). Ew.
    3. Using XML / XSL is a great way to use a templating language within PHP. However, the libraries between PHP4 and PHP5 are entirely different, so you have to write a wrapper if you want your PHP code working on PHP4 and PHP5. Or... install an unsupported PECL module. Smarty? No thanks.
    4. On most setups I've seen, MAGIC_QUOTES are turned on. This means if you're writing something for wide use, you'll have to use stripslashes() to get them out of GET or POST. Even worse, some boxes have MAGIC_QUOTES_RUNTIME on, so you'll have to use stripslashes on anything coming back from a database.
    5. Safe mode is one of the most annoying things to work with. I see sysadmins use it as a horrible band-aid for shared hosting (what the hell ever happened to apache and the perchild MPM?). Open_basedir is annoying too.
    6. Try, catch, and throw are PHP5 only, meaning that error handling ends up being done by something stupid like set_error_handler().
    7. Namespaces, namespaces, namespaces!

    I understand that the language is getting better with PHP5 and PHP6, but nobody's jumping on board. The majority of LAMP machines out there are running Apache 1 and PHP4 instead of Apache2 and PHP5. At least MySQL 3.23 is finally going out of style and 4.0 is becoming commonplace. But look what's out now: MySQL 5.

    I really think PHP is starting to majorly stagnate and fragment. So much so, that given a few years, I can imagine something like Python or Ruby taking away some serious mindshare given a few killer apps using the language.

    • I agree and disagree on a few points. REGISTER_GLOBALS was a sloppy idea that should have never happened. I also think that code should be able to be mixed with markup. I wrote a webapp 7 years ago in perl just using the print function for output. It wasn't fun. It was way more complex than it should have beeen, even with the html templating system I wrote.

      That aside... magic quotes are VERY important. I hated them when I first started, but the web would be a shittier place without them. Google for login
    • Re:This is silly (Score:4, Insightful)

      by drew ( 2081 ) on Tuesday June 06, 2006 @12:30PM (#15480692) Homepage
      I have many of the same complaints, and a few more.

      (A continuation of number 1) Scoping in general is completely screwed up. GLOBALS aren't actually really global. Unless you specifically bring it into scope with the "global" keyword, but even there the behavior is subtly different. Or if it's a "SUPERGLOBAL" (e.g. the variables which are registered by REGISTER_GLOBALS) which are always in scope. I also find the scoping behavior within functions to be incredibly annoying, but unfortunately that brain damage hasn't limited itself to PHP.

      (A continuation of number 4) Not only is MAGIC_QUOTES incredibly irritating, it's just not right. Most databases other than MySQL use '' instead of \' to escape characters, so adding the slash not only doesn't help, but makes it harder to clean the input. (Yes, I know about MAGIC_QUOTES_SYBASE, but in my experience, nobody uses it, instead resorting to stripslashes + str_replace.) That this is even needed as a language 'feature' is ridiculous in the first place. If they had a decent database abstraction from the beginning (or at least much earlier on than they did) that handled escaping properly, this misfeature might never have been created.

      And finally, what is with having language features being configurable in the first place? There's no clean way to write a redistributable PHP application that will reliably run on a given installation of PHP without listing a whole set of configuration options that the user needs to set in an .htaccess file (assuming that's even allowed). Some things (like MAGIC_QUOTES) can be worked around by detecting whether the option is set and running all of your input through a preprocessor that compensates for that particular feature, but others (like SHORT_OPEN_TAG) have to be enabled or disabled before your script begins to execute, and there's no way to work around them.
  • The site forces me to swallow its cookies in order to read it. I guess it really didn't want me to visit. Oh well.

    • Open source software has fought a long battle to get where it is today, and at least 3/4 of the so-called LAMP (Linux, Apache, MySQL, PHP) stack are under vigorous attack by many, myself included. Why?

      I can't speak for everyone, or for that matter, anyone but myself, but I'm good at doing that so here goes.

      I'm quite opposed to using MySQL and PHP, and I'm none too fond of Apache. Anyone who knows me or happens into a conversation with me about development quickly learns of my distaste for these particular
      • by dzfoo ( 772245 ) on Tuesday June 06, 2006 @07:38AM (#15478665)
        Thank you for the post. I see now that I didn't miss much, except some blogger's rant. I have my own reasons to dislike PHP and MySQL, so I don't necessarily disagree with the author's comments. However, this article is mainly a vanity/opinion piece, written perhaps with the aim to spark "controversy" (read: flamebait). Its just another two-bit blogger blowing smoke.

        (or nifty writing for the web two-point-oh)

        1. Find a subject you have an issue with, even if you do not know much about it.
        2. Click on "Creat new entry" on your favorite blog-o-matic software du juor.
        3. Start ranting about such subject, avoiding obsolete hallmarks of the web one-point-oh era, such as:
                a. Proper grammar and sentence structure.
                b. Research
                c. A point
                d. spell-checker (or worse, actually spelling correctly in the first place)
                e. Eloquence
                f. Proof-reading (or re-reading at least once) when you're done writing.
        4. Click "Submit" or "Save".
        5. ???
        6. Profit!

        • Make sure to submit it to Digg and/or Slashdot.

          My qualm is that he made no effort to really sell his point while making what I believe to be a rather inflammatory statement.

          I still hold that if a recent study showed the LAMP stack to be supposedly the most bug-free OSS project in existence, then you need to somehow back up claims that two of the major components need to be dismissed out of hand for being buggy.
  • Yeah, BASIC/PHP/MYSQL is real bad, that's why all those genius programmers that use C++ never ran off the end of an array, caused a buffer overflow bug, or had any kind of memory cleanup problems... A crappy programmer is such in any language, and BASIC/PHP/MYSQL is a very useful tool for making smaller apps without having to get into the hardware details of the machine's operation.

    Handling everything about the machine is neat, but it's something that honestly just wastes your time if you need a program that: reads a file, processes data and produces output. If that's all I'm doing, then why do I need to operate at a level that the O/S is going to conflict with?
  • In my career, I started out programing in BASIC on the Apple II and Trash-80.

    I found the transition to languages like PASCAL impossible because of the syntax difference.

    As I liked to put it "I learned most of my bad habits in BASIC". The transition to OO programming was particularly difficult because of the path I took from BASIC.

    Now, I do love an English-like verbose syntax because it just allows me to eyeball my code and just get it.
  • by kill-1 ( 36256 ) on Tuesday June 06, 2006 @07:09AM (#15478548)
  • Weakly typed dynamic languages do not have a future in large scale development projects. Given the average skillset of developers (i.e. not all developers having PHD's) there is a likely chance that less than perfect code will be written. The better language will be the language that is capable of producing less bugs. A common attribute of large scale development projects is that they are written by a team of developers and not everyone will know exactly how the whole system 'works'. In these cases without
  • Save LAMP! (Score:5, Funny)

    by ardor ( 673957 ) on Tuesday June 06, 2006 @07:49AM (#15478708)
    Without LAMP, I will get much less daily wtfs at [] !!111one
  • by Qbertino ( 265505 ) <> on Tuesday June 06, 2006 @08:20AM (#15478842)
    The article is rubbish and/or tells nothing new.
    Being a professional freelance web developer and familiar with various web technologies I can say this guy has got it all backwards.

    1) MySQL is not a full blown database. Big news. Would've you thunk? What this guy aparently just discovered the other day or so others have been aware of for years.
    I've got more news: Databases in general are pathetic. View logic and transactions just move the problem into the DB and away from the App. They don't really solve it. Object-relational setups and DBs do, but they are still a few years away from widespread use. In that respect Postgres and Oracle are closer to MySQL than to ZopeDB. On top of that, in order to utilize a DB properly you have to know about the problems you'll be facing. And that you learn of best by using flatfiles or it's SQL equivalent: MySQL.

    2) PHP is the web generations Basic. Very true. Does it spoil developers? No. The legend of procedural (Basic) coders lost to OOP was spread by academics who were unable to explain OOP in correct terms and context. Meanwhile people wo aren't that arrogant and mix OOP and functional programming whenever they feel like it (Symfony, Rails, Django, Zope) are kicking the collective asses of old-school hardcore 100% polymorphic OOP bloat advocates up and down the street (Java).

    LAMP isn't the end all of web technologies. Nobody has ever said otherwise without making himself look extremly silly. But LAMP is a viable solution for any project of any size if the enviroment permits using it. The tools and production pipeline are among the most sohpisiticated FOSS programms around. Half of Googles Database is filled with forum postings and tutorials on PHP. DBDesigner, Clay and MySQK Workbench make working with MySQL so easy and fast that Oracle is seriously concerned about it. A bazillion of available FOSS and commercial tools and solutions for PHP are biting huge chunks away from the serverside Java market, pushing it back to where it belongs: The client.

    Bottom line:
    LAMP isn't beautifull or notably advanced. Has never been and probably never will be.
    But it is:
    a) Extremely easy to get rolling with.
    b) Used by the largest amount of stable and mature OSS projects.
    c) Growing it's featureset and best-pratice compatibility in the same rate the general populace is becoming aware of OOP and what Databases where initially meant for.
    d) Nearly so widespread it can be considered a monopoly.
    e) Entirely FOSS.
    f) A T-Rex-sized Microsoft/Oracle/Macromedia/BEA/[fill in commercial webappserver vendor here] Boogieman.

    And that's why it will remain a wide used setup and why that's a good thing.
    • by Tony ( 765 ) on Tuesday June 06, 2006 @08:56AM (#15479008) Journal
      View logic and transactions just move the problem into the DB and away from the App. They don't really solve it. Object-relational setups and DBs do . . .

      No, they don't.

      And, what problem are you talking about? You mention a problem, but fail to mention just what this problem is.

      As far as object-relational databases: they suck far worse than pure relational databases. Relational databases are built on solid computer science-- specifically, set theory, which has its own algebra. Object-relational databases have no such solid foundation, and so are not as rigorously based in actual, real math. Hell, there isn't even a common definition of what an object-relational database is, let alone what problem domain they solve. Also, they don't provide a damned thing not already provided by a good relational database.


      The SQL language sucks. I'll give you that. We could certainly do better. But, at least it's marginally relational, with a complete (though stupid) grammar.
  • The thing is.... (Score:3, Insightful)

    by FooAtWFU ( 699187 ) on Tuesday June 06, 2006 @08:57AM (#15479011) Homepage
    PHP is a fine hypertext preprocessor - it is simple to use, readily available, and excessively convenient. The problem comes when novices discover it, delight in its convenience, want to use it for something big and important and they don't know how.

    Granted, if they were using, say, Perl, they still probably wouldn't know how to build anything big and important, but PHP in particular provides some simple, obvious, and well-defined mechanisms to implement Bad Coding Practices. Separation of the logic and the content are the first things thrown out the window; PHP's SQL-related functions invite no end of bad design (database-specific query functions instead of something generic like Perl's DBI classes, no prepared statements, practically BEGGING for SQL injection vulnerabilities -- then there's the whole register_globals fiasco, short-tags vs long tags and magic-quotes settings just to keep you excited, and so on and so forth...)

    There are other things, too - some will point out the lack of decent namespaces, inconsistent function naming schemes, too many functions that are too similar, and such- many valid complaints, a few silly complaints -- but they pale in comparison to all the Bad Stuff that PHP invites upon itself from novice coders.

  • by WindowsTroll ( 243509 ) on Tuesday June 06, 2006 @08:57AM (#15479014) Homepage
    I remember a few years back when LAMP was all the rage. The argument went something like this: Linux rocks and Windows sucks; Apache rocks and IIS sucks; MySQL rocks and SQL server sucks; Perl rocks and everything else sucks. At the time, most web sites were running Windows/IIS/ASP/SQLServer. The conventional wisdom, on /. at least, was that you had to run Linux because all other OS were inferior and if you were truly l33t, you would run Linux. The argument for apache was that it was the "proof" that the OSS model was superior and that you should embrace the pure and virtuous model of OSS.

    I'm really surprised to see that there are knocks against MySQL, particularly the argument that it could have been PostgreSQL or SQLite. This seems like revisionist history to me - MySQL was THE END ALL AND BE ALL of databases. Referential integrity - who needs it if your programmers have a clue, and anyone arguing for this was an IT weenie or a SUIT. Anyone advocating "real db functionality" was old school and didn't realize the world had moved past them because the only important feature was speed. Boy, how things have changed. Now, his argument must be "all of the /. crowd from year back must be complete idiots." , or "Now that I'm smarter, I see that I was dumb a few years back".

    The same was true for Perl - back in the day, Larry Wall was God incarnate, and only an idiot would ever write code to sit behind a web site when you could script it with Perl. Of course, now P stands for PHP. And in this respect, the guy is just a bigot. To quote, "PHP is another sore spot for me. I've gotten to the point that not only will I not write PHP code, I won't even run applications written in PHP (my long search for decent blogging software was due to the restriction that it not be written in PHP)." So, even though there may be a perfect tool for me to solve a problem I need solved, I refuse to use it because it is written in PHP.

    So, what happened? Perhaps the problem is that LAMP became popular. A popular undercurrent of sentiment is that if something is popular, then it is no longer l33t, and to express how l33t you are, you need to be a champion for the next "big thing". This shows how cool you are and how much smarter you are than everyone else. The problem is, once the cause that you are championing becomes popular, you are just like everyone else.

    One of the arguments for LAMP was that it was easy to create websites. In fact, it was so easy, that you could teach your friends and family how to create web sites with LAMP. The argument was that it was just like BASIC. Now, that it has become popular and it is ubiquitous, the argument against it is that it is just like BASIC.

    You just can't seem to win.
  • by SlappyBastard ( 961143 ) on Tuesday June 06, 2006 @09:29AM (#15479212) Homepage
    At the end of the day, good PHP code hinges on writing a good script t scrub all your GETs and POSTs.

    Hell, I worked with a kid who had math and CS degrees (I hold two degrees, but neither degree is math or CS) and he littered his code with magic quotes.

    The problem is that PHP is left in the wilderness. It's easy to learn, but too powerful to weild. But the C++ers talk it down, so there aren't enough people teaching the right way to use it.

    PHP can be brilliant. It can also be a portal into hell.

    But, ultimately, empowering new entries into the industry requires that we educate, not intimidate, them.

  • by Theovon ( 109752 ) on Tuesday June 06, 2006 @10:56AM (#15479908)
    I started with BASIC, then learned C and Pascal. BASIC and Pascal didn't ruin me. BASIC taught me to think algorithmically. If I'd had to learn a great deal more syntax and structure to start with, I would never have gotten started. BASIC is a good way to get immediate feedback on your initial programming attempts. "10 PRINT "HELLO": GOTO 10" is a common first program that is exciting to an 8-year-old who programs something for the first time. As I developed larger BASIC programs, I ran into the pitfalls of dealing with a spaghetti language. It wasn't a problem, though. BASIC had taught me the basics, and I was ready to move on. Pascal taught me structured programming. Compared to BASIC, it was great for writing larger programs and keeping code organized. But Pascal is too strict, and when I learned what I needed from that, I was ready to move on.

    C is a language that's too powerful for a beginner. There are too many ways to hang yourself if you don't know what you're doing. Someone who has never programmed before isn't ready for it. BASIC taught me to develop algorithms, so that when I was learning C, I was struggling with the syntax and semantics separately from the process of learning to write algorithms. Pascal taught me discipline that I used to structure C programs in ways that aren't required by the compiler but necessary to keep one's code organized and managable.

    BASIC is a good thing. It's like drinking milk as a baby. Pascal is a good thing. It's like learning to get along with other kids in kindergarden. People aren't ready for C until they've gone through those stages.
  • by Zaphod2016 ( 971897 ) on Tuesday June 06, 2006 @12:15PM (#15480578) Homepage

    It's a losing battle so I'll make this quick. PHP is:

    • ...probably *the* best known language on the web today.
    • ...essential for any web based OS project (wordpress, joombla, yadda yadda).
    • ...can be taught in the course of a few weekends to anyone willing to learn it.
    • perfectly capable for 99% of low/medium cost web projects.
    • just dandy with PostgreSQL; MySQL is an OPTION, not requirement.
    • ...can be implented in a logical, orderly way, designed to accomodate scalability and growth while offering (IMO) unparalled flexibility and compatibility with whatever else the web is doing.

    If PHP is the only language you know, use this article as an excuse to learn Perl or Python. If you already understand the basics of HTML/CSS and have taken a few "programming 101" classes somewhere, *good* open-source PHP projects are an excellent way to learn *good* programming; not just a "working script", but the whole shebang.

    And, to be fair, the "copy/pasters" are "copying/pasting" no matter which language it is.

  • Code is Code (Score:3, Informative)

    by Naum ( 166466 ) on Tuesday June 06, 2006 @01:48PM (#15481408) Homepage Journal

    Vaguely written rants laced with trendy buzzwords and university eggheads flaunting their scholarly beaks at plebian programmer tools aside, let's look at why LAMP has been and will continue to be a viable web development platform.

    First, I've coded on just about all platforms, from COBOL, REXX/CLIST and Assembler on IBM mainframes to C on Unix boxes to LAMP to Ruby (including some RoR apps). And, code is code — in the hands of an unskilled practicioner, the product is going to be crap no matter what the tool. And a gifted artisan can craft a masterpiece with nearly any tool.

    There's a great deal I detest about PHP. But, any language that I've toiled in for over a few years in writing relevant legacy code/enterprise applications/dynamic web software shows its unsavory side. No such thing as the one true programming language exists — they're all just tools, and just as they have their selling points that shine, they all suck in some sense of matter.

    Anyway, here's a short list of why LAMP is good.

    1. F/OSS — I spent many years coding on proprietary platforms with commercial language platforms. And I would gladly exchange it in a heartbeat for the opportunity as we have today to work with Free/Open Source software tools. Being freed proprietary whim is a great blessing that I think many take for granted today, or are blindly unaware of the ramifications. I realize this doesn't address whether Linux + Apache + MySQL + PHP > some other F/OSS solution like Ruby, ROR, lightpd (which are far superior, IMV, to Micro$oft, $un, !BM) etc....

    2. Shared hosting and LAMP package availibility/ubiquitousness — most likely, an entity wants a dynamic web site, a step up from the circa 1996 static html page variety, but their requirements are far less than something that requires a dedicated server. They pay someone with a little knowhow like me a little coin to set them up a LAMP site, either with a F/OSS project output platform customized for their usage or for a little more money, my own hand crafted framework solution. LAMP still excels in this regard, as most of the snazzy Web 2.0 offerings arn't freely releasing thier codebase as a "point, click and install solution" as the litany of PHP open source modules that populate the web space today.

    3. Low startup barrier — any enterprising developer can get off the ground and running in a moments notice. Granted, this is a source of great consternation, as hand in hand, it has led to a large amount of hideous, ugly, unstructured code, giving a lot of the PHP community, justifiably so, a bad rap.

    Having laid a case out for LAMP out, let me share some concerns about future LAMP direction:

    • Have to agree that about the assessment offered in another comment here about MySQL getting squeezed from both ends. For low volume sites, or even sites with considerable traffic but "read heavy" on the DB load, SQLite, built into PHP5, can easily take the place of MySQL and on the higher end, not sure if MySQL is going to remain a quality player. I expect that the "feature" to plug whatever DB you wish to use is going to grow in importance.

    • I finally made the leap to PHP5 and won't do any new project work with PHP4. Even in the shared hosting arena, there are enough hosts now that offer PHP5, that it shouldn't be an issue. Now, this scratches a great deal of existing PHP product out there for consumption, but I have discovered, to my surprise, that moving PHP4 code to a PHP5 environment has not been difficult at all, though there are a few gotchas to contend with.

  • by fbg111 ( 529550 ) on Tuesday June 06, 2006 @06:41PM (#15483710)
    FLPR []. There are also some interesting Python frameworks that have recently adopted the Rails team's marketing savy:

    • Turbogears []. Turbogears may become the choice for webapps with more complicated database requirements, eg apps that require a relational algebra engine rather than a simple object store, given their ongoing work to integrate the SQLAlchemy [] DB layer.
    • Django [] also looks good
    • [] for a lightweight framework.
    Given the Rails-led boom in opensource RAD web frameworks, there are plenty of combinations still left for anyone wanting to make a framework out of their favorite components - Linux/BSD/etc | Apache/LightTPD/etc | PostgreSQL/MySQL/SQLite/HSQL/etc | Ruby/Python/Lisp/etc.

Never buy from a rich salesman. -- Goldenstern