ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I want to learn programming. I think I'll learn C and Python, not sure in which order. I was wondering if anyone could point me to books that are for these specific languages, there are a lot, but I want to get something that is recommended.
I guess maybe I should read a book about the basics of programming, so could you recommend something for that as well?
I don't want to do this online, I wanna use an old-fashioned book, just so you know.
If you think I should rather learn another language first, please say so.
I gotta admit, physical books are nice. Especially for taking a break from the computer.
I would recommend Java for your first language. I don't like the way Python forces you to do things 'their way' and Java is closely related to both C and C++, so it'll give you a good foundation to move into either of those. It's also usable on a huge number of platforms with little to no change (if the program is well-designed) which is good if you want to distribute any of your work.
C is nice if you want to work on existing Linux utilities, as many (most) of those were written in C.
I'm a big fan of the O'Reilly Nutshell handbooks. The Python one (by Alex Martelli) is very useful, though it can lean somewhat on the technical side sometimes. I have the first edition, although I see that a new edition just came out recently, ISBN 0596100469. Kernighan and Ritchie's "The C Programming Language" is considered the quintessential C reference. It's somewhat small, but so is the language, and it has a reference section that covers the major ANSI libraries. Its ISBN is 0131103628.
As far as general programming goes, there are many many books on that topic. For technique I recommend "The Pragmatic Programmer" by Andy Hunt and Dave Thomas. It covers a wide range of subjects all of which are relevant to programmers, but which don't often get the coverage they deserve. Its ISBN number is 020161622X. Another good one is Eric Raymond's "The Art Of UNIX Programming" (ISBN 0131429019); I also have heard good things about Kernighan and Pike's "The Practice Of Programming" (ISBN 020161586X).
Personally, the way I've learned to program is to try to cover as many languages and methodologies as possible, comparing and contrasting them along the way. Languages are merely tools which programmers use to try to solve problems. By becoming familiar with many different "tools" you can start to learn which ones solve certain problems well. And in the future you'll have the experience to be able to choose the best tool for the job.
I think C and Python are good starts - they both offer different ways of looking at the world. In addition, both are rather transparent in how they work. Java is also worthy of attention, even if for no other reason than it's extraordinary popularity. Lisp or Scheme are important to examine, as they present an alternative to the procedural style used by nearly all other prominent languages.
Lastly, I personally believe Ruby to be an excellent beginner language, because it has many different features to explore, while still being very productive and easy to use. It also gives a good starting point for comparing other languages, as Ruby has borrowed many things from its predecessors. If you end up looking at Ruby, the essential book is "Programming Ruby", ISBN 0974514055, by Dave Thomas with Chad Fowler and Andy Hunt.
Good luck to you in your new ventures. If you have any other questions or would like more advice, please post or feel free to email me.
Last edited by taylor_venable; 07-25-2006 at 06:43 PM.
Reason: Grammatical errors fixed.
O'Reilly books all the way. I would also agree with Ruby. I have just started to learn Ruby and am very happy with the how it's all working. I am a interperted languange programer, so I cannot say anything about C, and Java for that matter. Well other than I believe the use and popularity of Java is decreasing at least in the Bioinformatics world. Mainly due to languages like php, python and ruby. I think!
yea and on amazon you don't pay tax which for a $50 book is a nice bonus. I have also found that while Barns & Nobel books will be $50 amazon will have the oreilly book new for $35. Programming Ruby is the best example.
Have you not done any programming at all? If not, I wouldn't suggest C be your first. It can be considered too cumbersome. I don't know Python, but if it's similar to perl I would think that would be a better choice as a starter language.
As for the books. I thought Ivor Horton's "Beginning C" was a good starter book for myself. Someone already mentioned Kernighan and Ritchie's "The C Programming Language" as a historically popular book, but I myself found it too dry and better as a reference than a learning tool.
O'Reilly books are also popular (or at least well marketed), but I find them hit or miss. I think they're "Learning" series is pretty good if you like to start slow. In contrast to taylor_venable, I've found that O'Reilly's "Nutshell" series are a painful to read if you're new to the subject (not enough instruction), and if you already know the subject then they're not deep enough (not enough detail).
I would recommend you buying pdf books instead. They are usually 50% cheaper and I found it much more practical when programming in my computer, so I can concentrate in what I'm doing, without losing focus from the screen. Besides, paperback books are a lot of waste of resources and the worst part is, they are always getting dated and you won't be able to use them in the future and most likely you won't be able to sell them again.
The only thing I can think of with books that are good, is, for example, if you have to take long train/busses rides to school/work. That is a good opportunity to read your books while travelling. Other than that, try getting pdfs . Here is a good place to look at: