Ideas for code organization improvements #135
Replies: 5 comments 17 replies
-
@InfinityJuice I'd especially love to hear from you now that you've run through so much commenting: Was there anything that felt stupid or silly or could just be done better with the layout from your perspective? |
Beta Was this translation helpful? Give feedback.
-
In relation to what Coach mentioned about sharing code more, I've been trying to think more on that. I was wondering if it would maybe be advantageous to create our own base template project out of something like the AdvantageKit skeleton template but with all our additional features setup (robot preferences, layout changes, etc). Then, each robot's code can be a fork of that and any code that's edited from the actual base template can be upstreamed for the other robots to be take back downstream. There could also be multiple layers (e.g. top level skeleten, forks of talon and spark, then each robot based on the respective bases) so that even more can be shared between similar robots. |
Beta Was this translation helpful? Give feedback.
-
Something I'm noticing that we could maybe consider: You can't really debug a function in simulation that only exists in a command. It gets loaded in on the creation of the command the one time. So the only parts you can debug are non-command function calls within that. It may be a good idea to keep as much actual code out of a command and just have it call a function for easier debugging. |
Beta Was this translation helpful? Give feedback.
-
Relating back to my comment about our base projects, what are some things that we'd ideally want available in every project we have as a template project? This is assuming no specific mechanisms or even drive base motors, something completely generic. Off the top of my head, I would think:
Some of these couldn't be fully fleshed out without actual mechanisms but having the basic parts down would be a good start. Any other ideas? |
Beta Was this translation helpful? Give feedback.
-
We also need to get a better branch naming system, perhaps one we could enforce through Github Rules. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've heard some mentions before of how some would change the way our code is laid out and I have some ideas of my own as well. However, I don't want to bias any opinions and would like to hear from the team what should maybe be changed.
Something to maybe keep in mind is our plans for quickly getting from nothing to base code with AdvantageKit, SysID, robot preferences, etc all ready to be built on top of.
Something else Coach mentioned was he wished we'd be able to share code easier between different bots like kitbot and competition bot. I explained this wasn't completely possible but there may be someways to improve the shareability between them and between bots each year.
Let me hear your thoughts on what you'd like to see!
Beta Was this translation helpful? Give feedback.
All reactions