4 ms·
> Ruby guys can always do the argument "Our code required 50% more servers, but it increases developer productivity by 50%, and since developers cost more than
by spriggan3 11y ago
> Ruby guys can always do the argument "Our code required 50% more servers, but it increases developer productivity by 50%, and since developers cost more than servers - it is a win".
Well that's true on a certain scale. There is no way I could have completed some projects with a small team, in a short amount of time if I had to use some like Go or Rust. Ruby,Python or PHP are useful for what they are good at : "front-ends" (on the server). So is Java by the way, but while Java is fast it eats way too much memory while doing nothing. Again, at a certain scale , developer cost VS performance cost is a reality. It's not very useful to boast about chosing Go or compiled language X or Z while your competitor can bring an app into production in 1/8 of the time it takes to develop the solution in PHP.
AFAIK Parse.com spent a year rewriting their Ruby app in Go. In the meantime, there brought no new functionality and then they just closed shop. Sure they got to write a fancy blogpost about how successful they were with Go. so successful they rewrote their app in nodejs when they decided to opensource it.
> So developer unfriendly + server unfriendly
How is PHP developer unfriendly ? It has 15+ years of libraries to do almost anything. You should probably have a look at PHP7 before passing any kind of judgement.
How is it server unfriendly ? PHP is with Java the most deployed language in the world.
- tyre 11y agoUsage (number of libraries or deployments) is not the same as friendliness. They are entirely separate. Consider programmatically working with email. Nightmarish, despite the number of users.
- spriggan3 11y ago> Consider programmatically working with email I'm not sure what you're getting at, Working with email is a nightmare in any language, Go or Rust or language of the moment X included.
- mikegioia 11y agoThe fact that he calls PHP "developer unfriendly" convinces me that that he's probably written 0 lines of PHP code and worked with 0 PHP developers.
- SomeCallMeTim 11y agoI've written a few thousand lines of PHP code, and can confirm that, on the whole, it's developer-unfriendly. It's junior-developer-friendly, but if you want to do something serious, there are better options.
- caleblloyd 11y agoI write PHP daily with a team if 6. It's Object Oriented support makes it very developer friendly for medium-sized projects if they are architected well. Using a modern framework like Yii2 makes it just as good as any other modern franework in any other dynamic language (rails, django, entity, etc). Yii2 performance also doubles from PHP5.6 to PHP7 for those interested: https://caleblloyd.com/software/yii2-php-7-performance/ https://caleblloyd.com/software/yii2-php-7-performance/
- subsection1h 11y ago> Using a modern framework like Yii2 makes it just as good as any other modern franework Please demonstrate that Yii 2 is as feature-rich as Rails 5. Thanks.
- mikegioia 11y agoYou guys need to relax. This is cringey for the Ruby community.
- ftxrc 11y ago> Yii2 > Modern Pick one.
- SomeCallMeTim 11y agoI've seen the performance improvements in PHP 7, which look awesome, and it's good to know that there are modern frameworks available now, so it's entirely possible the PHP universe has improved markedly since I was there last. But what kills PHP for me (and Rails and Django, for that matter) is the lack of native support for asynchronous operation and poll/epoll. If you're stuck with one thread per user, then you can't scale beyond a couple thousand concurrent users on one system without latency getting terrible. You can just do so much more on one server with Node it's not even funny. 70k queries per second with low latency are not uncommon; add in some work and that goes down, of course, but a well written app can have 20k+ queries per second of throughput. Even PHP 7 with WordPress in cached mode only brags of ~5k queries per second. You could likely do 4x that in Node without trying -- and possibly even without caching.
- HeyImAlex 11y ago> There is no way I could have completed some projects with a small team, in a short amount of time if I had to use some like Go or Rust A fairly large internal php service at work just wasn't working well enough for us (for a lot of reasons), so I decided to try writing a drop in replacement in go (as in, the server would respond to `whatever/endpoint.php`). It took about a month and a half, but the translation process was actually incredibly straightforward. Like, I automated a bunch of it straightforward. Most of my time was spent writing unit tests where the other codebase didn't have any. Maybe it was just how that php was written (totally frameworkless), but both languages seem to be fond of straight-forward imperative code, and IMO a junior developer could be just as efficient writing go as they could php. And man I don't even like go.
- spriggan3 11y agoGood for you. I'm talking about enterprise projects led by 2 people that need to be completed in 3/4 weeks. Not rewrites. With rewrites you already know the entire business logic of your system. Rewrites are always quicker than coming up with a solution from scratch. Does your service involved heavy HTML content ? with complicated HTML views ? I bet not. A dumb JSON API can be done in any language for sure.