News for hackers. Stuff that matters.
Re:Better bash in 15 minutes by pdkl95 on Thursday April 17, 2014 @12:38PM (#7604640)
I like modularity:

    request_body() {
        cat <<REQUEST_BODY |      
        {
            "from" : 0,
            "size" : 40
        }
        REQUEST_BODY
    }

    get_url() {
        curl http://localhost -d @-
    }

    request_body | get_url
I find it helps readability when you come back to it a year later. Of course, it's also easy to parameterize the body, if needed.

/readability sometimes trumps YAGNI

There are no comments on this comment yet.