LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-06-2004, 03:40 AM   #1
Replicator 3.0
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Rep: Reputation: 0
From complete newbie to C++ programing in Linux


I have an interest in programming but have zero programming background. I would eventually like to be able to program in C++ for Linux but I am unsure where to start. The local college has a course but recommends like a basic programming course and then a C course prior to taking C++.

Anyway, I was hoping some of you Linux pros could recommend a good place to start. I would rather not waste a lot of time and money on a basic programming course if it isn't necessary. Any advice is greatly welcome. (Books or class advice.)

Last edited by Replicator 3.0; 05-06-2004 at 03:46 AM.
 
Old 05-06-2004, 04:09 AM   #2
nonperson
LQ Newbie
 
Registered: May 2004
Location: Napoli, IT
Distribution: compiled from scratch, and a gentoo system
Posts: 24

Rep: Reputation: 15
This is just my personal opinion ( obviously ) but:
Unless you are obtaining a degree in Computer Science, A programing certification, etc. There is no reason to waste money on a class. There probably isn't even any reason to waste money on a book. The internet has more than enough tutorials floating around out there on programing, from C++ to Intercal.
If you have absolutly NO C programing knowlage, than it's probably best to start with C++, start forming those good OO habits right away ;-)
Why do you want to program? If you want to make kernel modules, "twitch" type video games, or really small code that runs really fast, than yes, c++ is the way to go. But if these are not your immediate goals I would suggest that you learn Python, Bash scripting, or even ( shudder ) perl. They are much easier to learn, and once learned will help immensly in learning new languages.
The more programing languages you know, the easier they are to pick up, so start with something easy. My personal favorite for general programing is Python, it has a lot of tutorials, excellent documantation, and is interpretted ( so you don't have to wait 5 hours for your program to compile just to find out it dosen't work ).
Bash scripts will teach you general programing terminology and methodology, functions, variables, variable scope, logic and flow control, etc. The syntax is widely diffrent from most other languages but it has the advantage of being the #1 programing language of Unix/Linux systems. Lot's of people say that linux is built on C, and I aggree, but it's RAN by bash scripts.
Anyways, the point of all of this is that if you google for a bit you can download more C++ tutorials than you can ever read, for free. Classes are for those who need to prove to a possable employer that they can program, and books are for the very rich. Your local library is another good source of information, granted out of date and windows oriented information, but it can help you learn the basics.
I hope that this was helpful.
 
Old 05-06-2004, 05:03 PM   #3
The_Nerd
Member
 
Registered: Aug 2002
Distribution: Debian
Posts: 540

Rep: Reputation: 32
I agree with nonperson... School is a TOTAL waste of time! The internet is good, but I also suggest these two books, the best ever.

http://www.amazon.com/exec/obidos/tg...books&n=507846

and

http://www.amazon.com/exec/obidos/tg...books&n=507846

I totally learned to program by books and with the aid of my big brother. I am so glad I didn't goto school... I see all the people who come out of school and know absolutly nothing! (No offense to anyone) Take nonperson's advice and start with Python (also my fav' scripting language), and maybe to aid you in learning python, try Blender www.blender3d.com, although I think that will probably be a bit advanced. Anyway, as for Linux, if you don't have it installed, I suggest downloading Redhat 9.0 http://debian.attica.net.nz/redhat/redhat-9/iso/i386. I hope that helps you get started. You might also want to do a google search and find another mirror for the isos if that doesn't work. Oh! Please don't download them if you don't have access to a cd-burner...

This forum is always here if you get stuck! Good luck!

Last edited by The_Nerd; 05-06-2004 at 05:09 PM.
 
Old 05-06-2004, 05:33 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,581

Rep: Reputation: 191Reputation: 191
Maybe I'm an old fashioned person, but I'd suggest C before C++. You can program in C quite well after a week. With C++ it's longer, C background helps.

To correct nonperson, kernel is written in C with assembly, not C++.
 
Old 05-06-2004, 06:36 PM   #5
Stack
Member
 
Registered: Oct 2003
Distribution: FreeBSD
Posts: 325

Rep: Reputation: 30
Quote:
I agree with nonperson... School is a TOTAL waste of time! The internet is good, but I also suggest these two books, the best ever.
Yeah let me know how your going to land that job with redhat or IBM with no sheepskin... Make sure you learn C++ before you learn C though. Don't believe me? It is what stroustrup(maker of c++) recommends. You want a hobbie use books, want a career/job head to college.

Last edited by Stack; 05-06-2004 at 06:39 PM.
 
Old 05-06-2004, 07:07 PM   #6
kooch
Member
 
Registered: Mar 2004
Location: Upstate NY
Distribution: Slackware/YDL
Posts: 77

Rep: Reputation: 15
Of course Strousup will recommend C++ he designed the damn thing.

Learning C first is a personal opinion kind of thing. The only technical reason I would suggest C first is that it's a smaller language and you'll use more of the language features regularly. Also looking at the assembly generated by gcc for C is much easier to read than the C++ that is generated if you ever want to kick it up a notch and go that direction.
 
Old 05-07-2004, 02:36 AM   #7
czarherr
Member
 
Registered: Sep 2003
Location: Suwon, Korea
Distribution: Slackware 14
Posts: 288

Rep: Reputation: 32
I wouldnt recommend C before C++ first, though, C and C++ are pretty different, better to just go ahead and learn C++ first, get some of the new habits in before you are held back by old C habits. just my 2 cents though
 
Old 05-07-2004, 03:35 AM   #8
ilhbutshm
Member
 
Registered: Jul 2003
Location: Europe
Distribution: Slackware 10.2
Posts: 104

Rep: Reputation: 15
Do you really need to know both, C and C++? What's the difference really? And what about C#?
 
Old 05-07-2004, 04:19 AM   #9
Replicator 3.0
LQ Newbie
 
Registered: Apr 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for all the helpful advice. I'm mainly looking into programming for Linux. Python sounds like a good place to start and seems to get good praise.
 
Old 05-07-2004, 05:19 PM   #10
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,581

Rep: Reputation: 191Reputation: 191
Quote:
Originally posted by ilhbutshm
Do you really need to know both, C and C++? What's the difference really? And what about C#?
When you know C++, you also know C (but people who know only C++ usually have problems with their first C programs). C++ is C with classes, inheritance and such things (object-oriented).
 
Old 05-08-2004, 04:00 AM   #11
ilhbutshm
Member
 
Registered: Jul 2003
Location: Europe
Distribution: Slackware 10.2
Posts: 104

Rep: Reputation: 15
So... why would anyone learn C and not directy go to C++?
 
Old 05-08-2004, 07:13 PM   #12
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,581

Rep: Reputation: 191Reputation: 191
Probably because of time. C++ is much richer and it takes much more time. In fact, your first programs in C++ will look nearly the same as C progs. Learning C first takes less time and will show certain things not so visible in C++ (or any other object-oriented language) like details of memory management.
 
Old 05-10-2004, 03:23 PM   #13
calble
LQ Newbie
 
Registered: Aug 2003
Location: Louisville, KY or Evansville, IN
Distribution: Fedora Core 3
Posts: 29

Rep: Reputation: 15
C stills have its place among micro controllers and what not. If you want a quick and fairly painless intro to C++ I would recommend Sams Teach Your Self C++ in 10 Minutes. It takes more than 10 minutes, but is a small book that teaches you the basics of C++ in a simple and easy to understand manner. I unless you want to be a profession programmer I would start with C++ and slowly but surely work my way up to nice useful GUIed programs. Not that there is anything wrong with the console, just that a majority of user today prefer to use a graphical app. Graphical programming is a whole different topic that can be saved for another day. I personally have found that it might take longer to learn it right, but it pays off in leaps and bounds. With C++ you can do practically anything. Once you know C++ you even know most of PHP.

Noah
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Complete Newbie to Linux Archaic MEPIS 13 07-03-2005 03:42 PM
A newbie is seeking for document about linux programing TruongAn Programming 4 02-21-2005 10:12 PM
Complete Linux Newbie-wine stopkittiestop Linux - Games 6 12-20-2004 11:51 PM
Complete Linux Newbie Permission's Jaz808 Linux - Newbie 12 09-23-2003 06:54 PM
I'm a complete Linux newbie. help...please propellerhead! Linux - Newbie 4 08-08-2003 11:44 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration