Created
August 20, 2012 06:29
-
-
Save max-mapper/3401560 to your computer and use it in GitHub Desktop.
official semicolon style of @maxogden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toCSV = function(table, cb) { | |
;;;;var cmd = spawn('mdb-export', [this.file, table]) | |
;;;;cmd.stdout.pipe(concat(function(err, out) { | |
;;;;;;;;;;;;if (err) return cb(err) | |
;;;;;;;;;;;;if (!out) return cb('no output') | |
;;;;;;;;;;;;cb(false, out.toString()) | |
;;;;;;;;})) | |
} |
azer
commented
Aug 20, 2012
:nice:
;;;;;;undefined = void(
);;;
why are you indenting by 4 semicolons? you a moron
function toCSV = function(table, cb) {
;var cmd = spawn('mdb-export', [this.file, table])
;cmd.stdout.pipe(concat(function(err, out) {
;;if (err) return cb(err)
;;;if (!out) return cb('no output')
;;;;;auth(out, function (err, token) {
;;;;;;;;if(err)
;;;;;;;;;;;;;throw err
;;;;;;;;cb(false, out.toString())
;;;;;})
;;;}))
}
it's much more elegant to indent according to the Fibonacci sequence.
Have we learned nothing from Python?
function toCSV = function(table, cb)
;;;;var cmd = spawn('mdb-export', [this.file, table])
;;;;cmd.stdout.pipe(concat(function(err, out)
;;;;;;;;;;;;if (err) return cb(err)
;;;;;;;;;;;;if (!out) return cb('no output')
;;;;;;;;;;;;cb(false, out.toString())
;;;;;;;;))
How would you indent this code example?
Might I suggest:
var magicWords = [ "abracadabra"
/*;;;;;;;;;;;;;*/, "gesundheit"
/*;;;;;;;;;;;;;*/, "ventrilo"
/*;;;;;;;;;;;;;*/]
/**/, spells = { "fireball" : function () { setOnFire() }
/*;;;;;;;;;;;*/, "water" : function () { putOut() }
/*;;;;;;;;;;;*/}
/**/, a = 1
/**/, b = "abc"
/**/, etc
/**/, somethingElse
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment