You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For languages like Java or C++, significant boilerplate code is needed to test out a chunk of code. This makes the Scratch activecode harder to use if I want to say test out a string function's behavior.
For books using those languages, it would be useful if there was already a main function (C++) or a class with a main function (Java) so that the reader could just focus on adding the code they want to test.
Issues / options:
The desired starter code might differ from book to book. Should the starter code be something that gets specified by a book author? Or at least a way to override whatever the default is?
An author might want to provide a few different "templates". In C++, I could see wanting one template that has a main function and another that sets up a simple unit test. This feature might also be useful in a language like Python - in a book that made heavy use of turtle graphics or media processing, the author might want to provide templates with the necessary setup code for those environments. Perhaps an author could describe environments with a title and some starter code and a drop-down would allow the user to pick a template.
The text was updated successfully, but these errors were encountered:
I was thinking of the dropdown to choose a template before I got to the end of #2.
Should this only apply to scratch activecodes?
Not sure if this is something for an author or something for developers to manage. I could see a simple web interface that authors and others would have access to to create a template and associate it with a language? or a book?
I do think we would want to limit it to just a few.
I think you are on to something in that author might not be the right role to set these up. Either a developer just sets up a couple of basic ones that are language based, or at the other end of the spectrum, an instructor sets up ones for the course they are teaching. (Or both?).
I think a developer created set of basic templates might be a good first step. Less complex than anything else and it likely would be good enough (or at least better than only having a blank editor) for most use cases.
For things other than the scratch activecode the author (or instructor if building an exercise) can already provide starter code. I think that is fine.
For languages like Java or C++, significant boilerplate code is needed to test out a chunk of code. This makes the Scratch activecode harder to use if I want to say test out a string function's behavior.
For books using those languages, it would be useful if there was already a main function (C++) or a class with a main function (Java) so that the reader could just focus on adding the code they want to test.
Issues / options:
The desired starter code might differ from book to book. Should the starter code be something that gets specified by a book author? Or at least a way to override whatever the default is?
An author might want to provide a few different "templates". In C++, I could see wanting one template that has a main function and another that sets up a simple unit test. This feature might also be useful in a language like Python - in a book that made heavy use of turtle graphics or media processing, the author might want to provide templates with the necessary setup code for those environments. Perhaps an author could describe environments with a title and some starter code and a drop-down would allow the user to pick a template.
The text was updated successfully, but these errors were encountered: