News for hackers. Stuff that matters.

Books with syntax highlighting, or why I prefer reading code from screen than paper

I recently noted an odd phenomenon. Maybe it's just me, but I suspect it's not.

One case: I own the paper Book of DJango. But I keep noticing I prefer to read it from the screen of my laptop. I also read newspapers, but prefer to read those from paper.

The reason for wanting to read code from screen is because I've become so used to syntax highlighting, whether in vim/gedit/TextMate/eTextEditor or on websites. I've come to expect it from he internet, where I do most of my learning. Going back to textbooks, black code on a white background seems like a massive blur of text.

Thing is, I'd happily pay for The Book or DJango, or any other text, in full color with syntax highlighting.

Am I the only one?

( 14 comments | 9 points | on HN )
Re:Books with syntax highlighting, or why I prefer reading c... by swombat on Tuesday December 16, 2008 @05:36AM (#399385)
Nah, I have no problems with non-syntax-highlighted code. I'm sure some people do, but I'm quite comfortable reading black and white code.
Re:Books with syntax highlighting, or why I prefer reading c... by davidw on Tuesday December 16, 2008 @06:11AM (#399393)
The real problem is not being able to grep books.
Re:Books with syntax highlighting, or why I prefer reading c... by ivanstojic on Tuesday December 16, 2008 @07:06AM (#399413)
That reminds me... I recently used my old, inherited book of my grandmother's cake recipes. I know there's a recipe for a cake I like in there, but for the life of me I cannot find it (the book is huge).

I cursed about seven times before giving up.

Re:Books with syntax highlighting, or why I prefer reading c... by ninjackn on Tuesday December 16, 2008 @03:11PM (#399953)
The lack of syntax highlighting in books don't bother me too much, it's the size of the book. I've gotten used to a wide screen monitor for code so it's nice when that long if statement is on one line.

For the purpose of learning from a book the bold and italics in print is often good enough for me. Have def in bold and comments in italics and i'm generally pleased. Then again it could just me a bias I have since i prefer to reading books than pdfs on a computer.

Re:Books with syntax highlighting, or why I prefer reading c... by Herring on Tuesday December 16, 2008 @05:39AM (#399386)
Yeah i find it really hard to read non-highlighted code. Incidentally, give kate a try if you use gedit. You might like it more.
Re:Books with syntax highlighting, or why I prefer reading c... by Oompa on Tuesday December 16, 2008 @04:50AM (#399368)
I've been reading the Pragmatic Programmer and the copy I have is in black and white, and I've noticed the exact same thing.
Re:Books with syntax highlighting, or why I prefer reading c... by travisjeffery on Tuesday December 16, 2008 @07:27AM (#399418)
I like reading from the book most of the time.

One reason could be that I've paid for it and feel like I've made a commitment and learn it, so it gives me some more motivation.

I can doodle, and write down thoughts easier than doing it on the web or using one of the features in any pdf viewing app.

Re:Books with syntax highlighting, or why I prefer reading c... by KevBurnsJr on Friday December 19, 2008 @09:21PM (#404159)
I wondered why Symfony's online book was so good.

http://www.symfony-project.org/book/1_2/10-Forms

Re:Books with syntax highlighting, or why I prefer reading c... by yagibear on Tuesday December 16, 2008 @05:08AM (#399375)
Real men read in hex.
Re:Books with syntax highlighting, or why I prefer reading c... by eru on Tuesday December 16, 2008 @12:05PM (#399657)
Syntax highlighted hex.
Re:Books with syntax highlighting, or why I prefer reading c... by alparsla on Tuesday December 16, 2008 @06:43AM (#399405)
Color in print is expensive
Re:Books with syntax highlighting, or why I prefer reading c... by nailer on Tuesday December 16, 2008 @01:11PM (#399764)
Sure. The question is, would people pay for it?

I would, and it seems like I'm not the only one.

Re:Books with syntax highlighting, or why I prefer reading c... by eru on Tuesday December 16, 2008 @12:05PM (#399659)
But you can use different fonts at almost no cost.
Re:Books with syntax highlighting, or why I prefer reading c... by eru on Tuesday December 16, 2008 @12:05PM (#399658)
But you can use different fonts at almost no cost.