0
CoffeeScript  Unfancy JavaScript
DimitrisTsironisCEO & Founder at GeemboUI designer & huge geek,who loves good design andfrench fries, as much asgood inden...
JeremyAshkenasInteractive News at theNYTimes /DocumentCloud •Creator of CoffeeScript+ Backbone.js • Code isLiterature
CoffeeScript is a little language that compiles into Javascript
It’s just Javascript!
Code is poetry...
A beautiful programming language  Least amount of code to get the job done  Readable and understandable  Easy to maintain ...
Let’s see some code!
Variables message = “Ready for some coffee?”                                               CoffeeScript alert(message) var...
Example coffee = ->   answer = confirm “Ready for some coffee?”     CoffeeScript  “Your answer is ” + answeror “Your answe...
Function Parameters coffee = (message) ->   answer = confirm message             CoffeeScript  “Your answer is #{answer}” ...
Optional Parameters coffee = (message = “Ready for some coffee”) ->   answer = confirm message                        Coff...
Applied jQuery  $ ->    changeTab = (e) ->       e.preventDefault()       $(“#tabs li a.active”).removeClass “active”   Co...
You get the idea
hubot, make me some coffee please!
Hubot is your companys robot.Install him in your company to dramatically  improve and reduce employee efficiency.
What he/she doesLives in your chat (Campfire, GTalk, Hipchat etc.)Deploys your codeConnect to your issues, commits etc.Find...
Written in CoffeeScript (and some Perl and Shell)
we have our own hubot Meet Geembot!
Open source & expandable (original written by Github Inc.)
Thanks!Follow me@geembohq@tsironakos
Upcoming SlideShare
Loading in...5
×

Coffeescript - take a sip of code

1,355

Published on

This is an intro presentation to the new and awesome language, Coffeescript. See the presentation for more details.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,355
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Coffeescript - take a sip of code"

  1. 1. CoffeeScript Unfancy JavaScript
  2. 2. DimitrisTsironisCEO & Founder at GeemboUI designer & huge geek,who loves good design andfrench fries, as much asgood indentation in astylesheet.@tsironakos
  3. 3. JeremyAshkenasInteractive News at theNYTimes /DocumentCloud •Creator of CoffeeScript+ Backbone.js • Code isLiterature
  4. 4. CoffeeScript is a little language that compiles into Javascript
  5. 5. It’s just Javascript!
  6. 6. Code is poetry...
  7. 7. A beautiful programming language Least amount of code to get the job done Readable and understandable Easy to maintain well, should have elegant and beautiful form
  8. 8. Let’s see some code!
  9. 9. Variables message = “Ready for some coffee?” CoffeeScript alert(message) var message; message = “Ready for some coffee?”; JavaScript alert(message);Functions coffee = -> CoffeeScript confirm “Ready for some coffee?” var coffee = function() { return confirm(“Ready for some coffee?”); JavaScript }
  10. 10. Example coffee = -> answer = confirm “Ready for some coffee?” CoffeeScript “Your answer is ” + answeror “Your answer is #{answer}” var coffee; coffee = function() { var answer; JavaScript answer = confirm(“Ready for some coffee?”); return “Your answer is ” + answer; }
  11. 11. Function Parameters coffee = (message) -> answer = confirm message CoffeeScript “Your answer is #{answer}” var coffee; coffee = function(message) { var answer; JavaScript answer = confirm(message); return “Your answer is “ + answer; }
  12. 12. Optional Parameters coffee = (message = “Ready for some coffee”) -> answer = confirm message CoffeeScript “Your answer is #{answer}” var coffee; coffee = function(message) { var answer; JavaScript if (message == null) { message = “Ready for some coffee?”; } answer = confirm(message); return “Your answer is “ + answer; }
  13. 13. Applied jQuery $ -> changeTab = (e) -> e.preventDefault() $(“#tabs li a.active”).removeClass “active” CoffeeScript $(@).addClass “active” $(“#tabs ul li a”).click changeTabjQuery(function($) { function changeTab(e) { e.preventDefault(); $(“#tabs li a.active”).removeClass(“active”); jQuery $(this).addClass(“active”); } $(“#tabs ul li a”).click(changeTab);});
  14. 14. You get the idea
  15. 15. hubot, make me some coffee please!
  16. 16. Hubot is your companys robot.Install him in your company to dramatically improve and reduce employee efficiency.
  17. 17. What he/she doesLives in your chat (Campfire, GTalk, Hipchat etc.)Deploys your codeConnect to your issues, commits etc.Finds funny cat gifsIntegrates with almost every service on EarthManages the playlist in your officeeverything you could imagine!
  18. 18. Written in CoffeeScript (and some Perl and Shell)
  19. 19. we have our own hubot Meet Geembot!
  20. 20. Open source & expandable (original written by Github Inc.)
  21. 21. Thanks!Follow me@geembohq@tsironakos
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×