Write the Last Line of Code First

Photo by Emile Perron on Unsplash
  • Start a project by writing some simple, abstract functionality
  • Attempt to build up brick by brick
  • Find out you didn’t account for everything you needed in the original plan
  • Add duck tape and paper clips, only to find your API or UI overcomplicated and requiring pages of documentation or in person communication.
  • “Don’t bite off more than you can chew.”
  • “You can always add more later.”

Bisect Development

That’s a fancy name I’ve made up, but it does describe what I’m after. A thought experiment for this term:

results = pollkit.execute()
widget = pollkit.get_or_create_surface('my_screen_id')
results.render_to(widget)
class PollKit(object):
api_endpoint = 'vidstats.com/api/lol/'
def execute(self):
# ...
def get_or_create_surface(self, id):
# ...

Drawbacks

Obviously this approach has the challenge of taking longer to get off the ground. So I advise, when starting to use this paradigm, after the “end commands” are written, learn toward the beginning as you bisect to have incremental results.

Practice

As your experience grows, you can maintain a better mind map and go for longer stretches without needing to debug and you’ll trust your code more.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael McCartney

Michael McCartney

Software blacksmith with an art degree