I've invested over 10000 hours in PHP and I want to know whether to invest another 10000 in some other language and what are the alternatives.
There are lot of opinions in the wild but I think that opinion supported by example is much better than just "I like X and dislike Y"
edit - some grammar EDIT 2 - To be more precise - I am not looking for a brain teaser, but for a tool which will allow me to be 1.5x (or 2x or 3x) more productive. I am looking for a tool to feed my family and myself in the next few years. To be honest I am a little scared of all "PHP sucks" articles. I don't want to be jobless in 3 years when/if PHP becomes the new COBOL.
Also, if I'm not mistaken, the very initial versions of Facebook were written mostly in Perl, so it's not like Zuckerberg was stuck with PHP since day 1.
http://books.google.ca/books?id=RRUkLhyGZVgC&lpg=PA34&ots=LR...
I'm not a fan of PHP but I don't think their issues could have been solved by simply porting over to another language.
My lesson: I will stick with PHP and learn more about organization, architecture and best practices. And Composer and PSR.
Please name these "Rails gurus". 100% of the experienced Rails developers whose blogs I follow have complained about old Rails code bases they've worked on or have encountered.
I personally am a fan of diversity (master one skill set, then another, then another). Unless you're doing cutting-edge work, you're probably at that point where your diminishing returns are close to zero, so you might as well learn something new.
There's no point in rewriting any current projects in another language, but I think it would be wise to start new projects in languages that aren't PHP. Expand your horizons and all that.
Nowadays I only use PHP if I'm testing something briefly or just need a really simple script; kind of like the bash of the web.
The problem has never been the language, but rather the software's organization and architecture (or the lack thereof). You can make mistakes in any language, some just make it a little easier for you. Such as PHP's notorious ability to mix code and HTML in the same file... the horror!
Before contemplating a language change, you might want to think about ways you could improve your architecture, development practices, and code hygiene.
I would recommend playing around with some other technology though, not so you can move to greener pastures but to just get a taste of what else is out there. Front-end stuff like Angular and Ember (which require some knowledge of HTML/CSS and JS, which as a PHP guy I bet you would have). Tools like these may slowly make backend technology less differentiated on the small to medium scale as time goes on, so you can't go wrong with investing time in frameworks like these.
Coming from PHP, and probably knowing some JS, have a bit of a look at Node (and Express, to get started), the concurrency model is different enough from PHP. Or even have a look at (gasp) ASP.NET MVC. I don't think that tech gets enough love these days. Try using Heroku with Rails and then go and try and use .NET with Azure. You'll be surprised at how much more responsive Azure is by comparison and you'll be enamored with the tight tool integration.
Either way, there's nothing to worry about. There'll still be heaps of PHP apps to maintain in your lifetime. It might make it harder for you to jump into some fancy new start up, but if you don't wear a cap backwards and have skinny jeans you wont get a job with the cool kids anyway.
Set aside a couple of hours a week to explore some alternatives and see how you feel within 3 months.
I haven't touched PHP in a few years (C# and Python for work now) and since really groking a other few languages I've come to the conclusion that, IMO, PHP manages to combine some of the worst aspects of dynamic and static typing to produce an ugly, confused language with gotchas that still haunt me.
But none of that matters - management, directors, clients, whoever care about results and productivity. They don't exist inside of the tech-hype bubble. People want a certain feature set, at a certain cost and within a certain time frame. They certainly won't rewrite their massive code base from PHP to start again in new-shingy-x, when they could be adding more value to an existing solution.
As much as I dislike PHP, I was amazingly productive in it. The systems I developed where way ahead of their competition just because I could iterate so rapidly. (It turns out I am even more productive in Python than I ever was in PHP, hindsight 'eh!)
You mentioned COBOL - there are a world of COBOL jobs out there (this is the first page that came up in Google http://www.jobsite.co.uk/cgi-bin/advsearch?search_type=quick... ) The fact that COBOL hasn't been cool for a few decades doesn't change the fact that there are masses of applications still running it across the world.
In your post you didn't say anything about disliking PHP, you said your scared of yours skills becoming redundant. Don't be - there will be vast amounts of PHP development going on in the world for decades to come, it isn't going anywhere just because the next big thing arrived. It just won't be cool and discussed at length on the internet anymore.
If you focus on being a skilled programmer instead of a coder who only works in PHP then you won't have trouble adapting your skillset. Make a point to really understand how what your developing works and why. When I picked up Java and C# after PHP I was productive in those languages within a few days - they are not that different at all. After a few months you will have learnt the idioms of those ecosystems and be well on your way to being fluent. A great programmer can produce great code in any language, a poor programmer will produce poor code in any language.
I do think it is really valuable to pick up a new language now and again, I always learn something that I take back to whatever I do day-to-day. It sounds like you work in web development at the moment, so maybe stick with something along those lines. Expert Javascript developers are so hard to find, I always find them the hardest to recruit for! It is a challenging language - everyone seems to 'know' it at some superficial level, but make an effort to really understand its idiosyncrasies.
Much more important than anything I've said above - developers have very personal, often very strong, opinions about programming languages. Take them all with a pinch of salt - programming languages don't matter nearly as much as we think they do. Play with a bunch of languages and then focus on a few the few that you really take to - quickly you will find something that you are passionate about enough to want to put your next 10,000 hours into.
As a solid PHP developer, if you aren't as solid on the front-end, then that's a great direction to go. An ace HTML / JS / CSS developer will have no problem finding work, especially as the front-end gets more complex and gets asked to do more. This would be a great enhancement to your tool-set rather than a replacement.
Otherwise, I would be looking at things which could bring in an alternative income. For example, you could build an add-on for Wordpress which you could sell while also boosting your profile in the Wordpress community. You may not want to do Wordpress work, but that could be another source if your other sources dried up.
There's lots of other things you could do also. The possibilities are endless. You should try to break out of your comfort zone of doing dev work to bring in other sources of income.
I can sense the fear, uncertainty and doubt in your post. You should embrace the chaos, kick your creativity into gear and try some different things. Chaos and change is good, it shakes things up and creates new opportunities.
Don't see your hours with PHP as a waste though. It's important as a developer to try different platforms and languages so you understand the pros and cons of different approaches.
On the other hand, if you are building a project to learn from, or for personal reasons, then take the time to start learning a new language.
This is not to say you can't invest time in another language to build a project in a different language. There may be reasons where PHP will just not cut it.
So to answer your original question. There are no projects I am sorry for building in PHP. However, there are projects where I look back and say I wish I had taken the time to learn a different language. Those projects tend to fall into the second category and I was just too lazy to take the time to learn something new/different at the time.
To answer your question: Whether it be PHP or Python or Ruby, you will need to work hard. Advice if you stick with PHP: Get the Zend's PHP and ZF certificates. Apply for job after that. You won't be jobless in next 5 years, and you can expect quite a good salary.
I looked at the available tools, got a price for a very expensive commercial tool, and got a price from an independent programmer to use rrdtool and build a custom tool. I wrote a paper which set out the options in a paper for management, explicitly saying it should be a fixed price contract with only supervision from our team, no effort.
The Engineering Director came to me and said he had a contact at another company, they already had a solution that would be suitable and they would be paid (by the hour) to adapt it to our needs. A month later they arrived with a Cisco PIX firewall, two HP Xeon servers and a pile of PHP and Perl code.
There was supposed to be two days of training and some integration. It didn't work. They had done nearly nothing and we had two weeks before the system had to be ready. So I knuckled down, rewrote the entire thing virtually from scratch and while learning PHP and Perl (I had exposure before but you could see my evolution of understanding in different parts of the code).
Two weeks later we had an undocumented mess that actually worked. I left shortly afterwards because I realised I might actually have to support this spawn of bile. I think it was two years later that I got a call asking me why it had slowed to a crawl. Given that my mind had blanked everything to save my sanity I couldn't help. But I suggested they look to see if the filesystem was full and to check the database. Apparently after a database and file system clean-up everything worked fine. I don't know how long it remained in service, but I fear it might still be functioning.
I know you wanted to opinions on different methodologies, but this is really just me sharing my scars and explaining why I shouldn't be let near code. ;-)
What I'd done different if i were starting the last one now? I'd not start on ruby, and would have went directly to php.
Btw, I'm starting one now in elixir. Cross fingers.
However, I still have Java as my backup language. I use Java for my side projects. I think there will always be demand for Java because of heavy use in big enterprises.
If I had to do it again I'd use node, but only for ONE REASON: concurrent I/O
PHP is not great if you want to get hired by someone else.
Pay rates for PHP skills are the worst.
hint: hhvm