Showing posts with label books. Show all posts
Showing posts with label books. Show all posts

Tuesday, April 7, 2009

Bits and Pieces

I found a link to an interesting article indicating that Most Britons have lied about the books they read on reddit today. Before anyone accuses me of Brit bashing, let me just say that I'm sure most Americans are just as quick to inflate their own literary tastes. I only mention this because it expands on my own prior observations about the books that programmers don't really read.



On 24 last night, an FBI analyst broke an AES block cipher in under 30 seconds. The really strange part was that the cipher was used to encrypt the 5-digit combination to an electronic door lock.

Someone needs to tell Hollywood writers that if I'm cracking an N-digit code, and I already know N-1 digits, it won't take my computer a few more seconds to figure out the last digit, no matter how much tension it builds. Most 10 year olds could figure it out in a few seconds.



John Cook posted a couple of good articles on floating point numbers on his blog, The Endeavor, recently. Floating point numbers are a leaky abstraction and Anatomy of a floating point number are both good reads for anyone interested in math or programming.

John's regular and high-quality posts have made The Endeavor one of my favorite blogs on the 'Net. Anyone who reads this blog should give it a try. I think you'll really enjoy it.

Friday, January 9, 2009

Learn Faster

No, this post isn't about speed reading. In the spirit of speed reading, though, I'll make this post mercifully short.

In my last post on programming languages I said that you should learn one language really well before you start branching out into other languages. Understanding programming concepts at a deep level is more important than learning the syntax of many different languages, but it can also help you learn new languages more quickly too.

Once you're at the point where you're ready to learn a new language, what do you do? Do you pick up a copy of "Learn Blub in 10 Minutes a Day" and slog through 24 boring chapters about the syntax of a new language? Or do you spend an entire year going through SICP, watching the video lectures, and doing the exercises? (I keep meaning to do that.)

No matter which path to enlightenment you choose, I have a quick tip that will help you get through any programming book faster. It allows you to apply concepts from languages you already know to the new language that you're learning. Ready to hear what it is? Here you go:

Do the problems at the end of each chapter first, then go back through and read the chapter. If you can't actually do the problems yet, at least read them and try to understand what they're asking.

This method works for two reasons. First, reading the questions and exercises at the end of the chapter gives you more accurate information about what's important in that chapter than even the title and section headings. If you read a question about while loops, for example, you're going to be paying attention for that topic when you read through the chapter. Second, it tells you what you already know, and can skip over. If you read a question about while loops, for example, you know that you can skim that chapter quickly or skip it altogether because you're already familiar with the concept.

This is the method I use when I need to learn a language in a weekend so I can use it in my project on Monday. It really works, but don't take my word for it. I know you have a Sam's book hidden away somewhere so no one will catch you reading it. Don't be ashamed. Okay, maybe a little shame is in order, but maybe if you get through it fast enough, no one will catch you.

Monday, December 22, 2008

Even More Free Programming Books

In a previous post I listed a few programming books that I found available for free online. Since then, I've been scouring the net looking for even more free programming books. Here's what I've found. (Note: As before, I haven't read all of these, so don't take this as a list of informed endorsements. Besides, they're free. You can read them yourself.)

  1. Practical Common Lisp
  2. Data Structures and Algorithms with Object-Oriented Design Patterns in C#
  3. Squeak by Example
  4. The Art of Unix Programming
  5. Algorithms
  6. Practical PHP Programming (Wikibook)
  7. Foundations of Programming

It just occurred to me how eclectic this list is. It's not every day that you see books on Lisp, C#, and PHP collected in the same list. The Internet is as wide as it is wonderful. :)

Additional Note: As some alert readers over on reddit noticed, the online version of Programming Pearls is incomplete, so I've decided to replace it on my list. Sorry I didn't catch this sooner, but you can still enjoy the 3 sample chapters that the author has graciously made available for free.

And here, for those of you who don't read blog comments, are a few bonus picks submitted by readers of my previous post.
  1. Higher-Order Perl
  2. On Lisp
  3. Starting Forth
  4. Thinking Forth
  5. Learning J
  6. Basics of Algebra and Analysis for Computer Science
  7. Concepts, Techniques, and Models of Computer Programming (PDF)
  8. .NET Book Zero
As always, I'm interested in hearing from you about even more free online programming material, whether they be in the form of books, tutorials, video lectures, etc...

Sunday, December 14, 2008

Freely Available Programming Books

In an earlier post, I listed some frequently recommended computer programming books. I got some good feedback from that post, so I thought I'd go a step further and provide some links to programming books that I've found for free online.

