I'm interested in learning a little bit about programming, but I don't have a clue about where to begin. Does anyone know of a book or a Web site where I can learn the basics of the basics? Do all the programming languages have something in common? What is the difference between them? What can I do with the various programming languages? How do I go about deciding what would be best for me to learn?
It doesn't really matter what language you start with...what matters is that you pick up the structure. Java is a good place to start. It is based solely on objects. If you pick up Java, you'll practically know C++/C. Visual Basic is also a good beginner language. I'm not into web development...so I can't really give you any good info. Any of the books that will teach you a language in 21 days is a good starting reference. The Dummies series is also great reference for starting out. Good luck!!!
I'd have to agree... I dont know JAva...but I just recently started learning C+..and it is solely DOS-based(not visual object programming)...if you learn to actually cut code manually...you will have a much better understanding of real programming....none of this click and drag programming... you need to learn basic structured programming theory first to learn good programming habits...C+ is a good place to start learning actual coding..powerful...versatile...and not that complicated to get into....plus...there are tons of references out there to get pointers from.
C is probably a good place to start. Java has put a lots of fundamental stuffs away, like pointers, release memory, etc. But Java really helps you a lot when you start object oriented programming. And once you learn Java, it's hard for you to go back to C or C++, it's just so much fun to messing around with Java. I started with BASIC, and then moved on to C, Linux Shell, C++, and now Java and JSP. The thing is that once you get the concept, all the language are pretty much the same, just different syntax.
If I was a beginner, I would start out with Java. Java is more easily understandable when you are trying to learn object oriented programming for the first time. C++ is probably more powerful because it exposes more low level details to the programmer. But for a beginner, that's just going to make the learning curve more difficult. Plus, C++ syntax is really very confusing and not intuitive at all.
What kind of programs do you wish to write? For simple windows programs, I would suggest MS VisualBasic or Tcl/Tk. For simple nonwindows programs, I would suggest C/C++. It all really depends on what you want to do.
I totally agree with LegendZ3 here. If you are serious about learning programming, then C would be the first language you should learn. This will give you very solid foundation in programming. Then you can move on to C++/Java for object oriented programming. Java might be easier to learn but it simplifies a lot of things that is going on behind scene and therefore it does not help you understand the fundamentals.
My Intro to Computer Programming class covered C++. It's a b**** to learn if you have no background in programming, but it's fun when you actually get a program to run correctly.
This is a totally ignorant response. If you re-read what TraJ initially questions was about learning the "basics of the basics". While Hello World is not a very intriguing program, it is a great starting point for someone who has never programmed before. While the (programming) world is tunnel-visioned on drag and drop programming and making things as easy as possible...there IS something to be said about starting to learn programming at a low level. All programs are generally console apps. Some run within a windowed environment, while others run from a console window. Knowing something about the environment in which they run will allow anyone to utilize 3GL and 4GLs much better. Do not discount that learning C++/Java first will allow you to learn the other. Both languages (syntax-wise) are close enough to one another that once TraJ, or anyone else, picks up the basics, they should be able to dive into the funner (visual) side of development (i.e. Java's visual components, Borland C++ Builder's visual tools, or MS Visual C++'s visual components). For someone starting out, directing them to an "easy" and "sexy" language/compiler might not be the best idea. Building a core foundation of Hello World samples and other simple exercises will only help the speed up the learning process.
I learned C++ in high school which should be a good place to start imo. The thing is, I always had trouble visualizing the movement of the code even through out college programming classes. I just don't understand why some commands are the way there are. But after learning a little of different stuff, hardware -> binary - > machine code -> some of the hire level language I understand better now. But my advice when learning how to programm is just trust the syntax and languages capabilities. Don't ask too much questions about why it works but just know that it works and you'll get good at programming faster.
Let me first say that my programming background is geared toward databases (SQL, Oracle, OLAP) for applications (excel, Access) and adhoc web reports (asp/aspx). The first language that I used was VB Script/JavaScript from navigating websites for ASP. Once I caught on, I moved into Visual Studio 6 and VBA for MS apps. I then moved on to Visual Studio .NET. I have yet to use C anything, because my background is limited to MS applications and data extraction for manipulation and presentation on web pages. But that's just me.
Several people have mentioned that you should learn C or C++ first in order to gain a better understanding of the fundamentals of good programming practices and to get a better handle of what's going on under the hood. But that's only the case if you're seriously thinking about learning and understanding programming. If you never intend to gain more than a light knowledge of how programming works, you should probably start with Java. It's very straitforward and relatively simple. You should also go into it with the understanding that Java is designed to hide away a lot of the finer points of programming, and it's extremely structured, but it may be a more friendly introduction. But again, it depends on your long-term goals. Java will teach you basic computing logic and everything, but you'll get better fundamentals and have more power if you start with C/C++.
Let me just add a couple more things: Java is also good because it reinforces a lot of good object oriented programming concepts into the language itself (like having interfaces, abstract classes, etc..). This is great for a beginner learning object oriented programming/design. I would actually not start with C. Procedural programming is way different from object oriented programming. If you learn C, you might pick up bad habits about procedural programming that you might not give up when you transition to object oriented programming. And plus, it just might add to the confusion to learn all these different programming models. The bottom line, like someone else said, just pick up a book about learning Java in 21 days.
The only problem I have with this post is the blanket assumption that object orented programming is inhrerently better that procedural or structured programming. That's not always the case. Maybe he doesn't want to or need to learn object oriented design.
That maybe true for now, but that's only because some hardwares right now are not capable to run OOP programs. But years down the road when all the hardware caught up, OOP is the way to go. Right now OOP is a industrial standard, when you are writing a big program, it will be extremely hard for you pull it off with procedral programming.
Naturally, people turn this into Java vs. C++ vs. blah or OOP vs. Procedural... TraJ - you said "What can I do...". The answer is pretty much whatever you want, as long as you can describe it. So the better way to decide which language to learn is to ask "What do I want to do?". Programming courses at university start with either Java or C++ (or Scheme). The other options are not seen as much. Skip Scheme. C++ gets hard-core very fast. This is good if it's what you need. People usually say Java is more readable and thus may help you if you're trying to learn on your own. The advice I always get is to pick up some books. Surfing the web is also a great option - I always check university CS websites to see if there are helpful lecture materials (or books) to read. If you go the book route, here are the ones I've heard great things about: Java: Java: How to Program by Deitel and Deitel Thinking in Java by Bruce Eckel (available for FREE on the web, and it covers a LOT including OOP concepts) C++: uh... someone help me out here C: C Programming Language by Kernighan and Ritchie (if you decide to go this route, you'll learn sooooo much it's crazy - very readable book, covers everything you really need to know about programming in ANY language and even down to the nuts and bolts... but it may be daunting for a complete newbie). Good luck!
The Deital books are good here too. They do a great job describing objects and how to integrate them into your code.