logoalt Hacker News

jll29today at 3:49 PM0 repliesview on HN

Well, why do humans read code:

1. To maintain it (to refactor or extend it).

2. To test it.

3. To debug it (to detect and fix flaws in it).

4. To learn (to get better by absorbing how the pros do it).

5. To verify and improve it (code review, pair programming).

6. To grade it (because a student wrote it).

7. To enjoy its beauty.

These are all I can think of right now, and they are ordered from most common to most rare case.

Personally, I have certainly read and re-read SICP code to enjoy its beauty (7), perhaps mixed in with a desire to learn (4) how to write equally beautiful code.