Hack-a-Day, Day 22: Hack-a-Golf

Hack-a-Day is my self-imposed challenge to do one project a day, for all of November.

 computer mini-golf)
computer mini-golf)

Today's project was mini-golf. I've seen these online, and I thought it was an easy problem (I was mostly right).

It turns out finding the intersection of two lines is really hard, though! It kind of seems easy mathematically, but in practice it's really fiddly with a lot of edge cases. Reflecting is also harder to figure out on a computer than by hand.

My little demo only has one level, but the hard part was the engine -- adding 8 more holes would be pretty easy, I think. There's no hilly slopes or other special features in this verion.

I stayed up too late finishing this one, heh. You can play online here or view the source code on github.

 the path of a ball without friction)
the path of a ball without friction)
Tagged , ,
leave comment

Hack-a-Day, Day 20: 1-D Platformer

Hack-a-Day is my self-imposed challenge to do one project a day, for all of November.

 1-D platfomer (the levels scroll left/right)
1-D platfomer (the levels scroll left/right)

Today's project was a simple platformer. I got something playable, but I wouldn't say it's to the point of actually being a game. Hopefully I'll have time to go back and finish it before the month is out.

I had a lot of fun making this one. I love visual stuff. You can play online here or view the source code on github.

Tagged , ,
leave comment

Hack-a-Day, Day 15: Vibe Chat

Today's project was a vibe-coded chat program. For those unfamiliar, "vibe coding" is programming where an AI does the majority of the coding, and in fact is often undertaken by non-programmers. In my case I took an approach a bit closer to "architect" than entirely hands-off, but an LLM did all the heavy lifting.

The code is here -- roughly one commit per interaction, with a few combined. The prompts are not included.

I've mostly been using AI very little during hack-a-day... sometimes to help debug, and in one case to write another "boring bit" (convert Minecraft world to JSON, for the voxel engine). It might get stuff done, but it's not going to improve the same set of skills to do stuff with an AI. And I'm generally a bit wary of using AI, because it can really just spew some absolute bullshit, which is in my head afterwards.

I've had a relatively better experience using Anthropic's Claude than most other products (for which I have a paid plan). Unfortunately they have very opaque usage caps, and I'd hit limits repeatedly during this project. Then it would say "please try again at 4pm" (in 3 hours). So I pretty much ran out of LLM usage on this one.

Overall I'd say I got to do some coding I usually wouldn't. The project was a curses frontend for a chat (and backend, but that didn't really get done yet). Something like making a curses interface would usually be a bit too boring for me--being able to collaborate with an LLM, who doesn't find such things boring, is great. Other than tooling issues, the main problem is that Claude doesn't write the best code. It generally has a very "junior programmer" vibe, with no use of abstraction, and tends toward the verbose.

My general take on AI though is that someone showed me a horse than can write an essay, and I'm complaining its penmanship is atrocious. It's pretty amazing stuff, and we're probably all going to be dead soon.

In the meantime it's pretty fun to mess about with.

PS: I do plan to update this one further, it just will require a bit of work each day given the rate limits. I had really grand plans, but we only got the bare minimum done.

Peace out!

Tagged , , ,
leave comment

Hack-a-Day, Day 12: Pokétrace

Today's hack-a-day project was Pokétrace. Did you ever, as a little kid, trace stuff you liked? It's how we learn art! I made this as a way to relax for adult (and for kiddos, of course!). And to improve my art skills.

You can trace pokemon in your browser. Let me know if you want any generations other than the first one, or show me any fan art you make! I'd love to see it.

This one should work on phones and tablets. Let me know if you run into any problems.

You can save your finished pokemon as an HTML file, and it should save progress (but only on your computer).

Open offer: if you trace all 150 pokemon, I'll make it into a coloring book version for everyone. And if you draw fan art of all 150 pokemon, I'll send you a poster of your art! (as long as you don't live somewhere with crazy shipping for me)

Enjoy!

Tagged ,
leave comment

Hack-a-Day, Day 07: Pokédex

Today's hack-a-day project was the Pokédex -- the fictional companion that tells you about pokemon in the game. My main goal was just to get the info into a reasonable database format, but along with way I built a little viewer too.

The plan is to make some kind of art game where you do pokemon fanart, a coloring book, or even a tracing game in the coming days. And now I'm ready, with art of each pokemon on hand.

Tagged , , ,
leave comment

Hack-a-Day, Day 05: German Language Reader

Today's hack-a-day project was the German Language Reader. It shows you the text of "German Legends" by the Brothers Grimm. Yes, the same brothers known for "Grimm's Fairy Tales" and perhaps less-so, the first dictionary.

If you highlight a word, you get the definition in english.

You can try it online. As usual, source code is on github.

I had hoped to have a German mode, but the German wiktionary API has been down for a week!

If you're technically inclined, it's not too bad to substitute in your own book. You'll need it in TXT format (to extract the words), and HTML format (to display).

I'm happy with this project, although I am posting it on the 10th, quite a bit late.

Enjoy!

Tagged ,
leave comment

Hack-a-Day, Day 04: Reverse Vibe Coding

Yikes, been having some back pain, and the past few days it's been tougher to work. I've started four projects in four days, without too much to show for it.

  • Day 01 project is waiting on computation to run; overall I'm happy with it but will post when I get the results.
  • Day 02 project I barely started and won't finish, most likely. It takes a photo of a Go board and tries to output the game. I'd learn some image processing doing it, but I'm sure there's plenty of existing and better tools to do the same thing.
  • Day 03 project was a bit ambitious. Will post it if I finish (and hopefully I will, it's cool!)

Today's hack-a-day project was Reverse Vibe Coding. I sometimes use LLMs such as Claude for "vibe coding", mostly on throwaway type projects. It didn't seem fair for that to go only one way, so today I offered to vibe code for Claude -- it picks what I should make, and I code it up for Claude.

The result is the Conversation Flow Visualizer. This graphs when new topics come up in conversation, and what they are.

Frankly I think it's dumb and useless, but Claude is the boss, so there ya go! Can't pick who you work fo... okay, I guess I could this time.

In any case, it was pretty relaxing to be a junior dev and just do as I'm told for a bit, honestly. Easy win.

I honestly think this would be a good way to learn a new programming language or a new library.

Peace out!

Tagged , ,
leave comment