• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New to Programming; Figured I'd start with Java

 
Greenhorn
Posts: 11
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I am anxious to dive into programming, having never programmed before.

I've always loved video games and everything about them. I've always wanted to design them, but felt it impossible.

Well, that line of thinking is done! Time to jump into programming, the only problem is... I have no idea where to begin. I have been anxiously searching the internet for Java tutorials but most seem to assume some experience with programming.

I've done the copy/paste of HelloWorld but I hated the oracle tutorial with it. It made assumptions that I knew what I was doing, and didn't really explain what was going on. I've looked for books online but am bogged down by how many suggestions there are.

I am looking for any resource regarding Java programming for someone with NO programming experience whatsoever. I'm using a Mac with Lion 10.7, if that makes any difference in your recommendations. I have already downloaded NetBeans (to write code???) and on my Terminal that came with my Mac, I seem to have a java compiler because in the terminal I typed 'javac' and a bunch of stuff came up - meaning I have a java compiler? Do I need anything else here?

Thanks in advance!

EDIT: I think I'll start with Java for Dummies. This seems to be the goto resource for people with absolutely no programming experience. Thoughts?

EDIT 2: Some have recommended that I start with C. Any thoughts here?
 
Bartender
Posts: 563
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should check out the Java Beginner's FAQ.

Many here recommend the Head First Java book, and I've read many glowing comments about it and some others (few) not as strong, but that's to be expected. Learning styles and what works for each person vary widely.

Some will suggest (strongly) to not use NetBeans or other high-performing IDEs (programmer's editors) to begin your learning adventure. Learning the language and the IDE at the same time can become a discouraging experience for some, and the IDE will hide some important fundamental details. Frankly, if you're fairly computer literate, learning the IDE isn't that big of a challenge, and you can learn the fundamental details later.

I would not discourage you starting with Java, but some might. Many an article brags about how great Python is as a beginner's first language. I can't go back and do the first language thing over again, so I can't give a useful opinion, but it's something you might stay open to awhile longer.

Whatever you decide, best of luck, and come back when you have questions.
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Greg Brannon wrote:You should check out the Java Beginner's FAQ.

Many here recommend the Head First Java book, and I've read many glowing comments about it and some others (few) not as strong, but that's to be expected. Learning styles and what works for each person vary widely.

Some will suggest (strongly) to not use NetBeans or other high-performing IDEs (programmer's editors) to begin your learning adventure. Learning the language and the IDE at the same time can become a discouraging experience for some, and the IDE will hide some important fundamental details. Frankly, if you're fairly computer literate, learning the IDE isn't that big of a challenge, and you can learn the fundamental details later.

I would not discourage you starting with Java, but some might. Many an article brags about how great Python is as a beginner's first language. I can't go back and do the first language thing over again, so I can't give a useful opinion, but it's something you might stay open to awhile longer.

Whatever you decide, best of luck, and come back when you have questions.



Greg, thanks for your response and good wishes. I've also read some things about Python. I've read it is the easiest to begin with, but I don't see its practicality. Maybe I should look into a bit more, because maybe it would familiarize myself with basic programming language?

I planned to learn Java, C#, C++ and other stuff that is good to know. These seem like the big 3 so far.

Head First Java seems like a good book, it has received some good reviews on here and Amazon. Maybe I'll start there instead of Java for Dummies.

I am computer literate. I've modded games before, obviously I didn't create the mod but I've manipulated files, which I think qualifies me as computer literate. When you said IDE will hide some important fundamental details, were you referring the some of the auto-fill in code? I noticed that when I tried copying some code, it had some auto-filler come up - I wasn't thrilled with this, I don't want help yet. I want to know everything that I'm doing.

Can you distinguish the difference between learning the language and learning an IDE? My perception of that statement is: learning what the lines of code actually mean, i.e.

println.blahblah.("Hello World") "

^ Is that what you mean by actually learning the language? If so, that's where I've wanted to start. The IDE is where I actually write the code after learning the language.

Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...

 
Ranch Hand
Posts: 95
Python C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got a book--- Java For Artists: The art, science and philosophy of object-oriented programming with Java - by Rick Miller and Raffi Kasperian
It does not force you to write only the code and learn the syntax and just go ahead.
It explains you what happens behind the scenes in the CPU so you "know about what you are talking".
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Since Java is an object‑oriented language, I think you want a book which teaches what object are, as Head First does. Agree with Greg, and I am one of those people who dislike IDEs for beginners. More suggestions here.
 
Greg Brannon
Bartender
Posts: 563
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

When you said IDE will hide some important fundamental details, were you referring the some of the auto-fill in code? I noticed that when I tried copying some code, it had some auto-filler come up - I wasn't thrilled with this, I don't want help yet. I want to know everything that I'm doing.

Can you distinguish the difference between learning the language and learning an IDE? My perception of that statement is: learning what the lines of code actually mean, i.e.

println.blahblah.("Hello World") "

^ Is that what you mean by actually learning the language? If so, that's where I've wanted to start. The IDE is where I actually write the code after learning the language.

Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...


Good response. I'll address your later questions and comments repeated above:

Fundamental details: Getting the development environment setup can be a real challenge for some. Challenges include: getting the JDK installed, setting the CLASSPATH or other helpful/necessary environment variables, compiling and running code from the command line, understanding use of the java/javac commands, managing source and compiled file locations and folders, resolving dependencies, etc. An IDE will often hide these details - sometimes complicate them - so that a program may compile and run fine in the IDE but will not from the OS command line. Some learning points are demonstrated from the command line. Can one start with an IDE, completely ignorant of these challenges, and learn them later? Sure. Any worse for the experience? I don't think so but others may.

Auto fill-in, code completion, syntax checking, source code templates, auto import management, source code formatting, etc. are all standard IDE features, that should be configurable, that may cause someone new to programming to miss learning fundamental skills and processes that will be revealed later in unpleasant ways. The scenario goes something like: learned to program using an IDE with all of those fancy features, goes on a job interview and is handed Notepad++ and is asked to write, compile, and run a relatively simple program and doesn't have the slightest idea where to start. Okay, that may be an extreme example, but not impossible. At some point, take the time to learn how to do all of that stuff correctly most of the time without the IDE crutch.

Learning the language versus learning the IDE: You already know how to use a basic text editor, create a new file or load an existing one, edit it, save it, etc. You can use that basic text editing knowledge you already have to start learning Java (or any language with .txt-based source code) right now, and you'll be learning the programming language, not how to use the editor. Replace the basic text editor with a piece of software called an IDE, and you'll not only be learning Java, but you'll be learning the IDE, and when something's not working the way you expect it to, you won't be sure if it's the program or the IDE that's causing the malfunction. Plus there's there's the "just getting started" part of creating the source code, compiling it, running it, seeing the results, etc. in an IDE that you will have to learn. Is it a big deal to start out learning both at the same time? For some, perhaps. For others, probably not. I disagree somewhat with your comment, "The IDE is where I actually write the code after learning the language." You will always be learning something about whatever language you choose to start with, even while using an IDE. You shouldn't think of the process as using one tool to learn the language, the learning's all done, and then you'll swith to another tool to actually "use" the language. You'll always be learning, no matter which editing tool you're using. Some will assert that you'll learn the programming fundamentals faster without an IDE in the way, but I don't know if there's scientific evidence to support that. Most beginning programming college courses that I've been able to survey on the web start with an IDE, though some instructors require the use of a "crippled" IDE for tests. Again, a non-scientific survey, just my observation.

That you feel somewhat overwhelmed is probably a good thing. It indicates that you recognize the challenges ahead. It's facing those challenges head-on, well armed with the right resources and tools, and an open mind to learn from the experiences gained by both succeeding and failing that will build your skills and confidence to continue on to and through the next challenge and to the next . . . And if you're motivated to learn, 25 is not too late to start.

Wish you the best and come back anytime and often for help.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

daniel keshishian wrote:Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...





I had to laugh at this. Even though I first started dabbling in programming at about your age, I didn't go back to school and take it up as a career until I was 49. You have lots of time.

I started with Java for Dummies and found it to be a good starting point. My past experience was all procedural programming, so I had a terrible time getting the OOP concepts down. The Dummies books helped a lot. I would say that you actually have an advantage in that you don't have that procedural baggage to drag you in the wrong direction.

I also agree with avoiding IDE's for now. Get an editor like Notepad++ and learn to compile and run programs from the command line. Only after you understand concepts like classpath should you start using an IDE. I recommend Netbeans for beginners. Eclipse is more powerful and flexible, but it can be overwhelming for beginners.

I haven't learned Python (yet) so I can't speak to that issue.

Good Luck and welcome!
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

daniel keshishian wrote:. . . hoping that at 25 it's not too late to start...

A mere child
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

daniel keshishian wrote:. . . hoping that at 25 it's not too late to start...

A mere child



I have diskettes that are older than that...
 
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

daniel keshishian wrote:

Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...



25? Yes, you're wasting your time. I learned to program when I was 12 and I did it with a handful of 7400 chips, some LEDs, and a breadboard. No one can expect to make it as a programmer if they do it later in life, or without a wire-wrap tool in their pocket at all times.

Of course, I didn't start learning Java until I was into my 40's and, man!, was that nostalgic! Compile-time errors I hadn't see since my teens started popping up all over my screen. Made me feel like a kid again, that did.

Seriously, welcome to the asylum. Java is a good language and there are a lot of good books for beginners. I used Rogers Cadenhead's "Sams Teach Yourself Programming with Java in 24 Hours." You might like that one. He has a very friendly, yet respectful, writing style.

I will also offer my agreement with those who say it is best to start without using an IDE. I use NetBeans, and I like it a lot. Once you master the basics, it (or another IDE of your choice) will simplify a lot of things for you. But, as with many sophisticated tools, it would probably only add needless confusion when you are just starting out.

Good luck!
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stevens Miller wrote: . . . 25? Yes, you're wasting your time. . . .

Unless I have drifted over to the Meaningless Drivel forum, or through a timewarp to 1st April, that’s nonsense!

I used Rogers Cadenhead's "Sams Teach Yourself Programming with Java in 24 Hours." You might like that one. . . .

There should be a review of it here. Mohammed didn’t like it.

I will also offer my agreement with those who say it is best to start without using an IDE. . . . Good luck!

agree
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:

Stevens Miller wrote: . . . 25? Yes, you're wasting your time. . . .

Unless I have drifted over to the Meaningless Drivel forum, or through a timewarp to 1st April, that’s nonsense!


I gotta put that smiley-face macro into one of my smart keys...

I used Rogers Cadenhead's "Sams Teach Yourself Programming with Java in 24 Hours." You might like that one. . . .

There should be a review of it here. Mohammed didn’t like it.


Wow, that book has changed! That online review is of the Sixth Edition. I used the Fourth Edition, which only mentions NetBeans in an appendix, and absolutely does not encourage, much less require, its use. Scanning the parts available online at Amazon, it seems that Rogers still teaches on the assumption that one is just using a text editor (indeed, where the Fourth Edition referred to the process of entering programs into a "word processor," that phrase has been replaced with "text editor" in the Sixth Edition), but he does include a lot of glowing remarks about it in the first chapter, none of which were in the Fourth Edition.

I disagree with the reviewer that including Android stuff is a plus. Sure, that's pretty gee-whiz-cool, but for a beginner?

Anyway, the Fourth Edition worked for me, the Sixth might be different, and, as ever, YMMV.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stevens Miller wrote: . . . I gotta put that smiley-face macro into one of my smart keys.... . . .

It’s not difficult, since the usual smiley is only :)
But on the net, people can’t see you wink, and there is a serious risk they will actually believe you if you say that sort of thing.
 
Naishadh Parmar
Ranch Hand
Posts: 95
Python C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...


You may not believe but I am just 13 and I know programming Java, a little bit of C(basic stuff) and programming android phones.
So, you take the judgement
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jk Robbins wrote:

daniel keshishian wrote:Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...





I had to laugh at this. Even though I first started dabbling in programming at about your age, I didn't go back to school and take it up as a career until I was 49. You have lots of time.


You have even more time than Jk Robbins might lead you to believe I wrote my first 'program' at the age of 32, on a machine that HP classified as a programmable calculator. It had plug-in ROMs -- you chose 4 out of the six available depending on what functions you needed (yes, in those days plug-ins had to be literally plugged in).

I started learning Java about 4 years ago. I'm now in the (18th) prime of life.
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Greg Brannon wrote:

When you said IDE will hide some important fundamental details, were you referring the some of the auto-fill in code? I noticed that when I tried copying some code, it had some auto-filler come up - I wasn't thrilled with this, I don't want help yet. I want to know everything that I'm doing.

Can you distinguish the difference between learning the language and learning an IDE? My perception of that statement is: learning what the lines of code actually mean, i.e.

println.blahblah.("Hello World") "

^ Is that what you mean by actually learning the language? If so, that's where I've wanted to start. The IDE is where I actually write the code after learning the language.

Gosh, I feel overwhelmed, and I'm hoping that at 25 it's not too late to start...


Good response. I'll address your later questions and comments repeated above:

Fundamental details: Getting the development environment setup can be a real challenge for some. Challenges include: getting the JDK installed, setting the CLASSPATH or other helpful/necessary environment variables, compiling and running code from the command line, understanding use of the java/javac commands, managing source and compiled file locations and folders, resolving dependencies, etc. An IDE will often hide these details - sometimes complicate them - so that a program may compile and run fine in the IDE but will not from the OS command line. Some learning points are demonstrated from the command line. Can one start with an IDE, completely ignorant of these challenges, and learn them later? Sure. Any worse for the experience? I don't think so but others may.

Auto fill-in, code completion, syntax checking, source code templates, auto import management, source code formatting, etc. are all standard IDE features, that should be configurable, that may cause someone new to programming to miss learning fundamental skills and processes that will be revealed later in unpleasant ways. The scenario goes something like: learned to program using an IDE with all of those fancy features, goes on a job interview and is handed Notepad++ and is asked to write, compile, and run a relatively simple program and doesn't have the slightest idea where to start. Okay, that may be an extreme example, but not impossible. At some point, take the time to learn how to do all of that stuff correctly most of the time without the IDE crutch.

Learning the language versus learning the IDE: You already know how to use a basic text editor, create a new file or load an existing one, edit it, save it, etc. You can use that basic text editing knowledge you already have to start learning Java (or any language with .txt-based source code) right now, and you'll be learning the programming language, not how to use the editor. Replace the basic text editor with a piece of software called an IDE, and you'll not only be learning Java, but you'll be learning the IDE, and when something's not working the way you expect it to, you won't be sure if it's the program or the IDE that's causing the malfunction. Plus there's there's the "just getting started" part of creating the source code, compiling it, running it, seeing the results, etc. in an IDE that you will have to learn. Is it a big deal to start out learning both at the same time? For some, perhaps. For others, probably not. I disagree somewhat with your comment, "The IDE is where I actually write the code after learning the language." You will always be learning something about whatever language you choose to start with, even while using an IDE. You shouldn't think of the process as using one tool to learn the language, the learning's all done, and then you'll swith to another tool to actually "use" the language. You'll always be learning, no matter which editing tool you're using. Some will assert that you'll learn the programming fundamentals faster without an IDE in the way, but I don't know if there's scientific evidence to support that. Most beginning programming college courses that I've been able to survey on the web start with an IDE, though some instructors require the use of a "crippled" IDE for tests. Again, a non-scientific survey, just my observation.

That you feel somewhat overwhelmed is probably a good thing. It indicates that you recognize the challenges ahead. It's facing those challenges head-on, well armed with the right resources and tools, and an open mind to learn from the experiences gained by both succeeding and failing that will build your skills and confidence to continue on to and through the next challenge and to the next . . . And if you're motivated to learn, 25 is not too late to start.

Wish you the best and come back anytime and often for help.



Greg, thanks so much for your detailed response.

Do you think I should start with Java? I chatted with a friend who's been programming for quite some time, and he recommended I start with C because of its transferrable nature. What are your opinions on this?

Aside from how much content there is, I was feeling party overwhelmed because I couldn't seem to find a good starting point. I would start some tutorial, then realize that the tutorial assumed I had some prior programming knowledge, then I'd abandon that source. I love challenges, and look forward to them, but I like to feel organized in my approach to something. I dislike jumping around - starting one thing, then moving to another before completing the previous thing.

As for the Notepad++ vs. an IDE, I think I'd feel more comfortable starting with Notepad++. I prefer the bare bones approach.

I have no lack of motivation. I am sort of between jobs right now with plenty of time on my hands to learn programming. I know it's not something I'll learn overnight (meaning, I understand I won't be looking for a job in programming next week), but when I become addicted to something, I learn quickly. I want to become addicted to programming. I want to be faced with challenges, overcome them, and see my results.

So today, I plan to go buy a book on either Java or C. What do you think, Greg?
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But on the net, people can't see you wink, and there is a serious risk they will actually believe you if you say that sort of thing.


Heh. Sonny, I know. I built the internet. Well, okay, I know some people who built the internet. I even met Gene Spafford, once.

Gotta push the envelope, now and then, just to see where it is.

Regarding programming for a pure noob, I'd seriously consider taking a course, maybe at a community college or something like that. Learning a new language is one thing, but learning to program in the first instance is quite another. I think Java is probably not the easiest language to learn for a first choice, but the others are probably not worth the time it would take to transfer your skills, and any of the "toy" languages designed to make learning programming easy just aren't going to be useful for anything past learning.

Thing is, in the age of the Web, a lot of problems I would have sought help on by asking a friend or colleague are now things I can get help on via Google. But, even that is an acquired skill. I well remember some late nights, back in the '70s, when a machine called the IBM 1130 steadfastly refused to compile my deck, I had no idea why, and how frustrating it was to be left with no one to ask and no place to go for an answer. You can learn to program out of a book, with no help from anyone, but I expect it would be easier, faster, and a heck of a lot more fun with some company.

That said, there are a lot of options for "Intro Java" classes in the world. I'd suggest a person (of any age) consider one of those, if they've never written a program before.
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to everyone who replied to this thread! It feels great knowing there are good people out there willing to help a newbie.

My question of the day is: should I start with Java or C? As I mentioned to Greg, I had a buddy who strongly recommended I start with C, because of its transferrable nature.

If I am going to start with Java, I'm going to purchase Head First Java. If I'm going to start with C, I have a few resources at the ready, but more would be welcomed. I'd like to hear your reasoning for recommending I learn one over the other. And, would you be so kind as to recommend the tools I'll need to get started. I may already understand what I need, but having it repeated is good practice.

 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stevens Miller wrote:

But on the net, people can't see you wink, and there is a serious risk they will actually believe you if you say that sort of thing.


Heh. Sonny, I know. I built the internet. Well, okay, I know some people who built the internet. I even met Gene Spafford, once.

Gotta push the envelope, now and then, just to see where it is.

Regarding programming for a pure noob, I'd seriously consider taking a course, maybe at a community college or something like that. Learning a new language is one thing, but learning to program in the first instance is quite another. I think Java is probably not the easiest language to learn for a first choice, but the others are probably not worth the time it would take to transfer your skills, and any of the "toy" languages designed to make learning programming easy just aren't going to be useful for anything past learning.

Thing is, in the age of the Web, a lot of problems I would have sought help on by asking a friend or colleague are now things I can get help on via Google. But, even that is an acquired skill. I well remember some late nights, back in the '70s, when a machine called the IBM 1130 steadfastly refused to compile my deck, I had no idea why, and how frustrating it was to be left with no one to ask and no place to go for an answer. You can learn to program out of a book, with no help from anyone, but I expect it would be easier, faster, and a heck of a lot more fun with some company.

That said, there are a lot of options for "Intro Java" classes in the world. I'd suggest a person (of any age) consider one of those, if they've never written a program before.



Steve, sound advice. Given that I'm short on money right now, I am going to see what I can handle on my own. I generally learn quickly and am able to teach myself stuff. I think I might just need to be a bit more patient with this, because everything is just going to be so new.

Right now, I'm just trying to decide between C or Java as a starting language.

 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Inch bes es! *

Java is a great language, and I've been using it almost exclusively for the past 15 years or so. However, I've dabbled with Python and I think it would really make a good language for learning, plus it has the pygame library, which supposedly makes creating video games very easy. It might be just what you're looking for.

* I'm part Armenian.
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The recommendation for taking a basic programming course at the local community college is a good one. Learning about looping, decision making, data structures, and collections is applicable to any language.

I'm not a C programmer, but I would NOT recommend C as a first language. I found it very difficult to learn the concepts of pointers and memory allocation. Java insulates you from that. C will allow you to do things like read or write past the end of an array, something Java won't allow. C just assumes you know what you are doing and gives you enough rope to hang yourself.
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Greg Charles wrote:Inch bes es! *

* I'm part Armenian.



I'm part also, as I'm American, which naturally means I'm a mutt.

Interestingly, Python seems to be the common recommendation for beginners. But, I'd prefer to learn Java or C first. Maybe I'm just stubborn.

Jk Robbins wrote: The recommendation for taking a basic programming course at the local community college is a good one. Learning about looping, decision making, data structures, and collections is applicable to any language.



I understand the intention, but I am going to give this a shot on my own first.
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the choice is between Java or C, I suggest Java. I love C and prefer it for a lot of things (anything involving a lot of unsigned integer data, for example, such as graphics work). But the comments here are accurate: C supplies you with a long list of ways to hurt yourself, often spectacularly and simultaneously inscrutably.

Also, this forum is a jewel for a beginner. A lot of forums "welcome" beginners by answering their questions with replies like, "Why would you even ask that? Your question says you don't know enough to be asking a question like that. There used to be an answer to your question on the Web, but I never knew where it was. Go find it yourself. You also posted your question in the wrong forum. People like you really piss me off. Hope that helps." This place is more cordial.

Heh. Never thought I'd be promoting Java over C, for anything. I've done some stuff in each of BASIC, Fortran IV, Pascal, APL, RPG II, Visual Basic, C/C++, Java, and a variety of assemblers. While a clever person once said that, "A dedicated programmer can write Fortran programs in any language," I do think Java encourages some good techniques, and allows for a lot of versatility, while still providing some useful safety nets.

Whichever one you choose, hang onto your seat: you're in for a ride.
 
Greg Brannon
Bartender
Posts: 563
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think your friend is overstating C's "transferable nature," whatever that means. It's a great language, the foundation for many that followed, but those that followed often began with the premise that they could improve on C. Some did, some didn't.

If you've narrowed the choice to begin with either C or Java, I would recommend Java over C. The basic programming tools and techniques you'll learn in Java will transfer to most any other language. To be clear, I'm not trying to talk you out of starting with Java. I'm very fond of it, think it's one of the best for learning programming basics while positioning to learn beyond the basics, and the help, tools, tutorials, etc. are plentiful. I was just sharing my observation that many opinions I've read on the topic of which language to learn first rank Python as the best.

As for starting a tutorial and getting discouraged because you suddenly find you're in over you're head, that's understandable, and it's not your fault. It's hard to write a set of beginning tutorials that stay at the exact right level for the user's absorption rate. While there are a lot of them, the quality, depth, pace, consistency, and accuracy of tutorials on the web vary greatly, and the average person is going to find it difficult to manage those characteristics to fit their needs. I started with a book and (mostly) worked through it cover to cover, coding all examples and attempting all of the exercises along the way. When I occasionally found a topic the book didn't explain to my satisfaction, I put the book down and did additional tutorials I found on the web. Even if they were at a similar level, just working more of them, sometimes from a different angle, was what I needed. Some of the more advanced topics, concurrency for example, I skipped and returned to later when I found a reason to.

What a great thread, by the way. Thanks to all who've contributed.
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Stevens Miller wrote:If the choice is between Java or C, I suggest Java. I love C and prefer it for a lot of things (anything involving a lot of unsigned integer data, for example, such as graphics work). But the comments here are accurate: C supplies you with a long list of ways to hurt yourself, often spectacularly and simultaneously inscrutably.

Also, this forum is a jewel for a beginner. A lot of forums "welcome" beginners by answering their questions with replies like, "Why would you even ask that? Your question says you don't know enough to be asking a question like that. There used to be an answer to your question on the Web, but I never knew where it was. Go find it yourself. You also posted your question in the wrong forum. People like you really piss me off. Hope that helps." This place is more cordial.

Heh. Never thought I'd be promoting Java over C, for anything. I've done some stuff in each of BASIC, Fortran IV, Pascal, APL, RPG II, Visual Basic, C/C++, Java, and a variety of assemblers. While a clever person once said that, "A dedicated programmer can write Fortran programs in any language," I do think Java encourages some good techniques, and allows for a lot of versatility, while still providing some useful safety nets.

Whichever one you choose, hang onto your seat: you're in for a ride.



I am pleasantly surprised at how nice people are on here. I am surprised I haven't received any awesome messages similar to what you said above. I have thick skin anyway. Internet tough guys don't really affect my day anyway.

I did start to realize that when I was asking about C, I am asking it in a Java section. I mistakenly assumed that programmers know all the languages. It's these little things that I'm still wrapping my head around.

I suggest you start with C (not C++). You can create some pretty cool stuff right out of the gate and you'll learn a lot that can be transfered to other languages. I started with Java and got stuck not knowing how to manage memory usage. I wish I started with C.



This is the synopsis of what my friend said.
 
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I would start with Java.
And while the college where I teach Java 101 classes uses a very simple (near trivial) ide, I strongly prefer to teach using Netbeans.

With Netbeans, you can download the full bundle with everything in it, and install it. Once you do, everything is setup, all the obscure
classpath variables, etc. are done automagically for you. No need to learn configuration stuff.

Then just type in the code you want, and press the RUN button.

I find that for real novices, you have to have a decent debugger, so you can step into code and look at variables. You can't do that when
you use something like notepad and the command line compiler.
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a great thread, thanks to all!

Greg, yeah, it is hard to cater to one level at all times. It seems that you guys strongly recommend Java over C. I wish we were all in a room together, with my friend, and we could have a discussion about the whys and why nots. This stuff is interesting.

 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Pat Farrell wrote:Yes, I would start with Java.
And while the college where I teach Java 101 classes uses a very simple (near trivial) ide, I strongly prefer to teach using Netbeans.

With Netbeans, you can download the full bundle with everything in it, and install it. Once you do, everything is setup, all the obscure
classpath variables, etc. are done automagically for you. No need to learn configuration stuff.

Then just type in the code you want, and press the RUN button.

I find that for real novices, you have to have a decent debugger, so you can step into code and look at variables. You can't do that when
you use something like notepad and the command line compiler.



Bah! Why did my friend have to recommend starting with C. I'm so conflicted...

Pat, you don't think that I'd be missing some key elements by jumping right into an IDE? Reading what you wrote about the obscurities that coincide with using notepad, I am more intidmiated going the notepad route, but I felt as though I should learn from the bare bones up. You don't think I'd be missing some key elements by jumping right into an IDE? Greg also agrees that I could jump right into an IDE. I feel he's right in that I could learn the fundamental details as I'm picking up on the other stuff. This seems logical to me.

 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its my opinion that there is so much stuff to learn when first learning programming that you need to focus on the programming task and not worry about the plumbing that makes it all work. Other folks think you need to understand it all before you can begin. I can see that for a few, but I've found that most get lost in the plumbing and forget why they are interested in it.

I strongly disagree with starting with C. Its too primitive and too easy to make subtle mistakes. We had to use C-like languages when I started, but that was more than 40 years ago.

I had really good experiences teaching using Smalltalk, which is only usable inside the complete IDE.

On the bare-bones versus tools argument: Suppose you need a pump to empty your basement. Do you go to the local store and buy a pump, connect it and turn it on? Or do you go out into the woods and find some copper ore, smelt it down, form it into wire and make an electric motor. Do you then go back into the woods to find some iron ore, smelt that down and make iron so you can cast it into the shape of a pump?

You do not need to be able to engineer a complete car before you can drive one.
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I started with Java and got stuck not knowing how to manage memory usage. I wish I started with C.



daniel, I'm going to stick my neck out and say that's an odd thing your friend said. Java is one of several languages that are called "managed" languages, precisely because they try to manage memory usage for you. C requires that you manage it yourself.

I know you're not a programmer yet, but let me try to offer an analogy: Suppose you bought ten tickets for side-by-side seats at the circus, so you can go with all of your closest friends. Everybody shows up and you tell them to start filling in from the aisle at Row "H" (since your tickets are for seats H1, H2, H3, on up to H10). Now suppose you miscounted and you have actually brought a dozen friends with you. Some of your friends, having followed your instructions, are going to sit in seats H11 and H12. But, hang on! Someone else has the tickets to those seats. When they show up and try to sit in those seats, two of your friends are going to be shoved out (or, depending upon who got there first and what kind of friends you have, the two people in seats H11 and H12 are going to be shoved out by your friends as they follow your instructions about filling in along Row "H" from the aisle).

C does nothing to stop you from exceeding the memory you ask for, just as your dozen friends would exceed the ten seats you reserved. Java, however, would notice that you had tried to use a seat (or some memory) that you didn't own, and would tell you when you tried. That's because Java keeps track of how much memory you have requested, and does everything it can to stop you from using more than what's yours. C has no such built-in protections. Indeed, there are some (dubious) programs out there that deliberately make use of the fact that C lets you attempt to make use of memory that was never allocated to you. It's as though Java were a well-policed metropolis, and C were the untamed west. This can be very hard to detect, at times. For example, suppose two settlers in that untamed west both thought they had staked a claim that included the same acre. If one settler only plants crops in the spring, and the other in the fall, they might never notice that they were planting the same acre, each one believing that acre was his own, neither of them ever interfering with the other. Things might work just fine for a long time, until one settler decides to plant crops in both spring and fall. They are going to run into each other then, and there's going to be a mess of a problem in sorting out who owns that acre. Java provides a kind of land office, making it impossible for both settlers to plant the same acre. Indeed, Java won't ever do the computer equilvalent of allowing two settlers to think they have both claimed the same acre: one of them is going to be told the other guy got there first, before he even gets a chance to try to plant anything on it.

For some things, this is actually kind of a pain in the rump. But, for a new programmer, it can save you from pulling your own hair out.

Go with Java, and keep your hair (so you can pull it out for some other reason, which, to be fair, Java has plenty of, just waiting for you).
 
daniel keshishian
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Steve, brilliant analogy. Stick your neck out as much as you'd like. This thread is gold for me and I'm not in the least bit sensitive. Here's what my friend sent me after I told him that everyone is telling me to go with Java or Pyton over C. I think I might have misquoted him before.

Python's not a bad choice. I'm suggesting C because it'll force you to learn the basics. From C you can learn almost any other language. That said, Java is easier simply because you don't have to worry about your own memory management. When your program uses something like a number or a string you have to pay for it with memory. Java will give you memory and clean it up when you're done with it. C forces you to do all of that work yourself.
If you need the number 5 you're going to use 4 bytes of space (4 bytes == 32bits == 32 1s and 0s). So let's say your computer has 2GB of memory then you've just used .000000186265% of your available memory where 100.00% is your total memory.
In java you can allocate that number and pass it around without worrying about the physical memory behind it - the runtime system will ensure that the memory is available when you need it. And when you're done with it the runtime system will clean it up so something else can use it.
In C you can allocate that number and use it within your current context just like you would in java. But if you want to pass it around you have to give thought to what will happen to the physical memory behind it. Depending on how you allocated it and want to pass it, different things can happen. This is why C is difficult.



What do you guys think about this?

I appreciate my friends intentions here, saying if I learn C it will make the next languages easier to learn. It's strange. I may just be acting stubborn, but I don't really want programs completing stuff for me. I want to know what those programs are doing. I know that I may be getting caught up in the minutia and wasting my time. Pat made a beautiful analogy before about using an IDE vs notepad that really hit home. Thanks for that by the way, Pat.

Would you folks agree that it's easier to go from C to Java, than vice versa? Eventually, I want to learn several languages and I'd like to hear your opinions about transitioning from one to another.
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

daniel keshishian wrote:Would you folks agree that it's easier to go from C to Java, than vice versa? Eventually, I want to learn several languages and I'd like to hear your opinions about transitioning from one to another.



Well, yes, but it doesn't matter. Java, like probably 90% of all languages designed in the past 30 years, looks a lot like C. Some of it is identical to C, such as the "for loop" and the basic if-then-else structure. So learn the basics once, and you can do any language.

There is a problem that many programmers implement everything in their second language using the constructs of the first one they learn. This is usually a bad idea. Languages are different because they were designed that way, and you really should learn to use their strengths.

If you want to do stuff that C is good for, i.e. embedded devices, or low, kernal level hacking, then I would recommend that you take a totally different direction, go spend $30 on an Arduino and some LEDs and use the Arduino IDE to learn how to turn on LEDs when you push a switch. It uses a C-style language, or perhaps baby-C, and then you can really do stuff like control motors to make a robot.

Lets get real here. You are worried about the first language. I can't count the number that I've used professionally. Its easily ten distinct languages and probably 30 or more if you count distinct dialects or Operating-System specific extensions. Don't think that you need to learn the one and only. You won't really understanding programming until you are using your third or fourth language. There is zero chance that you will be programming 20 years from now in Java if you actually like it, are good at it, and get a job as a programmer or designer. Java will either evolve to a language that is totally different but still called Java by the marketing folks, or we will all be using Java++ or Lava or Mava or some new name.

I would not recommend learning Java and C#, since they are so similar. I'd go with Java and Perl and Lisp, which are three radically different languages.
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to make a different analogy. To me, the choices are like the ones you make when you aspire to become a musician. Most people will start by choosing an instrument that interests them. Piano, guitar, drum, flute, saxophone, etc. This choice, to me, is like choosing a programming language. After learning the mechanics of playing the instrument, to really excel at being a musician, you must study music theory. You have to study rhythm, measure, scales, composition, etc. Then you have to combine this knowledge of music theory with the mechanics of playing the instrument -- this results in music. How well you know each part determines the kind of music you produce. Likewise, after you learn the syntax and constructs of a programming language, you have to study the mathematical and technical theories behind programming. How well you know these parts and how well you combine them determines the kind of programs you write.

Just as there is something that separates the technical musicians from the truly "artistic" musicians, there is also something that separates the technicians from the "artisans" in programming. I think that the separation has something to do with "craftsmanship".

For me, programming is about expressiveness. The languages that I like allow me to express a thought in an elegant and straightforward manner, without too many superflous motions. The language I like are appealing to my sense of logic, clarity and elegance. I think this is true for many other programmers who gravitate towards languages like Java, Groovy, Ruby. I hated COBOL and RPG because the mechanics and oppressively rigid forms of these languages impinge too much on my ability to express ideas clearly. Ironically, I thought assembly language was somewhat interesting and definitely challenging but I would never imagine myself doing that for a living.

So, I guess what I'm trying to say is find the language that fits your "senses": the way you think and the way you like to express yourself, something that doesn't bog you down in too many low-level details. Then learn programming and computing theory because that's really what's going to get you past the "air guitar, karaoke" level of programming and into the "technician" and "craftsman" levels and beyond.
 
Pat Farrell
Rancher
Posts: 4803
7
Mac OS X VI Editor Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote: Ironically, I thought assembly language was somewhat interesting and definitely challenging but I would never imagine myself doing that for a living.



I loved programming in assembly languages. It was actually a macro-assembly language. Loved it, did it well, was paid well, for maybe 3 or 4 years. I'm not sure that X86 assembly would be nearly as much fun, I was on a Dec PDP-10, which had a really nice instruction set.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Junilu Lacar wrote:I hated COBOL and RPG because the mechanics and oppressively rigid forms of these languages impinge too much on my ability to express ideas clearly. Ironically, I thought assembly language was somewhat interesting and definitely challenging but I would never imagine myself doing that for a living...


Interestingly, languages like COBOL and RPG came about for specifically the reasons you talk about: they allowed programmers to free themselves of the strictures (and sheer volume) of assembler or machine code, and express themselves (and problems) more easily.

That said, I totally agree with you, and couldn't wait to get free of COBOL and onto C myself.

Winston
 
Junilu Lacar
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Winston Gutkowski wrote:Interestingly, languages like COBOL and RPG came about for specifically the reasons you talk about: they allowed programmers to free themselves of the strictures (and sheer volume) of assembler or machine code, and express themselves (and problems) more easily.

That said, I totally agree with you, and couldn't wait to get free of COBOL and onto C myself.


Yes, thus the irony of me being more interested in assembly than COBOL or RPG. I think my interest in assembly was piqued by an article I read about Anders Hejlsberg, the original author of Turbo Pascal. The article quoted his colleagues at Borland as saying that he was such a good assembly language programmer that he wrote "object-oriented" assembly language. Of course, more people now probably know him as the architect of C# at Microsoft.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I haven't read this whole thread (too lazy) just wanted to drop in my $0.02 on the matter.
I am a beginner in Java, and I use eclipse to help me learn. Part of it is that when I'm not actively learning, I like to fool around and see what I can do (auto-generate a .Jar file for a hello world program with 1 click, organize my files obsessively)

And the other part of it is the tools that help you. I'm not talking about the auto-finish thing, I hate that. Mostly I love the play button, that runs the code without me having to close the editor, open cmd, run Javac, then run the file in java to see how it turns out. Eclipse does this for me in one click.

I also love that if I misspell something, or misplace a parentheses, I don't have to spend five hours looking for the error. I know some people say that's part of the experience of programming, well I don't like it.

Besides all that, there are settings in eclipse to turn off most auto correct features, or change them at least. Which is what I do. I don't turn off the notifications for error though.

Sorry for any spelling errors, my phone keyboard sucks. And by that I mean I suck at typing :P
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My vote goes to java, I'm just 18 and learned (desktop) programming for the first time in march this year. At first, I was overwhelmed by the numerius languages out there, and I was down for java. I found the book "Java : The complete reference" by herbert schildt really helpfull. You may like to start from the bare bones (which C does) but it can really piss off beginners like us. And the IDE ? put it up in your locker until you can write some logic 'cause they are just timesaving tools for pros IMHO (to speed up form designing and get more time in writing logics and algorithms).

But as always, YMMV. Regards
 
Stevens Miller
Bartender
Posts: 1464
32
Netbeans IDE C++ Java Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would hope daniel has enough info now to proceed. Both Java and C++ are current, popular, and powerful. Because it is a managed language, I suggest he start with Java. Because it is a managed language, I suggest he not stop with Java (you can have my char* type when you can pry the mouse out of my cold, dead hand ). But, fergawdsake man! Pick one, and join in on the fun!
 
Winston Gutkowski
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

daniel keshishian wrote:EDIT: I think I'll start with Java for Dummies. This seems to be the goto resource for people with absolutely no programming experience. Thoughts?


Head First Java seems to be quite a popular choice around these parts; and Kathy Sierra has also written other books that have helped a multitude of programmers through their SCJP exams.

Winston
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic