SlideShare a Scribd company logo
CoffeeScript
  Unfancy JavaScript
Dimitris
Tsironis
CEO & Founder at Geembo

UI designer & huge geek,
who loves good design and
french fries, as much as
good indentation in a
stylesheet.

@tsironakos
Jeremy
Ashkenas
Interactive News at the
NYTimes /
DocumentCloud •
Creator of CoffeeScript
+ Backbone.js • Code is
Literature
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

  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 ” + answer

or “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 changeTab



jQuery(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 company's robot.
Install him in your company to dramatically
  improve and reduce employee efficiency.
What he/she does

Lives in your chat (Campfire, GTalk, Hipchat etc.)

Deploys your code

Connect to your issues, commits etc.

Finds funny cat gifs

Integrates with almost every service on Earth

Manages the playlist in your office

everything 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

More Related Content

Viewers also liked

Great Company Concepto
Great Company ConceptoGreat Company Concepto
Great Company Concepto
Linfer Restrepo Ospina
 
El eros electronico
El eros electronicoEl eros electronico
El eros electronico
Rodolfo Marquez
 
карта мышления для вики
карта мышления для викикарта мышления для вики
карта мышления для викиKonshina
 
Visiones sobre el aprendizaje
Visiones sobre el aprendizajeVisiones sobre el aprendizaje
Visiones sobre el aprendizaje
Camilo Pulido
 
Virror Product Showcase
Virror Product ShowcaseVirror Product Showcase
Virror Product Showcase
Omar Mekky
 
مته های حفاری
مته های حفاریمته های حفاری
مته های حفاری
Technical University of Denamrk
 
кращі вчителі школи
кращі вчителі школикращі вчителі школи
кращі вчителі школи
max_iwan
 
Datafying Bitcoins
Datafying BitcoinsDatafying Bitcoins
Datafying Bitcoins
Tariq Ahmad
 
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آنامکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
Technical University of Denamrk
 
Pequena borboleta slid
Pequena borboleta slidPequena borboleta slid
Pequena borboleta slid
PequenaBorboleta
 
Skies miltonia location map
Skies miltonia location mapSkies miltonia location map
Skies miltonia location mapHenry Loh
 
Bartley residences photos
Bartley residences photosBartley residences photos
Bartley residences photosHenry Loh
 
(cement permeability test) آزمایش تراوایی سیمان
(cement permeability test) آزمایش تراوایی سیمان(cement permeability test) آزمایش تراوایی سیمان
(cement permeability test) آزمایش تراوایی سیمان
Technical University of Denamrk
 
Xii promoción
Xii promociónXii promoción
Xii promoción
Jazmín Jácome
 
De lopende band
De lopende bandDe lopende band
De lopende band
ThomasVeltmans
 
2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)
2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)
2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)elisa_bacchetti
 
Álvarez Méndez
Álvarez  MéndezÁlvarez  Méndez
Álvarez Méndez
Samantha Claudio
 

Viewers also liked (20)

Great Company Concepto
Great Company ConceptoGreat Company Concepto
Great Company Concepto
 
El eros electronico
El eros electronicoEl eros electronico
El eros electronico
 
карта мышления для вики
карта мышления для викикарта мышления для вики
карта мышления для вики
 
Visiones sobre el aprendizaje
Visiones sobre el aprendizajeVisiones sobre el aprendizaje
Visiones sobre el aprendizaje
 
Virror Product Showcase
Virror Product ShowcaseVirror Product Showcase
Virror Product Showcase
 
Large hadron collider
Large hadron colliderLarge hadron collider
Large hadron collider
 
مته های حفاری
مته های حفاریمته های حفاری
مته های حفاری
 
кращі вчителі школи
кращі вчителі школикращі вчителі школи
кращі вчителі школи
 
Tower a
Tower aTower a
Tower a
 
Pd rational
Pd rationalPd rational
Pd rational
 
Datafying Bitcoins
Datafying BitcoinsDatafying Bitcoins
Datafying Bitcoins
 
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آنامکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
امکان‌سنجی طراحی و ساخت سخت‌افزار شبیه‌ساز کنترل فوران چاه و نوشتن نرم افزار آن
 
Pequena borboleta slid
Pequena borboleta slidPequena borboleta slid
Pequena borboleta slid
 
Skies miltonia location map
Skies miltonia location mapSkies miltonia location map
Skies miltonia location map
 
Bartley residences photos
Bartley residences photosBartley residences photos
Bartley residences photos
 
(cement permeability test) آزمایش تراوایی سیمان
(cement permeability test) آزمایش تراوایی سیمان(cement permeability test) آزمایش تراوایی سیمان
(cement permeability test) آزمایش تراوایی سیمان
 
Xii promoción
Xii promociónXii promoción
Xii promoción
 
De lopende band
De lopende bandDe lopende band
De lopende band
 
2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)
2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)
2 5 estensione_vita_materiali_vezzoli_polimi_12.13 (9)
 
Álvarez Méndez
Álvarez  MéndezÁlvarez  Méndez
Álvarez Méndez
 

Similar to Coffeescript - take a sip of code

Coffeescript slides
Coffeescript slidesCoffeescript slides
Coffeescript slides
jair manosalva
 
Coffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotesCoffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotes
Brandon Satrom
 
Quick coffeescript
Quick coffeescriptQuick coffeescript
Quick coffeescript
Thomas Hunter II
 
An Intoduction to Coffeescript (Turkish)
An Intoduction to Coffeescript (Turkish)An Intoduction to Coffeescript (Turkish)
An Intoduction to Coffeescript (Turkish)Seyfeddin Bassarac
 
kRouter
kRouterkRouter
kRouter
Kelp Chen
 
Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScriptEddie Kao
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasminePaulo Ragonha
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayEddie Kao
 
CoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developersCoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developersMehdi Valikhani
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
David Furber
 
Coffee script final
Coffee script finalCoffee script final
Coffee script finalpriyankazope
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
niklal
 
Introduction to CoffeeScript
Introduction to CoffeeScriptIntroduction to CoffeeScript
Introduction to CoffeeScript
Stalin Thangaraj
 
Smooth CoffeeScript
Smooth CoffeeScriptSmooth CoffeeScript
Smooth CoffeeScript
Michael Scovetta
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScriptNone
 
CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012Matt Gauger
 
Coffeescript - what's good
Coffeescript - what's goodCoffeescript - what's good
Coffeescript - what's good
JeongHun Byeon
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScript
Forziatech
 
CoffeeScript Design Patterns
CoffeeScript Design PatternsCoffeeScript Design Patterns
CoffeeScript Design Patterns
TrevorBurnham
 

Similar to Coffeescript - take a sip of code (20)

test
testtest
test
 
Coffeescript slides
Coffeescript slidesCoffeescript slides
Coffeescript slides
 
Coffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotesCoffee scriptisforclosers nonotes
Coffee scriptisforclosers nonotes
 
Quick coffeescript
Quick coffeescriptQuick coffeescript
Quick coffeescript
 
An Intoduction to Coffeescript (Turkish)
An Intoduction to Coffeescript (Turkish)An Intoduction to Coffeescript (Turkish)
An Intoduction to Coffeescript (Turkish)
 
kRouter
kRouterkRouter
kRouter
 
Happy Programming with CoffeeScript
Happy Programming with CoffeeScriptHappy Programming with CoffeeScript
Happy Programming with CoffeeScript
 
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and JasmineSingle Page Web Applications with CoffeeScript, Backbone and Jasmine
Single Page Web Applications with CoffeeScript, Backbone and Jasmine
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
 
CoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developersCoffeeScript, An Introduction for Nodejs developers
CoffeeScript, An Introduction for Nodejs developers
 
Real life-coffeescript
Real life-coffeescriptReal life-coffeescript
Real life-coffeescript
 
Coffee script final
Coffee script finalCoffee script final
Coffee script final
 
