4 ms·
Leaving PHP is too expensive
- brianwawok 11y agoTLDR: PHP is the language supported by https://forge.laravel.com/ https://forge.laravel.com/, and forge is so awesome, I couldn't afford to use any other language for side projects. Kind of silly, but also kinda a good point. If a framework is awesome but deployment for side projects is either $50 a month or a huge pain, it may be not worth it for the small fish..
- teh_klev 11y agoAlready discussed in great detail a couple of days ago: https://news.ycombinator.com/item?id=11104265 https://news.ycombinator.com/item?id=11104265
- andy_ppp 11y agoI couldn't help think "Staying with PHP is too expensive" while reading this.
- falsedan 11y agoI got, "Learning PHP is too expensive"
- stanmancan 11y agoThis whole language bashing thing is really silly and tiresome. You know what the best language is? The one you use to actually launch a project. I don't care if you write in PHP, Ruby, Java, Python, C#, Javascript; it really doesn't matter. There are incredibly successful services written in each and every language that prove it's possible. "Staying PHP is too expensive" Yeah? How big did Facebook get before starting to migrate off of it? Do you think you're going to be Facebook big? Probably not. I don't mean to sound snarky, and I know language bashing has been around as long as computers have. It would be nice though if this community, out of all of them, could at least acknowledge the fact that every language has it's pros and cons, we will all have our favourites, and just because we like X doesn't mean Y is horrible. I grew up writing PHP. I still do. I've written some applications that are handling millions of hits per day on a $20 Linode. You know what? For the longest time, despite having some some neat things in the past, I felt ashamed that all I knew was PHP. Because of comments like this. People bashing it constantly. It made me feel like a bit of a script kiddie, that I wasn't a "real" programmer unless I knew language _____. I had a huge, 2 year lull in my side projects where I tried to learn Ruby, Java, Python, before getting frustrated and dropping the project. I finally got over that and went back to PHP and suddenly I'm finishing, launching, and making a bit of money off my side projects again. For anyone that happens to read this; don't worry what language you write in. Just make cool, functional shit, that's really all that counts.
- andy_ppp 11y agoI wasn't bashing PHP per say but I was saying that if you are sticking with it you are going to get worse and worse jobs going forward because the market is looking for Python right now. Depends what you want to be building, or if you work for yourself and choose the technology. I'm building a network scanner at the moment and I have to say that even Python let alone PHP isn't really cutting it. As I've been learning Elixir (for a project in my spare time) and getting to grips with the OTP you really do start to realise that functional programming and the Actor Model amongst all the syntactic sugar is a big win. Sure if you are bashing out a PHP websites great. But if you are building something with lots of processes or parallelisation requirements PHP (or Python for that matter) is not your friend. In conclusion use the right tool for the job. As everyone knows we should all stop using PHP and start using lisp, given the choice :-) http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html
- stanmancan 11y agoOf course you don't want to use a hammer to dig a hole. Picking the right tool for the job is necessary regardless of what line of work you're in. With that being said, you can accomplish some pretty interesting things if you think outside the box a little bit. I wrote a small application to perform an ETL between various data sources (MySQL, an old version of MSSQL, various third party API's, CSVs). I populate a queue and spawn up as many PHP processes as I want/need (php -f /thread.php {$id}) and each one runs on their own, grabbing an item from the queue, processing it, then grabbing another one. Currently I run about 64 of these "threads" at a time with no issues, which allows me to sync a few million records relatively quickly. Best tool for the job? No. Does it work? Hell yeah. Had I tried to learn a new language to get this done I probably never would have finished it or it would be way harder for me to maintain/debug in a language I'm not familiar with or use often enough to efficiently troubleshoot when something comes up weeks/months/years down the road.
- wildster 11y agoThere are hosting companies such as Webfaction that have great reasonable rails or Django hosting.
- xiaoma 11y agoWeb faction is great. I hosted multiple Wordpress blogs, node apps and whatever toy I was building on for years for under $10.
- fennecfoxen 11y agoThe answer is cheap shared hosting that supports old-school standards: CGI (or FastCGI), and your choice of Perl/Python/Ruby/NodeJS/Go/Rust/etc. For a hobbyist project with minimal traffic, you can afford to deal with the application's startup latency. (Java / Scala are probably out, though. Don't know about Erlang, haven't used it). Dreamhost is affordable enough and will do such things.
- merb 11y agoI've setup Java/Scala projects on 5 USD hosts. Why are they out? With SSD's you could even run a bunch of them thanks to swapfiles.
- fennecfoxen 11y agoOh, they're out for shared-hosting CGI/FastCGI only, because of high startup time and high memory usage and the fact that no one in Java ever uses that deployment model. If you're doing droplet-based stuff I'm sure it could work, but I don't think the author is satisfied with the costs of running multiple projects.
- brianwawok 11y agoJava / Scala can get dicy on $5 host. Problem 1) SBT cannot run with 512 ram, so you cannot compile locally. If using phat jars, that means you need to upload a 100mb jar every time you want to deploy, vs just a git pull and a build. May or may not matter to you. Problem 2) Once you start doing some actual work, the JVM itself is taking up a few 100 MB of ram, and the OS takes up a fair bit.. this leaves something like 128MB ram for your app best case.. for a lot of apps this is not enough. I had to go up to at least 1 GB VMs to get my medium complexity Scala app to work in prod, and I have been tuning JVMs for many years.
- merb 11y agofallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile swapon -s Works pretty well. You can't actually run too much on it however if you use a tomcat you actually get a decent Request per Second something like 100r/s. And you don't need 1GB VMs. 512 MB Scala Apps are working fine. It just depends on the technology.
- xiaoma 11y agoIn the first paragraph, this post looked like it was going to go down the path of discussing local optima—once you're skilled with PHP and its toolchain, you have a strong incentive to keep using it. In the past certain events such as the rise of Ruby on Rails made a compelling reason to move, but now PHP has very productive frameworks of its own. Even though a strong case could be made that working in rails is still a bit more productive, PHP is close enough that it's a win in the short term. From the other side, PHP isn't as performant as Java, Node or Go for certain things, but that gap has also narrowed (especially with PHP7). In this case, the biggest returns from switching would appear only after your app has hit a certain scale and at that point switching is harder. This would have been a compelling argument. What the author argued instead was that Heroku, Azure and other hosts were too expensive and $10/month hosting at Laravel Forge locks him into PHP. I don't get that at all, especially coming from a Swede. How much is it worth to learn something like Rails that would give you an edge in building an MVP for a side project? How about learning Node and getting an idea of what so much of the development world is using? If you're living in a wealthy norther European country, is the hosting cost really something that you want to direct what education you'll invest into your career?