Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: jedschneider/coffeescript_workshop
base: 33c2a97379
...
head fork: jedschneider/coffeescript_workshop
compare: 38890f1c91
Checking mergeability… Don't worry, you can still create the pull request.
  • 3 commits
  • 9 files changed
  • 0 commit comments
  • 1 contributor
View
0  Gemfile → presentation/Gemfile
File renamed without changes
View
0  Gemfile.lock → presentation/Gemfile.lock
File renamed without changes
View
2  presentation/agenda/agenda.md
@@ -1,6 +1,6 @@
!SLIDE title
# CoffeeScript #
-A Lexicon for JavaScript
+Better JavaScript Within Reach
!SLIDE bullets
# Agenda #
View
4 presentation/features/features.md
@@ -1,3 +1,5 @@
!SLIDE subsection
+#Coffee REPL
-# Features of the Language
+!SLIDE subsection
+# Features of the Language
View
98 presentation/intro/intro.md
@@ -38,7 +38,7 @@ coffeescript
it "makes testing JS awesome!", ->
expect(yourCode).toBeLotsBetter()
-original
+original
@@@ javascript
describe("Jasmine", function() {
return it("makes testing JS awesome!",
@@ -48,42 +48,70 @@ original
});
!SLIDE subsection
-# CoffeeScript Adoption #
+# Design
+> "The usefulness of speaking of patterns is to have a common terminology for discussing the situations designers already see over and over."
+
+> -wikipedia.org (design patterns)
!SLIDE bullets incremental
-# CoffeeScript Adoption #
+# Design (Language, API, Patterns)
+ * give up explicit control in favor of declaration and abstraction
+ * abstractions that are composable
+ * abstractions that provide a more common interface (think icons or traffic signals)
-* Quick and Enthusiastic
- * adopted as a first class language in Rails 3.1
-* Not all positive: [A case against CoffeeScript](http://ryanflorence.com/2011/2012/case-against-coffeescript/)
-* Rhetorical Response: [A case for CoffeeScript](http://www.codethinked.com/a-case-for-using-coffeescript)
-* Reflective: "It's Just JavaScript"
- * [CoffeeScript is for Closers](http://userinexperience.com/?p=732)
- * **The rise of 'Build Your Own JavaScript'** [Jeremy Ashkenas](http://www.infoq.com/presentations/CoffeeScript)
+# remember when this felt weird?
+ @@@javascript
+ $(document).ready( function(){
+ $("#content p").addClass("simple")
+ });
-!SLIDE incremental bullets
-# CoffeeScript is only part of the solution #
- * debugging is less of an issue with TDD (Test Driven Development)
- * comprehension is augmented with other libraries that are more declarative (underscore.js, _eg_)
+!SLIDE bullets incremental
+# CoffeeScript is just JavaScript
+* the next level of abstraction
+* solving basic problems in JavaScript (generalized from jQuery) and extends functionality
+* mitigate inherent problems with JavaScript [JavaScript: The Good Parts by Douglas Crockford](http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=sr_1_1?ie=UTF8&qid=1335356270&sr=8-1)
+* but the process is in reach
+* `javascript <=> coffeescript <=> google closure <=> dart and clojurescript`
-!SLIDE code
-# Alternative Comprehensions
-
- @@@ coffeescript
- list = [{foo : "bar"}, {foo : "baz"}]
-
- # built in comprehension
- item["foo"] for item in list #=> ["bar", "baz"]
-
- # underscore
- # _.map(list, iterator, [context])
- _.map list, (item)-> item["foo"]
-
- # or maybe
- _.map list, (item)-> _.pick(item, 'foo')
-
-!SLIDE bullets
-
-# Resources #
-
-* css : [railslove](http://github.com/railslove)
+!SLIDE subsection
+# Looping as an example of language extension
+
+!SLIDE execute
+# Basic JavaScript
+ @@@javascript
+ arr= [0,1,2,3,4]
+ otherArr = []
+ for(i=0; i<arr.length; i++){
+ otherArr[i] = arr[i] + 1;
+ }
+ // => 5
+ console.log(otherArr); // => [1, 2, 3, 4, 5]
+
+!SLIDE execute
+# First Step: Use An API
+ @@@javascript
+ arr= [0,1,2,3,4]
+ otherArr = []
+ $.each(arr, function(i){
+ otherArr[i] = arr[i] + 1;
+ })
+ //=> [0,1,2,3,4]
+ console.log(otherArr); // => [1, 2, 3, 4, 5]
+ console.log(arr);
+
+!SLIDE execute
+# Second Step: Make the Language Better
+same loop in coffeescript
+ @@@coffeescript
+ arr = [0..4] #=> [0,1,2,3,4]
+
+ otherArr = (a + 1 for a in arr) #=> [1,2,3,4,5]
+
+ #addOne = function(x){return x + 1}
+ addOne = (x)-> x + 1
+
+ console.log arr,
+ otherArr,
+ (addOne(a) for a in otherArr)
+ #(addOne a for a in otherArr)
+ #=> [0,1,2,3,4], [1,2,3,4,5], [2,3,4,5,6]
View
5 presentation/resources/resources.md
@@ -0,0 +1,5 @@
+!SLIDE bullets
+
+# Resources #
+
+* css : [railslove](http://github.com/railslove)
View
8 presentation/showoff.json
@@ -1,8 +1,10 @@
{ "name": "CoffeeScript Workshop", "sections": [
- {"section": "agenda"},
+ {"section" : "agenda"},
{"section" : "materials"},
- {"section":"intro"},
+ {"section" :"intro"},
/* {"section" : "about_me"},*/
{"section" : "workflow"},
{"section" : "materials"},
- {"section" : "features"} ]}
+ {"section" : "features"},
+ {"section" : "resources"}
+ ]}
View
8 presentation/workflow/workflow.md
@@ -1,11 +1,15 @@
!SLIDE subsection
# workflow #
+!SLIDE
+# Build Your Own Workflow
+Every team and situation may require something a little different
+
!SLIDE bullets incremental
# Workflow #
-
* write -> compile -> run
* A full list of options on the github wiki
* https://github.com/jashkenas/coffee-script/wiki/Build-tools
* **instant coffee** [https://github.com/fredericksgary/instant-coffee](https://github.com/fredericksgary/instant-coffee)
- * java based, built on JCoffeeScript with some added features
+ * java based, built on JCoffeeScript with some added features
+
View
5 spec/coffeescripts/converge_spec.coffee
@@ -1,5 +0,0 @@
-describe "Converge", ->
- it "creating a simple function", ->
- expect( Converge.double(2) ).toEqual 4
- expect( Converge.double(5) ).toEqual 10
-

No commit comments for this range

Something went wrong with that request. Please try again.