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

Self-contained code examples #69

Open
robmoss opened this issue Apr 11, 2024 · 0 comments
Open

Self-contained code examples #69

robmoss opened this issue Apr 11, 2024 · 0 comments
Labels
orientation Improvements or additions to our Orientation Guide

Comments

@robmoss
Copy link
Owner

robmoss commented Apr 11, 2024

Originally suggested here by @michaelplanknz.

It would be useful to have a few examples of code that are small, self-contained, and do some simple task. For example, a function that reads in a long-form CSV data set and returns some aggregated values, e.g., number of occurrences of X on each day between Y and Z.

This could serve as an exemplar for how to structure good code (comments, good variable naming, no magic numbers, well defined function inputs/outputs, etc).

It could also include an example of a test function, as I think the idea of automated tests may be a new concept for many (me included!).

Ideally, keeping the tasks relatively simple will mean that code doesn't need to use too many language-specific features or packages but can illustrate principles in a language-agnostic way.

@robmoss robmoss added the orientation Improvements or additions to our Orientation Guide label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
orientation Improvements or additions to our Orientation Guide
Projects
None yet
Development

No branches or pull requests

1 participant