Browser hacking: Let's make "Cookie Clicker" playable in Ladybird!
Channel:Andreas Kling · Length:1:44:17 · Published:2022-10-23 · Views:14610
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
- Exploring the Tech and Design of Noita · GDC Festival of Gaming · 31:00
- Overwatch Gameplay Architecture and Netcode · GDC Festival of Gaming · 1:04:03
- What the heck is the event loop anyway? | Philip Roberts | JSConf EU · JSConf · 26:52
- Rich Harris - Rethinking reactivity · You Gotta Love Frontend · 36:45
- Lexical Scanning in Go - Rob Pike · GoogleFOSSSydney · 51:17
- William Byrd on "The Most Beautiful Program Ever Written" [PWL NYC] · PapersWeLove · 1:31:05
- 🚀 TDD, Where Did It All Go Wrong (Ian Cooper) · DevTernity Conference · 1:03:55
- Bret Victor The Future of Programming · Joey Reid · 32:55
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- RailsConf 2016 - Turbolinks 5: I Can’t Believe It’s Not Native! by Sam Stephenson · Confreaks · 37:37
- "Uncle" Bob Martin - "The Future of Programming" · Paul Stringer's Mobile Tech · 1:18:21
- JavaScript: The Good Parts · Google TechTalks · 1:03:47
- Tim Ewald - Clojure: Programming with Hand Tools · ClojureTV · 58:39
- CppCon 2016: Jason Turner “Rich Code for Tiny Computers: A Simple Commodore 64 Game in C++17” · CppCon · 1:19:52
- Using Python to Code by Voice · Next Day Video · 28:17
- Clasp: Common Lisp using LLVM and C++ for Molecular Metaprogramming · Google TechTalks · 57:37