Which programming language?

I’ve been thinking about teaching myself to program in a more up to date language than the BASIC and FORTRAN type stuff I learned at school. I assume an Object Oriented language would be the thing to learn now.

I have decided to begin learning by writing a stock trading system, because it fits in well with my knowledge and interests. (I don’t really expect it to make any money, but you never know!) Also, I can begin with something simple like “get this data” and progress to some reasonably complex data manipulation and presentation stuff.

Can anybody suggest a language that would be good for manipulating large data series, as you would find in the stock market?

Any suggestions are welcome.

This is definitely a Great Debate. If you’re looking for two solid facts in the world of computer programming, they are:

  1. everybody has a language of preference, often fanatically expressed, and
  2. every language has strong points and weak points but few are objectively “better” at anything, none are objectively “best” at everything.
    [sub]3. Opal doesn’t code so why ask[/sub]

I use Perl, Java and VB, with a smattering of C. I grew up with BASIC and used Fortran, Pascal, and Lisp in their heydays. What I’ve learned is that it really doesn’t matter. Occasionally I hit a problem that would definitely be easier in one language than another, but usually the language choice is dictated by other constraints than “is it best for this problem type”.

That said, I’d recommend Java for the following reasons:

  1. It’s object-oriented and includes all the features a modern language should (inheritance, polymorphism, yada yada yada). That means it’s close enough to C++ to serve as a primer if you decide to move into really low-level coding.
  2. It has a tremendous library set that supports things like XML, messaging, etc. so you can do really useful things without slogging through the nuts and bolts.
  3. There is a ton of online help, tutorials, forums, etc. This is true of most languages, but I’ve seen a lot more free, high-quality resources for Java than for most others. In general, the Java community is less knowledgeable and less helpful than the Perl community, but they’re a pretty good second.
  4. It’s certainly powerful enough to handle your stock market example. Many large financial corporations use Java back-end systems. Java doesn’t measure up to C++ in most benchmarks of raw performance, but it’s no wimp.

Perl is a great language and one of my favs. Above I said I rarely had situations where one language was clearly advantageous. When I do, that language is usually Perl. However, it’s (almost) entirely a scripting language. If you want to do GUI apps, you can tie into various libraries, but it’s not as straightforward as setting up a GUI in Java. If you need to process text data, it’s fantastically flexible, but other languages have integrated regular expressions, so they’re gaining ground here. I lump Python, Tcl, Ruby and other languages in this category too. They’re different from Perl, but not vastly so (ooh, GD here we come).

VB is also a great language. It’s easier to learn than Java, especially if you have a BASIC background. It’s great for rapid prototyping of GUI apps. However, it’s not nearly as powerful as Java (strike two on the GD count). Also, it’s status is in flux due to the whole .NET initiative. Lastly, unlike Java and Perl, it’s not free. You have to buy the IDE from Microsoft.

C# is basically Microsoft’s evolution of Java (another GD, three down). Like Java, it’s C++ without the “hard stuff” and by most accounts they learned some lessons from Java. My main qualms about C# are whether you want to be tied that closely to Microsoft’s whim (see implication in previous paragraph about MS abandoning VB). I’m waiting awhile to see how it plays out.

C++ is a fantastically powerful language, and it’s definitely the choice for most hard problems like operating systems. However, with power comes complexity and C++ is not as easy to learn as others.

Delphi is another language that is used quite a bit for commercial apps. I’ve seen very good apps and code, but I don’t use it so I can’t really separate it from the crowd.

There are as many other options as there are people to sing their praises. In the long run, once you learn one language it will be easier to pick up another as you add tools you need.

I am a self-taught programmer in the making. I can read Perl script easily enough with my background in BASIC, Commodore 64 style. (well, I used it a lot when I was young, not a professional background)

I tried to pick up C but got bogged down very quickly. Java has allowed me seemingly exponential growth in understanding OOP programming, but my goal is to use it as a primer for getting into C++.

JavaScript helped me understand functions (methods in Java, I think C called them functions and C++ calls them methods) very well, and its pretty well integrated into HTML so understanding Document Object Models helped me understand designing GUIs in Java (seriously, learning Java has been very easy, with only a few hickups. I went from zero to making interesting beginner applications in about two weeks with no prior experience).

It is my understanding that Java is frequently taught in schools now as a model for OOP programming, which definitely seems to be the wave of the future.

I am leary about C#, too, but if its free and has some better standards set (like, say, by an independent authority like ANSI) than Java then I’ll jump on the bandwagon (read: give in to mob mentality).

Others have also recommended Visual Basic for me, but I never felt like going down that road.

I say it all ends up with asking yourself the question: how complicated do you need to get?

Ruby is a great scripting language that was developed in Japan. It’s properly Object Orientated, unlike Python, and it’s really really easy to use.

Ruby Homepage
RubyCentral - includes free manual
RubyGarden - Ruby news site

