94

I find that when someone asks what is the best way to learn how to program, people usually provide them with references to a bunch texts written by various authors.

However I don't believe many people at all learn to program from books. I find that they are usually faced with a challenge and then use programming as a tool to overcome it.

For example I 'got into' programming because I wanted to start a server for a game I was playing, so I googled and read through the support for that particular server and now I am a employed software engineer, using only the skills I developed (and then further developed) by coding C# scripts for a not very popular server package.

So my question is, do people generally find it easier to learn from these books? I know I have looked at a few of them and found them far too 'dry' to encourage me to finish it.

yannis
  • 39,547
  • 40
  • 183
  • 216
Alex Hope O'Connor
  • 384
  • 2
  • 7
  • 11
  • 3
    books is not primary here but great advantage if you read books they are just another books you are interesting in. – cnd Jul 28 '11 at 05:20
  • 42
    Are you talking about learning how to program from the beginning, or more advanced stuff? There's a huge difference between 'Learn C++ in 24h' and a decent book about more advanced theoretical stuff - you won't find Knuth's work online. – André Paramés Jul 28 '11 at 09:02
  • 78
    It seems you have never come across a good programming book. – Jaywalker Jul 28 '11 at 09:49
  • 46
    This is metaphorical to the question, "why go to school?" – Jodrell Jul 28 '11 at 10:46
  • 1
    @Jodrell Exactly. – bhagyas Jul 28 '11 at 11:00
  • 8
    I have never found books to be a primary learning tool, yet I have a ton of them and I recommend them all the time. It's obvious that you only learn by doing. However, books are the source of ideas and can be used as a readily available reference. We don't read/recommend the books to learn from. We read/recommend the books to share the ideas contained within them. – Joel Etherton Jul 28 '11 at 11:21
  • 1
    @Andre I don't entirely agree with your statement, anything that is published in a book can be found online, whether directly or in a blog post by someone who has read the original work and is offering their interpretation of it. I reckon if you research best practices online you are guaranteed to find a design pattern or algorithm that will get the job done efficiently. However I am not saying that digital media is the best way to learn, I am also studying a CS degree and really enjoy the group projects and find that I learn well in this kind of environment, also in CS you never stop learning – Alex Hope O'Connor Jul 28 '11 at 12:47
  • I also suggest that the question title is edited to say "Why do people use books to learn how to program" - the current title is much more general than the actual question and answers seem to be. – Joris Timmermans Jul 28 '11 at 13:30
  • I found good introductoru books the best tool to get from "clueless" to "lower intermediate" in any domain. A short, friendly guide that gives an intro to the language, framework, technology. Of course these are few gems in endless flood of useless money-grab monuments. I never found an IT book of >200 pages worth its money. – SF. Jul 28 '11 at 14:13
  • Another thought: it is much easier to _recommend_ a book than any other method of learning, so naturally people recommend books consistently. – Tikhon Jelvis Jul 28 '11 at 17:02
  • books are very good at least in three points. 1. to introduce "technical language", that is very important when you are showing someone what do you know (e.g. instead to call "that crazy thing", "a question"... you will call "a method", "an if loop"...). 2. as reference, when you forget how to use some functions, commands, some known useful techniques, tricks, standards... 3. examples that can match in some aspects what you want do do. – kokbira Jul 28 '11 at 18:38
  • 3
    A well written book can coherently and quickly teach a large subject much deeper than the vast majority of other learning methods. You CAN learn through only experience but it will take you exponentially longer. – Jeff Davis Jul 28 '11 at 20:54
  • @SF - then I think you haven't looked at many >200page "IT books" .. I've only ever found a couple to be !worth the money – warren Jul 28 '11 at 22:48
  • @warren - maybe we value money differently, due to living and working in different countries. If a book costs 1/4 my salary, it better be really good. I've borrowed several of the "more impressive" titles from the library, and some were quite handy but not worth the sacrifices I would have to make about my personal life to purchase them. – SF. Jul 29 '11 at 14:58
  • @SF - there is a good point; when it's a couple hours of your work time to pay for, it is certainly a different matter – warren Jul 29 '11 at 16:29
  • 2
    Overheard @work: "We don't need books. If we run into problems, we have Stack Overflow" – Niklas H Jul 30 '11 at 08:26
  • 1
    Didn't you ever look up things in MSDN? That is just a big online book. –  Mar 10 '12 at 12:58
  • possible duplicate of [Could spending time on Programmers.SE or Stack Overflow be substitute of good programming books for a non-beginner?](http://programmers.stackexchange.com/questions/107288/could-spending-time-on-programmers-se-or-stack-overflow-be-substitute-of-good-pr) – gnat May 15 '13 at 10:20

27 Answers27

229

Here's how I learn, generally speaking:

  • Buy a book
  • Don't read it cover to cover but know where everything can be found
  • Find a pet project to work on
  • Learn from experience, but use the book as a reference
  • Where the book fails, there is always google

Note: the third point sometimes comes first.

Edit: To answer the question "Why?"

Google is great to find out how to do something, but it's not great for finding out what you don't know. Why would you ever google "C# delegates," if you didn't first know that C# has a concept called delegates and that it might be useful to solve a problem you're working on?

Also, the signal-to-noise ratio can be a bit high sometimes. If you have a rough idea in your head how something is done then you can easily confirm whether the article you are reading is correct. But if you've no clue... you can end up in a bigger mess.

pdr
  • 53,387
  • 14
  • 137
  • 224
  • 19
    Great answer, particularly the edit in response to "why". I recently started learning ASP.NET, and did so by using google. I had been using C# for .NET 2.0 for years so thought I could get by. Every time I hit a problem I managed to find the answer by searching google, but it soon became apparent that I was only hitting the tip of the iceberg of what I could do, and I was completely missing large chunks of the libraries. A book provides a much better overview of the technology and everything it can do. Avoid "learn x in 24 hours" books and go for "advanced x" books instead. – Gavin Coates Jul 28 '11 at 12:22
  • 44
    +1 for "finding out what you don't know." – Covar Jul 28 '11 at 12:24
  • 2
    Extension to 5th point: When the book fails, there is always google *and other books on the topic, including those targeting non-beginners in the topic*. – Richard Jul 28 '11 at 12:31
  • 5
    +1 for "the signal-to-noise ratio can be a bit high sometimes. If you have a rough idea in your head how something is done then you can easily confirm whether the article you are reading is correct. But if you've no clue... you can end up in a bigger mess." – Tom Squires Jul 28 '11 at 13:27
  • On the same line, the text to content ratio of many programming series books can be quite high too, as opposed to say Introduction to Algorithms where each page is important in itself. – Mr. Zen Jul 28 '11 at 14:18
  • @Mr. Zen: True. But at least you know everything in there has been reviewed and edited. The same is not true of the internet. That was my point. – pdr Jul 28 '11 at 14:32
  • Too bad it wasn't accepted as the best answer as it's the one most people agree with. The selected answer was selected just because it was the same opinion than the person who asks the question. And my problem is that the selected answer doesn't "answer" the question "Why do people use programming books?". Sorry for the poor english, I hope I made myself clear. – Loïc Lopes Jul 28 '11 at 14:50
  • 9
    "Where the book fails, there is always google." You mean Stack Overflow ;) – Joren Jul 28 '11 at 14:50
  • 1
    I usually use StumbleUpon to search for general programming techniques to better myself. It's great because I can use a *directed* search. I'll find things that I didn't know I was looking for. – zzzzBov Jul 28 '11 at 23:06
  • Just saw your edit, I believe when you set out to solve a problem you end up hearing about something that you may note know about such as delegates, you then become curious and google them and it is this progressive curiosity that keeps you reading about what your interested in at the time. – Alex Hope O'Connor Jul 29 '11 at 00:15
  • @Alex: That can happen, for sure. Particularly if you read a lot of stuff on the internet. For me, I prefer to scan a book briefly, know what the concepts are and where I can find them when I need them. Apparently, I'm not alone, but whatever works for you is great. – pdr Jul 29 '11 at 00:39
  • Completely agree. Most tutorials online assume you have some programming concepts they might find trivial, when books are organized to guide you step by step to gather these concepts. – bbonamin Aug 02 '11 at 22:10
42

Some reasons why books are still relevant:

  1. I find it easier to read a lot of text on paper than on standard LCD screen, maybe e-books on a e-ink display will change this.
  2. Book tend to describe the big picture and some good practices, that is really good when you need a quick start or a new view.
  3. Google is really good when you need examples on specific topic, but not for the big picture.

But a book will never take you all the way, it will just push you in the right direction.

Johan
  • 281
  • 2
  • 8
  • 2
    +1 for the big picture. After I've been programming in some new language / environment for awhile, I find books are really useful for filling in the big picture and things I've missed from my own exploration. – Adam Morris Jul 28 '11 at 14:05
  • 2
    Raymond Chen's blog, or the *Going Deep* series on Channel 9, is extraordinarily helpful in learning the *why*. Once you know the "*why*" something is the way it is, *how* to do it becomes a trivial detail that can be googled. Usually a book's author can go into the background to understand the logic of what's going on, rather than trying to muddle through cobbled together strings of code snippits you found online. – Ian Boyd Jul 28 '11 at 15:04
  • IMO, one of the big advantages that books have is the ability to stick your fingers in multiple places at once so you can quickly flip among sections. I find this invaluable when I'm trying to learn something new by going through some code, as I frequently have look up something else (sometimes several things) in order to understand what I looked up in the first place. Navigating on a screen just isn't the same. – TMN Jul 28 '11 at 15:57
  • Agreed. Jumping right into Asp.Net MVC, for example, you may figure out how to do it. But there's so many things you'd likely get wrong too that are subtle. Then you're left scratching your head why something doesn't work. – Andy Jul 28 '11 at 17:30
