Blog Posts by Date | tag: 'javascript'


How to hot reload FastAPI and Flask apps on HTML, CSS, and Javascript changes


November 16, 2023 / 5 min read / 3,392 views, 1 likes, 1 comments


hot reload

In this tutorial, I'll show you how to automatically hot-reload your FastAPI and Flask projects that use template engines like Jinja with web servers like uvicorn or gunicorn. After reading, you will be able to automatically restart your server and refresh your browser when Python, HTML, CSS, and other files change—no manual intervention required.

Read more...

How I built a Connect 4 AI


May 28, 2022 / 36 min read / 6,539 views, 3 likes, 0 comments


connect 4 with robot

I wrote the board game Connect 4 for my website! 😀 Here's a link to it if you want to check it out. The game can be played against another human or an AI opponent. It can even be played AI-vs-AI, which I find kind of fun to watch -- and which made testing the AI out much easier and more scientific (more on that later). This is the story of how I wrote the AI for the game intuitively, through some trial and error. This post was updated with a significantly enhanced AI version 6 a couple days after the initial release.

Read more...