Badges

Gone streaking
Gone streaking
Gone streaking 5
Gone streaking 5

Forums

•

4d ago

THE MISTAKE THAT COST ME A YEAR

last year i was randomly visiting a website and couldnt download a video in hd quality. then as a dev, when something doesnt work, you think "let's build it." so i got the same thought. i started researching idea validation and found like 0.2% of websites actually worked fine, but they were full of shitty ads. i thought this is the perfect market , we should go all in. and when i checked their traffic i got shocked , cause they werent getting one or two million, they were getting tens of millions.

after some weeks of confusing "thinking" with actual progress, and a lot of procrastinating, i finally started. chose a regular tech stack, MEAN stack, to build it. at that time i wasnt even an experienced dev, just a kid at 17 with some exposure to stuff, knew how to code, but those traffic numbers pushed me to build as fast as possible.

i came to know we needed a scraper, and one of the best is yt-dlp. there were other options too, like youtube-dl, gallery-dl, unofficial tiktok apis. by all means i was overengineering, trying to build a robust system with multiple fallbacks that could download video and audio in every format avaliable. built that in two months, even using ai to figure stuff out. and by the end i had added so much complexity into one codebase that changing a single line meant updating 15 or 20 files, controllers, services, everything. that's when i realized this is what people call bad code.

so i rewrote it. this time removed external dependencies and just used yt-dlp efficiently in node js. after building that i felt it was pretty slow, taking about 10 to 15 sec just to fetch info, then another 10 to 15 sec to start the download. felt way too slow. tried optimizing with yt-dlp arguments and prewarmed pools, still around 9 to 10 sec. i was obsessed with speed at this point. almost 3 months gone.

View more