May 01

Donald Knuth, the advocate of literate programming, gave his opinion on code reuse from an interview by Andrew Binstock

I also must confess to a strong bias against the fashion for reusable code. To me, “re-editable code” is much, much better than an untouchable black box or toolkit. I could go on and on about this. If you’re totally convinced that reusable code is wonderful, I probably won’t be able to sway you anyway, but you’ll never convince me that reusable code isn’t mostly a menace.

In my view, literately programmed code should be visible for every programmer through its evolution, so literate programming doesn’t cope with OCP well. I guess it is why he prefer “re-editable” code to reusable black box code. But I think benefits of information hiding can be sacrificed in no case.

Mar 30

Recently, I found Douglas Crockford’s blog. Although I am very interested in his articles, finding his blog took a long time since http://www.crockford.com/ doesn’t provide any link to it. Reading posts was enjoyable. I note down some impressive posts.

Introducing other’s work

  • A paper, Using JavaScript as a Real Programming Language
  • The Non-Designer’s Design Book

Introducing his work

  • Adsafe
  • Contributions to JSON

Informative but arguable (in my view)

  • XML’s future in WEB : XML is on web trending down. XHTML failed to displace HTML because
    • Its client-side validation is not so beneficial.
    • It lacks security model
  • Thread is evil.
  • Scribe, the first trial of data-document translation, is similar to JSON. Adopting SGML and XML instead of it was a bad choice.

Security of JavaScript seems to be one of his current concerns. His recent talk shows his approaches toward the security problems.

Feb 22

Kent Beck’s “Implementation patterns” is the first book that I bought in this year. Its main concern is how to write better code that is readable and understandable, and it also touchs fundamentals of software design especially OOP. One of the book’s keywords is “intention”. Its strengths lie in being well-structured, easy to understand and thin.

However it is not a pioneeering book like DP of GoF; it doesn’t address something really new. That makes me a little disppointed because I have expected it would tell me lots of stuffs that I didn’t realize before. It is like a well-documented wikipedia in that sense.

The title of book need to be changed to “Implementation patterns in Java”. It is not just because example code of the book is written in Java but because some topics are very specific to Java so that these topics are not concerns of Non-Java developers.

Jan 29

The “Pro JavaScript Techniques” authored by John Resig, the creator of jQuery, is a excellent book. I neither bought nor read the book. Instead I just read sample code snippets from http://jspro.org/code/ and tested them. Guessing from the code snippets, Ch.2 and Ch.3 describe backgrounds of JavaScript. I think these chapters are the core of this book and they really help us understand the concept of “prototype-based” and write object-oriented JavaScript code gracefully. Remaining chapters are for advanced techniques and tips: Ajax, DOM, cross-browser supporting, new features of JavaScript 1.6/1.7 and so on. Even though these chapters are not so much impressive to me, they also seem to be worthwhile to read.