28

When I learned programming back in the 1980s books where more or less the only source of information available to completely learn a programming language as a whole. In addition you could buy computer magazines, but their content was random articles which may have been interesting and helpful or not.

Nowadays you can find all the information you need on the Internet. Though I would regard a complete tutorial as similar enough to a book.

How you learn may depend on you personal preferences or on actual needs.

The advantage of a "complete text", if book or online tutorial, will be that it covers material that, while not actually necessary, will help you later. It's just to know that something is possible and to know where to find it. Especially if you learn about a complex environment or a very complex language like C++. You can read through many small blogs about Ruby on Rails without ever hearing about Ajax or security matters. As long as you only play around, this may be no issue. But if, as happened to me, you want to go into professional Ruby on Rails development within a few weeks, then working with a text that covers all important points will help a lot.

Other books cover details about programming style, best practices, design patterns or certain groups of algorithms. You can work with them and maybe of all the design patterns you will only ever apply a very small subset. Still, it is helpful to know them and know where to find them. And it's simply a way to train your thought processes into a direction where you are more interested in "building a solution" than "making it somehow run".

Personally I like reading, so I don't have the feeling that books are dry. Though it is important of course, that the book is on your actual level of knowledge or beyond. If you have already mastered all the basics of C#, it doesn't make much sense to read a beginners book.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
thorsten müller
  • 12,058
  • 4
  • 49
  • 54
  • 7
    +1 for mentioning what I would have written: that the "best practice / methodology" type of books differ greatly from the "how to do X using Y" kind of books. And the former are the really valuable stuff, because it teaches hard-earned general problem-solving experience. Once you learn unit testing, refactoring, estimation etc., you can apply and adapt it to a host of languages / domains / projects. – Péter Török Jul 28 '11 at 07:49
  • 1
    Definitely appreciate the mention on styles, practices, and patterns. These are the books that are really the beneficial ones. You can learn to program by just having a problem to solve and solving it. You learn to program well by learning styles, practices, and patterns. Still, the best place to get a comprehensive understanding of these concepts are texts. – Rig Jul 28 '11 at 13:12
  • +1 for " it covers material that, while not actually necessary, will help you later" -- good programmers have a deep well of knowledge to draw on. Even if you don't remember all the details, but you know the thread to tug on and learn it when you need it, it can be quite invaluable! – Jared Updike Sep 09 '11 at 05:55
22

A book (or web documentation structured like a book) is still my preferred way of learning most languages.

If you just dive into a language and find stuff out for yourself, you're likely to miss out on important aspects, which a good book would have delivered to you at the right time.

For example, some colleagues of mine learned Java by diving in without a book. They'd been programming in Java for some years, when I discovered they were routinely manipulating arrays of byte[] by converting the array into a String, using .substring(), then converting the String back into an array. System.ArrayCopy() is introduced on page 155 of Java In A Nutshell

I hope you recognise that learning is easier with a teacher, than alone. A good book is a cheap substitute for a good teacher. It will introduce concepts in a carefully planned order, so you can build up a thorough understanding -- not merely enough to get by.

slim
  • 799
  • 1
  • 6
  • 11
  • 2
    +1 for the pointing out the difference between learning to do something and learning to do it well. – idbrii Jul 28 '11 at 16:56
  • A good book is a great way to quickly cover the area. Someone has already done the research for you. Finding a good book can be difficult. There was a time where I had a 50/50 chance of getting a great book on a subject I was interested in (really good buyer). Now I find the chance of finding a good book in the book store is less than 10%. However, there are many good book like resources available on the net. Picking the right resource can speed up your learning. – BillThor Jul 31 '11 at 15:49
  • 1
    I'm not sure when that time was. I took a look at my old CS books recently. The standard has improved vastly. For example, I used 'Functional Programming With Miranda' years ago. I used 'Real World Haskell' recently. The older book is mystifying today, despite basically using the same concepts and paradigms as Haskell. – slim Aug 04 '11 at 15:05
21

I think you might be on to something. For me at least, most of my skills have come from wanting/needing a program that does "X".

Maybe the people that learn this way aren't asking for help; they're just too busy getting it done (poorly, but learning along the way). The folks who want to be programmers (as apposed to that first group) ask a lot of questions about how to be a programmer, or how to program, even though they don't necessarily have a problem to solve, and these aren't questions with direct answers.

And so we punt to books. "Oh yeah, pick up a copy of 'Dive into Python.'" "Is that how you learned?" "Nope" "Um..." "I'm kind of busy, but I'll help if you get stuck" "Uh... OK, I guess"

On the other hand, I value the heck out of good reading material when I am learning, so that I can see how the problem I'm trying to solve is solved by a more skilled author, or maybe just so that I can learn some "beginner" techniques I might not have pick up along the way.

TLDR: books are good, learning by doing is good, learning by doing books is ???

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
  • 1
    +1: I think you've nailed it. Learn by doing, the most valuable books I own were specific to an application I was writing at the time. – Justin Shield Jul 28 '11 at 06:24
  • 41
    Be careful to avoid becoming a "self-taught" programmer that thinkthey know it all because they worked through a simple problem, badly, and feels themselves "too good" to read books. – Joris Timmermans Jul 28 '11 at 09:36
  • 2
    Should note I am not against reading, I just think digital media is usually a lot more current and engaging. – Alex Hope O'Connor Jul 28 '11 at 10:00
  • 2
    @Alex About digital media. That really depends on the topic being addressed by the media. If the media is addressing such things as how to do x in language y, or the most efficient way to code in z, then I agree with your statement. However, other topics (usually more advanced, theoretical topics), such as NP, P, algorithm analysis, etc, IMHO are usually addressed best by a text book. Take Knuth's *The Art of Programming*. It's quite an old text, but still considered one of the foremost books on programming. – cledoux Jul 28 '11 at 12:20
  • 16
    I think this is a case of confirmation bias. @Alex seems to be looking for a certain answer. I'm not saying this answer is *bad* per se, but it's certainly not the best answer provided by any stretch of the imagination. – zzzzBov Jul 28 '11 at 13:55
  • Books are becoming digital media. Admittedly the current generation of dedicated e-book readers like the kindle don't do well with technical books, like programming books. Given how fast the hardware is advancing, I think in just a few years you will have much better e-book readers and much better e-books to go with them. Books on programming have always been a popular way to learn new languages and technologies. I don't see this changing and with new formats books will become an even better tools for learning. – Jim C Jul 28 '11 at 14:17
  • 1
    Hmm. Come to think of it; A big part of how I learned was neither from a book, nor by doing, I did go to school for this. Extended, formal education in a field is of huge value; It also means that I can pick up this language or that technology without much trouble (a few weeks) and become proficient (a year or so) without ever really getting stuck, since I've got that framework of education to build from. – SingleNegationElimination Jul 29 '11 at 04:14
15

I love reading technical books. Not all technical books, just the ones about a particular subject I'm interested in, say Sharepoint. I recall the first book I really read (multiple times),s Programming Windows by Charles Petzold. Because of this and many others, I was capable of writing a Win32 application from memory. I hardly needed to look up an API, so was I was able to focus on the business part instead.

I feel that books provide an "authorative" way of doing something, perhaps by someone who knows the right way to do something better than me. I trust that what I'm learning is, dare I say it, the best way to solve my problem. That is, of course, if I trust the author (gotta love the reviews area in Amazon).

Although I find myself now more and more "googling" and copying and pasting when I try to solve a problem, I spend a good chunk of time making sure that what I'm copying (or being inspired by:) is something trustworthy that I can put in my code. Just because I find a solution on the web, it isn't necessarily the best.

While I, like so many other programmers, now simply google the answers, I still find myself picking up books from known authors. I feel the content is brought to me by someone who is good at explaining it (teaching it), and it saves me from having to filter all the junk from my Google results.

Eddie Paz
  • 216
  • 3
  • 6
14

I assume your question was not meant as "why use old technology like a printed book instead of HTML pages", but "why read longer texts about programming written by one or few authors".

You can think of books as structured collection of information about a certain subject. It has the advantage that someone has made the effort to build each chapter onto each other to make understanding the topic easy. Usually, you are also told what the boundaries of the information are (what is covered and what else there is that you need to look out for elsewhere). After reading and working with it, you can be sure of having achieved a certain skill. If you want to learn with the fast forward button pressed, a book can force you to work through every aspect without skipping the boring parts, at least if you trust the structure of the book. The collection named "book" is most often useful as a reference, too.

Using the Internet, blogs, "fiddling around", etc. usually falls into the kind of unstructured information. You get loads of bits and pieces of wisdom, but you have to do more search work to get to build up your knowledge, because no one will guide you in saying "learn this first or you won't see the merit of that stuff you have googled up now". You might miss certain parts because they are too boring or no one told you they were important. You might learn things wrong, because not everything written on the Internet is first quality. You might spend a lot of time filtering out useless search results. You might waste days with trying to accomplish something on your own, just because you didn't know a certain design pattern or programming construct and no one told you. The less you know, the worse it gets with unstructured information IMHO.

To put it a bit provocative: I would never trust an architect to build a bridge which I have to cross each day if he told me he had never read a book about bridge building or structural analysis but just learned it by fiddling around and using Google...

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Ray
  • 957
  • 5
  • 10
10

If you are a C programmer, how do you expect to learn Python without a book or teacher?

If you just learn the basic syntax and dive right in, you will end up writing C code in Python, and come to the false conclusion that Python is just as verbose and painful as C.

  • That's an exaggeration. If you started programming Python you could google answers to problems and find things like [Python recipes](http://code.activestate.com/recipes/langs/python/) that describe Pythonic solutions to specific problems. – idbrii Jul 28 '11 at 17:01
  • 6
    @pydave: If it were an exaggeration then there wouldn't be **so much** C-code-written-in-Python on SO [(example)](http://stackoverflow.com/questions/5249348) – BlueRaja - Danny Pflughoeft Jul 28 '11 at 17:22
  • 4
    I read your example question, read your answer, and I understand what you mean: Learning the basic syntax is not the same as learning the language. (I didn't even consider not learning the language's constructs.) If you learn just enough Python to write C code in Python, then you still haven't learned to program in Python. – idbrii Jul 28 '11 at 17:38
  • This is a serious problem that deserves more attention. All programming languages are Turing complete which means that you can solve any problem by writing C-like Python code, or Java-like Ruby code. There's no roadblock there that will force you to conform to the zeitgeist of the language you're programming in. Worse, you may not even feel the pain of your coding inefficiency because it will be approximately as painful as it was in native C or native Java, a pain level which you have come to accept as normal. – Wedge Jul 28 '11 at 20:45
  • can't agree more - I'm a C programmer in PHP when I write any :-| – warren Jul 28 '11 at 22:56
9

Google is typically only good for finding small snippets of code or open-source libraries. Documentation for some libraries/programs is unreliable at best (if it exists, it only shows you simple or common examples.)

I don't have many programming books, but I can tell you right now that I've got a book about OpenGL, and it's got the majority of the code for a 3D engine in it, which you can simply copy, but you can read the theory as well -- you just have to turn a few pages and an explanation of the code is right there, waiting to be read. Nowadays, you could probably find some open-source 3D engines on the net, but if you need to change the code substantially, you're probably in some trouble -- typically no help forum exists and the people on SO won't know the answer to your question if it's very specialized. When it comes to really specialized stuff, only a few dozen people in the entire world are going to be able to answer your question without spending hours in order to figure out enough to be in a position to come up with an answer. If you ask how to implement a linked list in C#, you're going to get 5+ answers on SO in the first 10 minutes, but if you ask what the best way to go about implementing a complex shading algorithm in three.js is, your question is going to sink off the front page like a rock.

On top of that, books are written almost exclusively from the perspective that the reader wants to learn about the theory involved, whereas google just produces random junk -- code snippets, archived discussions about the subject in which nobody knows what they're talking about, etc. Sources on the internet have gotten a lot better: SO, Moz Dev Network, Microsoft's web site, blogs, etc., but historically, books have been much better, with internet sources just now catching up.

Michael
  • 473
  • 1
  • 4
  • 12
  • 1
    +1 for pointing out the time you need to sort out random junk with the "learning by googling" method – Ray Jul 28 '11 at 07:51
  • 1
    +1 for 'archived discussions about the subject in which nobody knows what they're talking about, etc.' - ROFL. – immutabl Jul 28 '11 at 08:36
7

The quality of writing in the best books is such that a lot of the non-obvious issues are laid out before you even start. An author with a lot of experience will know to tell you about things like: unexpected side-effects, long-term repercussions, undocumented features, typical usage scenarios...

Basically, you are getting the benefit of a writer with a lot of experience walking you through the problem and pointing out the truly interesting bits.

Sometimes you can find this in online references as well, but because of the low barrier to entry a lot of the information online is too basic, missing on details, or just outright wrong. This can happen with books too, so make sure you only outright believe those books which are classics with consistently good reviews. Other books can also be useful, but only as one of the sources, you will still have to verify the information by cross-referencing or trying yourself.

Joris Timmermans
  • 8,998
  • 2
  • 36
  • 60
  • 1
    +1000 'just outright wrong' There is a ton of example code online written by 'the best programmers' that don't user compilers or know what they are talking about. Plus, a good book will be written with a pedagogical model that introduces then reinforces the content in a consistent and readable way. – jqa Jul 28 '11 at 13:46
6

Books tend to come with a great deal of information in a structured format. Google tends to come with a huge amount of information not always particularly structured and difficult to organise in terms of what you need to do.

I don't actually read physical paper books anymore - there's an electronic reader beside me and I have Kindle software on my laptop which gives me access to the information I am looking for.

Where Google is helpful is if you're not looking for a structured overview of how to program, but need details on how to program a specific task. Someone's nearly always written code for that task before, or, at least, something like it.

I think there's a difference between learning to program and learning to program a specific task. I would question the quality of code coming from someone who only ever learned bits and pieces from googling specific tasks if they've never really gotten a decent overview on how to program. This is not language specific, it's more conceptual.

temptar
  • 2,756
  • 2
  • 23
  • 21
4

Books are useful if you want to go deeper into a subject. Sure I learned C# from doing a few tutorials and writing some (pet) projects. But C# in depth is still useful to see what goes on underneath and to learn a few new things.

Also, I can take a programming book and read it in my bath or outside in the sun. I cannot do that with my desktop PC.

Carra
  • 4,261
  • 24
  • 28
4

Because it is a convenient way to learn from other programmers.

Books are a supplement. You can only get so far so fast working on your own. Who wouldn't rather be on a project with a better programmer willing to teach you something than just read the book?

I tend to use them more as a reference rather than an "Everything you'll ever need to know about programming."

JeffO
  • 36,816
  • 2
  • 57
  • 124
3

Books allow you to absorb a set of information in a "passive" way. You don't have to look what is possible you get presented a subset of the possibilities. When I was learning C# the book really helped pointing out the possibilities, and wonder what were the C++ equivalents. Of course the mastering took place when using it in a (real size) project. But the book really helped on pointing out differences and possibilities.

refro
  • 1,386
  • 6
  • 17
3

I want to become a programmer, so I am using programming books. Books will allow me to become professionally proficient at programming.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Benny
  • 11
  • 1
3

I haven't really read a programming book in a long time. I use to use them as reference guides, but now I think the Internet is easier for most languages and frameworks.

Anyway, I think the best thing to learn from programming books is the core language. For instance, my first real language was C. I learned it by writing an OS (I don't recommend this). As a result, my knowledge of C was pretty crippled even after two or three years of programming in it. I never got a good core knowledge of the language. I didn't know I could turn these 15 lines of messy code into a clean two lines of code. So I could solve problems, but I wasn't utilizing C to its full extent.

Then at one point I decided to learn C++... (about 2 years after beginning to learn C). So I read the only C++ book I had around, a C++ For Dummies Book. I read about 3/4ths of it straight through, doing very little "doing" during that time.. and as a result when I did jump into my first project instead of being comfortable with that 15 lines of messy code, I knew there was an easier way to do it (even though I may have had to look it up).

I did the same thing when I learned C#/ASP.NET. I did almost nothing but read until I was done with about 3/4ths of the book. And for what I didn't learn, I browsed Stack Overflow for interesting C# questions. When I stepped into my first project, I'd say that most of my code was relatively clean and has only had to be "hugely" refactored once since then.

So I would say that books are very useful for learning the capabilities of a framework or language. Beyond that though, they're mostly made useless by the Internet, except for of course the strong theoretical and specifically-designed-to-be-reference-material books.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
Earlz
  • 22,658
  • 7
  • 46
  • 60
3

In short, I think that books tend to be more useful at a high level. They can give you design guidance and help you prevent problems instead of solving them.


Books certainly have their disadvantages. My copy of Programming Python covers Python 2.0, but the runtime I use is 2.6.

However, I think the important aspect of books is that you can find things that you wouldn't stumble on yourself. Google helps you solve specific problems, but books will help you with design. And not just design books. If you read a good book that helps you understand the design of a language, you will better understand how to use that language.

Other books are good for refining your knowledge. I think Scott Murphy's Effective C++ book are a good example. While this book aren't really very good for learning C++, it helps you see problems in algorithm/interface/inheritance design that you haven't encountered (yet) or worked around. It might be easy to find a simple solution (that my cause other problems later), but by understanding the language better you can design your software to avoid these problems in the first place.

Of course, it's not the fact that books are printed on paper that makes them worthwhile. The care and effort that goes into creating them and the desire to give a rigorous education are what give books value. Often as a side-effect you get useful online resources like C++ FAQ lite or ebooks like Dive into Python. There are also online-only tutorials that are thorough and useful learning tools (like the documentation for some platforms/languages/libraries).

Snippets on the web are a good way of answering your question, but they rarely tell you what you should be asking.

idbrii
  • 184
  • 6
2

It's less about what you read, but how much. I like to have a couple of programming books on the go while I am working on a project. Every now and again (more often than you might think) you'll read about a technique that can be applied to your current project.

Once you've implemented into a real world solution, the information will stick.

Mild Fuzz
  • 1,562
  • 10
  • 21
  • 2
    I actually find that the case when answering questions on websites like SE. I often find that comments lead me to information relevant to solving a problem that I am either working on or know will be working on soon. – Lea Hayes Jul 28 '11 at 16:29
2

You can solve problems without reading books, but then will you really know what is happening behind your program to solve that problem?

You need to know what is happening and what could have been a better alternative. For that you need good programming books. Just reading books of course is not enough, you need to understand the content, go through other books, think of different approaches of solving problems and so on. Learning continues with and without books.

Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
2

I prefer using books because I feel that they provide a snapshot of the state of the technology you are working on. The author will state that with X.X version of Y language/library, this is how you solve problem Z. May website tutorials fail to list what versions they are using or provide the example code that they use while books often do.

Books often cover the "why" this solution solves the problem while online docs are typically copy paste.

You can also often lose links to all your references, they can move, or go down. I protect and take care of my books like an investment (which they are).

Spacebob
  • 841
  • 7
  • 11
1

I think I go for reading books.Especially downloading ebooks.Reading each and every part of the chapter.Copy their code! paste to your programming editor and then see what the output is.Then try to change the logic of it.I mentioned downloadable ebooks because to work faster.Books are really superb.I am not lying but since last November till today.I have finished around 20 books.It all requires love to read.What the newbies do is that they solve specific problem taking the help form internet.But when a real complex task is given to them,they give up.Reason,no knowledge about the task and its solution.For example I have bounded the controls with datatable and don't know what datasets do and I have been provided with the task to make relation(s) between memory resident copies of database tables I can't do it.

Adeel
  • 1
  • 1
1

When I was learning C++ I found most literature pretty useless until something in my head clicked. To this day I am not sure what it was, but everything started to make sense. Books and websites then made far more sense. It took me 2 books to learn how to program in C++ and neither were true C++ books (they were Visual C++ books which focused primarily on MFC).

If you get the right book(s) then it can be really useful. A friend of mine was reading some Dietel books at uni and I found those extremely well written. I have never found the "... for Dummies" books that useful because they don't explain things in the right way for me. Best advice is go to a bookshop and get a taster of the book so that you don't go wasting loads of money on what tend to be extremely expensive books.

For some programming topics I find it useful to read several books, undertake research via Google and experiment. I found myself doing this a lot when I was working on AI algorithms when I was working on a checkers game with J2ME. I also found myself doing this when I was learning how to create a compiler compiler for custom syntaxes. There are so many different variations and views.

Sometimes having an understanding of multiple views allows you to make connections that are otherwise more obscure.

Lea Hayes
  • 1,033
  • 1
  • 10
  • 17
1

I tend to learn (programming) from both books and "just in time" sources like the web. Both can be good but overall I prefer to learn from books, here's why:

When you learn only what you need to know immediately to finish a part of a project sometimes you miss out on the big picture. The best books are not merely references but in a sense achieve something closer to an apprenticeship, by providing a well rounded overview of a technology and lots of seasoned advice about the best solutions to common problems.

Just-in-time learning can very easily suffer from the problem of satisficing, when you identify a problem you want to solve you jump to the first solution that seems to work, then you run off to the interwebs to find out how to implement it. However, often this can get you in trouble, if you had been able to have a conversation with an experienced programmer about your problem they wouldn't tell you "here's how to do X" they'd tell you instead "don't do X, do Y instead". And this is the sort of knowledge that you tend to get from the best books. Indeed, some books are entirely about this sort of thing, such as Javascript: The Good Parts.

The other problem that JIT learning can have is a much slower learning curve. With JIT learning you tend to learn only what you need to know. But often just having a base core of knowledge can accelerate learning a new language or framework. Instead of stumbling over the basics you start off with a solid foundation and then build from there. A good chunk of material you may cover while reading a book may not be immediately useful for you, but having that background knowledge can be beneficial in guiding your decision making and especially in understanding new code that you're exposed to. There's a trade-off of course and there are bad books that just pile on useless facts that you won't remember after you've read them but there are also good books that give you a good grounding in the fundamentals and what's possible even if you don't have to use that knowledge on a daily basis.

There are also books at a higher level than a single technological subject which I think are crucial to maturing as a developer. Books like Code Complete, Refactoring, Working Effectively With Legacy Code, etc. You're not going to pick up the knowledge from those books just through JIT learning.

Wedge
  • 270
  • 1
  • 5
0

I think it's right that programming cannot be learned from books only (as most of the people mentioned), you need to practice a lot and there are many resources available on the internet (articles, videos, samples etc.).

But a good book fills the gaps in your knowledge. After reading a book cover to cover gives you confidence that you don't have any gaping holes in your knowledge of the subject. Though the challange is to find good books on the subject.

Manoj
  • 131
  • 2
0

I have no clue. I'm against programming books. In most cases, you still have to research on Internet to search additional information.

Do you want to learn a programming language? Google for it. I hated jQuery because it was looking hard. Then I came to Stack Overflow, and I know a lot from that. Without the help of any books.

  • Google for it
  • Look around for some professional, complete open source application
  • Browse in that code and TRY to get what is going on.
  • Try to write some fast/simple application from snippets of an existing code.
  • Try to rewrite it for yourself.
  • Find more tutorials on Internet
  • Take experience
  • Take more experience
  • You just learned a new language! (I didn't say you will be an expert, but the basics are learned in a few hours or days)
Peter Mortensen
  • 1,050
  • 2
  • 12
  • 14
genesis
  • 205
  • 1
  • 10
  • Having a book as a reference is very useful--you gain from the experience of others. The "book" could even be extensive online documentation/tutorials like [django](https://docs.djangoproject.com/en/1.3/) or [jquery](http://docs.jquery.com/Main_Page). But trial & error + reading source alone will leave major gaps in your knowledge. Now if you only need a few lines of jQuery, your method works but you didn't learn the language. But if you want to learn C, I'd recommend having K&R as a reference. Sure most info is online somewhere, but scattered throughout many blog posts. – dr jimbob Jul 29 '11 at 14:15
0

It is very difficult for new programmers to understand what programming actually is, how deep it is.

Anyone can write a program to tell a computer to do--well just about anything with very little learning, this isn't hard! What's hard is making a program that is supportable and can be understood quickly and comprehended deeply by other members of the team, this part takes years, dozens of years.

In addition learning to work as an effective part of a team is a bit of a curve.

So how do books help solve these "Real" programming problems in ways that looking up references on the web don't?

Well two of my favorite books are "Design Patterns" and "Refactoring".

Refactoring is a great book telling you how to recognize bad code. If you have learned by looking up coding references, this book (Well one of the many Refactoring books) is critical.

Design patterns doesn't really offer much that a good programmer can't figure out, but it did give names to a wide range of patterns everyone already used in code. This enabled programmers to more effectively communicate and helped some programmers find new ways to attack problems. Although you can find design patterns on the web, It's much easier to google the name of the design pattern than--google what you are trying to do.

I've been asked in interviews to describe these two books and what they are trying to accomplish, I think this is a very valid interview question... I'd want to pay attention to a programmer who didn't know about these two books unless he was applying for an extremely junior position.

Bill K
  • 2,699
  • 18
  • 18
0

I learned to program from books directly. About 20 years ago before google and the net ever became popular. I think they are great resources. However most modern day books just quote technical articles by the manufacturers. So I now agree it is better to learn online. With a word of warning as follows:

Even though I read many many books, and had internet access almost since it was financially feasable. I was never, ever able to complete any sort of sizeable project. Sure I could do many of the sizeable projects in big advanced books where they take 20 chapters to walk you through it, but when it came to my own real world projects, I always without execption hit a brick wall. I got to tell you, I read some heavy books.

I had problems all my life getting into college, but I am now going into my third year. In my first year I met people in 4th year, and masters, and was able to hold productive conversations about the theories of AI, HCI, assembler, and compiler development ect. But yet with all this knowledge I could not create a reasonable program. What was I missing... The one thing you cannot get from any book, or online.

Structure. In first year, I learned nothing of a technical nature (Allready knew the whole lot and breased through it without a days study, execpt maths and design as these were reasonably new to me), but I did learn structure and teamwork. In my first summer holidays I got closer than ever to completing my first real work.

In my second year, I learned a good deal of new tech stuff (still the basics in comparson to what I knew, but I was putting the theory I knew to real practice). This emphasised the importance of structure all over again. I have not completed my first real project. I now consider myself a programmer.

I dont beleive its necessary to read books to learn programming. But its a help. However, I do certantly beleive that no book or website teaches or can teach what you get from even 2 years of college. If you have managed to complete projects without ever going to college, fair play, but it is an experience I highly recommend no matter the age.

Books are good, internet is better, google and you tube are fab, but nothing beats good old fashoned college in my opionion. And I doubt any amount of googling and youtubing ever will, and I know first hand that no amount of books ever will.

  • Where it says above "I have not completed my first real project. I now consider myself a programmer". It should read "I have now completed my first real project. I now consider myself a programmer". Sorry about the misspelling. – Jack Spratt Jul 28 '11 at 21:09