Thursday, January 17, 2008

Reading List

My previous post discussed my thoughts on how to read programming books, here comes my reading list of programming/computer science books. The books I have completed reading after this post are listed for each year, afterwards come the books I am reading and those I plan to read (all books I have completed before this post is not listed here). Note that this is a living document.


Reading

To Read


Update (2008-8-18): started to add books other than CS/programming, e.g. mathematics, physics, literature, communications.

Update (2009-2-25): replaced table format with lists (lists with year heading consists books completed in that year), partly because lists are easier to update, but mainly because that I tend to sneak more books into reading queue when no free "slots" available, which makes the table format itself somehow "cheating".

Update (2009-3-13): started to use Amazon widget; correct the 1st paragraph to reflect the status of reading.

Wednesday, January 16, 2008

Read Programming Books

Although learning programming can be achieved via online tutorials, reading books is still the preferred way for systematic learning (see some discussions here, here, and here from author's point of view). Following list is gathered along my adventure on reading programming books, especially on programming language books (for books not requiring active participations, it is recommended that you follow advice from Charles Petzold). Some suggestions are easier to be said than to be done, therefore the list is also a reminder to myself.

1. Select the right book

Reading a programming book requires enormous time and energy. Before embarking on the hundreds-hour-adventure, it is justified to spend sometime to select the correct path. Sometimes starting reading an excellent book itself is an achievement. So which book to read? The simplest solution is to search in Google or Amazon and select those with enthsiastic reviews. Google/Amazon are always handy since you can get more details/reviews on books. There are alternatives of course, as we will discuss below.

If you just want to read great programming books without any specific topics, you are lucky since this important question has already been discussed again and again. For example, you may refer to this Reddit thread, or you can consult the opinions of some outstanding programmers/bloggers (e.g. Steve Yegge's recommendations here and here, Joel Spolsky's advice, and Jeff Atwood's list).

If you do have some topics in mind (e.g. one particular programming language), there are various ways in addition to Google/Amazon approach.

  • Lookup in Wikipedia. Typically for one programming language, there will be one related article. At the end of the article, there is one References section, where you can find some interesting links to books.
  • Consult the FAQ of the language newsgroup. Normally, language X has one corresponding newsgroup like comp.lang.X. Generally the FAQ (sometimes quite outdated) of the newsgroup contains some book recommendations.
  • For some languages with official website (e.g. Haskell, Perl, and Python), you can easily find book recommendations in the site.

Let's name a few commonly recommended books for some programming languages: SICP (a.k.a. Wizard Book) for Scheme, Practical Common Lisp for Common Lisp, Programming Ruby (a.k.a. The PickAxe Book) for Ruby, and Javascript, the Definitive Guide (a.k.a. The Rhino Book) for the Next Big Language.

2. Setup programming environment and prepare related resources

You can't learn programming without getting your hands dirty. To study one programming language, you have to install necessary package(s). "Modern" programming books (e.g. Practical Common Lisp, Programming Ruby, Javascript, the Definitive Guide, and Programming Erlang) typically have one chapter getting you started. If your book does not contain such part, you can always consult online tutorials to setup the environment.

Typically the package contains some kind of editor or IDE for developing. You need to familiarize yourself with them either by reading your book or tutorial. For Emacs users, you can install related mode and simply fire up Emacs.

If the book is not so cutting-edge, you can find abundant resources in the web: source code, discussion on exercises, and even video lectures. You can bookmark or download these resources for your future reference. SICP is an excellent example here: great video lectures, and nice wiki to discuss solutions to exercises.

3. Practice, practice, and practice

You can't learn a language without sustained practice. We will focus on the examples and exercises contained in the book here.

When you read one example, simply reading is not enough. It is better if you type the example and run it. Note: type, not copy & paste. The reason is the same as when you write programs. After compilation, you think your code has done what it's supposed to do. But typically you need several iterations to make it right. Similar thing happens for reading. You think you understand the code on paper, but actually you do not. You should type it in and run it to really understand it. When you type, you can think about the meaning of the code, syntax and idioms associated simultaneously. A more paranoid yet effective way is that you first read the example, and then enter it without even referring to the book. You then run the code, analyze the results, and compare your code with the example supplied in the book.

Now for exercises. Do them all if you can. Excellent books come with excellent exercises, if any. You could gain more insight when you employ the techniques you just learned. (If you have any doubt on the value of exercises, you can look at Steve Yegge's example on how doing exercises can change a person's view about a language.) If you cannot solve one problem with serious try, you can leave it for a while and attack it later. If you really cannot handle it, you can refer to the solutions, which you can typically find online. Believe me, you can easily find the answers to these hard problems of excellent books in the web.

4. Develop hobby project

When you have already read several chapters of the book and feel comfortable to write a few small programs with the language you just learned, you may consider to setup some hobby projects. You can use the project to automate some day-to-day tasks, either in home or at work. Or you may try to implement/interface some (emerging) cool things (e.g. Google Chart API or Ray tracing) with the language you are learning. Make sure the skills to complete the project match the skills you just learned. You may meet some problems you cannot handle with the skills you just acquired. Don't panic. Just peep the later chapters of the book you are reading, or Google around. Try to finish the project if you can (and then you can blog about it if nobody has not done so or your way is quite interesting). If you cannot finish it, you can leave it for a later attempt. You may try several such projects when you progress in the reading. The further you progress, the more ambitious task you can try. Such hobby project itself can be viewed as extended exercises, but designed by you, instead of the author.

(Note: this section is largely influenced by a nice article/post related to reading On Lisp. Unfortunately I cannot find the URL now.)

5. Never give up

The last but not the least advice is that you should read the book from the beginning to the end. Spending a lot of time on one book but giving it up when approaching say one third of it is just wasting time. Since you only touched the surface of the book, which is easier to learn and also easier to forget. Authors arrange the books in such a way that you could linearly read along, which typically means that advanced topics come later. You may get stuck with one chapter and cannot understand the topics discussed there. At this point, don't give up. Remember that you can only achieve a higher level of understanding of one language/technique if you can understand the difficult part of it. Just read it, understand it, try it, or Google around to find different (maybe better) treatment of the topic. Attack this gnarly problem and you will gain lots from it. You have now learned some unique things of the language, you can now look at the language in a different yet more insightful view, and of course, you can now proceed further to read the great book and learn more.

Happy reading!

Update (2010-2-21): editorial corrections (thank you justin for your suggestions).

Monday, January 14, 2008

MID for Programmers

Lots of MIDs were showed off in CES 2008. However, none of them satisfy my requirements. What I need is a device for web surfing, RSS feed consuming, programming, and of course blogging. The one closest to my criterial is from LG, however I shunned away from Windows. Following is a list of features I expect an MID to have, from a programmer's perspective.

Mandatory factors:

  • Around 5 inch touchscreen. Size matters. The screen size is the most difficult factor when making tradeoffs. We want it smaller for portability (otherwise why not a gorgeous 17 inch MacBook Pro?), but not so small to hurt our eyes. 5 inch seems to strike a nice balance. At this size, 800x600 resolution seems to be preferred.
  • Full keyboard (similar as that of laptop in terms of keys equipped). Interface is critical. I am an Emacs fan, and the main usage of the MID is to try interesting programming ideas within Emacs and to compose blogs as well. Therefore I need the keyboard to have Ctrl and Alt equipped as a minimum. I also hope numerical keys have their independent positions (e.g. not shared with QWERTYUIOP as my Dopod 838, which is really painful). Keyboard from LG prototype satisfies all requirements here, therefore I do hope other vendors could follow suit.
  • Fast CPU. Gentoo is my favorite Linux distribution, therefore I may try to install it (somebody has already done so on Q1 Ultra). In addition to satisfy a power-demanding distribution, a powerful CPU is also a right for programmer even on such a tiny gadget.
  • Linux based OS. Linux will shine on MID, which is actually an old news. However, there are also devices running Windows at least for Menlow based MIDs, e.g. the one from LG. The reason for me to mandate Linux here is that I can easily install other flavors of Linux distributions if the device itself comes with one. With built-in Linux, we can make sure that source code for hardware is readily accessible: every vendor should learn something from the event of Eee PC GPL issues.
  • WiFi access. Connection is important. Without WiFi access, I guess we can remove Internet from the name of MID.
  • Miscellaneous. We should match the fast CPU with at least 512 MB RAM. 8 GB internal storage is a minimum to fool around. SD card slot is a must to connect the MID with other devices, and Bluetooth with A2DP support is necessary to avoid hairy wires.

Optional features:

  • Phone capability. This feature is actually desperately needed. However I doubt whether I could find one MID if I insist on this feature. There are various reasons for vendors to drop this feature: maturity of the needed software, regulation aspects, and marketing issues (imagine the impact on N95 if N810 is a phone) etc.
  • GPS. This is always a nice feature to enjoy.
  • Nice camera. Just imagine the wow moment when you use your 5-inch-LCD-digital-camera.

Finally, is it possible for MID + Android?

Saturday, January 12, 2008

Gentoo's Crisis

Sad to learn Gentoo's crisis from Slashdot. I unsubscribed from Gentoo newsletter several months ago (even the newsletter itself has not been updated for some time), and I do not have any clue on this crisis. But according to my knowledge, there is no Gentoo 2007.1 release, which is a dangerous signal. Although the periodical release in Gentoo itself is not as important as for other distributions (actually there is no impact for users who have already installed Gentoo), bleeding-edge release is a must for newcomers.

As a fan of Gentoo, I do hope that Robbins's offer will be accepted and all the issues will be sorted out quickly.