I want to learn some programming...

Elderly Newt

Senior member
May 23, 2005
430
0
0
I've done some very very basic programming with HTML, and I've also done some programming on the TI-83 and TI-86 calculators, both of which use the same language (I believe it's BASIC?). I want to do more, and I want to get into Java.

First, is Java a good place to start?

Second, are there any books you'd recommend for a beginner like me? I was thinking of buying one of the following:

Beginning Programming with Java for Dummies
Java Programming for the Absolute Beginner

Would you recommend those? Or is there another book you'd recommend?

Thanks.
 

Spydermag68

Platinum Member
Apr 5, 2002
2,616
99
91
I like the Deitel and Deitel books. They are very easy to follow and understand with lost of examples and a CD with all of the programs. I just type them in myself for the pratice. At $80 buck each they are not cheep but there is a lot of information in the book and it is over 1000 pages.
 

ncage

Golden Member
Jan 14, 2001
1,608
0
71
Eld: go with Spydermag68 recommendation. Do you really want to learn programming or not? Sure you can get a lot of cheap books like Learn Java in 21 days but they suck and your not going to learn much. Deital & Deital are one of the best books to learn programming from. That was actually my very first programming book. If you worried about cost go to either ebay/half/amazon used books. You won't have to pay that much. Java would be a pretty good langauge to learn on but id even recommend C++ over that. Principles like pointers, operator overloading, ect....are essential to really learning to program i think. The question to is do you want to just learn programming to do little scripting things on web pages like applets/servlets ect or do you really want to learn programming to make a career out of it? If you want to make a career out of it definitly go with a deital/detial book. I speak from experience. I am a professional programmer in the industry for 8 years. I use primarily .Net now. I do not recommend .Net as a starting language though because of the massive structure of the .Net CLR. That would complicate things greatly and you don't really need all that to learn programming. Just get a box set up with linux/gnu c++ and you will be set to go. If you don't want to set up linux gnu has a free windows based c++ compiler but i don't remember the name.

Also remember: OOP (Object oriented programming) is cool but i wouldn't start with that. You want to learn structured programming first. If you get one of the deital/deital books they will start you out with strucutre programming.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
My recommendation is this:

1. Start with the Java tutorial from Sun. It will familiarize you with the Java language and some broader programming concepts.
2. Pick up a copy of Learning Java.

ncage makes some good points about the merits of Java as a starting language. Java is easy learn, but because it is a managed language, a lot of the "dirty work" (memory management, for instance) is done for you. As a first language, Java can be very forgiving about some bad programming habits. C++ is much less forgiving, but has a much steeper learning curve.

I think starting out with Java is fine. Follow the tutorials and the books and you'll be ok. So much of programming is object oriented these days that I see no reason why you can't begin with an OO language.
 

fs5

Lifer
Jun 10, 2000
11,774
1
0
Originally posted by: CraigOley
C++ is a better language to start out on.
not really. If you haven't done ANY programming at all C++ has a very hard learning curve. Java pushes OOP in your face which is sometime difficult to master for beginners. Honestly, I would start learning in some type of scripting langugage.

Python or PHP would be better options for absolute beginners. Of course you can't do all the cool graphical things like java easily.
 

ncage

Golden Member
Jan 14, 2001
1,608
0
71
Originally posted by: fs5
Originally posted by: CraigOley
C++ is a better language to start out on.
not really. If you haven't done ANY programming at all C++ has a very hard learning curve. Java pushes OOP in your face which is sometime difficult to master for beginners. Honestly, I would start learning in some type of scripting langugage.

Python or PHP would be better options for absolute beginners. Of course you can't do all the cool graphical things like java easily.


Sorry bud im going to have to totally disagree respectfully with you on this. Easier doesn't mean better. Some scripting langauges make horrible start langauges because they teach bad programming techniques. What would be a good example? How about undeclared variables? How about unitialized variables? C++ intial is not that hard when your doing basic stuff like learning what is a variable, what conditional statements (case, if, ect), what are loops (do, while, ect..). Sure it gets a lot harder when you get into more advanced lessions like pointers, operator overloading, dynamic memory allocation/deallocation, linked list but a good book out to gradually introduce a programmer into these principles where it won't be too taxing. Later on in your programming career when you go to stuff like .Net its still important to understand these principles. Yes even with microsofts garbage collector. You really must understand how the garbage collector works and to understand it you have to have the princples behind you. Yes you can work without understanding it but you won't be able to do some of the higher level stuff effectively and your components my be holding on to resources or be more resource intensive then they need to.
 

xtknight

Elite Member
Oct 15, 2004
12,974
0
71
How about start off with C, then learn C++. You will have good 'programming techniques' all along.
 

Injury

Lifer
Jul 19, 2004
13,066
2
81
Originally posted by: xtknight
How about start off with C, then learn C++. You will have good 'programming techniques' all along.

Because in my experience, C is clunky and not as user friendly as C++.
 

fs5

Lifer
Jun 10, 2000
11,774
1
0
Originally posted by: ncage
Sorry bud im going to have to totally disagree respectfully with you on this. Easier doesn't mean better. Some scripting langauges make horrible start langauges because they teach bad programming techniques. What would be a good example? How about undeclared variables? How about unitialized variables? C++ intial is not that hard when your doing basic stuff like learning what is a variable, what conditional statements (case, if, ect), what are loops (do, while, ect..). Sure it gets a lot harder when you get into more advanced lessions like pointers, operator overloading, dynamic memory allocation/deallocation, linked list but a good book out to gradually introduce a programmer into these principles where it won't be too taxing. Later on in your programming career when you go to stuff like .Net its still important to understand these principles. Yes even with microsofts garbage collector. You really must understand how the garbage collector works and to understand it you have to have the princples behind you. Yes you can work without understanding it but you won't be able to do some of the higher level stuff effectively and your components my be holding on to resources or be more resource intensive then they need to.
Like I said, it's a steep learning curve. You can't get much done with C++ if you don't know what you're doing. Which is why it puts MANY people off to programming.

Programming should not be about debugging some code for 3 hours and finding out you had a missing * or small syntax error. With scripting languages it gets you to the core of what's important. How to write a good algorithm or whats the best design pattern for a particular problem.

If you were trying to teach someone how to draw you wouldn't give them an etching stone and a cave wall. You'd give them a pen and paper.
 

Nocturnal

Lifer
Jan 8, 2002
18,927
0
76
I can attest to the Deitel books. They are some of the best books available. I am looking to pick up the C++, Java, C# and then the new Visual Basic 2005 . net when it comes out in March.
 

Elderly Newt

Senior member
May 23, 2005
430
0
0
Thanks for all the input guys. I'm not looking to make a career out of programming at all; it's simply a hobby, or, at this point, a potential hobby I suppose. I think I'll start out with that Java tutorial and see what I can glean from that. The Deitel&Deitel books sound like a great learning tool, but I'm not prepared to spend that much yet. Perhaps I'll look into a scripting language like fs5 suggested, even though I'm not entirely sure what a scripting language is. I'm guessing it's in a simlilar format to the language on the TI-xx calculators (BASIC?)? I'd be fairly comfortable working with a language like that.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Elderly Newt
Thanks for all the input guys. I'm not looking to make a career out of programming at all; it's simply a hobby, or, at this point, a potential hobby I suppose. I think I'll start out with that Java tutorial and see what I can glean from that. The Deitel&Deitel books sound like a great learning tool, but I'm not prepared to spend that much yet. Perhaps I'll look into a scripting language like fs5 suggested, even though I'm not entirely sure what a scripting language is. I'm guessing it's in a simlilar format to the language on the TI-xx calculators (BASIC?)? I'd be fairly comfortable working with a language like that.
The only theoretical difference between a scripting language and something like java or c(++) is that you don't have to compile scripting languages. You just feed them right to the interpreter and they run. In practice they tend to be geared towards making it easy to write powerful code fast at the potential expense of being really formal.

In my opinion, learning a language that does lots of stuff for you isn't a bad thing. If you're learning on your own, the most important thing is to see results so that you can keep yourself interested and motivated. My experience has been that you change so much over the first couple of years of programming that bad habits picked up in the beginning are easy enough to abandon, as long as you understand what they are and why they are bad. Just my opinion though, I'm sure there's lots of different ways to do it (and I don't even know c++ myself).

I started with c, followed shortly by java. In hindsight, I think it was a good combo as c gives you a decent view of some lower level stuff (although I certainly didn't appreciate it while I was first learning) and java is so mainstream as far as current OO styles. Probably not much of a relevant hobby language though.

I'm fine with not knowing c++ and don't anticipate ever needing it but that's just me. I wish school had forced a little more of something like python or perl into me, but I can do that in my spare time too.