25 Free Computer Science Books

December 20, 2008

As a computer scientist I’m always looking to improve my knowledge of the subject. There are lots of great sources of information available online, but nothing really beats the depth of knowledge that you can find in a book. It is possible to get the best of both worlds though, as many books are now available online in full, and free of charge!

Below is a selection of 25 of the best free computer science books that I’ve found online, with a brief description of each one. Where the book is also available in printed form I’ve included a link to Amazon, using my affiliate link. If you’d like to buy one of the books but would rather not help towards the cost of running this blog then you can search for the books directly on the Amazon site.

Become An X coder
A guide to MacOSX development with Cocoa using Objective-C. The book contains lots of examples and detailed screenshots.

The Cathedral and the Bazaar
Eric Raymond’s brilliant book about Open Source software, and its impact on software development projects.
View on Amazon

Data Structures and Algorithms with Object-Oriented Design Patterns in Java
Also available in C#, Python, Perl, Ruby, Lua, C++ and PHP versions.
View on Amazon

Dive Into Accessibility
Another Mark Pilgrim guide, on creating accessible websites.

Dive Into Greasemonkey
Greasemonkey is a Firefox extension that allows you to write scripts that alter the web pages you visit. Mark Pilgrim presents lots of example code and case studies in this book.

Getting Real
The influential book from 37 Signals which describes a smaller, faster, and better way to build web based software.

Getting Started with awk
Awk is the perfect tool for many system admin tasks. This book contains loads of great examples, and will turn you into an awk master in no time!

Git Magic
A complete guide to the popular distributed version control software Git, from Linus Torvolds.

GPU Gems
NVidia’s book on GPU graphics programming covers topics such as lighting, shadows, modelling materials, and performance issues.
View on Amazon

How to Design Programs
An introduction to computer programming and designing programs with the Scheme programming language.
View on Amazon

Introduction to Design Patterns in
C++ with Qt 4

From the book itself: C++ is taught “The Qt way”, with an emphasis on design patterns, and re-use of open source libraries and tools. By the end of the book, the reader should have a deep understanding of both the language and libraries, as well the design patterns used in developing software with them.
View on Amazon

Learn You a Haskell for Great Good!
A funny title, but a serious book about the purely functional programming language Haskell.

Linux Device Drivers
An O’Reilly guide on how Linux device drivers work, and developing your own.
View on Amazon


Linux Network Administrator’s Guide
An O’Reilly guide to to network administration on Linux, covering topics such as configuration, firewalls, and DNS.
View on Amazon


Logic, Programming and Prolog (PDF)
Broken up into three parts: Foundations, Programming in Logic, and Alternative Logic Programming Schemes. This books covers both the theory and practice of logic programming with Prolog in detail.
View on Amazon

The OpenGL Programming Guide
Also known as “The Red Book”, this guide tells you all you need to know about the 3D graphics programming library.
View on Amazon

PHPUnit Pocket Guide
The official documentation of the PHP unit testing framework. Contains everything you need to know to start writing automated tests for your PHP code.

Practical Common Lisp
An introduction to Common Lisp. Covers the language in detail, and goes on to describe lots of real life software projects such as spam filters and an network enabled MP3 player.
View on Amazon

Programming in Lua
A complete guide to the popular lightweight scripting language, written by its chief architect.
View on Amazon

Programming Ruby: The Pragmatic Programmer’s Guide
A guide to the popular programming language Ruby from the Pragmatic Programmers.
View on Amazon

The Scheme Programming Language
A complete guide to the Scheme programming language.
View on Amazon

Software Engineering for Internet Applications
The textbook for an MIT course with the same name. This book discusses issues related to building online application, including user registration, content management, and scaling.

View on Amazon

SQL for Web Nerds
Written by MIT professor Philip Greenspun, this book aims to teach SQL from a real world perspective rather than from a theoretical standpoint.

Structure and Interpretation of Computer Programs
A classic computer science text that teaches some advanced programming concepts using Lisp.
View on Amazon

A Tutorial on Pointers and Arrays in C
An extremely detailed tutorial (10 chapters) on pointers and arrays in C. It starts with a description of a pointer and ends with function pointers.

That is just a selection of some of the great books that are available for free online. If you don’t know where to look for more a good place to start looking try my top 10 free python books post. I’m sure I’ll be posting about more in the future too, so be sure to subscribe!

Blackberry OS 4.5 “Connection not writeable” Error

December 16, 2008

When deploying an application that worked fine on Blackberry OS 4.2 I was surprised to come across the following error message on devices running version 4.5 of the OS:

Connection not writeable

The error was shown when trying to create a HTTP connection, using my getWebData method. I tracked the problem down to the following line:

connection = (HttpConnection) Connector.open(url, Connector.READ, true);

Here I’m creating a read only connection (by passing the Connector.READ argument), which should be fine because I don’t want to send any data over the connection. However, on Blackberry OS version 4.5 creating a read-only HTTP connection will result in the “not writeable” error, even if you don’t explicitly try writing to the connection.

The simple fix is to create the connection with both read and write access:

connection = (HttpConnection) Connector.open(url, Connector.READ_WRITE, true);