CoffeeScript 1.3.3 (function() { describe("A suite is just a function", function() { return it("and so is a spec", function() { var a; a = true; return expect(a).toBe(true); }); }); }).call(this); Saturday, November 10, 12
CoffeeScript 1.3.3 (function() { describe("A suite is just a function", function() { return it("and so is a spec", function() { var a; a = true; return expect(a).toBe(true); }); }); }).call(this); describe("A suite is just a function", function() { var a; it("and so is a spec", function() { a = true; expect(a).toBe(true); }); }); Saturday, November 10, 12
numerous industry awards and accolades. we are regarded as technical experts and leaders in the web and mobile app development community. http://coderwall.com/team/mode-set we are the best at what we do Saturday, November 10, 12
resource based web apps pure javascript projects Mercury : http://jejacks0n.github.com/mercury/ Paranorman Mobile Site : http://vimeo.com/52507615 how we use coffeescript Saturday, November 10, 12
= arr[2] if arr.length >= 3 three = if arr.length >= 3 then arr[2] else "three" if arr.length >= 3 arr[2] else "three" three = "three" unless two?.length > 1 conditionals Saturday, November 10, 12
"schneider" , first : "matt" last : "daemon" ] getFirst = (ob)-> ob.first getFirst(name) for name in names _.map(names, getFirst) _.map(names, (n)-> n.first) list comprehensions Saturday, November 10, 12
to be hard. `coffee -wc src/*.coffee -o js/` codekit or live reload built into your web framework; e.g. assets pipeline in Ruby on Rails more complicated solutions for more complicated scenarios: require.js, instant coffee work ow changes Saturday, November 10, 12
that never happens in JS) Noobies will make a mess (because that never happens in JS) I don’t know JavaScript, how can I write CoffeeScript (use CS to learn JS) I’m worried about how my CoffeeScript compiles (lots of tools available, probably in your fav editor) language barriers Saturday, November 10, 12
= 'labolg' do (x = 'function') -> console.log x # => 'function' do -> console.log x # => 'function' console.log x # => 'labolg' Saturday, November 10, 12
when I refactor” “I can’t introduce CoffeeScript when I have all this JavaScript” “No one else in the office knows CoffeeScript” <script src="lib/vendor/jquery.js" type="text/javascript" charset="utf-8"></script> <script src="lib/myawesome.js" type="text/javascript" charset="utf-8"></script> <script src="lib/depends_on_myawesome.js" type="text/javascript" charset="utf-8"></script> timing Saturday, November 10, 12
_len = names.length; _i < _len; _i++) { name = names[_i]; getFirst(name); } // Generated by CoffeeScript 1.3.3 _.map(names, getFirst); “I’m married to CoffeeScript for life” support getFirst(name) for name in names _.map(names, getFirst) Saturday, November 10, 12