quii
We Learned This Lesson Already
Why Build vs. Buy is the wrong question
The Weight of AI on Engineers
Go is an object-oriented language
Learn Go with Tests – Working without mocks
Learn Go with Tests reached 20k stars
Practical ways to shift QA left
A hypermedia approach is the nice happy medium between a very static website and an SPA, not sure why so many people are close-minded about this possibility.
Htmx Is the Future
Learn Go with tests: Scaling acceptance tests
Learn Go with Tests: Intro to acceptance testing
The project is open-source (https://github.com/quii/learn-go-with-tests) so there's a few options available to you.
In releases, you'll find PDFs and epubs, I'm pretty sure most epub readers will let you use a dark mode. Or you can just read the markdown files on GitHub, which also supports it.
Learn Go with Tests – Generics
Learn Go with Tests – Templating
Learn Go with Tests – Reading Files
Learn Go with Tests – Intro to Generics
Learn Go with Tests – TDD Anti-Patterns
How My Website Works
Learn go with tests: Revisiting HTTP handlers
This is the _only_ point where you can safely refactor, if your tests are failing how do you know you haven't broken something? So long as you keep things "green" you know you're ok
> The danger seems to be when you have to walk away from some code and you or whoever picks up your code doesn't know what you were up to.
Just don't do this. You're not "done" with the TDD cycle until you make it pass and have refactored.
I reflect this in my git usage too, roughly it goes
- Write a test -> Make it pass -> git commit -am "made it do something" -> refactor -> run tests (if i get in a mess, revert back to safety and try again) -> git add . -> git commit --amend --no-edit
> It seems "safer" to write tests that are going to stay broken until every little corner of everything works properly, even though this is less iterative.
The problem with this is how do you safely refactor when you have potentially dozens of tests failing?
A big point of this approach is it makes refactoring a continuous process and makes it easier because you have tests proving you haven't accidentally changed behaviour.