What is Meteor.js?
- CLI tool (meteor)
- Library of packages
- Open source
- Built on Node.js
CONSTANT_NAME variable_name ClassName functionName
Naming things is cheap--have DESCRIPTIVE NAMES. It should read as close to natural language as possible, avoiding abbrevs. and in-house language when possible.
Functions should have one thing they do. Endeavor to have pure functions, so that they do not have side effects. Functions should be have a maximum of three arguments. Good functions have one or two.
Avoid being clever and implicit whenever possible.
| // Don't leak observes in Meteor.publish callback. | |
| // Define only one instance for server of buyer and distributor ids for reactive counts. | |
| var BuyerQueue = new Meteor.Collection(null); | |
| var DistributorQueue = new Meteor.Collection(null); | |
| function isBuyer (doc) { | |
| return _.include(doc.roles, 'buyer'); | |
| } |
| #!/usr/bin/env ruby | |
| # | |
| # requirements: | |
| # gem install mechanize | |
| # | |
| # usage: | |
| # das_download.rb [download_directory] | |
| require 'mechanize' |