﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Joe commented on Reviewing Postman</title><description>Nice one!</description><link>http://ayende.com/153601/reviewing-postman#comment6</link><guid>http://ayende.com/153601/reviewing-postman#comment6</guid><pubDate>Sun, 11 Mar 2012 22:46:33 GMT</pubDate></item><item><title>Aaron Powell commented on Reviewing Postman</title><description>Awesome, 15 seconds of fame! :P

I'm not sure what's more baffling, that of all my code (across Umbraco, FunnelWeb, docpad, tbd, etc) *this* is the one that gets reviewed or that Postman actually has forks (in fact it has 6)!

Just a few points, the lose declaration of 'postie' was because I wasn't familiar enough with "fat rocket" in CoffeeScript. I'm pretty sure you could fix that by using the function binding properly, but oh well, live and learn ;).

With regards to your final point it's a common practice in JavaScript to "mix and match" your arguments, since they are untyped you can get away doing that. If you take a look at jQuery you can pass in are:

* A function
* An array
* A selector
* A DOM element
* Nothing

And many jQuery methods will take different argument types in the same place (values or functions is the common one) to do different actions. I'd say you're right in your assessment that you're applying C# practices to JavaScript, which isn't a good idea ;).

But none the less I'm glad you liked Postman :D</description><link>http://ayende.com/153601/reviewing-postman#comment5</link><guid>http://ayende.com/153601/reviewing-postman#comment5</guid><pubDate>Sun, 11 Mar 2012 09:14:33 GMT</pubDate></item><item><title>Demis Bellot commented on Reviewing Postman</title><description>Nice overview Oren. 

I love the CoffeeScript language and culture which is aimed at expressing your intent as succinctly and readable as possible where un-necessary abstractions are shunned in favour of simple, elegant and functional solutions. Refreshing change from the over abstraction fetish I constantly run into with C# culture.

Jeremy Ashkenas is the master mind behind CoffeeScript who is also the author behind the very popular js libraries Underscore.js and Backbone.js - the choice js libs for building Single Page Apps with.

CoffeeScript is also included in Rails with the 37 Signals elite now preferring to use it over JS for their client side development, here's a good introduction to CoffeeScript from Sam Stephenson (of Prototype.js and Rails fame):
http://vimeo.com/35258313

The weird thing about the deliver() method above is that CoffeeScript actually has support for splats that automatically convert the remaining javascripts functional arguments into an array so this:

 deliver: () -&gt;
    name = arguments[0]
    createCache name if ! cache[name]
    args = [].slice.call arguments, 1
    args = [] if !args
    args = [args] if !isArray args

Can effectively been rewritten to:

 deliver: (name, args...) -&gt;
    createCache name if ! cache[name]

Which is even more readable and terse.</description><link>http://ayende.com/153601/reviewing-postman#comment4</link><guid>http://ayende.com/153601/reviewing-postman#comment4</guid><pubDate>Sun, 11 Mar 2012 09:07:29 GMT</pubDate></item><item><title>Pete Weissbrod commented on Reviewing Postman</title><description>I imagine that most of the reactions javascript programmers have with coffeescript sounds just like the same reactions assembly programmers used to have with C</description><link>http://ayende.com/153601/reviewing-postman#comment3</link><guid>http://ayende.com/153601/reviewing-postman#comment3</guid><pubDate>Fri, 09 Mar 2012 20:58:58 GMT</pubDate></item><item><title>Ben Dornis commented on Reviewing Postman</title><description>I should point out that this project belongs to Aaron Powell (https://github.com/aaronpowell/Postman) and that Ayende Rahien reviewed my fork :)</description><link>http://ayende.com/153601/reviewing-postman#comment1</link><guid>http://ayende.com/153601/reviewing-postman#comment1</guid><pubDate>Sat, 07 Jan 2012 20:29:44 GMT</pubDate></item></channel></rss>