Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General cleanup #23

Open
Eneroth3 opened this issue Feb 8, 2021 · 5 comments
Open

General cleanup #23

Eneroth3 opened this issue Feb 8, 2021 · 5 comments

Comments

@Eneroth3
Copy link
Contributor

Eneroth3 commented Feb 8, 2021

This is a quite old repo and there seems to be a lot of things we could look over in a general clean up. Here are a few points.

  • Consider merging tutorials and examples so we don't repeat ourselves and have two code bases to maintain.
  • Clarify what would map to an actual extension project. For instance, write a comment in the loader script telling it is a utility and not a part of the actual extensions. Getting this overview can be very difficult for new coders.
  • Consider wrapping the source for each extension in a src folder. I think rubocop-sketchup assumes such a folder, and it's a good practice to separate your source from "project meta" files like readme.
  • Clarify "tut" and "ex" prefix in file names. Prefer fully spelled out "tutorial" and "example".
  • Style Ruby for readability (after we've come up with a good RuboCop config).
  • Change Trimble Navigation to Trimble Inc in copyright notices.
  • Prefer inline Ruby load guard using instance variables over sketchup.rb methods.
  • Consider changing 99 to some other number for examples.
@Eneroth3
Copy link
Contributor Author

Eneroth3 commented Feb 8, 2021

load_tutorials.rb loads the examples, not the tutorials.

@thomthom
Copy link
Member

thomthom commented Feb 9, 2021

Consider merging tutorials and examples so we don't repeat ourselves and have two code bases to maintain.

The original intent was that tutorials would be fewer but with much more comments that makes little assumptions on prior knowledge.

There would be more examples than tutorials, acting as a way to present patterns and solutions for more experienced developers that just need a reference to look at.

Clarify what would map to an actual extension project. For instance, write a comment in the loader script telling it is a utility and not a part of the actual extensions. Getting this overview can be very difficult for new coders.

What do you mean by this? Can you show what you are referring to?

Consider wrapping the source for each extension in a src folder. I think rubocop-sketchup assumes such a folder, and it's a good practice to separate your source from "project meta" files like readme.

rubocop-sketchup can be configured to look in any folder. I think this this repo is a good one to demonstrate a complete project setup - since this contains many examples. For a project example I think it's better to have one dedicated for that. The current VSCode example shows a basic project setup: https://github.com/SketchUp/sketchup-extension-vscode-project

Clarify "tut" and "ex" prefix in file names. Prefer fully spelled out "tutorial" and "example".

True, "ex" could imply "extension" as much as "example".

Consider changing 99 to some other number for examples.

The 99 was to make them appear towards the end of the list when the files are sorted by name (which they usually use)

load_tutorials.rb loads the examples, not the tutorials.

This was intentionally since there's more examples than tutorials.

@Eneroth3
Copy link
Contributor Author

Eneroth3 commented Feb 9, 2021

Consider merging tutorials and examples so we don't repeat ourselves and have two code bases to maintain.

The original intent was that tutorials would be fewer but with much more comments that makes little assumptions on prior knowledge.

There would be more examples than tutorials, acting as a way to present patterns and solutions for more experienced developers that just need a reference to look at.

Hmm. That makes sense. I should consider changing my PR to only add examples, including the comments I already had.

Clarify what would map to an actual extension project. For instance, write a comment in the loader script telling it is a utility and not a part of the actual extensions. Getting this overview can be very difficult for new coders.

What do you mean by this? Can you show what you are referring to?

Being used to the file structure of extensions, I can easily see that each folder in tutorials/ or examples/ represent an individual extension, but if you aren't already familiar with extensions this isn't obvious. You may stare at the loading script and wonder where that would go in a real life extension.

load_tutorials.rb loads the examples, not the tutorials.

This was intentionally since there's more examples than tutorials.

Then we should probably rename it load_examples.rb. This small things can really get in the way of understanding if you are already a bit confused of what you are looking at.

@thomthom
Copy link
Member

Then we should probably rename it load_examples.rb. This small things can really get in the way of understanding if you are already a bit confused of what you are looking at.

That makes sense.

@DanRathbun
Copy link

DanRathbun commented Aug 8, 2022

I have come to believe that this repo, although well intentioned, has "put too many eggs in one basket" making it unwieldy.

The numbering is also problematic. If the time comes to renumber tutorials, the whole repo must change even if there is no real code changes the lessons.

It is also confusing having 1 issue tracker for multiple extensions.


I would propose that y'all open another account named "SketchUpTutor" or "TrimbleTutor" and have each lesson tutorial extension in a separate repository. Each one's README could have a link to the next lesson repo. And somewhere (GitHub Page) a master curriculum link list to all the tutorials in a series.

This dedicated account could have both Ruby and C tutorials for SketchUp as well as LayOut.

Just come up with some kind of repo prefix naming convention similar to what your doing now.
Ie, "sketchup-ruby-", "sketchup-c-", "layout-ruby-", "layout-c-", etc., ...

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants