View previous topic :: View next topic |
Author |
Message |
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Thu Jan 09, 2003 6:37 am Post subject: self-taught programmer or schooled? |
|
|
im 21 and im trying to teach myself how to program C out of 3 different books. one is mentioned in a previous thread which is aimed at dos users (it's an old book). im starting with that because it's very dumbed down and it's exactly what i need. the other book is a linux programming for beginners book. it assumes you already know basic C though it claims that it's not necessary. i intend to get into that once i actually do know basic C
i find it very slow going primarily because i have very little free time in which i can do this... i was just wondering if i should consider taking classes on the weekends at some local community college.
i know, it all depends on the person and how motivated blah blah blah. im just wanting to know how many of us out there are fully self-taught (perhaps books dont count as self-taught?) but are able to make those incredible apps like vi or emacs. or are the self-taught programmers destined to making hello world programs?
in a nutshell... am i wasting my time or should i press on?
ryan _________________ I used gentoo BEFORE it was cool. |
|
Back to top |
|
|
garo Bodhisattva
Joined: 15 Jul 2002 Posts: 860 Location: Edegem,BELGIUM
|
Posted: Thu Jan 09, 2003 8:02 am Post subject: |
|
|
c/c++,perl,bash,... all from the books _________________ My favorite links this month:
- Surf Random
- Web-based SSH
- Stop Spam |
|
Back to top |
|
|
Valen Apprentice
Joined: 18 Aug 2002 Posts: 197 Location: Toronto, Ontario, Canada
|
Posted: Thu Jan 09, 2003 8:24 am Post subject: |
|
|
I've learned Scheme/Lisp,C,C++ and Java from examples (mainly) and books/online sources (supplementary).
At school I was taught Pascal, and at work I was sent on course to learn JSPs and servlets.
I would say my skills in both classes are equal (although it should be noted that when you are learning one language your skills in all others increase as well). I have made good (IMHO, but not incredible) programs in C++ and JSP/Servlet with java. My only advice would be to avoid focusing on the syntax (which you tend to do when using books for a specific language) and focus on the algorithms and concepts. |
|
Back to top |
|
|
eyevee99 Apprentice
Joined: 16 Apr 2002 Posts: 239
|
Posted: Thu Jan 09, 2003 8:26 am Post subject: |
|
|
c/c++ and assorted scripting languages (php javascript asp) all self taught. I now develop games for a living in c/c++. |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Thu Jan 09, 2003 8:52 am Post subject: |
|
|
I'm completely self-taught, and I've been programming for 20+ years. A couple of bits of advice: find a project, something that sounds fun to you, and use that as a hook. One of my favorite early programs was an adaptive tic-tac-toe playing game - it modified its own percentages for making different moves based on how it had done in the past. Also, don't be afraid to rewrite things. Try something out, then take another look at the design once you get close and see if there's a clearer way to do things. Try building things both from the top down and from the bottom up. See which sort of problems are suited to each style. Don't let yourself get paralyzed. Just write and write and if you get a block, switch to some other project or some other part of the program. Hang in there. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Thu Jan 09, 2003 10:48 am Post subject: |
|
|
I'm studing to become an Information- and Communications technology Engineer. I'm being schooled in C++ and x386 Assembler, later in the course we will be replacing C++ with Java or C# (the management hasn't decided yet).
So schooled. |
|
Back to top |
|
|
mihochan Apprentice
Joined: 16 Apr 2002 Posts: 296 Location: Melbourne again
|
Posted: Thu Jan 09, 2003 11:38 am Post subject: |
|
|
I'd say that teaching yourself is the way to go, but why start with C?
You'd be able to accomplish more with a higher level language.
Java is not a bad place to start in my opinion. It is simple, well-documented and Sun procide some really excellent tutorials over the .NET (oops!)
Tom _________________ In the long run we are all dead - Keynes |
|
Back to top |
|
|
eyevee99 Apprentice
Joined: 16 Apr 2002 Posts: 239
|
Posted: Thu Jan 09, 2003 11:46 am Post subject: |
|
|
I'd done the basics in high school, and some cobol at uni (while becoming an accountant, ack!). Then I started with Javascript. That gave me the basics of the c style languages and I moved into C/C++ development from there.
:D
Only been doing that for around a year, had been a dabbler forever prior to that.
:) |
|
Back to top |
|
|
cvk Guru
Joined: 06 Jan 2003 Posts: 314 Location: Our house, in the middle of our street
|
Posted: Thu Jan 09, 2003 1:14 pm Post subject: |
|
|
I'm an application/database developer and I learned about 90% of what I know now in everyday project work. As I started to work, I knew some C and was quite good at Pascal. Right now I don't program neither C nor Pascal anymore, but it has helped me much to understand the basics.
If you feel stuck, you could of course take a programming class, although my experience shows that they barely help, because most of the time I felt either bored or completely clueless, but that's just my opinion...
Btw: Three books worth buying:
- "The C++ Programming Language" by Bjarne Stroustrup
- "The C Programming Language" by Kernighan, Ritchie
- "Algorithms in C" by Robert Sedgewick
cvk |
|
Back to top |
|
|
Zadeh Tux's lil' helper
Joined: 31 Oct 2002 Posts: 131
|
Posted: Thu Jan 09, 2003 4:32 pm Post subject: |
|
|
I'm a senior computer science and math major and have also taught C Programming classes so I think I can give you some good advice.
As far as I'm concerned, just about every single person who programs is "self-taught." Whether they were introduced to it through their own curiosity or took a course, most of the "work" involved was done by themselves. Classes and instructors are primarily a guide in my opinion. They can save you some time, but they will cost you some money. :)
A few things I would recommend if you want to learn C are:
1) Lurk in some of the #C channels on IRC.
2) Lurk on comp.lang.c and read as much there and related ng's as you can.
3) Write lots of mini-programs to test any ideas that you come up with.
4) Study some fairly simple, existing code and then do something with it.
As for books, contrary to some of the recommendations above I wouldn't recommend anyone who's new to programming to read "The C Programming Language" or Bjarne's "The C++ Programming Language." Those books don't offer enough newbie hand-holding, in my experience.
If your end goal is to just learn programming concepts in general, you might be better off initially using a more high level language.
Also, the language itself is a fairly small part thats involved when you consider what goes into making a sophisticated piece of software like vi or emacs. (Just because I know the English language, doesn't mean I can write new book on general relativity :) |
|
Back to top |
|
|
mmealman Guru
Joined: 02 Nov 2002 Posts: 348 Location: Florida
|
Posted: Thu Jan 09, 2003 4:44 pm Post subject: |
|
|
I started programming when I was 12, was doing assembly at 15 and database apps around 18 or so. By the time I got to college I really didn't need the courses.
Taking a college course if you're new wouldn't hurt. Being able to self teach is vital though, because college won't be able to teach you 90% of the stuff you need to know. And you have to constantly self teach yourself new things as the computer world advances.
I'd also recommend against C as a starter language. Have you checked out Python? |
|
Back to top |
|
|
Warri0r n00b
Joined: 03 Jan 2003 Posts: 12
|
Posted: Thu Jan 09, 2003 5:55 pm Post subject: |
|
|
Just a couple of points, some of which have already been posted by other people:
- class won't do you any good, unless you are lucky enough to get an instructor who really knows what it's all about, and chances of getting such a teacher in a public college are abysmally low, albeit non-zero of course.
- never, ever start with high level OO languages like Java, or you will have no clue how things work internally and basically will have no idea what the heck you're doing
- Get yourself a good book (K&R, as cvk already suggested, if you're going to learn C), go through it, if you have any questions about a particular topic, keep playing with it (i.e. writing small code snippets) until you figure out how it works. After your first pass through the book, start coding some kind of a project (something that you would consider interesting), the best way to actually learn is to apply whatever you got from the book to the 'real-life' code.
- Keep K&R around, it's called a "C programmer's bible" for a reason
- (If you're running some flavor of unix) man pages are your best buddies
- If you got really stuck on something, you can always get help on IRC or newsgroups, you can also always take a look at an open-source project similar to yours and see how other people solve the same problem.
- Stay way clear of VB unless you enjoy getting brain damage
- After you got comfortable with one language (whichever one you decide to start with), get some theoretical knowledge about how stuff is supposed to work (Data structures, Discreet math, Automata, etc. - check what courses are included in a comp. sci. program at your local university for details), knowing the theory never hurts and helps more often than not. For some of this stuff it might be better to take a class, as some of it is a bit complicated, although the point about getting good instructor still applies.
Just my $0.02 |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Thu Jan 09, 2003 6:02 pm Post subject: |
|
|
I'm self tought from books, if i wasnt going to teach myself who else would have? School doesnt even teach me VB!
Last edited by idl on Thu Jan 09, 2003 11:38 pm; edited 1 time in total |
|
Back to top |
|
|
cvk Guru
Joined: 06 Jan 2003 Posts: 314 Location: Our house, in the middle of our street
|
Posted: Thu Jan 09, 2003 6:26 pm Post subject: |
|
|
Warri0r wrote: | - Stay way clear of VB unless you enjoy getting brain damage |
VB is an absolutely great means to rapidly deploy applications - I never found any language where I could reach my goals that fast - even for rather large projects, but it can severely damage your whole programming style. It is the completely wrongest language to learn anything but the most basic concepts, as it's so terribly minimized.
If you really want to learn something, you'll better go the hard way and learn C or Pascal, maybe even an OO language like Java (which I prefer). If you really need to do something in VB afterwards, your C-knowledge will help you very much. If you need to program something in C, when you only know VB is nearly impossible.
VB.net seems to be very nice (=Java-like) if one plans to program only Win32 software.
cvk |
|
Back to top |
|
|
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Thu Jan 09, 2003 11:25 pm Post subject: |
|
|
thanks all very much for your support it's great to have gotten so many responses!
to those who've asked "why C", it's simple. well, no it's not, but yeah. i chose C because i heard gnome was written in C. i also heard that the linux kernel was written in C. i've been told by several sources that C is faster at some things than C++. i've been told the exact opposite too. i bought a 40 dollar C++ bible from IDG books and they said this:
Standard C++ Bible by IDG Books Worldwide wrote: |
According to conventional wisdowm, you should learn C first and the learn C++. That advice turns out not so wise after all. It is better to avoid learning the "C Style" of programming lest you start out with a few unnecessary and unhealthy biases. If you do not already know C, you should wade right into C++ according to more current, conventional wisdom [...] Of course C programmers who want to learn C++ can use this book, too. |
i was convinced that i should learn C++ first, but so many friends said C is the way to go. it's faster at some things blah blah blah. here's what the book said:
Standard C++ Bible by IDG Books Worldwide wrote: | C is more suitable than C++ for solving some programming problems. Many staunch C++ advocates might not agree with this opinion, but it is widely held by others. C++ software development environments are typically big (I'm assuming this is referring to stuff like Visual C++ Studio). They use lots of disk space and requires large, fast computers.
C, which is a traditional procedural programming language, is sometimes a better choice for writing low-level device drviers and embedded applications. |
device drivers is something i've wanted to do but never knew where to start. often times some ass in some irc #linux channel will tell me "if you don't like it, write your own driver". i recall him telling me then when i asked why my mouse wheel didn't work in suse 6.2 (this was my very first linux experience).
not too interested much in embedded stuff really. as rac stated, i should find something that sounds fun, and go with it. originally, i wanted to make my own email client. but recently, i'm wanting to port www.acmworld.com/storecreator/ to linux. i realize that i should probably learn C++ for such a task, but the books i have hold my hand with C. they also tell me what i need to know to be able to code gui apps with tcl/tk, and even gtk. there's a whole chapter on gnome apps
if C works for the gnome developers and for linus himself, then it works for me. i will eventually go with C++ and java for web apps, but for now, i'm satisfied with my decision.
/********************** EDIT **********************/
i don't intend to program windows software as the last poster mentioned. i've recently discovered that i have a strong passion for linux and i want to do my part to make sure that linux looks real sexy to the average schmo who's going to faced with palladium and the tcpa sometime during the next 3 or 4 years. however, contradicting myself is a favourite past-time and the storecreator app will probably be compiled for win32 operating systems. but that's more of an executive decision....
i know it's very geeky but 5 years down the road, i want someone to open a copy of [commercial linux distro] and install it. i want one of the commonly used apps that they won't be able to live without to have my name in the man page. when they read the help files, it will be something that *i* wrote. i think that when that day comes, i can die a happy man
thanks everyone for your suggestions!
ryan _________________ I used gentoo BEFORE it was cool. |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Thu Jan 09, 2003 11:47 pm Post subject: |
|
|
I allmost went mad when deciding to learn C or C++ so many people saying different things.. I finaly made up my mind to learn C++ and so i started, but now I have just started work on a project called HL-Q thats very similar to HLSW for windows as I thought xqf sucked. But anyway.. i'm writing it with GTK+ which ofcourse is C.. so bleh! just pick them out of the hat, that what i say! |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Fri Jan 10, 2003 12:09 am Post subject: |
|
|
The difference between C and C++ is not the language so much (C++ is largely a superset of C, and you can write C-style programs in C++), as it is the programming paradigm: procedural vs. object-oriented.
Object-oriented programming is a completely different way of thinking. Very useful for certain types of tasks, but it's not a magic bullet.
Nobody should learn C++ as a first language. The only people who should use C++ are some C programmers that want more object-oriented support within the language. That's it. If you want to learn object-oriented programming from scratch, try to find a Smalltalk system (if they still exist) or learn Java.
One of C++'s design decisions was to maintain as high a degree of C compatibility as possible. This has led to all sorts of bizarre baggage that barely makes sense for people who know C, and for those without a C background it will seem completely through the looking-glass. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
aja l33t
Joined: 26 Aug 2002 Posts: 705 Location: Edmonton, Canada
|
Posted: Fri Jan 10, 2003 12:20 am Post subject: |
|
|
I teach programming (among other things) for a living. One of my opening lines when a new course begins is that you can't learn programming by listening to me talk about programming or by reading a book about programming. You learn programming by programming. Lectures and texts are a supplement to that (primary) task.
That being said, taking a course (or, better, getting a job) that requires you to program is an excellent spur to getting you down and actually coding. Self-teaching requires quite a bit of self-discipline, and is usually only successful if you have an actual project in mind. I.e - Not "I'm going to learn C++", but "I'll need to learn C++ in order to finish this".
And, raq, I disagree. C++ is a pain to learn, but it teaches you the low-level stuff at the same time as enforcing some basic OOP practices. Going from C++ to just about any language is much easier than just learning the language. Learning Java is a weekend project, etc... Course, YMMV - |
|
Back to top |
|
|
kraylus l33t
Joined: 07 Jun 2002 Posts: 648 Location: ft.worth.tx
|
Posted: Fri Jan 10, 2003 1:03 am Post subject: |
|
|
i was contemplating using the c++ bible for a bit and seeing how that goes, but here's an example of the first c++ program they have me write down:
Code: |
#include <iostream>
int main()
{
// write to the screen
std::cout << "My first C++ program";
return 0;
}
|
that app works flawlessly in the authors included IDE (Quincy 99) which uses GCC. on my linux system, it doesn't compile at all. it claims an undefined reference to std. im assuming that either iostream.h doesn't exist on this system, or possible has a different way of thiking, i dunno.
reguardless, i think ill stick with the C stuff. lotta money was spent on this damn c++ bible but i cant use it lest i want to develop windows apps
i can't afford all these books that everybody mentions and i've been hard pressed to find an online resources that teaches me more than "hello world". so i'll stick with what i got and maybe later when im out of debt, i can spend a few hundred on s'more books
ryan _________________ I used gentoo BEFORE it was cool. |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Fri Jan 10, 2003 1:15 am Post subject: |
|
|
Code: | #include <iostream.h>
int main(void)
{
std::cout << "My first C++ program\n";
return 0;
} |
Code: | Interimo root # g++ -Wno-deprecated -o kraylus kraylus.cc
Interimo root # ./kraylus
My first C++ program
Interimo root # |
works fine for me, Where you using gcc instead of g++? |
|
Back to top |
|
|
aja l33t
Joined: 26 Aug 2002 Posts: 705 Location: Edmonton, Canada
|
Posted: Fri Jan 10, 2003 1:17 am Post subject: |
|
|
Kraylus,
That code looks ok (well, compilable, I've got some notes...) to me. In your version, did you:
Code: |
#include <iostream>
|
or did you accidentally
Code: |
#include <iostream.h>
|
iostream != iostream.h . The latter does not support the std namespace. If you are getting the error that you report for the <iostream> library, I would think that your C++ standard libraries are out of date.
That being said, I'd dump the book anyway - IMHO, there's a bunch of other things wrong with the example, from a style point of view. I'd have rendered it:
Code: |
#include <iostream>
using namespace std; //Saves all those 'std::' everywhere
int main(int argc,char** argv) //int main() is not a valid sig
{
//write to the screen
cout << "My first C++ program" << endl; //should terminate cout ops
return 0;
}
|
|
|
Back to top |
|
|
cvk Guru
Joined: 06 Jan 2003 Posts: 314 Location: Our house, in the middle of our street
|
Posted: Fri Jan 10, 2003 1:31 am Post subject: |
|
|
kraylus wrote: |
Code: |
#include <iostream>
int main()
{
// write to the screen
std::cout << "My first C++ program";
return 0;
}
|
|
Did you g++ helloworld.cpp -o hello?
cvk |
|
Back to top |
|
|
cvk Guru
Joined: 06 Jan 2003 Posts: 314 Location: Our house, in the middle of our street
|
Posted: Fri Jan 10, 2003 1:32 am Post subject: |
|
|
aja wrote: | Kraylus,
That being said, I'd dump the book anyway - IMHO, there's a bunch of other things wrong with the example, from a style point of view. I'd have rendered it:
|
Damn, you were faster than me
cvk |
|
Back to top |
|
|
BigRedDot n00b
Joined: 29 Oct 2002 Posts: 67 Location: Austin
|
Posted: Fri Jan 10, 2003 2:10 am Post subject: |
|
|
Code: | //int main() is not a valid sig |
No. "void main()" is not a valid signature (in hosted implementations, just about anything can go in a freestanding implementation), "int main()" is perfectly valid.
Also, from a pedagological point of view
Code: | using namespace std; //Saves all those 'std::' everywhere |
is easy to skim over and completely hides how namespaces are at work. Perhaps the intent was to take advantage of a simple setting to explicitly illustrate how namespaces affect scope. _________________ Even if you are one-in-a-million, there are still 6000 people just like you. |
|
Back to top |
|
|
Zadeh Tux's lil' helper
Joined: 31 Oct 2002 Posts: 131
|
Posted: Fri Jan 10, 2003 2:32 am Post subject: |
|
|
rac wrote: | The difference between C and C++ is not the language so much (C++ is largely a superset of C, and you can write C-style programs in C++), as it is the programming paradigm: procedural vs. object-oriented.
Object-oriented programming is a completely different way of thinking. Very useful for certain types of tasks, but it's not a magic bullet.
Nobody should learn C++ as a first language. The only people who should use C++ are some C programmers that want more object-oriented support within the language. That's it. If you want to learn object-oriented programming from scratch, try to find a Smalltalk system (if they still exist) or learn Java.
|
And that is just one such of many excellent examples of the entrenched bias against C++ from (I would guess) a C programmer which (as a previous poster mentioned) drives people mad.
There is no requirement in C++ that it be used in an "object-oriented" way. In fact, I make much less use of it as a model and of late most of the attention in the language over the last several years has been paid to functional-like semantics with templates. The same can be said recently of Java and C#, who refer to them more generally as "generics."
Quote: |
One of C++'s design decisions was to maintain as high a degree of C compatibility as possible. This has led to all sorts of bizarre baggage that barely makes sense for people who know C, and for those without a C background it will seem completely through the looking-glass.
|
Having taught C++ last semester to students first-hand I find that statement a gross and disengenuous exaggeration. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|