News for hackers. Stuff that matters.
Re:Interview with a Pornhub web developer (2019) by eric4smith on Tuesday July 28, 2020 @12:09PM (#23977213)
Back in the day I did work at a group of one of the largest adult websites.

Tech was PhP, MySQL, memcache and similar vanilla stuff running on many Linux servers - pretty simple stuff.

The trick was performance. Simple stupid mistakes that would not be detected in sites that have low traffic become enormous problems in a high traffic server.

Pretty much nothing was dynamic and we wrote scripts to create static pages for almost everything except search and authentication.

Things like logging just could not be done. It was easier to load a bunch of data in memory on a request and process it instead of running a slightly slower SQL query, since a ton of those could kill the database.

And yes, there were no placeholder images or videos. After some time you just get used to it and code. But I have to say you get pretty desensitized to it and when I resigned from that job my life in that area improved quite a lot.

Highlights were p*rn stars and random celebs visiting the office - but after some time that got kind of meh.

The job itself was just a programming gig and very professional except for the images on the screen which we learned to ignore.

On the whole, the guys who ran the thing were a pretty solid and great bunch of people and it was one of the best dev experiences in my long career.

Re:Interview with a Pornhub web developer (2019) by twic on Tuesday July 28, 2020 @01:00PM (#23977942)
I once worked on a site for a big underwear seller. It's not porn, but 90% of the media is extreme closeups of perfect ladies' bottoms and so on. The lead dev rapidly decided that the test product would be a very boring pair of men's boxer shorts.

Which was fine until he revealed that he'd chosen them because that's what he always wore.

Re:Interview with a Pornhub web developer (2019) by dvtrn on Tuesday July 28, 2020 @03:48PM (#23979902)
This story could have ended so many different ways in the thread context here that I chuckled a bit of relief at the end.

But now I gotta ask: you say it was fine until the reveal. Were they pictures of him in the boxers or just a brand he liked-or what did the reveal change for the team?

Re:Interview with a Pornhub web developer (2019) by twic on Tuesday July 28, 2020 @05:28PM (#23980895)
They weren't pictures of him, but every time i looked at the test site, for a fraction of a second, i thought about my colleague's crotch.
Re:Interview with a Pornhub web developer (2019) by ringshall on Tuesday July 28, 2020 @06:11PM (#23981230)
That’s a quote worthy of bash.org
Re:Interview with a Pornhub web developer (2019) by flywheel on Tuesday July 28, 2020 @07:39PM (#23981865)
I used to work at a porn company in early/mid 2000s, when IE was the dominant browser - the office breathed a sigh of relief when I coded a pixelation filter for IE using directshow effects or something, I forget it's been so long since I did anything for IE - but IE was fairly advanced for the time in what you could do with some CSS. The pixelation filter was for employee use only, of course. No longer did we have to actually watch clowns having sex to debug a problem with a specific movie depicting clown sex. Or any other porno, for that matter. It got kind of exhausting/distracting having to code when the data was porn.
Re:Interview with a Pornhub web developer (2019) by outworlder on Tuesday July 28, 2020 @02:37PM (#23979191)
> Things like logging just could not be done

Good.

There are legitimate reasons to log requests. But far too often, developers that are used to 'printf debugging' will abuse the system. In many cases, what they were actually looking for was either some form of APM, distributed tracing, or much more commonly, would be better done by collecting metrics - which tend to be much more lightweight.

At work I've been fighting a battle to turn multiple dozens of terabytes of logs a day into something manageable, for years now. Sometimes I wonder if I could use the logging system itself in lieu of the application, as practically all data is dumped there! It's difficult battle to convince multiple groups to just use a counter instead of spitting out the same line of text every time the same kind of event happens.

Anyway, back to the point: no matter how busy the system is, you can surely engineer a mechanism to collect error logs, even if you have to sample them. But while things are running smoothly, track metrics. And, if you have a reason to suspect things are wrong, selectively turn on some logging.

I wish more people were aware of the costs of logging. Even more so nowadays, with the microservices craze.

Re:Interview with a Pornhub web developer (2019) by danudey on Tuesday July 28, 2020 @06:52PM (#23981545)
At my previous company, one of the devs added some debug output, but they added it to a hot loop and forgot to if it out in production.

As a result, all of our frontend servers slowed to a crawl because the logging calls were thrashing our disk I/O - and keep in mind, this is an application which never hits the disk and lives entirely in memory, mostly just assembling data structures from other APIs and combining them into a response for the client. To see a server like that brought to its knees by disk I/O from three lines of debug logging was... impressive, to say the least.

Re:Interview with a Pornhub web developer (2019) by deeblering4 on Tuesday July 28, 2020 @05:50PM (#23981054)
There are some tools out there that run on-box to transform log events into metrics. Not the ideal, but scales much better than dealing with a firehose of useless logs in a central log system.
Re:Interview with a Pornhub web developer (2019) by blitmap on Tuesday July 28, 2020 @06:04PM (#23981172)
Counters are something I've become more familiar when logging from GPU drivers.
Re:Interview with a Pornhub web developer (2019) by commandlinefan on Tuesday July 28, 2020 @01:17PM (#23978194)
> after some time that got kind of meh.

When I was younger, I used to while away time by browsing exotic vacation destinations (that I couldn't nearly afford) on travel websites. One day, I got an offer to work at one of them. After about a month there, the last damned thing in the world I wanted to spend my free time doing was looking at travel website destinations. Made me re-evaluate what sort of jobs I'd want to do day in and day out.

Re:Interview with a Pornhub web developer (2019) by bryanlarsen on Tuesday July 28, 2020 @03:00PM (#23979440)
Work ruins everything. I helped a friend set up a dance studio and it ruined dancing for me for a little bit. Some career advisors say "If your hobby is your job you'll never work a day in your life". Bad advice IMO.

Now if you could figure out how to do it without either customers or bosses...

Re:Interview with a Pornhub web developer (2019) by citizenkeen on Tuesday July 28, 2020 @03:14PM (#23979559)
Best advice I ever got: Do what you like, not what you love.

If you do what you love, what you love becomes work.

Is you do what you like, then you like your work, go home, and have energy for the things you love.

Re:Interview with a Pornhub web developer (2019) by john4534243 on Tuesday July 28, 2020 @05:28PM (#23980889)
I am a non native English speaker. Whats the difference b/w like and love ? Both seem synonymous to me. If i love a person or thing i definitely like them.
Re:Interview with a Pornhub web developer (2019) by gdubs on Tuesday July 28, 2020 @05:33PM (#23980942)
Usually a difference in intensity. Love is what one feels towards their dog. Like is how they feel about their brand of dog food.
Re:Interview with a Pornhub web developer (2019) by DoreenMichele on Tuesday July 28, 2020 @09:12PM (#23982480)
In this case, I would say they mean take a job doing something you enjoy but aren't so invested in that you will resent doing it the way your boss wants it done or feel like you lost something when you get home and don't want to do more of it for fun.

Some programmers write code at work and then do side projects on top of that. Other people enjoy knowing a little code, but would find it burdensome to write production quality code everyday. For them, programming is a hobby. Other people are content to program for their job and then leave it at the office and stop there.

People who have a hobby they love sometimes find their enjoyment is completely ruined if they try to turn it into a business. Loving something on weekends and evenings doesn't necessarily translate to being able to do it happily all day, everyday for work when other people are calling the shots and telling you how to do it.

Re:Interview with a Pornhub web developer (2019) by mitchdoogle on Tuesday July 28, 2020 @07:43PM (#23981885)
I am a native English speaker. I would I agree with you that loving something does mean that you like it as well. "Loving" is a subset of "liking".

I would say that, in this context, liking something means it is satisfying to you beyond the average activity. While loving something means that it is something you consider a part of your life - something that you feel you couldn't do without.

So working at a job which involves something you love can sap the joy out of it, because you end up doing that thing not for you, but for other people.

Re:Interview with a Pornhub web developer (2019) by RJIb8RBYxzAMX9u on Tuesday July 28, 2020 @08:51PM (#23982339)
Generally, the strength of the affection, with "love" being stronger than "like". There are other differences between "love" and "like", but this is the main (and relevant to this thread) one.
Re:Interview with a Pornhub web developer (2019) by tudorw on Wednesday July 29, 2020 @01:58AM (#23983846)
Having something you love removed would cause emotional pain, having something you like removed would be like meh.
Re:Interview with a Pornhub web developer (2019) by rednua on Tuesday July 28, 2020 @03:18PM (#23979606)
This is great, thanks for sharing.
Re:Interview with a Pornhub web developer (2019) by smoe on Tuesday July 28, 2020 @03:21PM (#23979633)
I think it is not that work necessarily ruins everything. The problem is turning your hobby into a job means turning your hobby into a business, which is were in my opinion most of the friction comes in.

For programming the difference between what I like to do and what I can easily get paid to do is not that big, so it makes sense to combine as a career advice. But for hobbies like music or painting, unless you get extremely lucky, it is whole lot harder, takes much longer and requires to make much more compromises to get to the point where it is really fulfilling.

I only ever tried the latter semi-professionally. And it was already a soul crushing experience at times.

Re:Interview with a Pornhub web developer (2019) by cactus2093 on Tuesday July 28, 2020 @06:46PM (#23981496)
Exactly. "Start a highly competitive small business and bet your entire livelihood on it, but the product is something you love" is pretty different than just getting to do what you love all day.

For it to make sense, at a minimum you have to also like and be pretty good at running a small business in addition to the thing that you love.

Re:Interview with a Pornhub web developer (2019) by ashtonkem on Tuesday July 28, 2020 @03:31PM (#23979734)
I’ve gone with “someone who turned a hobby into a career now needs a new hobby”
Re:Interview with a Pornhub web developer (2019) by _jal on Tuesday July 28, 2020 @07:39PM (#23981863)
My best jobs have been at places where I simply did not care about the thing we were selling - in one case I was very far outside the target market, in another, just not something I use or think about much without a reason like income.

Several theories, probably something to each of them. The one I think explains the most is that if nobody is "passionate" about whatever you're doing, then you can approach things analytically, instead of having a layer of emotional investment gumming things up.

Re:Interview with a Pornhub web developer (2019) by to11mtm on Tuesday July 28, 2020 @08:39PM (#23982258)
I've seen a few takes on this mindset.

Personally, jobs that I thought the concepts/industry were interesting to me, but the work was far enough removed that it didn't sour me to the industry have worked out well. e.x. If you're a car guy, working on the software for an inspection company isn't too bad, you still come out liking cars, and wind up with some interesting stories.

OTOH, I've spoken with colleagues that have a bit more nuanced mindset: If they don't care about the product, that's fine, but they won't work for a company that sells a product they know they don't like, they won't do it.

Re:Interview with a Pornhub web developer (2019) by smsm42 on Tuesday July 28, 2020 @04:01PM (#23980040)
I think having more than one thing in your life is important. I mean, I like what I am doing at my job. There's not many things (maybe except "being a multi-billionaire"?) I'd do instead as work. But there are other things in my life that I like to do off work. Won't want to do them as work, but definitely good as something other than work. Being able to switch and rest is the key, I think.
Re:Interview with a Pornhub web developer (2019) by _trampeltier on Tuesday July 28, 2020 @08:09PM (#23982069)
If you make your hobby to your job, then you have no hobby anymore, it's your job.
Re:Interview with a Pornhub web developer (2019) by FearNotDaniel on Wednesday July 29, 2020 @02:06AM (#23983882)
Programming was my hobby when I was 11yo. 38 years later, I still can't believe they pay me to do this shit, it's awesome. Also, I have new hobbies now.
Re:Interview with a Pornhub web developer (2019) by KptMarchewa on Tuesday July 28, 2020 @06:17PM (#23981278)
Thank god I work in fintech. I guess nobody does that shit as a hobby.
Re:Interview with a Pornhub web developer (2019) by Uhhrrr on Tuesday July 28, 2020 @03:56PM (#23979983)
Robert Fripp: "The concern of the musician is music. The concern of the professional musician is business."
Re:Interview with a Pornhub web developer (2019) by defaultcompany on Tuesday July 28, 2020 @08:14PM (#23982106)
So true. My father tells the story of when he was a kid and got a job loading bubble gum machines with bubble gum. Apparently they told him he could eat as much bubble gum as he wanted which blew his mind. Of course then after the first week he couldn't stand the stuff.
Re:Interview with a Pornhub web developer (2019) by yetihehe on Tuesday July 28, 2020 @01:51PM (#23978628)
I had to make very tricky ad which required synchronization of flash "videos" in multiple browser windows, before js frameworks really started. To this day I hate "Hit the road jack" song.
Re:Interview with a Pornhub web developer (2019) by golergka on Tuesday July 28, 2020 @05:51PM (#23981062)
Doesn't ruin gamedev though.
Re:Interview with a Pornhub web developer (2019) by at-fates-hands on Tuesday July 28, 2020 @02:24PM (#23979036)
I remember reading a developer's horror story about working for an aspiring porn actress. He ran her site, monetized it and worked with her to get her videos out to larger sites and generate traffic for those so she could "move up in the industry".

The whole process sounded really seedy, and the parenting comments made by him the other guy who worked there were pretty distressing. Her kids (two boys, one girl all under 10) walking around while they were editing her porn scenes, all the marketing materials out in plain view of the kids as well.

He the nail in the coffin was when she stopped paying him and offered him sex instead for payment.

He said it was his first and last job in the industry. He said it also created a problem on what he should put on his resume for the time he worked for her. The suggestions on the site were pretty funny, but it was clear his experience was not like yours.

Re:Interview with a Pornhub web developer (2019) by hondo77 on Tuesday July 28, 2020 @06:35PM (#23981410)
Yeah, what I learned during my brief time in the porn biz was that, while being a sleazy jerk isn't a requirement to work in porn, it seems to help.
Re:Interview with a Pornhub web developer (2019) by dansnerd on Tuesday July 28, 2020 @03:13PM (#23979556)
Oh man, is that the same Eric Smith that I think it is?

Was this company located in a building on the corner with a flag flying? And did you maybe sit at a corner desk on the 3rd floor?!

If so, how are you doing, its DanS :)

Re:Interview with a Pornhub web developer (2019) by jdhawk on Tuesday July 28, 2020 @03:24PM (#23979675)
ha, missed connections on HN.
Re:Interview with a Pornhub web developer (2019) by eric4smith on Tuesday July 28, 2020 @09:35PM (#23982638)
Dan!!!!!
Re:Interview with a Pornhub web developer (2019) by Papirola on Wednesday July 29, 2020 @02:52AM (#23984078)
I love this forum.
Re:Interview with a Pornhub web developer (2019) by nitwit005 on Tuesday July 28, 2020 @01:40PM (#23978505)
> Things like logging just could not be done.

Had that problem at an ad tech company before. We just did sampling so that 1 in 10 or 1 in 20 requests would get logging.

It definitely made me wonder how many web servers out there have their performance determined by the rate at which logs can be written to disk.

Re:Interview with a Pornhub web developer (2019) by throwaway0a5e on Tuesday July 28, 2020 @01:50PM (#23978615)
>It definitely made me wonder how many web servers out there have their performance determined by the rate at which logs can be written to disk.

As someone in the HFT space I suspect a lot of traders are performance bound by this. Wouldn't surprise me at all if a couple darkpools were this way.

Re:Interview with a Pornhub web developer (2019) by dmurray on Tuesday July 28, 2020 @02:12PM (#23978913)
As someone formerly in that space I don't think so, assuming by "traders" you mean the prop firms who actually need the speed advantage. You can always arrange for the logging to happen outside the critical path, which is a tiny minority of the code you run. And you will do that if its necessary to gain a fraction of a microsecond on a competitive trade. Even if it's just being able to run a build with logging off for special cases.

For a looser definition of "traders" that includes dark pool operators and exchanges, then sure. Writing logs was definitely the bottleneck at one major European exchange for some years. They may not be able to turn off logging for regulatory reasons, but they also don't care so much about the microseconds. In this case they could definitely have improved performance with horizontal scaling (have each computer handle fewer stock symbols) but didn't consider that economically justified.

Re:Interview with a Pornhub web developer (2019) by throwaway0a5e on Tuesday July 28, 2020 @02:26PM (#23979060)
By traders I mean "anyone who doesn't sit on the market side of my network card", so a wide variety of firms. My comment about darkpools was tangential but there's a couple of them who aren't exactly known for running a tight ship.

>You can always arrange for the logging to happen outside the critical path, which is a tiny minority of the code you run. And you will do that if its necessary to gain a fraction of a microsecond on a competitive trade. Even if it's just being able to run a build with logging off for special cases.

Yes you can do that. Yes you'd think that anyone for whom it would be beneficial would do that... but you'd be surprised how often people run with logs cranked to 11 in prod.

Re:Interview with a Pornhub web developer (2019) by tyingq on Tuesday July 28, 2020 @03:11PM (#23979540)
I've had the opposite. Where we couldn't turn logging off because the writes prevented a weird race condition that would crash the application.
Re:Interview with a Pornhub web developer (2019) by colinmhayes on Tuesday July 28, 2020 @03:43PM (#23979840)
Lmao why use data synchronization when you can just write to disk?
Re:Interview with a Pornhub web developer (2019) by tyingq on Tuesday July 28, 2020 @03:49PM (#23979918)
Heh. It was a bit hard to pin down, but we did eventually fix it. One of those Java super deep dependency things where the 3rd party thing at the bottom is broken. I think it was cxf.
Re:Interview with a Pornhub web developer (2019) by throwaway894345 on Tuesday July 28, 2020 @04:11PM (#23980135)
Why write to disk when you can just sleep() sporadically?
Re:Interview with a Pornhub web developer (2019) by ashtonkem on Tuesday July 28, 2020 @03:33PM (#23979750)
Trading systems often record every single packet going through the network using fiber optic splitters, which makes it pretty easy to replay traffic to a debugging instance.
Re:Interview with a Pornhub web developer (2019) by sleepybrett on Tuesday July 28, 2020 @06:43PM (#23981474)
Most teams don't understand the cost of logging on their infrastructure, they just seem to thin writing logs is 'free'.
Re:Interview with a Pornhub web developer (2019) by doublerabbit on Tuesday July 28, 2020 @06:26PM (#23981337)
Close experience. Apart from I was working for a shady porno dating website and where I was the sole sysadmin on-call 24/7. The "Oh wow, I get to look at genitalia at work" novelty wears off pretty quick. Especially to when you have to wake up at 4am to diagnose why some guy can't get off.

The company scammed and logged and sold the data as much as possible. The models were barely legal and a few looked like they were held at gun point. Lasted eight months up until I started getting nightmares and then the company went bankrupt. After receiving the first ever lawsuit in the UK for fake dating.

Re:Interview with a Pornhub web developer (2019) by wolco on Wednesday July 29, 2020 @12:17AM (#23983475)
Reminds me of the Ashley Madison scam.

Did anyone have a chance to work at the company that created Ashley Madison? I always wondered what really happened there.

Re:Interview with a Pornhub web developer (2019) by morrbo on Wednesday July 29, 2020 @05:14AM (#23984819)
< Pretty much nothing was dynamic and we wrote scripts to create static pages for almost everything except search and authentication. >

Would you mind elaborating on this please? I'm just trying to work out if you mean things like a custom user's menu, etc. you'd somehow pre-generate and then cache the HTML, or do you mean things like certain categories, etc. were just HTML?

Maybe i'm overthinking this, but would you generate a dynamic page once (ie. first time user logs into the site -> generate their "my account" page) and then cache it in memory, or as HTML on the disk, or set the cache control header and leave it to them locally?

thanks!

Re:Interview with a Pornhub web developer (2019) by etxm on Tuesday July 28, 2020 @06:14PM (#23981255)
> Pretty much nothing was dynamic and we wrote scripts to create static pages for almost everything except search and authentication.

I believe you can put JAMStack on your resume!

Re:Interview with a Pornhub web developer (2019) by wdb on Tuesday July 28, 2020 @12:54PM (#23977842)
Yes, I think the desensizing is the biggest problem and you get less interested about it all.
Re:Interview with a Pornhub web developer (2019) by mistrial9 on Tuesday July 28, 2020 @01:35PM (#23978425)
long ago (before the Internet) I spoke with a woman who 'performed' in such videos. She said she was a user of pain killers (addict), and second she urged me sincerely not to watch the products; sad situation in the flesh.
Re:Interview with a Pornhub web developer (2019) by asddubs on Tuesday July 28, 2020 @03:15PM (#23979573)
I suppose it didn't have anything in the way of user generated content, like comments?
Re:Interview with a Pornhub web developer (2019) by antb123 on Thursday July 30, 2020 @08:27AM (#23997286)
Basically the same setup as a large newspaper I consulted for but not php.
Re:Interview with a Pornhub web developer (2019) by MuffinFlavored on Tuesday July 28, 2020 @03:21PM (#23979636)
I guess my biggest question is not really a technical one.

Why do porn sites get so much traffic? Why do people enjoy consuming pornography as much as they do, at the volume/frequency that they do?

Re:Interview with a Pornhub web developer (2019) by jetbooster on Tuesday July 28, 2020 @03:37PM (#23979777)
I suppose because sexual gratification is one of our species basest instincts, and due to the way our brain evolved to be social creatures, we have mirror neurons[1] which fire when we observe actions as well as when we perform them. For this reason, viewing sex can emulate (to an extent) our primal desire to mate.

Everyone has different levels of libedo however, so it's likely that your lack of understanding is due to your own lower libedo not generating the same level of sexual desire. Or, you are the kind of person where the emotional connection involved in sexual relations is far more important, which obviously means watching people you have no connection to would not arouse you as much. Alternatively, it could be that you may have decent access to actual sex, which is obviously more gratifying as a general rule.

[1]: https://en.m.wikipedia.org/wiki/Mirror_neuron

Re:Interview with a Pornhub web developer (2019) by sixQuarks on Tuesday July 28, 2020 @03:49PM (#23979921)
Very good answer I must say
Re:Interview with a Pornhub web developer (2019) by abiogenesis on Tuesday July 28, 2020 @08:13PM (#23982104)
This is the first time I've seen libido written as libedo. Could it be a typo?
Re:Interview with a Pornhub web developer (2019) by mtnGoat on Tuesday July 28, 2020 @06:40PM (#23981446)
you might be amazed at how little actual content is consumed, despite the high traffic number.

these sites get a lot of traffic(clicks and page views) and serve a lot of bandwidth(videos) but most users are just clicking around and watching just a few seconds to a couple minutes of any video they load(due to skipping). I think a lot of the traffic just people looking for the perfect scene or something new... there is a lot of junk on those sites these days.

source: i used to manage a number of high profile adult websites.

Re:Interview with a Pornhub web developer (2019) by notyourwork on Tuesday July 28, 2020 @03:24PM (#23979673)
Why do people like alcohol or any other vice that some group may frown upon? I don’t think you’ll find a satisfying answer here. Different people like different things.
Re:Interview with a Pornhub web developer (2019) by k__ on Tuesday July 28, 2020 @03:51PM (#23979943)
Keeping your prolactine levels high keeps your mind clear.
Re:Interview with a Pornhub web developer (2019) by golergka on Tuesday July 28, 2020 @05:53PM (#23981080)
Evolutionary reasons are pretty much self-evident, I think.
Re:Interview with a Pornhub web developer (2019) by dkdk8283 on Tuesday July 28, 2020 @03:19PM (#23979613)
Mojo?