- 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
- Analyze code base to check if there's something similar already done(and reusable)
- 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
- Get it done
-
Make real tests on it(if possible)
-
Review the code and tests(if everything makes sense, quality and if there's any typos) before asking someone else's code review
-
PR and ask for code review if all good
- 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)
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.