XRobots / openDog

CAD and code for each episode of my open source dog series
GNU General Public License v3.0
825 stars 189 forks source link

Code Organisation #12

Open JakeMercer opened 5 years ago

JakeMercer commented 5 years ago

Hi James, love the project! I just have a few suggestions on how to organise your code; a few small changes that would make contributing to the repository much easier.

By organising the code into "parts" corresponding to your videos you're not really exercising the real power of Git. Instead of having copies of the main dog INO file with each video's changes in a different directory, you should have a single file that you change and make a commit for each video you produce. This would help clean up the repo and mean if anyone makes a pull request with useful changes to the code, it's easy for you to pull those changes into your file and don't have to manually sync those changes into files you have yet to push.

There is a useful discussion on the topic in this StackOverflow question.

There are a number of common structures that could be defined in a common header file so that if you needed to make extensions, you only have to do that in one place.

Cheers, Jake

is4n commented 5 years ago

It would make sense to create a separate branch along with each new video as a reference and continually update master (or any other branch) as any normal code project would. This would make it easy both for those watching through the videos, since they can "follow along" with the code, and for devs since they can benefit from Git as it's meant to be used.

mrbesen commented 4 years ago

instead of making branches, you can just tag the latest commit of a video with "PartXX" or something.