How to create a draft pull request
+ +## The Definition of "Done" + +The definition of _"Done"_ is highly subjective especially in the context of pull requests. By providing a standardised +definition of _"Done"_, we seek to avoid misunderstandings in what constitutes a pull request that is ready for review. + +By our definition, a _"Done"_ pull request satisfies all the following criteria: +* It is feature-complete +* It is thoroughly tested and nothing is expected to break +* It is prepared cleanly and thoroughly to the best of the author's ability + +Sometimes, developers may be overwhelmed by the pressure to ship pull requests fast and skip the last two points. However, +this is counterproductive and often leads to a net decrease in development velocity. The decrease in velocity can be attributed +to the latency of the constant ping-ponging between author and reviewer. Furthermore, it can be a frustrating experience +for the reviewer. + +To avoid such situations, it is recommended for developers to perform a cursory self-review at least once. A self-review +should address common mistakes such as grammatical and spelling errors. + +See [common pull request issues](./common-pull-request-issues.md) for more information. diff --git a/Forus Labs' Engineering Documentation/docs/collaboration/git-gud.md b/docs/collaboration/git-gud.md similarity index 100% rename from Forus Labs' Engineering Documentation/docs/collaboration/git-gud.md rename to docs/collaboration/git-gud.md diff --git a/docs/collaboration/pair-programming.md b/docs/collaboration/pair-programming.md new file mode 100644 index 0000000..59969eb --- /dev/null +++ b/docs/collaboration/pair-programming.md @@ -0,0 +1,28 @@ +--- +id: pair-programming +title: Pair Programming +sidebar_label: Pair Programming +--- + +_Useful tips for pair programming._ + +Collated below is a non-exhaustive list of tips for pair programming. By collating these tips, it is our intention that +developers will be better equipped for pair programming. + +## Environment +* Have a comfortable and inviting environment. +* Avoid esoteric desktop setups, i.e. custom keybindings and non-standard shells. Stick with the defaults. +* Disable notifications, i.e. Discord messages, email pop-ups. Pairing with someone distracted by such notifications can be a frustrating experience. + +## Interaction +* Have one developer drive and another navigate. The driver will mostly be typing while the navigator mostly discusses what to do. +* Regularly switch between roles. As a rule of thumb, a switch should occur every ~15 minutes. If one person seems like engaged, switch roles. +* Take frequent breaks. Recognize that people respond to pair programming in different ways and cannot last the entire day. +* Do not be afraid to make and show mistakes. Some people are fearful that others will see all mistakes they make during pair programming. +Demonstrate that everyone makes mistakes, show your mistakes and how they iteratively get fixed as you go. +* Avoid closed discussions when there is a disagreement with an approach, e.g. "That's not good" or "I don't like it". +This will shut down someone and encourage the avoidance of sharing opinions or dreading pair programming. +* Ask open questions such as "What are the benefits and trade-offs of doing it this way?" or "Are there any alternatives that we can explore?". +* Moments of silence are perfectly acceptable. +* Spend time together away from code. Build rapport, trust, laugh about things. Discussing ideas away from the code can sometimes +help see the bigger picture. diff --git a/docs/collaboration/reviewing-a-pull-request.md b/docs/collaboration/reviewing-a-pull-request.md new file mode 100644 index 0000000..5060333 --- /dev/null +++ b/docs/collaboration/reviewing-a-pull-request.md @@ -0,0 +1,38 @@ +--- +id: reviewing-a-pull-request +title: Reviewing a Pull Request +sidebar_label: Reviewing a Pull Request +--- + +_A guide to reviewing pull requests._ + +## Performing a Code Review + +After the submission of a pull request, it must be reviewed by another developer. All developers will be assigned to review +pull requests. In most cases, the reviewer is chosen by GitHub's workload distribution algorithm. However, if a pull request +is exceedingly complex, the developer most familiar with that particular area will be chosen instead. + +If a pull request is deemed to contain too many trivial mistakes, i.e. formatting/grammatical mistakes, the reviewer should +cease the review. Before continuing the review, the reviewer should request for the author to perform a self-review and fix +any underlying mistakes. This is to prevent a constant ping-ponging between author and reviewer. + +Similarly, if a pull request is too large, the reviewer should request that the pull request be split into several smaller ones. + +See Google's [The Standard of Code Review](https://google.github.io/eng-practices/review/reviewer/standard.html) and +[What to Look for in a Code Review](https://google.github.io/eng-practices/review/reviewer/looking-for.html) for more information. + +## Conflict Resolution + +It is recommended that the pull request author and reviewer conduct face-to-face meeting or video call to discuss the changes +under the following circumstances: + +* A disagreement occurs +* A pull request contains too many flagged issues +* A pull request contains architectural issues + +## Approving a Pull Request + +After a pull request has been approved, the reviewer should **squash and merge** the pull request. + + +Squashing and merging a pull request
\ No newline at end of file diff --git a/docs/further-reading.md b/docs/further-reading.md new file mode 100644 index 0000000..8992079 --- /dev/null +++ b/docs/further-reading.md @@ -0,0 +1,28 @@ +--- +id: further-reading +title: Further Reading +sidebar_label: Further Reading +--- + +_Additional resources for further reading and learning._ + +Listed below is a curated list of articles and books that we have found to be tremendous aid in our journey to improve our +software engineering skills. + +## Project Management +* [Pragmatic Engineer](https://newsletter.pragmaticengineer.com/) - A weekly newsletter on project management and software engineering. +* [The Mythical Man-Month](https://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959) - A collection +of essays on project management. + +## Software Engineering +* [A Philosophy of Software Design](https://www.amazon.com/Philosophy-Software-Design-John-Ousterhout/dp/1732102201) - An in-depth +look into software design and manging complexity. +* [Google's Engineering Guide](https://google.github.io/eng-practices/) - A guide to creating and reviewing pull requests. +* [Google's Technical Writing Guide](https://developers.google.com/tech-writing) - A guide to technical writing. +* [The Pragmatic Programmer, 20th Anniversary Edition](https://www.amazon.com/Pragmatic-Programmer-journey-mastery-Anniversary/dp/0135957052) - A must-read. +* [Trunk-based Development](https://trunkbaseddevelopment.com/) - A collection of documents on trunk- based development. + +## Languages + +### Java +* [Java Concurrency in Practice](https://www.amazon.com/dp/0321349601/?tag=javamysqlanta-20) - A good introduction to concurrent programming in Java. \ No newline at end of file diff --git a/docs/getting-started/a-quick-tour.md b/docs/getting-started/a-quick-tour.md new file mode 100644 index 0000000..c8eedce --- /dev/null +++ b/docs/getting-started/a-quick-tour.md @@ -0,0 +1,5 @@ +--- +id: a-quick-tour +title: A Quick Tour +sidebar_label: A Quick Tour +--- \ No newline at end of file diff --git a/docs/getting-started/first-steps.md b/docs/getting-started/first-steps.md new file mode 100644 index 0000000..e9816f9 --- /dev/null +++ b/docs/getting-started/first-steps.md @@ -0,0 +1,5 @@ +--- +id: first-steps +title: First Steps +sidebar_label: First Steps +--- \ No newline at end of file diff --git a/docs/getting-started/what-to-expect.md b/docs/getting-started/what-to-expect.md new file mode 100644 index 0000000..9767242 --- /dev/null +++ b/docs/getting-started/what-to-expect.md @@ -0,0 +1,12 @@ +--- +id: what-to-expect +title: What to Expect +sidebar_label: What to Expect +--- + +As part of the on-boarding process, a new developer will have a developer familiar with the codebase tagged to them. During the first few reviews, the other developer will review the pull request after the new developer. By observing the other developer, the new developer will know what to look out for. + +## The first week + +## The first month + diff --git a/Forus Labs' Engineering Documentation/docs/overview.mdx b/docs/overview.mdx similarity index 91% rename from Forus Labs' Engineering Documentation/docs/overview.mdx rename to docs/overview.mdx index ca2c625..4b63f3e 100644 --- a/Forus Labs' Engineering Documentation/docs/overview.mdx +++ b/docs/overview.mdx @@ -13,7 +13,7 @@ import ThemedImage from '@theme/ThemedImage'; light: '/img/logo-full-light.svg', dark: '/img/logo-full-dark.svg', }} -/>; +/> Every respectable organization that produces software adheres to certain best practices and conventions. These living documents represent _our_ best practices and conventions that we developed over time from our experience and observations. We welcome @@ -21,5 +21,5 @@ any improvements and suggestions to these documents, so don't be afraid to contr The documents are sorted into three categories: * [Getting Started](./getting-started) - Essential information for new developers -* [Collaboration](./collaboration) - Our conventions and practices +* [Collaboration](./collaboration/git-gud.md) - Our conventions and practices * [Style Guides](./style-guides) - Style guides for different languages (and technical writing) diff --git a/Forus Labs' Engineering Documentation/docusaurus.config.js b/docusaurus.config.js similarity index 96% rename from Forus Labs' Engineering Documentation/docusaurus.config.js rename to docusaurus.config.js index dc176e3..e70f72d 100644 --- a/Forus Labs' Engineering Documentation/docusaurus.config.js +++ b/docusaurus.config.js @@ -8,7 +8,7 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const config = { title: 'Forus Labs\' Engineering Documentation', tagline: 'Unlocking your potential', - url: 'https://your-docusaurus-test-site.com', + url: 'https://foruslabs.io', baseUrl: '/', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', @@ -58,7 +58,7 @@ const config = { }, // {to: '/blog', label: 'Blog', position: 'left'}, { - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/forus-labs', label: 'GitHub', position: 'right', }, diff --git a/Forus Labs' Engineering Documentation/package-lock.json b/package-lock.json similarity index 100% rename from Forus Labs' Engineering Documentation/package-lock.json rename to package-lock.json diff --git a/Forus Labs' Engineering Documentation/package.json b/package.json similarity index 100% rename from Forus Labs' Engineering Documentation/package.json rename to package.json diff --git a/Forus Labs' Engineering Documentation/sidebars.js b/sidebars.js similarity index 82% rename from Forus Labs' Engineering Documentation/sidebars.js rename to sidebars.js index 47b4fa6..e89143e 100644 --- a/Forus Labs' Engineering Documentation/sidebars.js +++ b/sidebars.js @@ -34,11 +34,9 @@ module.exports = { type: 'category', label: 'Getting Started', items: [ -// 'manual-installation', -// 'manual-installation/android', -// 'manual-installation/ios', -// 'manual-installation/macos', -// 'manual-installation/web', + 'getting-started/first-steps', + 'getting-started/a-quick-tour', + 'getting-started/what-to-expect', ], }, { @@ -46,12 +44,11 @@ module.exports = { label: 'Collaboration', items: [ 'collaboration/git-gud', + 'collaboration/development-etiquette', 'collaboration/crafting-a-good-pull-request', - 'collaboration/gentlemens-etiquette', -// 'manual-installation/android', -// 'manual-installation/ios', -// 'manual-installation/macos', -// 'manual-installation/web', + 'collaboration/reviewing-a-pull-request', + 'collaboration/common-pull-request-issues', + 'collaboration/pair-programming', ], }, { @@ -69,7 +66,7 @@ module.exports = { }, ], }, - + 'further-reading', ] // 'Home': { // }, diff --git a/Forus Labs' Engineering Documentation/src/components/HomepageFeatures.js b/src/components/HomepageFeatures.js similarity index 100% rename from Forus Labs' Engineering Documentation/src/components/HomepageFeatures.js rename to src/components/HomepageFeatures.js diff --git a/Forus Labs' Engineering Documentation/src/components/HomepageFeatures.module.css b/src/components/HomepageFeatures.module.css similarity index 100% rename from Forus Labs' Engineering Documentation/src/components/HomepageFeatures.module.css rename to src/components/HomepageFeatures.module.css diff --git a/Forus Labs' Engineering Documentation/src/css/custom.css b/src/css/custom.css similarity index 100% rename from Forus Labs' Engineering Documentation/src/css/custom.css rename to src/css/custom.css diff --git a/Forus Labs' Engineering Documentation/src/pages/index.js b/src/pages/index.js similarity index 100% rename from Forus Labs' Engineering Documentation/src/pages/index.js rename to src/pages/index.js diff --git a/Forus Labs' Engineering Documentation/src/pages/index.module.css b/src/pages/index.module.css similarity index 100% rename from Forus Labs' Engineering Documentation/src/pages/index.module.css rename to src/pages/index.module.css diff --git a/Forus Labs' Engineering Documentation/static/.nojekyll b/static/.nojekyll similarity index 100% rename from Forus Labs' Engineering Documentation/static/.nojekyll rename to static/.nojekyll diff --git a/Forus Labs' Engineering Documentation/static/img/collaboration/draft-pull-requests.png b/static/img/collaboration/draft-pull-requests.png similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/collaboration/draft-pull-requests.png rename to static/img/collaboration/draft-pull-requests.png diff --git a/Forus Labs' Engineering Documentation/static/img/collaboration/feature-branch.png b/static/img/collaboration/feature-branch.png similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/collaboration/feature-branch.png rename to static/img/collaboration/feature-branch.png diff --git a/static/img/collaboration/squash-and-merge.png b/static/img/collaboration/squash-and-merge.png new file mode 100644 index 0000000..aefd350 Binary files /dev/null and b/static/img/collaboration/squash-and-merge.png differ diff --git a/Forus Labs' Engineering Documentation/static/img/docusaurus.png b/static/img/docusaurus.png similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/docusaurus.png rename to static/img/docusaurus.png diff --git a/Forus Labs' Engineering Documentation/static/img/favicon.ico b/static/img/favicon.ico similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/favicon.ico rename to static/img/favicon.ico diff --git a/Forus Labs' Engineering Documentation/static/img/favicon.png b/static/img/favicon.png similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/favicon.png rename to static/img/favicon.png diff --git a/Forus Labs' Engineering Documentation/static/img/logo-dark.svg b/static/img/logo-dark.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/logo-dark.svg rename to static/img/logo-dark.svg diff --git a/Forus Labs' Engineering Documentation/static/img/logo-full-dark.svg b/static/img/logo-full-dark.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/logo-full-dark.svg rename to static/img/logo-full-dark.svg diff --git a/Forus Labs' Engineering Documentation/static/img/logo-full-light.svg b/static/img/logo-full-light.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/logo-full-light.svg rename to static/img/logo-full-light.svg diff --git a/Forus Labs' Engineering Documentation/static/img/logo-light.svg b/static/img/logo-light.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/logo-light.svg rename to static/img/logo-light.svg diff --git a/Forus Labs' Engineering Documentation/static/img/undraw_docusaurus_mountain.svg b/static/img/undraw_docusaurus_mountain.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/undraw_docusaurus_mountain.svg rename to static/img/undraw_docusaurus_mountain.svg diff --git a/Forus Labs' Engineering Documentation/static/img/undraw_docusaurus_react.svg b/static/img/undraw_docusaurus_react.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/undraw_docusaurus_react.svg rename to static/img/undraw_docusaurus_react.svg diff --git a/Forus Labs' Engineering Documentation/static/img/undraw_docusaurus_tree.svg b/static/img/undraw_docusaurus_tree.svg similarity index 100% rename from Forus Labs' Engineering Documentation/static/img/undraw_docusaurus_tree.svg rename to static/img/undraw_docusaurus_tree.svg