Andrey (azangru) wrote,

There's a strange tendency out there for tech podcasters not to be good programmers themselves.

There are exceptions, of course. The googlers at http203 are fantastic. Kent C. Dodds is probably good. Don't know about the guys.

But Tracy at Modern Web podcast, A.J.O'Neal at JSJabber (there was a recent episode where Dan Shappir was trying to explain to him the purpose of iterators and generators — the features that were introduced into the language at least 5 years ago), or this guy, who wrote this:

(link to commit)

According to the docs, Node's fs.readFile, as well as fs.readFileSync, will return a buffer if the options object does not contain the encoding. If it does, as in the example above, the function will return a string. So he is getting a string, calling it a buffer, and returning a string.toString()

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.