's the name, refactoring's the game. Software Developer & Technical Coach. 🇵🇸✡️🌈🇦🇹🏴
's the name, refactoring's the game. Software Developer & Technical Coach.
🇵🇸✡️🌈🇦🇹🏴
Posts
's the name, refactoring's the game. Software Developer & Technical Coach. 🇵🇸✡️🌈🇦🇹🏴
@BarneyDellar@mastodon.scot @qcoding@iosdev.space
Given a function like:
F()
{
a();
b();
if (c()) { d(); }
}
It makes sense to have test(s) for when `c` is true and other test(s) for when it's false.
But don't have some test(s) for the `a` effects and some test(s) for the `b` effects. If the `a` and `b` effects need to be verified, assert them both in the same test.
And yes: if this makes your tests undesirable in some way, refactor.
's the name, refactoring's the game. Software Developer & Technical Coach. 🇵🇸✡️🌈🇦🇹🏴
New unit testing rule just dropped:
Any two adjacent lines of code shall be verified by the exact same tests.
's the name, refactoring's the game. Software Developer & Technical Coach. 🇵🇸✡️🌈🇦🇹🏴
Most NFL teams are named for a city, e.g.: Seahawks, Browns, Cowboys, Bay Buccaneers.
Some are named after states: Titans, Vikings, Cardinals, Panthers, Jets, Giants, Commanders, City Chiefs.
Patriots are named after a country that doesn't exist. Ironic.
's the name, refactoring's the game. Software Developer & Technical Coach. 🇵🇸✡️🌈🇦🇹🏴
Micro USB in 2025 is a misdemeanor.
USB-C that requires a USB-A charger is a felony.