The Action Pattern: Clean, Obvious, Testable Code

1 · Nicolás Bevacqua · March 26, 2019, 12:02 p.m.
Let’s convert a mock API endpoint for signing up new users in a mobile app into using the action pattern.When I first started writing software on the web, my code was a mishmash. Every project was loaded with unnecessarily long files and code left commented, thrown to the side of the road like an abandoned vehicle. The theme of the day was: unpredictability. Under ideal conditions—the happy path—I was able to make my code work. But what I couldn’t do was make my code work consistently. One time ...