Alexey Golub
tyrrrz.me · Personal blog · on HN since 2019
Alexey Golub, a .NET developer, writes about C#, software testing, and reverse-engineering YouTube's video player.
What HN saysHN commenters discuss his posts on fakes versus mocks and unit testing, with some agreeing with his test cost graph and others citing his YouTube work.
15HN people shared it
4linked it in comments
14stories submitted
879story points
4 years agolast shared
2019people per year2026
Most-shared posts
- 1Unit Testing Is Overrated3 people · 737 points · first shared 2020 · 387 comments on HN
- 2Prefer Fakes over Mocks3 people · 106 points · first shared 2020 · 119 comments on HN
- 3Reverse-Engineering YouTube (2017)3 people · 23 points · first shared 2020 · discussion on HN
- 4Pure-Impure Segregation Principle3 people · 6 points · first shared 2020 · discussion on HN
- 5Fluent Generics in C#2 people · 2 points · first shared 2020 · discussion on HN
- 6Working with Expression Trees in C#1 people · 2 points · first shared 2020 · discussion on HN
- 7Reverse-Engineering YouTube: Revisited1 people · 2 points · first shared 2023 · discussion on HN
- 8How to Reverse-Engineer YouTube1 people · 1 points · first shared 2019 · discussion on HN
- 9Test conversion efficiency.png1 people · first shared 2022
What HN people wrote when they linked it
rockwotj · 2022-11-10
Fakes > Mocks!
Post: https://tyrrrz.me/blog/fakes-over-mocks
Previous HN Discussion on the above post: https://news.ycombinator.com/item?id=24770954
This does require dependency injection (DI), and my hot take is that manual DI > framework magic. Sure it's a little extra code writing, but folks should optimize for reading code, and some of the frameworks out there have a lot of complex concepts for DI (For example dagger is a popular DI framework for JVM, and the dev-guide has a lot of stuff in it, which feels like a lot to learn for what it's providing: https://dagger.dev/dev-guide/, no knock against dagger, I've ran into this with other DI frameworks too!)
commandlinefan · 2022-05-02
> poor test coverage
Yet you don't have to hang around here long to be told that "Unit Testing is Overrated": https://tyrrrz.me/blog/unit-testing-is-overrated
cuddlybacon · 2022-04-07
My gut reaction to the title was to disagree. Looking at the article, the thing that stands out strongest is this graph:
https://tyrrrz.me/static/b606743d039cfb56391c5793d0dda8f2/bb630/Test-c…
It shows test cost vs test isolation. I agree with the assumed correlation. My experience though is the real correlation is above the assumed correlation, not below it. My guess is that the author's organization moves part of the cost somewhere else where the author doesn't have to see it. At the start of my career, I was one of those people who had this cost dumped on them so that the devs could ignore it: I was an on-team QA engineer.
1vuio0pswjnm7 · 2020-10-28
Inside the source of the Javascript player (base.js) was a function to transform (update) the value of the video signature (s) parameter. All you had to do was look at base.js and duplicate the string operations used to produce the updated s, whatever they were. No need to use Javascript. yt-dl chose to use Python. Only a minority of videos used this "technological measure". Most videos on YT do not require a continually updated s; the value of s stays the same.
2017: https://tyrrrz.me/blog/reverse-engineering-youtube
2015: https://github.com/bitnol/CipherAPI
2014: https://gist.github.com/kl/9070523
2014: https://api.w3hills.com/ytcipher
Regarding the "bookmark" comment, there is no way to "bookmark" any YT download URL because all YT download URLs (not just ones that have a changing signature) include timestamps; as is typical of download URLs on video sites, they have an expiration. Generating URLs that expire is not done as a means of copyright-related "access control"; the purpose has to do with caching.