Open americodls opened 1 year ago
That is an amazing idea ...
Any ideas on what we can name the model and are we going to use all the exercises in the list?, and how do you normally get things like this to the local database..
Thank you
About this issue.. Am i going to make an api call in my seed file to get the data in the exercise.json and use them to create objects in my database
Except by the "API call" ti makes sense to me.
What do you mean by API call? You mean load the json file?
Yes, to load the json file? any ideas on how i can do that
@unfazedEgnimadevspace this tutorial can help you: https://hackernoon.com/ruby-how-to-readwrite-json-file-a23h3vxa
Let me know if something is not working as expected or you have any blockers.
The number of objects in the github gist exercise.json is alot, should i still use all of them or i should just pick a few
@unfazedEgnimadevspace it is your call. I don't know about you but I have intentions to use this app in the future, so if you don't want to add all exercises now, maybe we should prepare seeds file to select the exercises we want to add... like an allow-list that will copy to the database only the exercises that are in the list...
wdyt?
I have added all the exercises already, wrote the code in the seed file as well and created a pr... can you kindly go through the pr
Here is one suggestion for a feature:
Freestyle training
Users can select an exercise from the list to execute it and record their performance.
When performing an exercise execution, the following will be recorded:
- When it happened (timestamp)
- Number of repetitions (integer between 1 and 100)
- Number of sets (integer between 1 and 10)
- Weight (decimal number)
The list of exercises will be obtained here.
What do you think about this idea @unfazedEgnimadevspace ?
Hello @americodls
Can we call the name of this model recorded_exercise and what db relationship do you think it will have with the exercise model as well
I am thinking many to many, or what do you think?
RecordedExercise
is not bad.
But what about Training
or PerformedExercise
?
I think it's are more related to the domain that "recorded", think about a conversation between two people in a gym. I think that hardly they would use "recorded" to describe what they are training.
Does that make sense for you?
Why do you think that many to many association would be necessary?
I can see that we can perform the same exercise many times. But when we perform an exercise, we perform just one exercise, right?
Maybe in a next iteration we can group performed exercises in a "workout session"? That would represent the group of performed exercises in a gym session. Does that make sense?
Naming is hard, usually we try to get good names from conversations with people that are immersed in the domain. Not always we have opportunities to have conversations like that, so I also try to find articles that talk about the domain so that I can learn more about the used vocabulary.
I found this: https://www.themanual.com/fitness/workouts-versus-exercises/
Here is a summary I learned so far:
Exercise: A prescription of how to exercise a muscle or a set of muscles.
Training: The description of how an exercise was performed, that includes reps, sets, weight.
Training session: A group of workouts of training performed consecutively
Feel free to disagree, those discussions are healthy to understand properly what are we modeling. And keep in mind that sometimes we will need to change names because our understanding of the domain will change, that's natural.
When you are in doubt, write some code and read it. See how it looks like. That helps too.
Here is one suggestion for a feature:
Freestyle training
Users can select an exercise from the list to execute it and record their performance.
When performing an exercise execution, the following will be recorded:
The list of exercises will be obtained here.
What do you think about this idea @unfazedEgnimadevspace ?