Damn Fine CoffeeScript
Damn Fine CoffeeScriptDamn Fine CoffeeScript
Damn Fine CoffeeScript
 
Introduction to CoffeeScript
Introduction to CoffeeScriptIntroduction to CoffeeScript
Introduction to CoffeeScript
 
Smooth CoffeeScript
Smooth CoffeeScriptSmooth CoffeeScript
Smooth CoffeeScript
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012CoffeeScript & Jasmine - MadJS February 2012
CoffeeScript & Jasmine - MadJS February 2012
 
Coffeescript - what's good
Coffeescript - what's goodCoffeescript - what's good
Coffeescript - what's good
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScript
 
CoffeeScript Design Patterns
CoffeeScript Design PatternsCoffeeScript Design Patterns
CoffeeScript Design Patterns
 

More from Dimitris Tsironis

Automating Front-End Workflow
Automating Front-End WorkflowAutomating Front-End Workflow
Automating Front-End Workflow
Dimitris Tsironis
 
Git 201
Git 201Git 201
Git 101
Git 101Git 101
HTML+CSS: how to get started
HTML+CSS: how to get startedHTML+CSS: how to get started
HTML+CSS: how to get started
Dimitris Tsironis
 
Coffeescript unfancy javascript
Coffeescript unfancy javascriptCoffeescript unfancy javascript
Coffeescript unfancy javascriptDimitris Tsironis
 

More from Dimitris Tsironis (7)

Automating Front-End Workflow
Automating Front-End WorkflowAutomating Front-End Workflow
Automating Front-End Workflow
 
Modern Webapps
Modern WebappsModern Webapps
Modern Webapps
 
Git 201
Git 201Git 201
Git 201
 
Git 101
Git 101Git 101
Git 101
 
HTML+CSS: how to get started
HTML+CSS: how to get startedHTML+CSS: how to get started
HTML+CSS: how to get started
 
Capistrano for non-rubyist
Capistrano for non-rubyistCapistrano for non-rubyist
Capistrano for non-rubyist
 
Coffeescript unfancy javascript
Coffeescript unfancy javascriptCoffeescript unfancy javascript
Coffeescript unfancy javascript
 

Recently uploaded

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 

Recently uploaded (20)

Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 

Coffeescript - take a sip of code

  • 1. CoffeeScript Unfancy JavaScript
  • 2. Dimitris Tsironis CEO & Founder at Geembo UI designer & huge geek, who loves good design and french fries, as much as good indentation in a stylesheet. @tsironakos
  • 3. Jeremy Ashkenas Interactive News at the NYTimes / DocumentCloud • Creator of CoffeeScript + Backbone.js • Code is Literature
  • 4. CoffeeScript is a little language that compiles into Javascript
  • 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
  • 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. Example coffee = -> answer = confirm “Ready for some coffee?” CoffeeScript “Your answer is ” + answer or “Your answer is #{answer}” var coffee; coffee = function() { var answer; JavaScript answer = confirm(“Ready for some coffee?”); return “Your answer is ” + answer; }
  • 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. 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. Applied jQuery $ -> changeTab = (e) -> e.preventDefault() $(“#tabs li a.active”).removeClass “active” CoffeeScript $(@).addClass “active” $(“#tabs ul li a”).click changeTab jQuery(function($) { function changeTab(e) { e.preventDefault(); $(“#tabs li a.active”).removeClass(“active”); jQuery $(this).addClass(“active”); } $(“#tabs ul li a”).click(changeTab); });
  • 14. You get the idea
  • 15. hubot, make me some coffee please!
  • 16. Hubot is your company's robot. Install him in your company to dramatically improve and reduce employee efficiency.
  • 17. What he/she does Lives in your chat (Campfire, GTalk, Hipchat etc.) Deploys your code Connect to your issues, commits etc. Finds funny cat gifs Integrates with almost every service on Earth Manages the playlist in your office everything you could imagine!
  • 18. Written in CoffeeScript (and some Perl and Shell)
  • 19. we have our own hubot Meet Geembot!
  • 20. Open source & expandable (original written by Github Inc.)