Comment

Comment by andruby

What you describe as sections seem like natural breaking points for function. Split of those section in their own named function. The names help to document, make it easier to test and the calling of the functions will give a high-level overview of the processes

Ie:

  def drive
    turn_ignition()
    shift_gear()
    press_accelerator()
  end

  def turn_ignition
    … code
  end

  def shift_gear
    …
parent andruby 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton