Books For Programmers

I’ve seen many lists about the best programming books and I am sure there are a lot of books that are specific to a programming knowledge or technology – that I have not included in my list.

The books I have chosen are those that are meant to inspire, increase productivity and improve your programming design skills.

Note: This list has no particular order.

Code Complete 2

Steve McConnell

The main focus of this book to help you improve your programming design skills.

CodeComplete2


The Pragmatic Programmer: From Journeyman to Master

Andrew Hunt and David Thomas

This book focuses on the best practices of programming (i.e. what you should and should not do).

PragmaticProgrammer


Pragmatic Thinking and Learning: Refactor Your Wetware

Andy Hunt

From the author of The Pragmatic Programmer, this book takes one-step back from programming and focuses on your everyday thinking and problem solving skills.

PragmaticThinking


The Productive Programmer

Neal Ford and David Bock

This book will teach you different tools that you can use to make your programming life more productive.

ProductiveProgrammer


Algorithms in a Nutshell

George T Heineman, Gary Pollice and Stanley Selkow

Unless you’ve memorized the implementation of every algorithm, this book is a handy desktop reference with pseudocode examples.

AlgorithmsNutshell

Alternate: Introduction to Algorithms

Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein

This book has become a staple in many undergraduate computer science programs. Containing much more information and details on algorithms.

IntroAlgorithms


Head First Design Patterns

Lisabeth Freeman, Eric Freeman, Bert Bates, and Kathy Sierra

The people at Head First have a way of explaining things in a straight-forward, non-technical approach – a good tutorial and desktop reference.

HeadFirstDesignPatterns

Alternate: Design Patterns: Elements of Reusable Object-Oriented Software

Erich Gamma, Richard Helm, Ralph Johnson, and John M. Vlissides

Also a common computer science textbook by the Gang of Four (GOF), this book has much more information and more detail on design patterns.

GOFDesignPatterns


Clean Code: A Handbook of Agile Software Craftsmanship

Robert C. Martin

This book covers the best practices, case studies and first hand experiences with creating “clean” code.

 

CleanCode


Refactoring: Improving the Design of Existing Code

Martin Fowler, Kent Beck, John Brant, William Opdyke, and Don Roberts

This book covers the best practices in modifying existing code.

 

Refactoring


How To Design Programs: An Introduction to Programming and Computing

Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi

This book is geared to the beginning programmer and focuses on the design and creation of programs.

 

HTDP


Structure and Interpretation of Computer Programs

Harold Abelson, Gerald Jay Sussman, Julie Sussman

Picking up where How To Design Programs left off, this book explores ways to look at code from an object-oriented point of view.

SICP

 

5 Types of Programming Comments to Avoid

Have you ever been reviewing code and come across a comment that you deemed was unnecessary? Commenting your code is meant to improve the readability of your code and make it more understandable to someone other than the original developer.

I have identified 5 types of comments that really annoy me and the types of programmers who make them. I hope after reading this you won’t be one who falls into one of these categories. As a challenge, you can try to match up these comment programmers with the 5 types of programmers.

1. The Proud Programmer

This programmer is so proud of his code that he feels the need to tag every line of code with his initials. Implementing a version control system (VCS) allows for accountability in code changes, but at first glance it won’t be so obvious who is responsible.

2. The Obsolete Programmer

If a piece of code is no longer used (i.e. Obsolete), delete it – don’t clutter your working code with several lines of unnecessary comments. Besides if you ever need to replicate this deleted code you have a version control system, so you can recover the code from an earlier revision.

3. The Obvious Programmer

We all know how basic programming logic works – this is not “Introduction to Programming.” You don’t need to waste time explaining how the obvious works, and we’re glad you can explain how your code functions – but it’s a waste of space.

4. The Life Story Programmer

If you have to mention requirements in your comments, don’t mention people’s names. Jim from sales probably moved on from the company and most likely the programmers reading this won’t know who he is. Not to mention the fact that it everything else in the comment is irrelevant.

5. The Someday Programmer

This type of comment is sort of a catch-all it combines all the other types. The TODO comment can be very useful when you are in the initial development stages of your project, but if this appears several years later in your production code – it can spell problems. If something needs to be fixed, fix it now and do not put it off until later.

CodeComplete2

If you are one who makes these types of comments or would like to learn best practices in comment usage, I recommend reading a book like Code Complete by Steve McConnell.

Coding Standards

Do you adhere to a certain coding style or standard when programming in your language of choice? If you are not following an official coding standard or a standard set-forth by your place of employment – perhaps you should start.

Why follow a coding standard? Standardize coding practices allow code to be more easily read by other programmers. Just imagine if you inherited code that was labeled as follows:

This might look like the code you wrote when you wrote your first program. However, if you saw this coding style in a professional environment you might have a difficult time understanding the meaning behind the variable names.

Coding standards are not necessarily dictated by the creator of the language. Many have just evolved into standards among the programmers who use the language.

I have compiled this list of several coding standards and styles. If want to start adhering to coding standards, I suggest you start with the official standards (if available). Also, check with your organization to see if they have a coding standards document already created.

SQL

.NET (C#/VB.NET)

PHP

C/C++

Python

Java

Ruby

HTML/CSS/Javascript

Objective-C

If I left out your favorite programming language, check out the Coding Conventions for languages at wikipedia.

Do you know of any other coding standards resources that I should include in the list above? Please share in the comments.