Programming Language to Track Workouts?

1 points by lemonberry ↗ HN
Does anyone know of a programming language to track workouts? I keep my workouts in a text file and keep thinking how great it would be if this was actually a programming language that I could run to get information out of and to run queries against? Maybe queries isn't the correct word, but functions that could take the text file as input and output certain specific data. For example: how many pushups I did in the past 30 days.

I'm barely a programmer, though I do enjoy it, so I'm not sure if this is a dead end idea or not.

8 comments

[ 2.6 ms ] story [ 25.9 ms ] thread
R is a language for statistics which has built-in support for plots and many libraries for visualization etc...

You can also use it then to generate PDF/text files for eg tables of sets/reps/whatever you want.

I've heard of R and this was one of the things I thought of first.
SQL might be a good fit for this.

You can ask ChatGPT to help you import your text file into a tiny SQLite DB and then query against it. GPT is also very good at helping write queries.

I think SQLite is a promising approach. Thanks.
It's never a dead end Idea. It's just, independent of the programming language, with all of the languages you describe logic in code. So if you really want to learn that, you have to learn a syntax and basical thinking in "chains". Because that's what you do in the end: building a chain of instructions.

I think, Python is very fast to learn and you'll find a lot of resources. Chatgpt also helps a lot, but you have to check really a lot what that AI guy say. It's better to read up the basics and do what ever to get acquainted with the language first.

The are also online websites that let you run code online without having to set-up an IDE.

if you ask me, it's easier to set-up an excel file that imports the contents of the text file (link it) and then, you can query it with Plain Excels formulas. Which is a database or can be seen as a database and actually, it's sufficient more than that for your use case imho

So. Try a few steps with python. Remember. It's pure logic. Nothing magical on that.

You also can go for other languages, but, mostly they're difficult to understand in my opinion. You can try JavaScript, but then you also have to learn the basics of HTML and so on .. when you're at it, you might end in programming a small website.

So check out what you really need.

I am just starting to learn JavaScript in earnest. My HTML and CSS are pretty good. But this could be a fun goal down the road. Thank you.
Ok, so it won't be a problem to understand programming on logic level.. there are a few concepts of good and wrong do's. I think you better off with JavaScript here, as the HTML CSS part is already understood. It's a typeless language, which mean you just define a variable, give it a value. And where ever you use this variable, all the consuming functions are doing the typing by them selves. It's more of ease.
SQL would be great for this. I got into sql by building a DB that tracks my hunting and fishing trips. SQLite or mysql would be great!