C and C++ , C++ is rock hard to learn and most people hate its guts since its hard to learn , but oh so powerful and used in $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ jobs

if you can hack C++ you can do anything (programming wise)

IMHO, if your aim is to learn OO rather than just a specific language, Java is probably your best bet. Java is a modern fully OO language whereas C++ was originally developed at a time when OO itself was young and ideas about it not yet fully formed. As a result of this, and the desire for backward compatibility with C, C++ is not the cleanest language around . For someone new to OO it may not be obvious when they are having a problem with the language or OO concepts and this may hamper progress. I would doubt that a programmer schooled in Java would have too many problems transfering their skills to C++ or indeed any other OO language.

Java does have its limitations. It supports neither multiple inheritance nor true generic types. To be fair the former is not crucial, though it is far more useful than Java zealots would like to admit. Generic types are very useful indeed but here C++ is far from perfect either. Templates are certainly better than the macros it used previously but are still messy when compared to other languages.

I currently program in Eiffel which is a superbly designed language. It handles generic classes in a very elegant manner and multiple inheritance is a breeze (far to easy IMO, Eiffelers use it far too much) but suffers from a lack of support and a very small user base.

I think ticker summed it up, that if you are learning how to program, pick a language that has a huge user base. That way you can pester more people to help solve a problem. I program in PowerBuilder (ack!) and SQL in my day job and I use VB, and a little Perl and Javascript on the side for fun (double ack!) I am planning to learn a little Python in the future too…

It is true that you have to buy the VB IDE from MS, but to have an actual Perl or Java IDE you need to purchase that too. otherwise you are coding from text editors and the command line. Which is not a bad thing, but a good IDE, like VB has, can really save time. Or cause more headaches when using an IDE like PowerBuilder has.

The irony is that to do what you want, PowerBuilder is a very viable option. It is a powerful, simplistic database front end. Beyond that it becomes quite cumbersome. But I would stick to a more interesting language, otherwise you may just get bored with the whole process.

Good luck

I reccomend Perl. Reasons:

  1. Very easy to learn. You can be productive with Perl after only learning a small part of the language.

  2. It’s free.

  3. Lots of support on the Internet for Perl newbies.

  4. It’s object oriented when you want it to be, and not object oriented when you don’t want it to be.

  5. It’s weakly-typed, which means there is less worrying about data types and more actual coding. (Of course efficiency is sacrificed for this, but it doesn’t sound like you want to be doing extremely hardcore number crunching.)

  6. It is very easy to do extremely big and complex data structures in Perl (good for a stock program.)

  7. It’s easy to create GUIs with Perl/Tk

  8. Perl has one of the most sophisticated regular expression engines. This probably won’t matter to you, though.

For Java, Sun offers the community version of their Forte IDE for free. It’s quite nice for both GUI layout and coding, but I prefer text editors (that’s a whole other GD). You can start another holy war comparing Forte to JBuilder, but if you want to bang out a quick GUI layout without doing the gridbaglayout dirty work by hand, Forte is fine.

For Perl, I’ve never found an IDE to be useful, but then I never do GUI work in Perl. I use a text editor that highlights and colors different keyword types. There are many freely available editors with this capability, and I think some give you execute options, so they’re very nearly a script IDE. There are also a number of free full-fledged IDEs for Perl; go to perlmonks.org and search on “ide” for references.

I’d say you have two credible options;

Java or VB.

Much as I love it, C is past it. C++ is the bees-knees, but not easy to learn if you don’t know Object Orientated concepts or C.

Other languages mentioned in this thread are ok, but a bit specialised. I would only go with them if you have a particular interest in what they do.

VB is easy to learn, but sucks as a language. And the world is already full of bad VB programmers. Ever seen a program that sounded like just the job, but was a total mess in the implementation? It was probably VB. The world is full of bad VB programs.

That’s not to say you can’t write good programs with VB, or get a job doing it. But it wouldn’t be a career choice I’d actively pursue.

That leaves Java. It doesn’t matter whether Java has any real lasting power. Learning it can only do you good, as it is a clean, structured language that encourages clean, structured programming style. The OO principles in it are also used in lots of other newer languages, including C++. And there’s plenty jobs using it about just now.

Great post by micco. I saw this, and figured I’d share the knowledge about Delphi:

Delphi uses Object Pascal as its underlying language. Object Pascal is pretty much Pascal++. Delphi is Inprise(formerly Borland) specific. It is a true OO language (inheritence, polymorphism and encapuslation), a little easier to learn than C++ or Java, but not by much; has a good UI, and a lot of components are available for it.

It does not support multiple inheritence, and the Inprise class hierarchy has some problems that drove me to drink (although, admittedly, it was a short trip). It has a feature where in you can define a private member variable, then define the accessor and mutator methods, then create a “property”, so that when the property is accessed, the associated mutator method is called. C# will have this feature as well. This sounds nifty, but in practice encourages some questionable design techniques (because this features encourages the programmer to break encapsulation).

Executables are a little bigger than comparable C++ programs, and run a little slower. I never compared them to VB.

In the field, it fills a role between VB and C++. Faster to develop in than C++, better OO design than VB. It seems to break down a little bit when attempting to do BIG projects, especially in Extreme Programming situations, where you’re doing frequent builds. The component based architecture can be difficult to automate large build processes.

It is a good language, and a useful tool. I’d stick the Java or C++ though, assuming you want to learn an OO language.

I think I can speak for everyone when I say that eventually you will have to learn more than one! MANY more than one. The nice thing is, they all have similar structures. Learn one, and be well on your way to learning another.

It also depends on what you are doing. I am doing databases on the internet, so I use PHP and JavaScript. I could also use ASP or JSP.

PHP is preferred for my work because it is free and there is a ton of internet support. ASP is the Microsoft version, so you have to pay for everything. JSP is the Java version, which I have only looked at.

For a more general language, I learned C++ a long time ago, but never really did anything with it. If you are writing commercial programs or have a project, it’s very good. Visual Basic is another good one to learn. Again, though, these are both Microsoft programs. :stuck_out_tongue:

I really like the looks of Ruby. That looks like the future, if it gets wide acceptance. All objects, all the time.

Ok, I guess this is a pretty good place to ask my sub-question. Which C++ should I get? I’d like to program for windows, but windows OSs change every two years, and I’m not sure about compatibility between 98 vs NT-style OSs. I know Borland is a pretty big name in programming, but it is certainly the only name in programming I actually know as well, so I’m certainly biased.

Honestly, a link to a pretty objective review site would help me most, though anyone’s comments are welcome. As it stands I already have a copy of Borland C++ on my machine from a friend’s version.

Since C++ is OS specific, should I just break down and purchase MS’s Visual C++ and be done with it? Let it be said that right now I really don’t feel like learning Linux or equivalents, and probably won’t unless I have a really good reason too.

}

Wrong on two counts.

ASP is not a language, it’s a server framework for running scripts, much like CGI. You can write ASP pages in VBScript, Perlscript, Javascript, etc. I’ve even seen ASP written in Cobol, but I can’t imagine why you’d want to. Since ASP is not language-specific, this makes it very powerful. I use VBScript to bang out quick pages because it has a great object model and database work is quick and easy. When I hit hard problems, I can write pages in Perl (or just call Perl subroutines). This lets you use the best tool for each job and maximize code reuse. Regardless, ASP is not a language so it has nothing to do with the OP.

Also, ASP is essentially free. It’s a built-in part of IIS, which is a built-in part of Windows NT. This requires that you buy NT, but saying ASP alone costs money is disingenuous. Also, there are completely free ASP engines for Apache.

In terms of functionality, ASP, PHP, and JSP are basically identical, but they’re all web-based client/server systems which may not be what the OP needs.

erislover:

When I was using C++ on windows I tried Borland, Metroworks, and Visual C++ IDEs, and I found Visual C++ to be far and away the best. It integrated with visual source safe so I could check out my files in the IDE rather than the source control program - VERY convenient. I also liked the interface and features a little better. This was 3 years ago though, things might have changed.

As for the OP, since you have a programming background I’d go with java. For someone who is completely new its probably a good idea to start with scripting languages, but if you’re trying to get a little deeper into OO java is the way to go.

So C and C++ are hard now? When did this happen?

I found both of these languages a cakewalk compared to RPG IV. RPG was a required class for a degree, and yet half the people in the class dropped it more than once. I still dream about that level of frustration from time to time.
It was a hideous, hideous experience. And of course, I have never, ever needed RPG in any job I’ve had.

If you’re going to jump into this language, you will probably want to get this program (MS Visual C++). But I’d recommend taking a class on it first, as the language is a bit quirkier than most (in my limited experience). Be prepared to dish out some lengthy programs in the end of the class though. Good luck!!!

Since when is C++ os specific? There are a whole set of libraries for dealing with windows (the generic term X windows MS windows etc) that are dependent on the window manager. But C++ is not OS specific.

Thanks for all your input everyone.

I think I’ll start with Java. The consensus seems to be that it is one of the easier to pick up and I don’t have to buy anything to start.

After that I guess it’s on to C++.

I’ve worked in RPG for 16 years, and use it every day. Of course, I work on IBM midrange machines (that’s the AS/400 these days, or is it the E-Server series now? I can’t keep up sometimes :slight_smile: ). And that’s pretty much the only place you run into RPG, but it is very common on those boxes. As far as I know, it not used anywhere else. Of course, there’s a bunch of AS/400 shops out there, so it’s not a bad language to know.

And it’s a very good business oriented programming language, being very file and record oriented (or table and row to use the RDB terms). It doesn’t do flashy front ends well, but if you want reliable, easy to create code for standard business applications like data entry, data manipulation, and reporting (RPG stands for Report Program Generator, its original purpose), it’s great.

Ugly