The moment when you realise every web dev tool is inspired by some smug *NIX developer over 50 years ago

The moment when you realise every web dev tool is inspired by some smug *NIX developer over 50 years ago. #dry

There I was writing a simple Python scrip to parse an XML document.

"I'd like to watch the changes to this python script as I'm following this Python XML tutorial based on its built-in module."

A quick man watch in the terminal, and sure enough there's watch. Watch is a built in tool on most *NIX (Linux, Unix, BSD) systems originally written in 1991 by Tony Rems (the man page reliably informs me).

Sometimes it feels as though we're wallowing around in the web dev world re-inventing the wheel rather than working on solving actual problems. I'm just wallowing around wasting time re-implementing things people already thought of many many years ago.

So now, to watch my python program and keep running it every time I make changes to it (or just re-run it every n seconds) I simple use watch -n1 python main.py in one terminal window, and edit the script in another:
Using watch to run a command every one second and observe the output whilst programming

With that I can close the write it->watch it break->debug loop a little and enjoy it letting the python interpreter bail out as we go.

Big caveat: Obviously don't do this when programming something destructive else that could lead to a fun evening restoring backups. Backups you ask? Oh lord!

Watch this