PDA

View Full Version : Learning to Program



TFF
May 28th, 2012, 09:55 PM
Hi!

I am a semi-experinced Ubuntu/*nix user however I feel my next step is to start to learn to code. I am also due to receive a Raspberry Pi in the next week and this has also spurred me on.

My question is can anyone in the community reccomend a good printed book to learn c++ whilst in the Linux enviroment. Allot of the books I'm seeing are all developing in windows and the use of its libraries as such.

I know printed books are 'old school but I prefer it when learning.

Many thanks in advance!

Bachstelze
May 28th, 2012, 10:17 PM
Why C++? It's not exactly what I would recommend as a first language... (Or at all, for that matter.)

bud986
May 28th, 2012, 10:27 PM
Id recomend python, it's not a super heavy laguage, but powerful and has high portability and similar syntax. And it's useful for allot of things, games, desktop apps etc.

Cardale
May 28th, 2012, 10:30 PM
I personally hate Python and think if your gonna try something you might as well jump in the deep end. C/C++ is the way to go.

If you want to learn a language thats good for prototyping or just dinking around just use Java.

Then again Ubuntu uses Python for alot of things and it might be useful to know.

llanitedave
May 29th, 2012, 12:11 AM
I don't know why a personal hatred for Python would lead you to recommending against someone else learning it, especially since you didn't provide any information as to why it would be an inferior choice other than your personal preference.

I don't think there's anything wrong with learning C++ first, it's certainly doable. Whether C++, Java, Python, or even html/javascript are the best choices really depends on what the OP's needs are.

My C++ book was "Ivor Horton's Beginning C++, The Complete Language", published by Wrox in 1998. I don't know whether it's still available, but it concentrated on the command line and the Standard Template Library of ANSI/ISO C++. It's platform-independent, so it should work as well for Linux as any other.

That said, I don't think you can go wrong with Python.

DarkShades
May 29th, 2012, 12:36 AM
C++ books I don't really have any favourites that are linux specific. but there is a really great website with tutorials and such I can recommend. I know not the most ideal but there is a wealth of information at http://www.cprogramming.com/

"The C++ Programming Language" is a little dry so maybe a Teach Yourself C++ in x number of days type book is a good starter if it focuses on standard libraries rather than specific Windows development.

I tend to like a lot of the books put out by No Starch Press as well in the way of programming books. If you have a local library you might want to try before you buy a specific book to see if it's the book that clicks with you.

Once you know the language then you can mess with linux specifics.

gnusci
May 29th, 2012, 01:12 AM
A book I find very useful:

Sams - Teach Your Self C++.

amedrano
May 29th, 2012, 04:14 AM
If you choose to learn Python, there are a great deal of free resources online

Dive into Python
http://www.diveintopython.net/

How to think like a Computer Scientist
http://www.ibiblio.org/catalog/items/show/3775

And a non free book I recommend is
Head First Python
http://www.amazon.com/Head-First-Python-Paul-Barry/dp/1449382673/ref=sr_1_1?ie=UTF8&qid=1338261175&sr=8-1
Its a fun book.

Ubuntu does use python quite a bit (I believe). I just finished writing an Ubuntu desktop app in python :D

madverb
May 29th, 2012, 04:20 AM
A Byte of Python is good too: http://www.swaroopch.org/notes/Python

trent.josephsen
May 29th, 2012, 04:32 AM
"The C++ Programming Language" is a little dry so maybe a Teach Yourself C++ in x number of days type book is a good starter if it focuses on standard libraries rather than specific Windows development.

I disagree. (Disclaimer: I am not an experienced C++ programmer and in no way qualified to evaluate C++ books.) I liked Stroustrup because the book teaches C++ the way C++ is supposed to be used, rather than starting with the part that is mostly just C and describing C++ features later (which a lot of books seem to do, intentionally or otherwise). Turning to a "Learn <something incredibly complex> in <unrealistically small time>" style book is probably not the way to go.

Would I recommend Stroustrup for a beginner? No; I wouldn't recommend any C++ book to a beginner. But if someone who was going to learn C++ anyway asked my opinion, I wouldn't hesitate to recommend The C++ Programming Language.

N. B. The Raspberry Pi "officially supported" language is Python.

dodle
May 29th, 2012, 05:08 AM
I used C++ Programming in Easy Steps (http://www.amazon.com/Programming-Easy-Steps-Mike-McGrath/dp/1840784326). It's pretty basic and not really specific to any OS (until the very end where it touches on GUI programming with the Win32 API). I think it is a good book for getting your toes wet.

zombifier25
May 29th, 2012, 05:15 AM
For C++, the site http://www.cplusplus.com provides a great deal of info, including documentation and information about C++'s libraries. I taught myself C++ on that site.
For Python, I uses its official documentation: http://www.python.org/

TFF
May 29th, 2012, 09:45 AM
Thanks for some really helpfull and detailed responses guys. Python was my second option but due to some arguments put forward and its capabilities I think I will go for python in the end and if I manage that then I will maybe move onto C. I also appreciate that python is the initial language of choice for the RPi.

Thank to all for your input.