Skip to content

Instantly share code, notes, and snippets.

@mvoto
Last active June 15, 2018 17:24
Show Gist options
  • Save mvoto/c23e555fb16202a16a1d7e9cd153a38f to your computer and use it in GitHub Desktop.
Save mvoto/c23e555fb16202a16a1d7e9cd153a38f to your computer and use it in GitHub Desktop.

Estimation

  1. Understand the problem as much as you can(if not, ask someone for clarification)

1.1. Break the task as much as possible in order to have an accurate estimation

1.2. Think about edge cases(this is tricky) but it's a good exercise to try to decrease scope

Planning

  1. Analyze code base to check if there's something similar already done(and reusable)

Development

  1. Try to separate the task from 2 different perspectives:
  • The developer who has a better understanding of the task
  • The test writer(which is possibly the consumer) and knows almost nothing about the task
  1. Get it done

Delivery

  1. Make real tests on it(if possible)

  2. Review the code and tests(if everything makes sense, quality and if there's any typos) before asking someone else's code review

  3. PR and ask for code review if all good


Protips

  • Running rspec on specific file names:
bin/rspec $(find ./spec | grep spec_files_preffix.*spec.rb$)
  • Hash received or default value set:
(config[:pool] && config[:pool].to_i) || 1
  • Log all SQL stuff on console:
ActiveRecord::Base.logger = Logger.new(STDOUT)

Vim and Tmux stuff

On Vim, to adjust split screen sizes to be exac same:

Ctrl + w =

On Tmux, to adjust split screen sizes to be exac same:

Ctrl A + Alt 5

(Ctrl A is leader)

Avoid customizing it too much, otherwise when editing things on a server you will find it hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment