Actually there is nothing at all wrong with Basic, it is an excellent language for when you want to write a quick little utility program and aren’t concerned with speed/hiperfomance. I still often use it to generate simple little programs to do basic(no pun) number crunches, such as read a file of data and convert it to a newer style of format for our records.
You might want to check out Python. It’s free, it’s easy to learn (especially compared to C or C++ - I haven’t learned Java yet), and its use is becoming more common. There are a lot of python modules/libraries available at the web site that extend the capabilities of the language. It’s slow, though, as it’s not compiled.
I think something we have to look at in this great debate of “Java Sucks” is how young that language is. Give it time, it needs to grow up a bit. C/C++ have been around for quite a while. But, as far as teaching yourself a language, C or C++ is probably the right way to go (considering half the languages out there are C based languages)… C’s probably the best language to learn first because it helps develop the fundamental concepts of programming to be quite stong <end “non-sensical” phrase here>
All I know is the first language I learned was Java. I love it. But hey, I’m not fussy, I just like to code.
For programming, start with C.
If you find you need C++, I’d actually recommend learning Java first. It’s very similar to C++ in syntax and structure, but more restrictive, with a nice set of standard simple GUI components. Basically, I think it’s a great way to get a feel for OOP, and easier to get started with. (I think of it as C++ with training wheels.) It is slow, though, so it’s not a good language for “real” programming.
For scripts, use Perl. Perl rules. It’s not meant to be a programming language, though. It’s good for manipulating files, automating repetitive tasks, or connecting different programs together (especially in Unix). I love Perl.
Everyone says that Java is slow. But doesn’t Java have an option for compiling to native code? Is it still slower when that option is invoked?
My head still hurts too.
Believe it or not, I have a friend who got a job doing this and who made great money at it. He has since moved on to C/C++ and UNIX, of course.
To some degree, yes. Java comes included with a large set of APIs that make programming much easier. They tend to be flexible at the expense of high performance. You always have the option of “rolling your own” classes to speed performance critical sections of your code.
What Java gives you is speed of development over speed of execution. The APIs make complex issues like networking, multithreading, GUI development, and client/server programming reasonably easy. Your programs run on many different platforms too, so that’s a big plus.
Anthracite, I weep for you. I was once a C/C++ snob, but a few weeks with Java made me see the light. I can still see uses for C in embedded and real time programming. C++ as a big kluge. OOP was the right way to go though. It’s the only way to make reliable large scale systems. You’re really being too rigid here. Become bituminous and flow into Java. You’ll thank me some day.
I actually find Java a bit to restrictive in its implimentation, it is a decent language, but I think it needs some time to mature still. I also disagree(d) with some of the choices that they made with the base classes. I say disagreed because I haven’t done any Java programming in the last four years, been mostly doing C/++, AREXX (I actually got to program Amiga based systems! Whoopie! ), and currently a lot of Labview. So Java might have changed some of my complaints.
Well, as Edsger W. Dijkstra once said
It should be noted that this quote, in addition to being obviously hyperbolic, originated during the Structured Programming War and that Basic and Dijkstra were on opposite sides. Nonetheless, many people today agree with it in spirit.
The reason Basic is generally reviled among “serious” programmers is that it encourages sloppy and undisciplined coding practices in novices. While it’s easy to write trivial programs in it, it doesn’t scale well at all. If you start out by learning to write simple 50-line programs in Basic, you’ll quickly find that anything substantially more comlicated becomes a herculean task; difficult to debug and nearly impossible for anyone other than the programmer to understand. You basically have to switch to another language and relearn how to program fairly early on in your education, and you’ll likely bring some of your bad habits along, e.g. an aversion to some of the more complicated-but-elegant flow control structures available in more powerful languages. Larry Wall, creator of Perl, said it best: “Easy things should be easy, and hard things should be possible.”
For me Eiffel is the ‘best’ language, but Java would get my vote as the best to learn right now. Demand for C++ is still pretty good but Java has more momentum behind it. It is also a ‘better’ language, IMHO.
I vastly prefer java to C/C++. But that’s primarily because I’ve had more experience with it. OOP is definitely the elegant way to go for an application of any large size.
Having said that, I did enjoy Assembly programming when I dabbled in it (schoolwork, but damn I could optimize).
Anthracite: That’s because the bulk of the use Java gets is behind the scenes, server side. Java’s forte is network communication, really. The stuff you described would more likely be done in Fortran, since that’s best for scientific computations. I worked with an internet startup over the summer, and everything was in Java save a simple command line getter program written in C++.
I won’t say Java is better than C++, but it is more secure, and has this wonderful thing called garbage collection that frees the programmer from having to think about lower level stuff. The trade off, of course, is more overhead. It all depends on what you need it for.
IMO, OOP is a cool thing that sounds great when you are trying to get a project approved. “We’ll just create these neat, reusable data objects and calculation modules using an OOP approach, and we’ll save thousands of dollars!!!”
Try workinig on a 10,000+ line project written in procedural code, then do the same in object oriented. I’d take the OO over procedural any day. I got lots of exposure to Java over the summer, and I’m sold. For large projects, OO is much more managable.
OO isn’t just about reusability; it’s about security (data hiding) and abstraction. When you create an object, you no longer have to think about all the knitty-gritty stuff that makes the object do what it does, you can just imagine it being what it’s supposed to represent.
BlackKnight Yes, you can compile into native code, but you also lose the greatest advantage of Java: portability. If I write a Java app on my Windows 2000 machine, I can distribute it to people, and as long as they have the Java VM installed, a person running Linux, FreeBSD, Windows 95, Macintosh, whatever can run it.
But, you’re still not going to get all of the speed back. Java is object oriented, and hence has a lot of overhead (code that needs to execute for certain things to happen; error checking, security needed for data hiding, etc.). There’s also the garbage collection, which goes into the native code which was originaly a part of the Java VM. (Garbage collection is this wonderful feature that, while your program is running, determines what memory that you did allocate is no longer needed, and frees it up anyway. You don’t need to worry about it. Great stuff.)
As for the actual subject, use languages to learn programming concepts, not to learn the language. If you learn language X, that language may not be in as much demand in ten years. Don’t get too stuck in one language. I was taught with C++, and I’m extremely fortunate I had the opprotunity to get immersed in Java over the summer so I could learn a new way to look at things. You always need to start with one language, but the problem is that until you learn your next one, that first language is your universe.
Once you understand programming concepts, you can learn languages as needed.