Results 1 to 15 of 15
Thread: Learning C...
- 09-29-2010, 08:37 PM #1
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
Learning C...
Ok so you're probably thinking what C has to do with a Java forum... but my question does relate to Java so I hope I wont get in trouble.
I'm currently a Java newbie and I'm thinking of learning C. It would seem that many people advise against learning C/C++ as a first language... will basic knowledge of Java be enough to make learning C a little easier?
Looking forward to your input,
LJ
- 09-29-2010, 10:21 PM #2
Java might keep you on the OOP path. With C it is very easy to wander off.
- 09-29-2010, 11:36 PM #3
One of the biggest problems I have when I do a week of Java them jump right into C++ is that I'll do two things wrong:
1) Start writing procedurally instead of strict OOP (what Norm said).
2) Forget to memory manage. You can spam new in Java and not have an issue; in C++ it's quite a different story.
As a rule of thumb, don't start another cookie until you're finished this one--if you truly feel that Java is holding you back or that C/C++ has something new to offer, then go for it. If you just want to try it for fun... I might stick with Java until it's mastered a little better first.
That being said, it is your decision--whichever you feel is more advantageous to you as a learner will be the path you stick to better.
Much luck!
PS: Personally I started with Flash Actionscript then went to C++ and found it quite easy due to similar syntax. But not everyone agrees. Some people want to start with something like Python (which is remotely different) or Java, just for simplicity's sake.
- 09-30-2010, 10:18 AM #4
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
Thanks for your input guys.
To be honest the main reason why I'm considering learning C is because of an article I read here -- see "The Pitfalls of Java as a First Programming Language". Also from what I have read (perhaps someone can confirm this) is that those who know lower level languages like C, find it easier to learn higher level languages like Java and such. So my thinking is that if I were to learn C --although it may be more difficult than Java-- I'd have a deeper understanding and therefore when I want to learn other languages I'd be able to pick up on them quicker. I feel as if the statement in the article applies to me:
I'd like to be a serious programmer, so at some point I suppose I will have to learn C anyway -- right?Java, instead of exposing this beauty, encourages the programmer to approach problem-solving like a plumber in a hardware store: by rummaging through a multitude of drawers (i.e. packages) we will end up finding some gadget (i.e. class) that does roughly what we want. How it does it is not interesting! The result is a student who knows how to put a simple program together, but does not know how to program.
Zack, when you said:
What do you mean by that? I've never had an idea in my head as to when I can say I have "finished" learning Java. I mean, if someone were to ask if I can program in Java I'd say no because I don't feel as if I can. How do I measure what level I am at?As a rule of thumb, don't start another cookie until you're finished this one.
- 09-30-2010, 10:43 AM #5
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 7
That quote is just not true. About the only difference between the languages in that aspect is that you do not have to do memory management in Java. If you do a bit a searching you will find literally millions of libraries for C that allow you to easily accomplish just about anything you might want to do in much the same way that the Java classes do. Just in Java they are included from the start, whereas in c you have get the library, first. Whoever said that is definately biased if not right out bigoted.
- 09-30-2010, 01:12 PM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Just look at what you get with C++ (which is a better match to Java than C)...
That's as much as you get in Java, ignoring GUI and database related stuff (which you'd be a fool to try and write yourself). Hell, most of it was cribbed for the earliest version of Java.
- 09-30-2010, 03:34 PM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
I have programmed in C starting in the mid seventies in the last century; it was far before ANSI/ISO C saw the light and far before Bjarne Stroustrup invented his first version of C++. Knowing C, gradually learning C++ was (sort of) easy. In those days I also programmed in languages using a completely different paradigm: Lisp, Hope, a bit of Haskell; finally learning Java was a breeze for me; of course I had to get used to its idiosyncracies and cleverness (not really present in C++ which suffers from its C inheritance ;-) but I don't know if I'd recommend learning C; it's so close to the bare metal and so far from object oriented programming; it can be used in an object *based* way and it has all the building blocks to create an object oriented language, but that's it. All in all I find C a wonderful language but so is Lisp and Java; C++ is a behemoth that offers you all the arms to shoot yourself in the foot or in your back; I don't recommend C++.
kind regards,
Jos
- 09-30-2010, 03:46 PM #8
I started with Fortran and moved to assembler. After retiring I wanted to learn OOP so decided to learn Java and have been playing with it ever since. Really enjoy it.
I've tried C++ several times and keep getting frustrated trying to use the help to get API doc for classes. The doc I've found has been so fragmented, with links that go in loops that after java's API doc, I've give up.
A current project: EasyBridge written in C++ has been a trial. There are so many ways to screw it up, I can't count. The operator override stuff is cute and saves one or two lines of code but when working with pointers I never know if the code is comparing the pointers or what the pointers point to. And the legacy C stuff is a mess. Conditions: 0 vs not 0 for true and false. All the macro stuff can leave a program unreadable. I used lots or macros in assembler and am very used to them. etc etc I'm getting tired now and must go take my nap.
- 09-30-2010, 05:34 PM #9
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
Thank you for all of your input.
Has anyone read "The C Programming Language" byBrian W. Kernighan and Dennis Ritchie? Would this be suitable for someone who knows the basics?
- 09-30-2010, 05:43 PM #10
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 09-30-2010, 05:46 PM #11
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
If I read and understand it from cover to cover, how good of a C programmer would I be? (Hope that isn't a stupid question).
- 09-30-2010, 05:47 PM #12
- 09-30-2010, 06:15 PM #13
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,405
- Blog Entries
- 7
- Rep Power
- 17
- 09-30-2010, 08:04 PM #14
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
Thank you JosAH. I am going to buy the book and have a go at it :)
- 09-30-2010, 09:54 PM #15
Senior Member
- Join Date
- May 2010
- Location
- London
- Posts
- 106
- Rep Power
- 0
Anyone read "Absolute Beginner's Guide to C" by Greg Perry? I think perhaps I'll purchase that along with "The C Programming Language" and go through that book first. It does seem to have some good reviews, and people have in fact specifically recommended reading it first. What do you lovely people think? :D
Similar Threads
-
Learning Java...
By Learning Java in forum New To JavaReplies: 2Last Post: 09-24-2010, 09:03 PM -
Pre-requisites for learning JSP
By xtiano77 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 03-23-2010, 06:03 PM -
e-learning
By Vipan Konnect in forum Advanced JavaReplies: 3Last Post: 11-21-2009, 04:29 PM -
Self-directed learning
By Mr.Beans in forum Forum LobbyReplies: 3Last Post: 05-05-2009, 10:40 PM -
Learning Java
By Derkins in forum New To JavaReplies: 3Last Post: 04-09-2009, 02:46 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks