Stevens Miller wrote: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!
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.
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.
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 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.
Greg Charles wrote:Inch bes es! *
* I'm part Armenian.
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.
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.
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 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.