Hacker News new | ask | show | jobs
by psygn89 479 days ago
Nice! I had an idea that I never coded up. Basically a hamster with a parachute that would fall slowly to the bottom of the page. If you scroll down fast his parachute will deploy to catch up and land once again at the bottom of the viewport. He'll hold a "Top" sign when you hover over him and will shoot off with a jetpack when you click on him and as the screen hits the top you'll see him deploy a parachute again to gently land at the bottom of the screen.
5 comments

Okay now i want this. For some reason i keep imagining the hamster to look similar to the gopher in golang (obviously not blue)
Nah, the hamsterdance.com hamster.
His name is Hampton, and he released a wonderful full album.
Waiting for the repo link. I will add a fork where the hamster's parachute doesn't redeploy if scrolling to fast and then the user "loses". Discourages scrolling. Might be helpful?
Have a look at my other comment. I just noticed it has an issue that parachute doesn't redeploy properly when you scroll down->up->down, but it works nicely aside of that.
https://gist.github.com/iamtomek/5d4a30c1a6765d695950c777e38...

Disclaimer: I wrote zero lines of this, it was made purely with Claude 3.7 (via Kagi assistant) with around 10 additional revisions in one conversation. I pasted the emojis in the prompt, but that's basically it.

I never coded anything meaningful in html and js.

Edit: it silly that in a place where so much discussion is about AI, when I paste a working AI generated code what I first get is downvotes. I guess you like hating AI more than hamsters.

> a working AI generated

The parachute will never deploy if you're higher than a previous low. So if you scroll down, a bit up, and then down again it will not have a parachute, until reaching the point where it was at the bottom last and then suddenly it gets a parachute mid fall.

If it's falling without a parachute, it will get glued to the corner the moment you start scrolling up. If it's falling with a parachute, scrolling up will break it and it will continue past the screen.

I don't want to sound overly critical - it's cool that you dished this up so quick - just commenting on your comment. The fact that the AI made so many bugs in such a short script is kinda disproving it "working", doesn't mean we like hating AI.

You are 100% correct, but decided not to try to fix it manually, as it's a cool demo "I did this in 15 minutes in ai chat".

Truth be told, it has less UI issues than my last outsourced app I deployed. And it had dedicated UI team and a few million budget.

The Hamster v0.0.1 is working. He's just not great at his job.

Anyone else reading this please fork it and fix it thanks
Sorry you got downvoted. Uploaded it for a demo: https://65d22473-339d-4325-90bb-bef215770f60.paged.net/
I wouldn't downvote this because it's interesting to see what an AI can do. But it's pretty clear a human has to fix it.
And it’s also pretty clear that humans typically don’t crank this type of thing out in 15min. The current narrative around AI is a lot more about augmenting our work and making parts of it faster. It can create buggy code in almost no time, which leaves plenty of time for bug fixing, iterations, and optimization.

Humans can also create buggy code quickly, but it takes a while! And you still have to do bug fixing and optimization after you think you’re finished.

Thanks! People downvoting you should be ashamed of themselves.
I've noticed it's a common practice on other places as well. It doesn't even need a reason, just random people or bots doing random actions to create more chaos.
and on scroll up a hamster with jetpack/rocket
ok this sounds cool