4 ms·
This is the reality of software engineering. Fixing this would probably be a waste of time. Compared to downloading the video content, it doesn't matter at all.
by Jabbles 6y ago
This is the reality of software engineering. Fixing this would probably be a waste of time. Compared to downloading the video content, it doesn't matter at all. And as the article says, repeated content probably compresses extremely well.
An inefficient framework that enables the thousands(?) of engineers at YouTube to reliably design frontends is well worth it.
On the other hand, maybe YouTube's code is a horrible duplicated mess and this is just the result of that. But still, what actual benefit other than aesthetics would you get?
- birdyrooster 6y agoIn other words, DRY should be applied based on business need. Edit: I have a bone to pick with overly obsessive adherents to acronymized maxims and I am acting out because I am scarred. Downvotes deserved.
- teej 6y agoDRY is about code you write, not the code artifacts you ship to the client.
- birdyrooster 6y agoThank you, that is a really good distinction.
- ijustlovemath 6y agoWhen DRY makes you commit to bad abstractions, it's a harmful practice.
- cortesoft 6y agoYes?
- darepublic 6y agoWhere I work people have been trained on not over applying DRY. Which o actually agree with but some people take that way too far and duplicate needlessly in favour of even the simplest abstraction.. a named function. I am scarred by that
- kosievdmerwe 6y agoYeah, trying to fix this would be a clear example of "premature optimization". Youtube isn't some low data use application, where undisplayed HTML is a significant source of wasted capacity. Even if it were, the right answer would probably be some layer between HTML generation and delivery that gets rid of cruft. Software engineers are really expensive.
- agumonkey 6y agoand this is how you get a vestigial tail
- foobarian 6y agoSo far the discussion was about the title text being replicated inside the HTML, presumably coming down in a single request. But, I would also not be surprised if redundant service calls occurred to fetch the data; especially when different teams are involved in maintaining a page coupling their designs adds a lot of burden that is probably more costly than just living with a little redundancy.
- plq 6y agoThe technical term for that "horrible duplicated mess" is "obfuscated code".
- deleted 6y ago[deleted]
- pythonaut_16 6y agoIn my experience the answer is "all of the above" It's rather analogous to physical products that are shipped with the instructions in 8+ languages or Tesla selling cars with their batteries limited in software.
- oh_sigh 6y agoThis response is almost certainly compressed at multiple levels. I'd guess the duplicate content adds almost nothing to the actual overhead.