Browser hacking: Let's make "Cookie Clicker" playable in Ladybird!

Channel:Andreas Kling · Length:1:44:17 · Published:2022-10-23 · Views:14610

Watch on YouTube

Summary

In a long live-coding session, Andreas Kling works on making the Cookie Clicker game playable in the Ladybird browser from SerenityOS. He tracks down bugs in the browser engine and fixes them.

Why HN recommends it

HN loves the Browser hacking series for its clear debugging method of reducing bugs to minimal reproductions, which people say influenced their own testing.

At one point, he deletes half the HTML file to isolate where in the site the problematic code is. — HN, 2023

Web development · Compilers, interpreters & program analysis · Software practice, open source & careers

Subtitles (excerpt)

[Applause] well hello friends welcome back to browser hacking today we are going to work on a browser game in ladybird uh specifically the cookie clicker game if you are not familiar uh Cookie Clicker is an idol game where you bake cookies and you bake them by clicking on the cookie that's it's that simple every time you click you get a cookie and the more cookies you get you can actually spend them on upgrades over here like I can purchase a cursor which then spawns this little hand here that spins around the cookie and clicks it um once every 10 seconds and um that's it's sort of you buy upgrades to automate the process of making cookies and um something I particularly like in this game is that there's a silly upgrade called a grandma which lets you buy a grandma who will then bake cookies for you at a rate of one cookie per second I think yep and this game does not really work in ladybird um it displays but you can't actually bake any cookies but it looks like it's so it looks like it's close to working right so um the goal today is going to be to try to bake a cookie I guess and maybe if we could even get it to the point where we can purchase a grandma that would be fantastic so that is what we're going to try

On Hacker News

I love Andreas Kling's "Browser hacking" series on YouTube where he fixes various issues Ladybird has with specific websites. E.g: Fixing a CSS layout bug found by chessboard.js - [LINK] Let's make "Cookie Clicker" playable in Ladybird! - [VIDEO] He's very good at articulating his thought progress and it's always really interesting to see how he reduces the bug down into a minimal reproducible ex… — hopfog, 2022-11
Of course you are correct that supporting Twitter or any service is a moving target, so long as it changes. But that doesn't mean specific bugs can't be captured in a test case. Watch this video of Andreas doing exactly this, albeit for a simpler web app [VIDEO] At one point, he deletes half the HTML file to isolate where in the site the problematic code is. In a way doing a kind of binary search… — jonhermansen, 2023-04
I can sympathize with the authors love/hate relationship with tests, but I can’t help feeling like it’s because we as developers so often test the completely wrong things. I don’t typically write tests, but they do make sense for a few cases (specifically end to end tests that look for well defined outputs from well defined inputs). I was inspired by Andreas Kling’s method of testing Ladybird, wh… — _gabe_, 2024-08

Related videos