Hacker News new | ask | show | jobs
by it 5191 days ago
The article claims that YouTube is written in PHP. As someone who worked there, I can tell you it's not. YouTube is written mostly in Python plus some Go. Some of it is a mess, but that's beside the point.
3 comments

You should have finished the paragraph

>> (Update: While YouTube was originally written in PHP, it migrated to Python fairly early on, per Matt Cutts and Guido van Rossum.)

Youtube was first launched using PHP but ported to Python around the time this article was written, if I recall correctly. Having trouble finding a source - best I can do it second hand on Quora - http://screencast.com/t/NZD0KIHdF / http://www.quora.com/Is-YouTube-still-written-in-PHP/answer/...
This was actually the reason why I started learning Python for web development. I can't remember how long ago it was, but I had spent months/years burying myself in PHP and hoping to see the light... after having a short affair with rails, Python was the language that called out to me from... eh, usenet probably. It seemed so simple and pleasant, yet with the performance to be powering the 'Tube.
do i understand you correctly - you found it harder to learn PHP because its so unorganized and inconsistent ,

and found Python easier to understand and learn than PHP ...

anyone else here with similar experience ?

Absolutely. I feel like I wasted some of my most able years fiddling with code that was complete garbage (my fault) and not learning much of anything because I was constantly looking for explanations of, well, everything. Granted, I was young, foolish, and accepted what everyone was saying ("All you need for webdev is PHP... shhhh shhhh"). I didn't really 'get' programming due to all that. But Python was a breath of fresh air, and while I'm no expert I feel much better for it even while going through snippets of PHP.

Basically, I saw PHP as the pragmatic solution to programming for the web. Problem was I didn't really understand programming until Python showed me the light, and while I'm much happier now using and [still] learning C I found it to be an immense help.

You chose python for its performance?

Well, I guess it's no Ruby.

[As only a novice could...] But yeah, I've only recently gotten back in to Ruby because performance be damned, it's fun in its own way (to someone who doesn't do any programming for a living at least). Edit: though I'll freely admit that for my purposes, performance has yet to be much of an issue.
There is really nothing wrong with Python performance-wise, the bigger issues will be things like the speed of your database, what kinds of caching and algorithms you use, etc.

Maybe worry about recoding the whole thing in ASM (or something equally macho) when you find that you have a good working idea which is only really hampered by time differences measured in ns.

Most web apps do not require you to carry out ray tracing. For typical cases Python can indeed be pretty fast.

If you have the most fun using Ruby then use it, life is short