Please note that I'm going against my own previous advice here, as I haven't finished reading every one of these books from cover to cover (I haven't even started SICP, I admit), so don't take these as endorsements from someone who has read the books.

NOTE: One Anonymous poster pointed out that there's more material missing from the Google Book Search selections than at first appeared. I've had to remove those books, but you can search their selection through the link provided.

Without further ado, I present to you the 7 best free programming books that I could find online. Enjoy.
  1. Structure and Interpretation of Computer Programs
  2. Thinking in Java (3rd ed.)
  3. Thinking in C++ (2nd ed.)
  4. Algorithms and Complexity
  5. How to Think Like a Computer Scientist(Learning with C++)
  6. Programming Ruby (1st ed.)
  7. Dive Into Python
Please let me know if you find any of these links useful. I'm particularly interested to learn what people think of SICP, since it's been on my "to read" queue for quite awhile. If you decide to read it, be sure to check out the SICP companion video lectures. (Update: I've started reading SICP since this was first published, and I'm keeping track of my progress starting with The SICP Challenge.)

I'd also certainly be interested to learn of any other free online book resources that anyone can recommend.

Related posts:

Even More Free Programming Books

Wednesday, December 10, 2008

Books Programmers Don't Really Read

Mark Twain once said that a classic novel is one that many people want to have read, but few want to take the time to actually read. The same could be said of "classic" programming books.

Periodically over on Stack Overflow (and in many other programming forums) the question comes up about what books are good for programmers to read. The question has been asked and answered several times, in several different ways. The same group of books always seems to rise to the top, so it's worth it to take a look at these books to see what everyone is talking about.

Books Most Programmers Have Actually Read
  1. Code Complete
  2. The Pragmatic Programmer
  3. C Programming Language (2nd Edition)
  4. Refactoring: Improving the Design of Existing Code
  5. The Mythical Man-Month
  6. Code: The Hidden Language of Computer Hardware and Software
  7. Head First Design Patterns
  8. Programming Pearls
  9. Effective Java (2nd Edition)
    or Effective C++
  10. Test Driven Development: By Example
I've read all of these books myself, so I have no difficulty believing that many moderately competent programmers have read them as well. If you're interested enough in programming that you're reading this blog, you've probably read most, if not all of the books in this list, so I won't spend time reviewing each one individually. I'll just say that each of the books on the list is an exceptional book on its respective topic. There's a good reason that many software developers who are interested in improving their skills read these books.

Among the most commonly recommended programming books there is another group that deserves special consideration. I call the next list "Books Programmers Claim to Have Read". This isn't to say that no one who recommends these books has actually read them. I just have reason to suspect that a lot more people claim to have read the following books than have actually read them. Here's the list.

Books Programmers Claim to Have Read
  1. Introduction to Algorithms (CLRS)
    This book may have the most misleading title of any programming book ever published. It's widely used at many universities, usually in graduate level algorithms courses. As a result, any programmer who has taken an algorithms course at university probably owns a copy of CLRS. However, unless you have at least a Masters degree in Computer Science (and in Algorithms specifically), I doubt you've read more than a few selected chapters from Introduction to Algorithms.

    The title is misleading because the word "Introduction" leads one to believe that the book is a good choice for beginning programmers. It isn't. The book is as comprehensive a guide to algorithms as you are likely to find anywhere. Please stop recommending it to beginners.

  2. Compilers: Principles, Techniques, and Tools (the Dragon Book).
    The Dragon Book covers everything you need to know to write a compiler. It covers lexical analysis, syntax analysis, type checking, code optimization, and many other advanced topics. Please stop recommending it to beginning programers who need to parse a simple string that contains a mathematical formula, or HTML. Unless you actually need to implement a working compiler (or interpreter), you probably don't need to bring the entire force of the Dragon to bear. Recommending it to someone who has a simple text parsing problem proves you haven't read it.

  3. The Art of Computer Programming (TAOCP)
    I often hear TAOCP described as the series of programming books "that every programmer should read." I think this is simply untrue. Before I'm burned at the stake for blasphemy, allow me to explain. TAOCP was not written to be read from cover to cover. It's a reference set. It looks impressive (it is impressive) sitting on your shelf, but it would take several years to read it through with any kind of retention rate at all.

    That's not to say that it's not worthwhile to have a copy of TAOCP handy as a reference. I've used my set several times when I was stuck and couldn't find help anywhere else. But TAOCP is always my reference of last resort. It's very dense and academic, and the examples are all in assembly language. On the positive side, if you're looking for the solution to a problem in TAOCP (and the appropriate volume has been published) and you can't find it, the solution probably doesn't exist. It's extremely comprehensive over the topic areas that it covers.

  4. Design Patterns: Elements of Reusable Object-Oriented Software (Gang of Four)
    Design Patterns is the only book on this list I've personally read from cover to cover, and as a result I had a hard time deciding which list it belongs on. It's on this list not because I think that few people have read this book. Many have read it, it's just that a lot more people claim to have read it than have actually read it.

    The problem with Design Patterns is that much of the information in the book (but not enough of it) is accessible elsewhere. That makes it easy for beginners to read about a few patterns on Wikipedia, then claim in a job interview that they've read the book. This is why Singleton is the new global variable. If more people took the time to read the original Gang of Four, you'd see fewer people trying to cram 17 patterns into a logging framework. The very best part of the GoF book is the section in each chapter that explains when it is appropriate to use a pattern. This wisdom is sadly missing from many of the other sources of design pattern lore.

  5. The C++ Programming Language
    This book is more of a language reference than a programming guide. There's certainly plenty of evidence that someone has read this book, since otherwise we wouldn't have so many C++ compilers to choose from.

    Beginning programmers (or even experts in other languages) who want to learn C++, though, should not be directed to The C++ Programming Language. Tell them to read C++ Primer instead.
As I said before, I know there are a few of you who have actually read these books. This post isn't intended for you, it's intended for the multitudes who are trying to appear smarter by pretending to have read them. Please stop recommending books to others that you haven't read yourself. It's counter productive, as often there is a better book (more focused on a specific problem domain, easier to understand, geared more toward a specific programming language or programming skill level) that someone more knowledgeable could recommend. Besides that, you may end up embarrassing yourself when someone who has actually read TAOCP decides to give you a MMIX pop quiz (if you don't know what I'm talking about, then this means you).