As a developer, I feel that others should test my code. Is that reasonable?
As a developer, I feel that others should test my code. Is that reasonable?
As an example, we wanted to automate the test for browser-based OAuth connections to GitHub and authorizing an app there.
Here is the test that does so: https://github.com/coreinfrastructure/best-practices-badge/b...
Even for manual tests, the test spec should make part of the change request and be reviewed appropriately.
Cheers!
Who says I don’t?
In my previous job this worked quite well.
I discovered those drawbacks fairly early, so quickly made it a habit to be super-strict and critical about pretty much every single line of code I write (both with regards to style, functionality, how it adheres to the standard practices etc).
What I also do consistently is review older code: if I have to add a function to existing code, it happens more often than not that I'll re-read and review the surrounding bits. Often to come up with better code. If time permits, else I take note and go back to it later.
In practice it turns out that if I haven't touched code for months, reviewing it is almost the same as reviewing someone else's code, i.e. starting with a clean slate. Which is also why I'll sometimes write something, commit it, but not yet merge it to production. Then a week or so later I'll come back and review every bit again.
I personally find that me a couple months down the track is pretty much another person anyway. In a sense you're not reviewing your own code, you're letting it be reviewed by future you. But if you're in a team with multiple developers, having someone else review your code would be more efficient.
I really like this idea, haven't heard it before but it makes complete sense, thank you.