Solved Where to start with a 70-line repetitive script? BEBellaRossiOP 25 Oct, 08:01 Feels overwhelming.
NONoahLoops25 Oct, 14:56 Solutionreplies: 2Run it first and save the output — that's your safety net. Then extract one function at a time (parse_feed first), run again and compare. Never change behaviour and structure at the same time.
EMEmmaCodes26 Oct, 21:58And stage 2's asserts lock in the behaviour so the fourth engine can be added safely.
OLOliviaPy26 Oct, 16:41Rename t, m, s to real names while you're at it — "Names that explain" pays off here.
HEHenryWrites27 Oct, 08:31This is the most "real job" challenge on the site. Every company has this script somewhere 😄
Comments 5
Join the discussion CommentAlready have an account? Log in
Run it first and save the output — that's your safety net. Then extract one function at a time (parse_feed first), run again and compare. Never change behaviour and structure at the same time.
Save the output first. Brilliant, so obvious in hindsight.
And stage 2's asserts lock in the behaviour so the fourth engine can be added safely.
Rename t, m, s to real names while you're at it — "Names that explain" pays off here.
This is the most "real job" challenge on the site. Every company has this script somewhere 😄