Coffeescript - take a sip of code
Upcoming SlideShare
Loading in...5
×
 

Coffeescript - take a sip of code

on

  • 1,735 views

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

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

Statistics

Views

Total Views
1,735
Views on SlideShare
1,735
Embed Views
0

Actions

Likes
0
Downloads
7
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Coffeescript - take a sip of code Coffeescript - take a sip of code Presentation Transcript

  • CoffeeScript Unfancy JavaScript
  • DimitrisTsironisCEO & Founder at GeemboUI designer & huge geek,who loves good design andfrench fries, as much asgood indentation in astylesheet.@tsironakos
  • JeremyAshkenasInteractive News at theNYTimes /DocumentCloud •Creator of CoffeeScript+ Backbone.js • Code isLiterature View slide
  • CoffeeScript is a little language that compiles into Javascript View slide
  • 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 well, should have elegant and beautiful form
  • Let’s see some code!
  • 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 }
  • 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; }
  • 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; }
  • 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; }
  • 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);});
  • 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.Finds funny cat gifsIntegrates with almost every service on EarthManages the playlist in your officeeverything you could imagine!
  • 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