News for hackers. Stuff that matters.
Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @12:21PM (#23977357)
>We are generally at the forefront of trends and big changes in tech as they roll out, which keeps it fun and challenging.

Still phasing out jQuery and using php and mysql. I'm sure their streaming tech and video player are cutting edge, but otherwise their stack sounds like a large, legacy webapp.

Re:Interview with a Pornhub web developer (2019) by Nextgrid on Tuesday July 28, 2020 @01:43PM (#23978533)
A "legacy" web app that happens to perform at the same scale as YouTube. Maybe there's nothing wrong with using simple, battle-tested technologies after all?
Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @02:35PM (#23979168)
Seems I rubbed some people the wrong way. That's ok. PHP is a disgusting language. Of the over twenty languages where I have more than passing familiarity, PHP and Perl are the worst. There are better options almost irrespective of the use case. JQuery was fine back in the day, but there are much better options now too. If you find yourself working with these technologies, and you don't like it, find a new job. You couldn't pay me to work with them anymore.
Re:Interview with a Pornhub web developer (2019) by Nextgrid on Tuesday July 28, 2020 @02:57PM (#23979393)
I wasn’t actually commenting about the language itself, more about the fact that you can go very far with just a server-side language and powerful hardware without having to use overhyped stuff like microservices and/or Kubernetes which apparently everyone thinks is a must-have nowadays.
Re:Interview with a Pornhub web developer (2019) by therealdrag0 on Thursday July 30, 2020 @01:59AM (#23995120)
Eh. K8 is for orchestration, right, not performance.

Also adult site’s performance is insanely read heavy. They can cache the shit out of content and whatever is behind that doesn’t have to be the fastest. That model doesn’t apply to all software needs.

Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @04:52PM (#23980575)
Sure, just about anything could work. With a dynamic language your hardware requirements will be about 10x more. But that's a tradeoff you might want for possibly faster development time.
Re:Interview with a Pornhub web developer (2019) by Nextgrid on Tuesday July 28, 2020 @08:33PM (#23982227)
When it comes to cost to performance ratio your best option is avoid cloud providers like the plague and go for good old bare-metal servers (from a third-party or on-premises if your scale warrants it). You'll get a 10x improvement without having to change any software at all. Then if that's still not enough you can consider switching languages.
Re:Interview with a Pornhub web developer (2019) by Ligrev on Tuesday July 28, 2020 @05:43PM (#23981002)
What are you basing your 10x comparison on? What costs 10x less? Does it consistently cost as much?

I'm sure they would love to hear from you if you can cut 90% of their hardware costs without increasing other costs.

Re:Interview with a Pornhub web developer (2019) by cutler on Tuesday July 28, 2020 @07:53PM (#23981961)
Based on these benchmarks - https://dizzy.zone/2018/01/23/Kestrel-vs-Gin-vs-Iris-on-EC2/ - Go could easily be reducing costs 10x at a PHP-based company. Just look at Go's memory requirements. It's insane.
Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @05:57PM (#23981103)
Anecdotal reports basically, obviously 10x is just a round number I picked. I've seen a company that switched citing up to 40x hardware reduction going from Ruby on rails to Go.

10x cost savings is hardly unheard of.

Re:Interview with a Pornhub web developer (2019) by spanhandler on Tuesday July 28, 2020 @07:02PM (#23981622)
I think you're significantly underestimating how well-performing PHP is, in the narrow but important field of serving dynamic web pages. Go (or Java, or C#) can be faster but you might be surprised that it's less of a slam-dunk win than one might expect. Python and Ruby basically aren't in the same league. Nodejs can be said to be licking at its heels, at best. Yes, seriously.

I'd put PHP somewhere under the middle of the list of languages/ecosystems I'd like to work in again (RoR, specifically, though not Ruby generally; non-TypeScript JavaScript; and gnarly AbstractFactoryImpl-style Java are all probably worse than it, IMO, and of course PHP deep in anything like Wordpress is pretty miserable) and I like Go quite a bit, but there's no denying that if performance is a top criterion PHP should probably be on your short list when choosing a language/ecosystem, and if PHP's not going to cut it then probably no scripting languages are on your list, and you're very likely looking real hard at C++.

Re:Interview with a Pornhub web developer (2019) by atonse on Tuesday July 28, 2020 @02:15PM (#23978949)
Since when is jQuery, PHP and MySQL "legacy?"

Half the web runs on that stack.

Re:Interview with a Pornhub web developer (2019) by outworlder on Tuesday July 28, 2020 @02:43PM (#23979253)
And a significant number of financial and airline systems run on COBOL. Active usage doesn't make something more or less 'legacy'.
Re:Interview with a Pornhub web developer (2019) by atonse on Tuesday July 28, 2020 @03:50PM (#23979930)
Brand new systems are being written all the time that use PHP and MySQL.

These are actively developed technologies that new programmers are learning all the time, with vibrant ecosystems of suppliers (like wordpress plugin and theme developers, or mysql performance consultants), that aren't showing any sign of fading.

Again, that doesn't compare to COBOL.

Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @04:54PM (#23980596)
This is true. They're still subpar options though. I mean if you have to use them because that's what your team knows and you don't have time to learn something else, fine. But if you're building a new team and hiring for those skills you're making a mistake.
Re:Interview with a Pornhub web developer (2019) by Frondo on Tuesday July 28, 2020 @05:49PM (#23981048)
They're fine, as good as anything else right now. PHP can be very high-performance, and MySQL/MariaDB, when run in the strict modes (usually enabled by default now) it's ACID-compliant, fast, and still easy to administer.

I was part of a team that launched recently on C# (.NET Core) and MariaDB, but if more of us were comfortable with PHP I'd have had all confidence that that'd have been just as good a platform.

I don't see how it's a mistake. What wouldn't be? node.js? Something ruby- or python-based?

Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @06:00PM (#23981133)
Use Python or Go. Better thought out languages, comparable or better tooling, libraries, and performance. A while back I would add ruby to that list, but Python seems to have won the market over it.

So, again if it's what your team knows best, it's fine. Otherwise it's a mistake.

Re:Interview with a Pornhub web developer (2019) by carlhjerpe on Tuesday July 28, 2020 @07:01PM (#23981614)
I would like to argue C# is a well thought out language with great tooling, libraries and performance (not C(++) performance, but do we really need that if we could iterate 10x faster?)

The type system being static with dynamic support and reflection enables me to think about real problems instead.

I used to dislike GC languages, but working with C# changed my mind. (not saying refcounted systems aren't nice, I'm following rust from a distance)

Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @11:02PM (#23983148)
I like C#, no problem with it as a pick.

I don't believe dynamic languages deliver on faster iteration over the long haul. I used to be the biggest dynamic languages fan, but now I avoid them unless it's a small project.

PHP is a mess of a language that's been cleaned up somewhat well, but it's still at such a disadvantage.

I would never advise a company to use it for a new project unless they have lots of talent very familiar with it already.

It's just a mistake. You can disagree, but know that you're wrong ;)

Re:Interview with a Pornhub web developer (2019) by atonse on Thursday July 30, 2020 @11:32AM (#23999325)
When I was a full time C# dev (after doing ruby for years), I found that ReSharper turbocharged my productivity to the point where I was faster with C# than I ever was with Ruby.

But credit to ASP.NET Web API being so solid too.

Now that I almost exclusively code in Elixir, I'd love to try F#.

Re:Interview with a Pornhub web developer (2019) by cblconfederate on Wednesday July 29, 2020 @07:55AM (#23985638)
i would like to see someone rewrite wikipedia in another stack and compare.
Re:Interview with a Pornhub web developer (2019) by unethical_ban on Tuesday July 28, 2020 @02:20PM (#23978997)
I guess I should do more of my own research (I am security ops, not dev) but when did jQuery become legacy?
Re:Interview with a Pornhub web developer (2019) by sbarre on Tuesday July 28, 2020 @03:02PM (#23979464)
jQuery provided a lot of quality-of-life functionality that is now part of the native Javascript language/runtime on modern browsers.

The most famous likely being the selector querying functionality, and the event management (and I'm sure others I am not thinking of).

jQuery still works, but under the hood it's just proxying those native methods, so you might as well just use those native methods directly.

Re:Interview with a Pornhub web developer (2019) by wallawe on Tuesday July 28, 2020 @02:35PM (#23979170)
With the advent of new frameworks like React (7 years old now) and Angular, jQuery has become less and less used. Anecdotally, I have interviewed at 7 or 8 companies over the last 7ish years and only one still used jQuery, and they were moving away from it.
Re:Interview with a Pornhub web developer (2019) by eloff on Tuesday July 28, 2020 @02:31PM (#23979120)
Long time ago, even the creator of jQuery says don't use it.
Re:Interview with a Pornhub web developer (2019) by xrisk on Tuesday July 28, 2020 @01:30PM (#23978371)
if it ain't broke, don't fix it
Re:Interview with a Pornhub web developer (2019) by cblconfederate on Tuesday July 28, 2020 @02:24PM (#23979041)
Do suggest a better alternative.
Re:Interview with a Pornhub web developer (2019) by wilsonrocks on Tuesday July 28, 2020 @02:49PM (#23979320)
I would use vanilla JS rather than jQuery now that most browser compatibility issues are sorted. But most of my work doesn't need to support versions of IE older than 11.
Re:Interview with a Pornhub web developer (2019) by cblconfederate on Tuesday July 28, 2020 @03:02PM (#23979466)
which is exactly what they are doing (also , nominally vanilla JS is even more legacy than JQ)
Re:Interview with a Pornhub web developer (2019) by wolco on Wednesday July 29, 2020 @01:18AM (#23983711)
What do you gain? What do you lose?

jQuery has a better syntax and smaller coding footprint.

Re:Interview with a Pornhub web developer (2019) by holoduke on Tuesday July 28, 2020 @05:23PM (#23980841)
isn't jQuery nowadays also using all native functions of a browser? I still find the regex selector so powerful in jQuery.