I don't have a whole lot of experience with programming so I was wondering if anyone has any suggestions for books, etc. that they think are particularly helpful for a somewhat beginner in learning Arduino/general programming.
The book stores in my area all have books on Arduino programming. One thrift store even had on a couple of years ago.
Paul
If you like learning from books have a look at Arduinos for Dummies. I have not used it myself - just looked at it in a shop - but Sailing for Dummies is excellent.
There are lots of useful links on the Useful Links Thread.
And Google will find dozens of online Tutorials.
Note that Arduinos are programmed with C++ but most of the C++ text-books are written for PC programming and will probably start with a lot of basic stuff that is not relevant for an Arduino.
...R
What do you mean by general programming? If you're looking to write code, the language you choose rather depends on what you're planning to build.
To use Arduino though, you will need to learn C++. What are you trying to achieve?
i think The Elements of Programming Style by Kernighan and Plauger (you can read on the web) is one of the best books to really learn how to write good programs and it's only a 160 pages.
Kernighan wrote the C Programming Language with Dennis Ritchie who developed C.
In the Elments of Programming Style, the authors go over programs from college textbooks and journal articles, exposing the bugs in the programs, how to correct them and how to make the programs much better. The example programs are in various languages.
he gave a talk on Elements of Programming Style just a few years ago in Princeton, sorta saying people are making the same mistakes.
Humble Bundle has a great set of ebooks available right now in their DIY Electronics 2.0 bundle of Wiley eBooks.
These are offered on a "pay what you want" basis (at least $1 US) that helps charity. This bundle includes:
If you pay at least $1:
- Exploring Arduino
- Learning Python with Raspberry Pi
- Raspberry Pi Projects
- BeagleBone for Dummies
- Raspberry Pi for Dummies
If you pay at least $8, you'll also get:
- Circuitbuilding for Dummies
- Arduino for Dummies
- Arduino Projects for Dummies
- Raspberry Pi Projects for Dummies
- Complete Electronics Self-Teaching Guide with Projects
If you pay at least $15, you'll also get:
- Electronics for Dummies
- Adventures in Raspberry Pi
- Exploring BeagleBone
- Exploring Raspberry Pi
- Arduino Sketches
- Raspberry Pi User Guide
These are all the complete and latest versions of these books and are officially sanctioned by the publisher. They are all DRM-free and available in multiple formats - all available for immediate download after paying. They offer similar bundles several times a year. I have also purchased a few O'Reilly bundles and have not been disappointed.
The Programming Style book by Kernighan and Plauger is a masterful work, but one that is best appreciated by someone with some programming experience. There is a ton of good introductory books on C and online tutorials, too. Obviously, I am biased, but Beginning C for Arduino (2nd Ed) might suit your needs. Go to Amazon, read the reviews of it and other books of your choice. In many cases, there is a banner on the cover art that says "Look Inside" which allows you to look at the Table of Contents and read a few pages. This should help you find the resources you need.
i hope the books being suggested aren't being judged by weight.
And as they said in the preface to Elements of Programming style "all of the programs we use are taken from programming textbooks" so there is no guarantee an introductory book does not teach bad programming practice.
i think learning to write good program requires seeing good programs. Software Tools describes many programs used during program development demonstrating good program architecture
And if people were inventing a programming language now I hope it would be better than what Kernighan and Ritchie came up with
Being popular (i.e. the only game in town) does not mean C/C++ is perfect.
...R
Ken Thompson who worked with Ritchie on Unix and Rob Pike who co-authored the Unix Programming Environment which is another great book, ended up at Google and developed The GO programming language as a better object oriented programming language
i'm not sure of any higher level languages before C that had pointers providing direct access to specific address bus locations (i.e. hardware registers). This allowed them to develop the first operating system not written in assembly and therefore portable across hardware architectures
I like Simon Monk's books (instructive and inexpensive). Here's a good one --
"...here is no guarantee an introductory book does not teach bad programming practice."
Very true, but learning to program and writing good programs are two different processes. You cannot do the latter without knowing the former.
As to introductory books pushing bad programming practices, it does happen, but those books fairly quickly disappear from the marketplace. Also, there are some incredibly bright programmers who have written very obtuse programming books and the OP gives the impression that he is a beginner. I still maintain he will get more out of a book like K&P's Style book after learning the language and doing some of their own programming.
econjack:
I still maintain he will get more out of a book like K&P's Style book after learning the language and doing some of their own programming.
I'm not familiar with that book but I agree with the general sentiment.
To learn how to be a good programmer you need to have sufficient knowledge to recognise the difference between good and bad - and, best of all - to know when the difference doesn't really matter. It's also useful to recognize the different constraints that apply to a programmer working in team as compared to a programmer working on his own.
...R
Robin2:
I'm not familiar with that book but I agree with the general sentiment.
I've seen enough of your posts over the years to know that you would appreciate and enjoy the Style book. I think you would also enjoy Programming Pearls by Jon Benchley, too.
econjack:
I've seen enough of your posts over the years to know that you would appreciate and enjoy the Style book. I think you would also enjoy Programming Pearls by Jon Benchley, too.
Appreciate the tips. I will make a note of the names and look them up.
I don't have much space for books now so almost all of the programming books I used to have are gone - probably can't even remember the titles. One I kept is Joel on Software which is a printed version of Joel Spolsky's blog posts. I think I got it before I knew what a blog was. Also (mainly for sentimental reasons) Programming Ruby by Dave Thomas.
...R
Robin2:
I don't have much space for books now so almost all of the programming books I used to have are gone
fortunately it is online - The Elements of Programming Style and if your not up for reading, there's a video of a talk by Kernighan on The Elements of Programming Style he gave in Princeton in 2009
@gcjr: I know the Style book is copyrighted. I'm wondering if the site mentioned has permission to post Brian and PJ's book. I know there are dozens of torrent sites that have my books online and none of them have permission to post them. My publishers estimate that for every book I sell, 3 more are downloaded illegally. Indeed, one publisher has 3 full time employees who do nothing but identify such sites and issue cease-and-desist letters. In most cases, they shut down the site, but they open a new one in a matter of hours. The real cost is not what the authors lose in royalties, but it is the books that don't get written by writers because they can't exist without the royalty income.
Because there is no effective way to stop such sites, my position is that, if you downloaded a book without paying for it and find it useful, then go out and buy the book. While most readers won't do this, it does present a riskless way for the reader to evaluate the book, but still reward the author if it's worthwhile.
then watch the video, it's only an hour of your time
gcjr:
there's a video of a talk by Kernighan on The Elements of Programming Style he gave in Princeton in 2009
Jeremy Blum books were quite good