[ ] a [ ] b
If user is careless, forgetting to put "- " before "[ ]", TODO list could get buggy.
Steps to reproduce bug:
- on parsed MD page of list above, tick "c" to note that "c" is done.
- Now, edit the file.
Based on the article: Using checklists for code review
In general, people are pretty good at the code review process, but it's sometimes surprising what can slip through. A natural consequence of the way our brains look at the world is that it's easy to pay a lot of attention to small details and code style flubs, and completely miss the big picture.
Obviously, not everything is applicable for every change. If the review request isn't making any changes to UI, then skip the first two checklists entirely. If a change is a bug fix, typically don't review it for architecture and design principles.
Put the big stuff first (e.g. architecture). You don't want to work through a ton of small issues before realizing that everything has to be rewritten.
> Do a pass through the code for each and every item in the checklist. By only looking for a very specific type of defect, each pass goes relatively quickly, even for large changes. Focu
|unless self.class.const_defined? "IRB_RC_HAS_LOADED"|
|# Log to STDOUT if in Rails|
|if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')|
|RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)|
|on run argv|
|tell application "System Events" to tell process "Terminal" to keystroke "t" using command down -- open a new tab|
|tell application "Terminal" to do script "cd " & item 1 of argv in front window -- change directory|
|-- in your profile|
|-- alias newtab='osascript ~/.applescripts/newtab.applescript `pwd`'|
|Surround a heredoc with quotes and you can continue the code on the same line:|
|render :status => 404, :text => <<-'EOH' and return unless setup|
|article not found<br/>|
|I, as a server, have failed<br/>|
|Quotes also give you more freedom/creativity with the terminal ID:|
|tell application "Terminal"|
|do script "clear" in selected tab of front window|
|do script command in selected tab of front window|
|tell application "System Events"|
|my run_command("cd ~/Projects/nudge")|
|class ActionController::Request # ActionController::AbstractRequest in Rails < 2.3|
|# Returns true if the request seems to come from a bot|
|user_agent =~ /\b(Baidu|Gigabot|Googlebot|libwww-perl|lwp-trivial|msnbot|SiteUptime|Slurp|WordPress|ZIBB|ZyBorg)\b/i|
|# Then in your controllers you can do :|