I strongly agree with Kent Beck's recommendation of first making the change easy, and then making the easy change.
for each desired change, make the change easy (warning: this may be hard), then make the easy change
— Kent Beck (@KentBeck) September 25, 2012
I also strongly agree with Kent C. Dodd's thoughts about testing implementation details.
Testing implementation details is a recipe for disaster.
— Kent C. Dodds 🧑🚀 (@kentcdodds) September 7, 2018
Do yourself a favor and give react-testing-library a solid try. Your future self will thank your present self https://t.co/iMU4gcj8aP 🐐
Additionally, I try to make my code resemble documentation code as much as possible. However, documentation code is often updated and refactored much faster and more frequently than production code.
I hope this series of branches demonstrates my attempts to get an app working, add tests, and then incrementally improve the app without having to significantly change my tests.
I don't want to build a cliche app, like a todo list. And I'd prefer if my app actually solves a real problem and/or answers a real question(s) I've had for a while.
As a developer who has fixed a handful of typos and grammatical errors in open source documentation, I want to see a list of all the repos that I've "contributed" to, along with how many stars all those repos have, so I can "measure" the reach of my impact.
I will build an app with the following features:
- A text input where the user can type a GitHub username
- A button that queries the GitHub GraphQL service for the
repositoriescontributedto
for the specified user - A table of repos showing repo owner, name, and stargazers
- Configuration
- Prettier
- Format script
- Get it working with no dependencies:
basic-functionality
branch- Regular HTML and native
fetch
- Regular HTML and native
- Add tests:
add-tests
branch- Testing library
- Separate data and UI:
extract-presentational-components
branch- Extract presentational components
- Reskin UI:
reskin-ui
branch- Replace regular HTML with Bootstrap
- Update API client:
update-api-client
branch- Replace native
fetch
with Apollo Client
- Replace native
- Refactor:
replace-class-component-with-hooks
branch- Replace class components with hooks