Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN?
The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsistent. After awhile you just get used to it and don't think about it anymore. Programming languages are no different.
I agree with Marco that it will take "years to master" whatever he chooses next. I always scratch my head at these "I learnt Python in a day" claims you often see around here. No, you didn't learn Python in a day. You learnt the syntax for a for loop in a day. Idiomatic Python takes much longer.
I don't agree that choice is the reason people don't use Linux on the desktop. Desktop Linux is the reason people don't use Linux on the desktop. I'm sorry but it's truly awful and probably won't ever get better. In the absence of product direction you have us geeks making everything configurable because, you never know, you may want to write your own window manager (and knowing us geeks, no two will agree on what's right) so you have no consistency, no grand UI/UX design and it's just terrible.
I use Linux/Ubuntu at work basically because I have to. There are advantages on having your dev environment mirror your production environment and Linux (over OSX) does actually have a package system (it's a messy hack on OSX) but I certainly don't like it.
The only computers I use that I truly enjoy using are my iPad and my Macbook Air.
Fear of the wrong choice isn't I believe what motivates most people. Fear of looking like an idiot? Sure. But that's different and will probably be the case with anything new.
People don't tend to weight up two or more options, decide which is best and go with it. They tend to use the first thing they come across until its flaws (perceived or actual) outweigh the "cost" of transition and appearing like an idiot for awhile.
Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing. Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got all the compilation tools, headers, and libraries I could need either already installed or a few keystrokes away. Not to mention the fact that it's beautiful: http://files.0xf.nl/screenshots/screenshot-2012-06-27.19%3a4...
Linux can be really, really awesome, if you're prepared to spend time making your work environment great.
Lastly, all this time is not wasted, you end up learning so much stuff that you can apply to every where else - because of my linux knowledge I often find myself helping out my friends who use OSX but don't understand things like headers and libraries.
I'm actually quite the opposite, I've been a long time Linux user (Fedora, Ubuntu, Debian, and more recently Arch) and recently I decided to dive head first into OSX for work and play.
OSX is beautiful, it's smooth, and it can run a lot of my games too. But, just like Windows, it lacks functionality. Setting up a MAMP server with my required PHP extensions for work was an absolute nightmare even with Homebrew. Even when working with my Ruby projects I was struggling, when some gems required certain libraries to be installed, it was a nightmare to install them too.
Not to mention installing software and keeping it up to date was a pain too. Once you become used to relying on robust package managers it's very difficult to turn back.
Linux is designed to be powerful and functional foremost, and that's what makes it fantastic.
> Linux (over OSX) does actually have a package system
I found running a VM on my mac to be the best of both worlds. Plus you can backup and distribute your VM so the entire team develops on the same setup.
>Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN?
From the impression I get of Marco whilst listening to his Build and Analyze podcast, is that he does have a lot to say about the technical aspects of his work. However when he does, it is often written/spoken out as a response to a question. The constant talk about PHP in recent weeks has probably triggered something he's been thinking about for years.
php is great for what it does. ruby is great for what it does. python is great for what it does. at the end, it's all about preference.
someone who has mastered in PHP will no doubt be a lot more proficient in developing apps than a junior/intermediate python or ruby developer. same can be said for reverse.
it really all comes down to knowledge and experience.
I personally love having Mac OSx and Ubuntu Server running in a VM. Best of both worlds, IMO. I don't have to mess up my Mac install, and I can dev in a "real" linux environment.
>Desktop Linux is the reason people don't use Linux on the desktop. I'm sorry but it's truly awful and probably won't ever get better. In the absence of product direction you have us geeks making everything configurable
Have you tried Unity or G-S lately? I'm not as willing to argue G-S has as clear a direction as Unity, but they both ship with a very limited amount of configurability and they're both insanely easy to start using even without background knowledge.
>I use Linux/Ubuntu at work basically because I have to. There are advantages on having your dev environment mirror your production environment and Linux (over OSX) does actually have a package system (it's a messy hack on OSX) but I certainly don't like it.
I'm very surprised that Google doesn't provide some kind of consistent dev VM environment that is similar to prod that developers can SSH into.
Here is another point that highlights the problem:
If I want to write a hello world application in PHP, it's neither as long as <?php print("hello world");?> nor as short as <?="hello world"?>
Rather it's simply: hello world. Just type in those 11 characters in a text file and save it as hello.php. Now load it on your browser [or run it from command line] and it will print hello world. I don't think it can get any more simpler than that in other languages. PHP was developed from the ground up as a templateting language for serving HTML pages. These other languages are more of a general type.
Therefore the replacement for PHP should come through a new language targeted as a replacement for PHP as Jeff said. Otherwise there always be extra web/template stacks for the developers to take care of. And that will be the first hurdle to learn and overcome for novice developers looking for switching to something easier.
I'm not convinced this is true. You see, way back in the day in 1997 when I was doing web dev, everything worked the way PHP does. ColdFusion, ASP (not ASP.net, ASP), PHP, and almost everything else that was seriously trying to do web pages worked that way. It took the community collectively a long time to stop seeing URLs as identifying anything but specific files. This is back when having those files be programs was still a bit of an innovation.
After 15 years of one of the biggest bursts of innovation the open source world has ever seen, and with such diversity in frameworks that the mind boggles, nobody has returned to this model successfully. I've got MVC-inspired designs coming out my ears, continuation-based designs, frameworks just beginning to incorporate web sockets deeply (instead of as an afterthought), GWT, ASP.net, and other attempts at building a fundamentally different model and compiling it into another, and everything under the sun... but no return to the page-is-program model.
I don't think it's the key to PHP's success, because even in the competitive-yet-very-fertile soil of the web framework world, nobody else can make it work anymore. I think it's vestigial, and nothing else.
(Personally I think the key is simply that everybody has deployed it, and since there's basically no way to force every web hosting company to support Language X simultaneously, PHP isn't going away until the entire concept of web hosting goes away. Which isn't anytime soon.)
Are you seriously basing a whole argument on what the hello world program looks like? That has nothing to do with actual real world programs. Mixing logic & presentation might make it easier to get something running quickly, but it's one of the downsides of PHP that these things get mixed up when they probably shouldn't for a project of reasonable size. The whole idea that it's an advantage of PHP that you can get something up and running so quickly is wrongheaded. Actually, it's much better if it requires some amount of thought and planning to code something up because that increases the likelihood that you'll do it right the first time and build on a solid foundation.
It is not that support is completely non-existant. Ruby, for instance, can be executed in a PHP-like fashion using ERB.
$ echo 'hello world' | erb
hello world
$ echo 'hello world' | php
hello world
If a new user could throw index.erb up on a server and have it execute in a Ruby context, would we be any further to supporting better development practices? Will the user take that experience and move into a framework like Rails later? If yes, what has stopped them from using the similar PHP frameworks that will already take them away from the comfort of the single page template?
If you truly only need a single page template without any further abstraction, then why not use PHP? It seems all of the complaints about PHP stem from using it in big projects. It is hard to argue that it does a single page template very well for when that is all you need. Right tool for the job and all that.
What people continue to fail to explain is why PHP needs to be replaced.
Why not improve it? After the millions of man hours that have gone into the plethora of open source PHP based frameworks and tools (aka, what powers the internet) - wouldn't we as a community want to improve the foundations rather then scrap them entirely?
That's one of the problems with the now-famous Fractal blog, I think: It was a joy to read in the sense that being a Python programmer, it only heightened my appreciation of the achievement that languages like Python and Ruby represent. It's what conscious, determined design gets you and what mistakes they managed to avoid.
But it's preaching to the choir. If you've never seen anything other than PHP, you won't understand two thirds of the list or why they're problems. (<- Not looking down on PHP coders there, rather I'm thinking back to when I started out on PHP and am speculating on how I would have received the document.)
How do we communicate effectively what makes other languages better to someone with no reference frame other than PHP itself?
Most PHP developers don't start their first programming project from scratch using PHP to write their first web app. It's far more common to start because you are running a blog on WordPress and you want to make some small change. Then you make another and another, then you're writing plugins and suddenly you're a programmer and PHP is your language.
So to encourage developers to start with something other than PHP you'll need to lower the barrier to entry to modifying existing software, and also make something as popular and widely useful as WordPress and MediaWiki.
> If you've never seen anything other than PHP, you won't understand two thirds of the list or why they're problems.
Two thirds of that list are actually incorrect.
But I programmed in Java, C++, C, VB, and so on before I started coding in PHP many years ago. So many years ago, in fact, that PHP was easily the best choice.
The problem with lists like that is they obscure the truth -- and that is -- that solving a programming problem in modern PHP isn't really that different from solving it in Python and Ruby. It's just not that much of a leap.
I've programmed in C, C++, PHP, Python, Perl, Java, Javascript, Prolog and probably could program in any general purpose language out there given some training and enough motivation. I still "don't understand two thirds of the list or why they're problems". I.e. not that I can't literally understand what the complaint is about - I can't understand why it's anything special to PHP and why it's a PHP problem as opposed to agressive exaggerated "don't make me actually learn anything that contradicts my preconceived notions" stance. PHP has its own quirks, so has any other language out there. I do not see a big deal about it.
The idea that disagreement is because person disagreeing is not educated enough and only if he could learn The Next Best Thing he'd immediately become a fanboy like you are - is deeply fallacious. I've seen your Next Big Thing. It's nice. So are other hundred Big Things. They are all nice, and all have its place. And no, I'm still not a fanboy, sorry. I still think Python is a nice language for its uses, and PHP is a nice language for its uses. Banality, but somehow so many people can't grasp how can it be. Please believe me, it can.
> How do we communicate effectively what makes other languages better to someone with no reference frame other than PHP itself?
You're trying to convince yourself that you made the right choice, the right investment.
That's sad.
Have confidence in yourself. You made the right choice for yourself and let others choose for themselves.
There is no universal proper language or platform to use.
PHP works and it works extremely well for many companies. Its commercial success is not debatable.
Python on the other hand ... aside from Google, who's using it at a massive scale? Even Google has been shifting to Java for a long time.
See how that works?
Let's stick to the old parable. A proper tool for every job. If you're convinced that there is no proper application for PHP, then you're not even trying to be objective ... you're just trying to make yourself feel better about the choices you made.
The fear of making the "wrong" choice actually makes the familiar, mastered PHP more attractive.
The multi-core reality means that the long-term languages will have a strong concurrency model. Clojure and Go are two languages with strong concurrency models that are building momentum and have potential to go mainstream.
But for your first foray out of PHP, I would pick a language that has a large, well-established community with mounds of documentation, books, and resources.
My path out of PHP would be:
1. Python
2. Clojure
3. Go
Learn Python first because it's easy to learn, easy to read, and it's taught at major universities so it's easy to find smart people to help. It has a large community behind it, which is still building momentum, and it has a huge library so it's generally more useful than Ruby.
Then once you're comfortable with Python, I would venture into Clojure. It's different, but in a good way. And you get access to all of Java's libraries so it's practical now, even though it's relatively new.
And then look at Go. Go is building momentum fast, but right now it doesn't have the massive libraries that Python and Clojure have. However, in a few years, this will change.
I think that multicore support is unlikely to be the crucial feature that cements the success of the language of the future for simple CRUD web apps. Such apps are invariably not CPU-bound. Wide support on hosting providers, tooling, ease for novices, database access, etc. are far more important--which explains the success of PHP in the first place.
The only thing flawed with PHP is your outlook on it. People with money (investors, clients, etc.) don't care about ANY of the nuances mentioned here or by Jeff Atwood. At the end of the day, we use PHP and are rewarded for doing so. If you want to use another language or make a new one...Great. Do it. But I'm not sure why some people just want to try to change an entire industry and move people off of PHP... It makes no sense. No one is holding a gun to your head to use PHP. You have alternatives and if you're not happy, make something yourself. You can't have everyone hold your hand your entire life and do things for you.
PHP is good. I'm living proof of that. I'm a very successful developer and PHP does just about everything I ask of it. I also find it enjoyable (when you don't use crap frameworks or CMS' like Drupal). For those of you that do struggle with PHP, then what on God's green Earth makes you think you'll do any better with the next language? There comes a point when you've rifled through everything saying they are all junk that you gotta look in the mirror and ask yourself what's really the problem?
Is learning another procedural/OO language really that tough? I've put off learning Haskell/Erlang/etc because it's such a shift in thinking, but PHP/Ruby/Python/Java/JS/C-whatever seem to all be about the same. There's some new syntax, and entire new libraries, but it just means you have have the docs open a bunch at first. I find I have to actively _keep_ myself from starting new projects in the new flavor of the month and force myself to use something that I know much better and that is much more proven. I think I'd be rather proud of myself if I got a whole project done in PHP rather than Node or Scala or JRuby or something like that.
Disclaimer: I'm a Rails programmer for work and hobby.
Interested in learning something that isn't PHP to code your web applications in? Ok. You have a ton of options and this is a very exciting time to be a web developer.
Do you want to lean towards stability and proven concepts and work within a full application structure? Look at Django and Rails.
Do you want to serve up responses from a simple script without a lot of extra pieces? Look at Sinatra and Flask.
Do you want to get in on the cutting edge and don't mind forging some of the path yourself? Look at Node.js and Meteor.
Got a high level decision made? Sweet. Now compare the primary languages between your choices (forget the framework for now). After a few minutes looking at each, which reads better to you? Feel free to go on gut instinct here: there are no wrong choices.
You've now made a choice for your next learning target. Now: don't spend years. Don't worry about knowing everything about the framework and the language. Google for "X tutorial" and follow the first link that looks reasonable and current. Do that tutorial. Now you have some bearings within the framework and have some idea of how it thinks.
Now. Pick something you want to build (a todo list is popular now, it used to be a blog or a wiki). Build it. You will make mistakes. You will be confused. Google for answers (if you're in Node.js or Meteor you will have trouble here) or hack until you get something working.
Throw what you built up on github and ask others to check it out. Build something else. Repeat.
If you are already a decent programmer with a good grasp of the web and how HTTP works: you will pick up any of these frameworks well enough to work in it in a month or so. In six months you'll be well advanced: especially if there are good books available for the framework/language you are working in.
I'll sound like a broken record, but I'm convinced Flask is the perfect transition.
It's built for smaller web apps, and rapid prototyping. The system of mapping endpoints to functions is incredibly intuitive -- if you've used Python before, learning Flask is incredibly easy.
I know it's difficult to compare or find an observer who could adequately judge between the two, but I wonder if Ruby made Jekyll easier to write and maintain? Of course, there's not any easy way to make that judgment without knowing how much effort Marco put into Second Crack versus what was put into Jekyll.
I've been having a similar problem with the added difficulty* that I don't do development as my full-time job (yet) and have been coding mostly for developer contests and hackathons.
So when I start something that has a deadline in 24 hours or just a few days, I can either fall back to PHP to get something going fast or spend most of my time just learning a new language. So, I have been typically going with PHP…
I've found that the important thing is to take the time to set yourself up with the minimum environment that can get something, anything going in a different language: that means whatever is needed to print something on a page and get some logic working with GET and POST parameters. Because the nice thing with PHP is that it's so easy to write a single file that displays text on a page, or that responds to POST and GET parameters with some logic behind it. If I started with Ruby for example, I wouldn't know how to do this basic thing. (granted, with Rails and Heroku, this is easy)
My plan is to make Python my generalist programming language and I started to look at Flask (http://flask.pocoo.org/) for that reason: it's a mini-framework that doesn't take long to learn how to do these simple things. I can then play with it for simple things.
*though it can make things easier since I can just work on whatever I want in whatever language I want :)
So, I wouldn't really call myself a "programmer," because I'm a front-end web designer. I'm learning more and more web programming and I'm obviously using PHP. The main issue I see with languages like Ruby or Python for novices like me is that when you ask a novice (running on Windows) to go into the command line, that's like asking a cook to go milk cows. The cook will figure it out, but fuck you.
Sure, there's a learning curve to any new language, and I would love to learn a "better" language, but, if you can't explain to a novice why a certain language is better, the novice is going to go for the smallest learning curve and the language with the best/most ubiquitous documentation.
What do Python or Ruby do that PHP can't? Are they "faster?" I've heard that they are more secure, but does that mean that PHP can't be as secure if a skilled developer is coding for security? People say things like "rapid development," but I've been using CodeIgniter and it seems pretty rapid to me. What it all comes down to is this: are Ruby and Python "practical" for novice programmers like me? Truly? If not, then doesn't it make sense to start with a language like PHP and then, when you have figured shit out, make the jump to Python or Ruby? I wish this was more clear.
"Whichever language I choose to replace PHP will have its own problems that will take me years to master, but by the time I know whether I chose the “right” language, I’ll have invested far too much time in it to practically switch any meaningfully sized project to another language: exactly the situation I’m in now with PHP."
Something that I'm not seeing people take into account generally when they decide to develop in a "new" language or complain about any established language additionally is how far along that new language is and how many people know it well. Choosing the best thing also involves how easy it is to get the help of others. An analogy might be an automobile purchase. If you are located in the middle of nowhere it might be a better idea to buy the Honda where there are multiple local dealers rather than the NewGreatAuto (pick any car with less market share that is better price and feature wise) where you have to travel 50 miles each way for warranty service.
I went through this with hardware back in the 90's choosing SGI servers that were better price and performance wise than Sun, only to find that many open source software ready to run was not available for SGI. And that there were less people that knew IRIX than Solaris.
If you're a really good PHP developer and are considering using another language, you should ask yourself one question:
Why do I need to switch?
You've already gone through the pain of learning how to work around all of its warts, and you will lose a ton of productivity immediately after switching to a new language. This may seem trivial if you are just programming as a hobby (and fun, even, to learn something new) but if you are a professional programmer, the productivity loss can be a problem. If you are a freelancer billing at a good rate, can you charge the same thing to your new client knowing things will take you twice as long and be less optimal, with bugs happening in new surprising places?
Taking on a new language needs to happen for a better reason than "the language I'm an expert in is kind of ugly." Are there libraries that are only available in the new language? Is there a different server architecture that lets you write applications with several times the performance in certain important use cases? These are valid reasons. "Too many functions in the global namespace" is not, especially if you already have them all memorized.
There's a bit of a false dichotomy there. You don't just have to immediately switch or not. It's worthwhile to learn new languages regularly, whether you use them professionally or not. Keep working in PHP and do a small project in something else. Easy transition if you keep going deeper into this new language, or easy to change your mind and go back to PHP.
There's a fantastic reason: Having fun. Programming should be fun. If you find the language you're working with being ugly and terribly designed, it's hard to believe you're having fun.
Being addicted to PHP is like being addicted to coffee; for some of us, it works, and we're just fine with that. Code quality comes from the programmer, not the language.
Really, I wouldn't worry about making the "wrong choice". I can identify with this, and I think its a reflection of perfectionism, which is not a good trait to have especially when you want to make something new. It takes years to master a language/web dev framework, and considering the pace at which web dev is moving these days, your mastery will be incomplete and slightly outdated by that time anyways. The point is, thats not the goal you should have in mind anyways. You can start from scratch with a new web framework and start being productive in a week, two weeks tops. After that, just use it for your projects and allow the experience of those projects to help you learn more about the framework/language.
Perhaps someone should make 'PYP', a Python that's easy for PHP programmers.
Like PHP, .PYP files would be templates with no limits on mixing presentation and logic. The filesystem hierarchy provides the default URL-routing.
But, you get the regularity/power/compactness of Python wherever you want it. (Perhaps, every line in a .PYP file beginning with '\' is meaningfully-indented Python.) If you ever want to hijack a part of the URL-space from the filesystem, there are routing utilities to do that.
Would such a glide-path from PHP to Python be a good thing? Or bad? ("The barbarians are at the gates!")
I don't think it's widely used, though, probably because the possibility of using PHP in this template-like way isn't actually a big advantage (serious PHP devs almost certainly don't use PHP that way); PHP's big advantage is that it's installed everywhere.
Either Python or Ruby, or any number of other languages, are so much better than PHP that it doesn't matter if you make the slightly less ideal choice.
I'd suggest switching to JavaScript (or CoffeeScript) instead of Python or some other trendy language.
a) You need to know it anyway.
b) Node.js is awesome and works the way web servers ought to work.
c) JavaScript, if you avoid the obvious warts, is a really nice language. Every other language I've learned either has as many warts as JavaScript or isn't practical.
Having picked JavaScript, it turns out to be amazingly powerful. Need to automate content production? Adobe's stuff is all scriptable via JavaScript. Want to write a 3d game? Unity uses a dialect of JavaScript.
I was in the exact situation a year or so ago. Everything I wanted to build, I always went straight to PHP.
I stopped myself from, unfortunately, not building things. I've spent the last year learning Ruby, Python, Rails, Django, and a half dozen javascript frameworks to get myself acquainted with it all. Only recently I took a position where I'll be working with Rails full-time. It's a tough addiction to break, but it's so liberating once you learn what else is out there and what you can do with it!
[+] [-] cletus|13 years ago|reply
The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsistent. After awhile you just get used to it and don't think about it anymore. Programming languages are no different.
I agree with Marco that it will take "years to master" whatever he chooses next. I always scratch my head at these "I learnt Python in a day" claims you often see around here. No, you didn't learn Python in a day. You learnt the syntax for a for loop in a day. Idiomatic Python takes much longer.
I don't agree that choice is the reason people don't use Linux on the desktop. Desktop Linux is the reason people don't use Linux on the desktop. I'm sorry but it's truly awful and probably won't ever get better. In the absence of product direction you have us geeks making everything configurable because, you never know, you may want to write your own window manager (and knowing us geeks, no two will agree on what's right) so you have no consistency, no grand UI/UX design and it's just terrible.
I use Linux/Ubuntu at work basically because I have to. There are advantages on having your dev environment mirror your production environment and Linux (over OSX) does actually have a package system (it's a messy hack on OSX) but I certainly don't like it.
The only computers I use that I truly enjoy using are my iPad and my Macbook Air.
Fear of the wrong choice isn't I believe what motivates most people. Fear of looking like an idiot? Sure. But that's different and will probably be the case with anything new.
People don't tend to weight up two or more options, decide which is best and go with it. They tend to use the first thing they come across until its flaws (perceived or actual) outweigh the "cost" of transition and appearing like an idiot for awhile.
[1]: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...
[+] [-] antihero|13 years ago|reply
Linux can be really, really awesome, if you're prepared to spend time making your work environment great.
Lastly, all this time is not wasted, you end up learning so much stuff that you can apply to every where else - because of my linux knowledge I often find myself helping out my friends who use OSX but don't understand things like headers and libraries.
[+] [-] beefsack|13 years ago|reply
OSX is beautiful, it's smooth, and it can run a lot of my games too. But, just like Windows, it lacks functionality. Setting up a MAMP server with my required PHP extensions for work was an absolute nightmare even with Homebrew. Even when working with my Ruby projects I was struggling, when some gems required certain libraries to be installed, it was a nightmare to install them too.
Not to mention installing software and keeping it up to date was a pain too. Once you become used to relying on robust package managers it's very difficult to turn back.
Linux is designed to be powerful and functional foremost, and that's what makes it fantastic.
[+] [-] smokeyj|13 years ago|reply
I found running a VM on my mac to be the best of both worlds. Plus you can backup and distribute your VM so the entire team develops on the same setup.
[+] [-] mmackh|13 years ago|reply
From the impression I get of Marco whilst listening to his Build and Analyze podcast, is that he does have a lot to say about the technical aspects of his work. However when he does, it is often written/spoken out as a response to a question. The constant talk about PHP in recent weeks has probably triggered something he's been thinking about for years.
[+] [-] pbiggar|13 years ago|reply
I wonder if you've tried homebrew? It's really really good, esp compared to the horrors of MacPorts.
[+] [-] jaequery|13 years ago|reply
someone who has mastered in PHP will no doubt be a lot more proficient in developing apps than a junior/intermediate python or ruby developer. same can be said for reverse.
it really all comes down to knowledge and experience.
[+] [-] fideloper|13 years ago|reply
[+] [-] jaequery|13 years ago|reply
[+] [-] drivebyacct2|13 years ago|reply
Have you tried Unity or G-S lately? I'm not as willing to argue G-S has as clear a direction as Unity, but they both ship with a very limited amount of configurability and they're both insanely easy to start using even without background knowledge.
[+] [-] benihana|13 years ago|reply
I'm very surprised that Google doesn't provide some kind of consistent dev VM environment that is similar to prod that developers can SSH into.
[+] [-] z92|13 years ago|reply
If I want to write a hello world application in PHP, it's neither as long as <?php print("hello world");?> nor as short as <?="hello world"?>
Rather it's simply: hello world. Just type in those 11 characters in a text file and save it as hello.php. Now load it on your browser [or run it from command line] and it will print hello world. I don't think it can get any more simpler than that in other languages. PHP was developed from the ground up as a templateting language for serving HTML pages. These other languages are more of a general type.
Therefore the replacement for PHP should come through a new language targeted as a replacement for PHP as Jeff said. Otherwise there always be extra web/template stacks for the developers to take care of. And that will be the first hurdle to learn and overcome for novice developers looking for switching to something easier.
[+] [-] jerf|13 years ago|reply
After 15 years of one of the biggest bursts of innovation the open source world has ever seen, and with such diversity in frameworks that the mind boggles, nobody has returned to this model successfully. I've got MVC-inspired designs coming out my ears, continuation-based designs, frameworks just beginning to incorporate web sockets deeply (instead of as an afterthought), GWT, ASP.net, and other attempts at building a fundamentally different model and compiling it into another, and everything under the sun... but no return to the page-is-program model.
I don't think it's the key to PHP's success, because even in the competitive-yet-very-fertile soil of the web framework world, nobody else can make it work anymore. I think it's vestigial, and nothing else.
(Personally I think the key is simply that everybody has deployed it, and since there's basically no way to force every web hosting company to support Language X simultaneously, PHP isn't going away until the entire concept of web hosting goes away. Which isn't anytime soon.)
[+] [-] andreasvc|13 years ago|reply
[+] [-] randomdata|13 years ago|reply
If you truly only need a single page template without any further abstraction, then why not use PHP? It seems all of the complaints about PHP stem from using it in big projects. It is hard to argue that it does a single page template very well for when that is all you need. Right tool for the job and all that.
[+] [-] blindhippo|13 years ago|reply
Why not improve it? After the millions of man hours that have gone into the plethora of open source PHP based frameworks and tools (aka, what powers the internet) - wouldn't we as a community want to improve the foundations rather then scrap them entirely?
You know, like what happened with Javascript...
[+] [-] columbo|13 years ago|reply
Wouldn't that also apply to jsp, cfm, gsp, jsf and asp?
[+] [-] sho_hn|13 years ago|reply
But it's preaching to the choir. If you've never seen anything other than PHP, you won't understand two thirds of the list or why they're problems. (<- Not looking down on PHP coders there, rather I'm thinking back to when I started out on PHP and am speculating on how I would have received the document.)
How do we communicate effectively what makes other languages better to someone with no reference frame other than PHP itself?
[+] [-] alxp|13 years ago|reply
So to encourage developers to start with something other than PHP you'll need to lower the barrier to entry to modifying existing software, and also make something as popular and widely useful as WordPress and MediaWiki.
This is going to take a while.
[+] [-] wvenable|13 years ago|reply
Two thirds of that list are actually incorrect.
But I programmed in Java, C++, C, VB, and so on before I started coding in PHP many years ago. So many years ago, in fact, that PHP was easily the best choice.
The problem with lists like that is they obscure the truth -- and that is -- that solving a programming problem in modern PHP isn't really that different from solving it in Python and Ruby. It's just not that much of a leap.
[+] [-] smsm42|13 years ago|reply
The idea that disagreement is because person disagreeing is not educated enough and only if he could learn The Next Best Thing he'd immediately become a fanboy like you are - is deeply fallacious. I've seen your Next Big Thing. It's nice. So are other hundred Big Things. They are all nice, and all have its place. And no, I'm still not a fanboy, sorry. I still think Python is a nice language for its uses, and PHP is a nice language for its uses. Banality, but somehow so many people can't grasp how can it be. Please believe me, it can.
[+] [-] maratd|13 years ago|reply
You're trying to convince yourself that you made the right choice, the right investment.
That's sad.
Have confidence in yourself. You made the right choice for yourself and let others choose for themselves.
There is no universal proper language or platform to use.
PHP works and it works extremely well for many companies. Its commercial success is not debatable.
Python on the other hand ... aside from Google, who's using it at a massive scale? Even Google has been shifting to Java for a long time.
See how that works?
Let's stick to the old parable. A proper tool for every job. If you're convinced that there is no proper application for PHP, then you're not even trying to be objective ... you're just trying to make yourself feel better about the choices you made.
[+] [-] espeed|13 years ago|reply
The multi-core reality means that the long-term languages will have a strong concurrency model. Clojure and Go are two languages with strong concurrency models that are building momentum and have potential to go mainstream.
But for your first foray out of PHP, I would pick a language that has a large, well-established community with mounds of documentation, books, and resources.
My path out of PHP would be:
Learn Python first because it's easy to learn, easy to read, and it's taught at major universities so it's easy to find smart people to help. It has a large community behind it, which is still building momentum, and it has a huge library so it's generally more useful than Ruby.Then once you're comfortable with Python, I would venture into Clojure. It's different, but in a good way. And you get access to all of Java's libraries so it's practical now, even though it's relatively new.
And then look at Go. Go is building momentum fast, but right now it doesn't have the massive libraries that Python and Clojure have. However, in a few years, this will change.
[+] [-] pcwalton|13 years ago|reply
[+] [-] ericingram|13 years ago|reply
If your goal is to become independent and wealthy, perhaps not.
[+] [-] tom_m|13 years ago|reply
PHP is good. I'm living proof of that. I'm a very successful developer and PHP does just about everything I ask of it. I also find it enjoyable (when you don't use crap frameworks or CMS' like Drupal). For those of you that do struggle with PHP, then what on God's green Earth makes you think you'll do any better with the next language? There comes a point when you've rifled through everything saying they are all junk that you gotta look in the mirror and ask yourself what's really the problem?
[+] [-] banana_bread|13 years ago|reply
[+] [-] pkulak|13 years ago|reply
[+] [-] xyzzyb|13 years ago|reply
Interested in learning something that isn't PHP to code your web applications in? Ok. You have a ton of options and this is a very exciting time to be a web developer.
Do you want to lean towards stability and proven concepts and work within a full application structure? Look at Django and Rails.
Do you want to serve up responses from a simple script without a lot of extra pieces? Look at Sinatra and Flask.
Do you want to get in on the cutting edge and don't mind forging some of the path yourself? Look at Node.js and Meteor.
Got a high level decision made? Sweet. Now compare the primary languages between your choices (forget the framework for now). After a few minutes looking at each, which reads better to you? Feel free to go on gut instinct here: there are no wrong choices.
You've now made a choice for your next learning target. Now: don't spend years. Don't worry about knowing everything about the framework and the language. Google for "X tutorial" and follow the first link that looks reasonable and current. Do that tutorial. Now you have some bearings within the framework and have some idea of how it thinks.
Now. Pick something you want to build (a todo list is popular now, it used to be a blog or a wiki). Build it. You will make mistakes. You will be confused. Google for answers (if you're in Node.js or Meteor you will have trouble here) or hack until you get something working.
Throw what you built up on github and ask others to check it out. Build something else. Repeat.
If you are already a decent programmer with a good grasp of the web and how HTTP works: you will pick up any of these frameworks well enough to work in it in a month or so. In six months you'll be well advanced: especially if there are good books available for the framework/language you are working in.
Have fun!
[+] [-] jmduke|13 years ago|reply
It's built for smaller web apps, and rapid prototyping. The system of mapping endpoints to functions is incredibly intuitive -- if you've used Python before, learning Flask is incredibly easy.
[+] [-] danso|13 years ago|reply
I know it's difficult to compare or find an observer who could adequately judge between the two, but I wonder if Ruby made Jekyll easier to write and maintain? Of course, there's not any easy way to make that judgment without knowing how much effort Marco put into Second Crack versus what was put into Jekyll.
[+] [-] Timothee|13 years ago|reply
So when I start something that has a deadline in 24 hours or just a few days, I can either fall back to PHP to get something going fast or spend most of my time just learning a new language. So, I have been typically going with PHP…
I've found that the important thing is to take the time to set yourself up with the minimum environment that can get something, anything going in a different language: that means whatever is needed to print something on a page and get some logic working with GET and POST parameters. Because the nice thing with PHP is that it's so easy to write a single file that displays text on a page, or that responds to POST and GET parameters with some logic behind it. If I started with Ruby for example, I wouldn't know how to do this basic thing. (granted, with Rails and Heroku, this is easy)
My plan is to make Python my generalist programming language and I started to look at Flask (http://flask.pocoo.org/) for that reason: it's a mini-framework that doesn't take long to learn how to do these simple things. I can then play with it for simple things.
*though it can make things easier since I can just work on whatever I want in whatever language I want :)
[+] [-] RyantheLou|13 years ago|reply
Sure, there's a learning curve to any new language, and I would love to learn a "better" language, but, if you can't explain to a novice why a certain language is better, the novice is going to go for the smallest learning curve and the language with the best/most ubiquitous documentation.
What do Python or Ruby do that PHP can't? Are they "faster?" I've heard that they are more secure, but does that mean that PHP can't be as secure if a skilled developer is coding for security? People say things like "rapid development," but I've been using CodeIgniter and it seems pretty rapid to me. What it all comes down to is this: are Ruby and Python "practical" for novice programmers like me? Truly? If not, then doesn't it make sense to start with a language like PHP and then, when you have figured shit out, make the jump to Python or Ruby? I wish this was more clear.
[+] [-] larrys|13 years ago|reply
Something that I'm not seeing people take into account generally when they decide to develop in a "new" language or complain about any established language additionally is how far along that new language is and how many people know it well. Choosing the best thing also involves how easy it is to get the help of others. An analogy might be an automobile purchase. If you are located in the middle of nowhere it might be a better idea to buy the Honda where there are multiple local dealers rather than the NewGreatAuto (pick any car with less market share that is better price and feature wise) where you have to travel 50 miles each way for warranty service.
I went through this with hardware back in the 90's choosing SGI servers that were better price and performance wise than Sun, only to find that many open source software ready to run was not available for SGI. And that there were less people that knew IRIX than Solaris.
[+] [-] restlessmike|13 years ago|reply
Why do I need to switch?
You've already gone through the pain of learning how to work around all of its warts, and you will lose a ton of productivity immediately after switching to a new language. This may seem trivial if you are just programming as a hobby (and fun, even, to learn something new) but if you are a professional programmer, the productivity loss can be a problem. If you are a freelancer billing at a good rate, can you charge the same thing to your new client knowing things will take you twice as long and be less optimal, with bugs happening in new surprising places?
Taking on a new language needs to happen for a better reason than "the language I'm an expert in is kind of ugly." Are there libraries that are only available in the new language? Is there a different server architecture that lets you write applications with several times the performance in certain important use cases? These are valid reasons. "Too many functions in the global namespace" is not, especially if you already have them all memorized.
[+] [-] bluesnowmonkey|13 years ago|reply
[+] [-] ch0wn|13 years ago|reply
[+] [-] lukifer|13 years ago|reply
[+] [-] playhard|13 years ago|reply
[+] [-] zaptheimpaler|13 years ago|reply
[+] [-] gojomo|13 years ago|reply
Like PHP, .PYP files would be templates with no limits on mixing presentation and logic. The filesystem hierarchy provides the default URL-routing.
But, you get the regularity/power/compactness of Python wherever you want it. (Perhaps, every line in a .PYP file beginning with '\' is meaningfully-indented Python.) If you ever want to hijack a part of the URL-space from the filesystem, there are routing utilities to do that.
Would such a glide-path from PHP to Python be a good thing? Or bad? ("The barbarians are at the gates!")
[+] [-] voyou|13 years ago|reply
I don't think it's widely used, though, probably because the possibility of using PHP in this template-like way isn't actually a big advantage (serious PHP devs almost certainly don't use PHP that way); PHP's big advantage is that it's installed everywhere.
[+] [-] wvenable|13 years ago|reply
[+] [-] lucian1900|13 years ago|reply
Go with Python if you already find it appealing.
[+] [-] podperson|13 years ago|reply
a) You need to know it anyway.
b) Node.js is awesome and works the way web servers ought to work.
c) JavaScript, if you avoid the obvious warts, is a really nice language. Every other language I've learned either has as many warts as JavaScript or isn't practical.
Having picked JavaScript, it turns out to be amazingly powerful. Need to automate content production? Adobe's stuff is all scriptable via JavaScript. Want to write a 3d game? Unity uses a dialect of JavaScript.
[+] [-] adeelk|13 years ago|reply
Time to learn some more languages.
[+] [-] pragone|13 years ago|reply
I stopped myself from, unfortunately, not building things. I've spent the last year learning Ruby, Python, Rails, Django, and a half dozen javascript frameworks to get myself acquainted with it all. Only recently I took a position where I'll be working with Rails full-time. It's a tough addiction to break, but it's so liberating once you learn what else is out there and what you can do with it!