Jump to content

what's a good programming language to learn?


ecoli

Recommended Posts

Ed, if you have time and want to have fun (and by fun i mean make your head hurt), metaprogramming is a TON of fun in Python (and also very scary, i should mention that i got very scared of the concept some time through the video, and am yet to finish it, but it really is a great intro all the way through to advanced). Check this out:

Python is a very good language; though, not one I used professionally. Since retiring, I have no passion for the craft, and my skills have rusted.

 

The presenter in the video is awesome, and the techniques shown are powerful.

 

I worked with other programmers, usually numbering more than 50. In that environment, few will understand the metaprogramming, including managers. The last place I worked, a director gave me a project three times, which was impossible, because he was instructing me to remove code that did not exist. The third time, he became angry, and yelled at me for being too ignorant to find code that he believed existed. He asked other programmers (ones he thought smarter and more knowledgeable than me) to find the code. After a couple of weeks, he said. OK, I was wrong the code does not exist. That was in a COBOL shop, which means code is almost trivial and repeated (boring) many times.

 

About 90% of those programmers had not used COBOL functions! From my experience, I believe use of metaprogramming is invaluable to minimizing the amount of code, but very few of the programmers I worked with were capable of doing it. And, managers do not want to do things they cannot understand. Thus, I am not convinced that the power and elegance of Python will become common in large programming shops.

Link to comment
Share on other sites

  • 2 months later...

Perhaps Java and Python have this advantage - they're hard to understand. So they give anyone who can program in them an aura of superiority, of mystique. Just like traditional mystiques, such as medical handwriting and legal phraseology. Which are designed to baffle the layman. And so preserve an elite status for professionals.

 

As a layman, I think BASIC is easily the best programming language. It's simple and logical. Aided by REM statements,

a well-structured BASIC program makes clear at each stage what it's doing, and why.

 

Whereas, don't programs written in other languages, somewhat resemble Egyptian hieroglyphics?

Link to comment
Share on other sites

Neither Python nor Java is particularly difficult to learn and understand. Both are commonly used as beginner languages in computer science curricula. Python in particular is very clear. Java is perhaps slightly more complex at the beginning, but it has the advantages of being fairly widely used and sharing a lot of syntax with handy languages like C/C++ and Perl.

In any case, the main challenge in learning to program is understanding programming concepts themselves. Outside of a few deliberately designed esoteric languages, learning syntax is a small part of the process and not generally difficult.

BASIC strikes me as an odd recommendation in 2013, heh. I suppose Visual Basic is handy if you're into that sort of thing, and TI-BASIC might be fun if you happen to have a TI graphing calculator and want to write new programs for it, but generally speaking, there are much more useful and still simple to learn languages available these days.

Link to comment
Share on other sites

Of the languages I see here, it comes down to what language is easiest and most accurate to use for your designed project. Really there is no one specific language to learn. Computer language for the most is designed for a specific set of applications. C++, is great for game design. VB great for networking, ect.. The easiest to learn with much more expansion possible is JAVA. That language is barely even broken into! SUN has been at it for over 25 years :)

 

So a great starter language would be Java or VB. After you are proficient with either. Then think about taking on the more frustrating languages.. C++, META, Cl,SLIP..

Most of my friends who are programmers know 3-5 languages. I personally am a SQL junkie . I know a little VB, some Java, and a insane amount of scripting for Exceed and WMF software :)

Link to comment
Share on other sites

 

Thanks John and jduff. Your posts show how programming has changed since my time, back in the 1980's.

In those days, I used Sinclair Basic. That was very simple, and required only thinking step by step, logically, to write a program. And it was easy to learn - it had a syntax-checker, which wouldn't allow a wrong line to be entered.

 

I still think that was a good way to teach programming. These days we have modern languages like C++. But doesn't C make you declare all variables in advance? That's quite annoying. It's not like Basic, where you can make up a variable as needed, when you want, "on the hoof" without having to go right back to the start and "declare" it.

 

I suppose the "declaring" is necessary because C is designed to be compiled into machine code. And compilation is much easier if all the variables are known at the start, rather than suddenly popping up.

 

But the requirements of a compiler shouldn't interfere with human freedom. Why should we comply with the machine?

 

Basic isn't intended to be compiled, so it gives the programmer complete freedom to create variables as needed. It's a very nice logical language to work with.

Link to comment
Share on other sites

And it was easy to learn - it had a syntax-checker, which wouldn't allow a wrong line to be entered.

 

The most of modern C/C++ IDE's have syntax checking, wrong entered stuff is highlighted..

Visual Express/Studio is searching for names of variables, members, classes while entering couple letters, suggesting what you might want, and then you can pick it up from drop-down list.

Use f.e. ConTEXT editor for programmers. It can analyze different types of languages, PHP, C/C++, JavaScript etc.

http://www.contexteditor.org/

 

I still think that was a good way to teach programming. These days we have modern languages like C++. But doesn't C make you declare all variables in advance? That's quite annoying. It's not like Basic, where you can make up a variable as needed, when you want, "on the hoof" without having to go right back to the start and "declare" it.

 

I suppose the "declaring" is necessary because C is designed to be compiled into machine code. And compilation is much easier if all the variables are known at the start, rather than suddenly popping up.

 

But the requirements of a compiler shouldn't interfere with human freedom. Why should we comply with the machine?

 

Basic isn't intended to be compiled, so it gives the programmer complete freedom to create variables as needed. It's a very nice logical language to work with.

 

In interpreted languages the all variables are strings. So language doesn't need to know type, when there is just one type variable you can have.

 

In C/C++ you need to tell language what will be type of variable, otherwise it doesn't know type.

In C/C++ string doesn't even exist as language standard (std::string is just yet another optional to use class included in external linked library). There is array of characters (char name), which is equal to array of bytes. You can't use it as "default type", without telling how large is array, and we are back to root..

At modern times in serious programming everybody are using Unicode, which has wider character standard.

Edited by Sensei
Link to comment
Share on other sites

I don't see why you'd say it's necessary to declare a variable at the beginning. If it's a global variable, then yes, you'd want to declare it outside of a certain method or class, so the scope covers where it's appropriate, but if you need to use a variable in a "for" loop for example, you declare the variable right there (e.g. for(int x=0; x<10; x++)). If a variable is only used in a particular method, you wouldn't need to declare it anywhere else except within that method.

 

I agree with the poster that said it isn't as important to understand a particular language as it is to understand the concepts since they are used across languages. In object oriented programming (OOP) languages it is important to know what a class, object, instances, inheritance, etc. are, and it doesn't matter much if you are programming in C#, Java, or any other OOP language, the idea is mostly the same and it comes down to mostly syntax differences.

Edited by Trumptor
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Attempting to answer/comment on everything up to this point:

 

The thread is about languages to learn, not necessarily good languages to learn to program in. If we were talking about best beginner languages, then i think that no language is better than Python; it was developed for the purpose of teaching people how to program. Not sure what John is talking about, Python is no more difficult to learn than PHP or Ruby or JavaScript, it is easier than Java unless your background is strictly in C++.

 

C has tons of uses, there are things that just don't need object orientation, like boot loaders for example, memory management, and tons of other OS/Firmware areas. But what you loose in C++, specifically direct memory management of your program environment, is a necessity, and so C, even assembly is still useful. And it's still simpler than C++, OO, while having its' uses, sometimes makes code extremely complex.

 

Modern compilers don't care where the variables are declared, there would be no gain in performance if the variables were defined all over the code (like in C++), its just how the language was defined in 1972 because it was easier back then to do it that way, and because you can still compile a program written in 1972 on modern compilers (i.e. the language has changed very little and is extremely backwards-compatible), and for the most part vise-versa, you have to declare your variables in the beginning.

 

Syntax highlighting has been around for a while, and everyone SHOULD use a syntax-highlighting text editor to program (if they are not using an IDE, which i prefer not to). I do not understand any teacher that forces their students to use something nano-like. What you use for an editor is your choice, but use modern editors, they will help you write less error-prone code.

 

Also as a point of note, Sun Microsystems was around for 28 years, and seized to exist in 2010. Java appeared in 1995 and since acquisition in 2010 has been developed by the Oracle corporation.

 

Also what does it mean "That language was barely even broken into!"?

 

C# is pretty cool, when you use it with Mono

 

And yes, programming has changed significantly since the 1980s :)

Link to comment
Share on other sites

Not sure what John is talking about, Python is no more difficult to learn than PHP or Ruby or JavaScript, it is easier than Java unless your background is strictly in C++.

 

My point was that Python is a fairly easy language to get into. Java isn't bad either, but it may be a bit more complicated initially.

 

I personally started with C++, so perhaps my perspective is skewed. However, I stand by my second paragraph. Most languages aren't that difficult to learn. Programming concepts are the bigger hurdle.

Link to comment
Share on other sites

Eventually, I want to be able to do some computationally-heavy modeling work, which obviously requires programming knowledge.

 

Is there a specific language that would be good for this type of interest. Where can a newb start learning about building the tools to develop skills to develop stochastic-type models?

 

Thanks!

just go for c++ and java and html

Link to comment
Share on other sites

HTML is not a programming language.

ecoli, if you are looking into doing computationally-heavy modeling work, for really heavy stuff, like i work on a system with over 1000 GPUs kind of stuff, focus on C++ with MPI and Cuda, if you are looking at the financial market, then learn Java.

Link to comment
Share on other sites

  • 2 weeks later...

I think there is a difference in the type of languages used, but little differences in the languages used for a certain purpose. For example, C#, Java, Ruby etc. are programming languages with the same basic function and by learning one you can easily switch to another. ASP.NET and PHP are more focused on webpage development and require a different understanding. Oracle and SQL programming deal with databases and have a different setup and learning curve as well.

Link to comment
Share on other sites

All these different languages! Is it really necessary to have so many?

 

I never do any research before posting (it prejudices the mind so). But I'd guess that the total number of computer languages ever invented, must be fast approaching the number of human languages currently in existence. Which is, purely from memory, some 4,000 or so.

 

Of course, some of the computer languages are perhaps dead or moribund - is COBOL still around? What happened to Forth, and LISP (((aka "Lots of Irritating Silly Parentheses"))). Does Pascal still find favour in some quarters - it was very big in the 1980's. Or has it gone the way of ancient Algol.

 

Can't we devise, and use, a single common-purpose programming language. Just as English is used as the common language for Science.

 

OK, some posters justify the use of computer languages for specific purposes. As in AtomicMaster and Trumptor's posts above - if you're looking at the financial market, then learn Java...... Oracle and SQL programming deal with databases (apologies for conflating the posts).

 

But isn't that a bit as if we were to say - if you're looking at physics, then learn German. Or - Russian literature deals with chemistry, so learn the Cyrillic script. I know these aren't good examples! Best I could do in the white-heat of composition.

 

My point is - suppose we discarded all computer languages except one - say C++. Would that make it impossible to write programs to cater for all the problems that we use computers to solve?

Link to comment
Share on other sites

Is it really necessary to have so many?

Yes.

We use the right tool, for right task.

 

To drive a nail we use hammer, not rock or dumbbell (although they would work more or less good for this task).

 

I never do any research before posting

 

If you would do research before posting, and talk only about things that you know, you wouldn't have reputation points like you have now..

 

Of course, some of the computer languages are perhaps dead or moribund - is COBOL still around? What happened to Forth, and LISP (((aka "Lots of Irritating Silly Parentheses"))). Does Pascal still find favour in some quarters - it was very big in the 1980's. Or has it gone the way of ancient Algol.

 

That's natural selection, like in real life. Living languages are evolving, dead languages are dead and nobody knows about them, until finding fossils..

 

Can't we devise, and use, a single common-purpose programming language. Just as English is used as the common language for Science.

Common language of science is not human language, but mathematics..

 

 

But isn't that a bit as if we were to say

 

No, it's not.

 

My point is - suppose we discarded all computer languages except one - say C++. Would that make it impossible to write programs to cater for all the problems that we use computers to solve?

 

If you would know C/C++/PHP/JavaScipt/Java etc. you wouldn't ask such silly questions..

C/C++ is compiled to machine code, one at a time (f.e. 32 bit Intel for Windows). Have direct pointers to memory. Allow low-level manipulation of data. Thus very prone to crashing program or crashing whole computer including restart in the worst scenario. So completely not suitable for servers running web masters programs.

PHP is server run interpreted script. Access to low-level of server would cause serious issues with security.. It will never crash server due to error in script..

JavaScript is client run interpreted script. It's run on web browsers, and nowhere else.

Java is either interpreted or JIT-compiled. Can be run on either server (f.e. JSP) or client. It's high level, so no memory pointers like in C/C++.

PHP, JSP and JavaScript can be mixed with HTML pages seamlessly.

 

Program meant to run on server must be in not compiled form, except CGI (which is C that is writing HTML to stdio). But it's obsolete now. Architecture of server is/should be unknown to web masters.

Edited by Sensei
Link to comment
Share on other sites

Thanks Sensei. appreciate your post, and would like to pick up on two points from it:

 

1. You say "If you would do research before posting, and talk about only things that you know, you wouldn't have reputation points like you have....you wouldn't ask such silly questions"

 

To which I'd offer this (off-topic) reply - hasn't Science made progress precisely because some people didn't do previous research, didn't care about reputation points, and did ask silly questions? Think of Copernicus, Galileo and Darwin. Suppose these three characters had posted their ideas on a 16th/17th/19th century equivalent of SFN. Wouldn't they have got very bad rep, and been blasted off? For not doing proper research into the crystalline spheres which obviously surround our centrally- positioned Earth. And for not realising that heavy objects must obviously fall faster than lighter ones? And failing to grasp that all animals were created in 4004 BC and obviously saved from the Great Flood via the accomodation provided in Noah's Ark?

 

2. But all this is not really germane to the thread. So - getting back on topic - computer languages and the learning of them -

 

a. I can kind of understand the points you make in the last two paragraphs of your post. But couldn't a single language, such as BASIC, cope with all the isues you describe. I mean, an advanced version such as BBC-BASIC enables the programmer to create sub-routines or "procedures". These procedures can contain any amount of complex coding. And once created, they can be called, within the program, by a single command such as PROC- dosomething. That would seem to be all that's necessary. After all, doesn't all programming really boil to this simple proposition - how to make bits flip from "0" to "1" and vice-versa. I find it hard to accept that this simple task can't accomplished by one set of programming instructions.

 

b. On learning programming languages - are kids still taught in schools to program computers? What programming language is used - is it the same in all schools, or do different schools use different languages?

Link to comment
Share on other sites

This thread started years ago.

There are probably languages now that didn't exist when the question was first asked.

I also suspect that, by now, the OP has got the hang of at least one language (and I'd not be at all shocked to find they have learned (at least bits of) several).

 

ecoli,

Am I right?

Link to comment
Share on other sites

Maybe OP is waiting for Quantum Computers. These won't need any programming languages at all - you just specify the question, then the Q computer sprays its superpositioned qbits around randomly until it hits good and spits out the answer.

Link to comment
Share on other sites

To which I'd offer this (off-topic) reply - hasn't Science made progress precisely because some people didn't do previous research, didn't care about reputation points, and did ask silly questions? Think of Copernicus, Galileo and Darwin. Suppose these three characters had posted their ideas on a 16th/17th/19th century equivalent of SFN. Wouldn't they have got very bad rep, and been blasted off? For not doing proper research into the crystalline spheres which obviously surround our centrally- positioned Earth. And for not realising that heavy objects must obviously fall faster than lighter ones? And failing to grasp that all animals were created in 4004 BC and obviously saved from the Great Flood via the accomodation provided in Noah's Ark?

These things are different.

Proposition of using one language for everything is reverse to progress..

It's kinda like saying "one bacteria species should be enough for life"..

 

Science is progressing, because some people are doing experiments, and others theoreticians are trying to explain observations.

 

If you would start making experiments and showing them to public on forum, you would get respect and positive reputation.

Find new kind of particle, and you will have Nobel in hand wink.png

 

b. On learning programming languages - are kids still taught in schools to program computers? What programming language is used - is it the same in all schools, or do different schools use different languages?

 

It's question not to me, as I have not been in school for 20 years.

 

But I hope so they are learning C/C++ extensively.

Edited by Sensei
Link to comment
Share on other sites

I agree with you Sensei that having only one language would impede progress. I think that if there was only one language, it would be more rigid and would evolve slower, but with so many competing languages, where there's a fault in one language, the next will look to address the issue - Java was made to improve on C++, C# was there for developers that wanted more from Java (allowing pointers again), etc. I think the most taught languages are C# and Java by far.

Edited by Trumptor
Link to comment
Share on other sites

But couldn't a single language, such as BASIC, cope with all the isues you describe

 

Yes. Any programming language can be used to do any task. But some have features (or libraries, etc) that make certain types of tasks easier.

 

I think people should learn several different types of programming language (procedural, declarative, functional, etc) and then learning any specific language is just syntax.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.