What Programming Language to Learn?

WhiteZero

2[H]4U
Joined
Oct 21, 2004
Messages
3,638
So a few years back, in highschool, I took a year of VisualBasic. I found it kind of fun to program little apps but I didnt really stick with it.

Whats the most versatile, widely used, and future-proof (and maybe "easy" to learn) programming language to learn today? I've heard any of the C languages (C, C++, C#) is still a good choice.

I want to lean something that would have a practical use today and still be around and used years from now.
 
As much as I hate to believe that im giving out this advice -

try out Java first. I did VB.NET first and was pretty happy with it but now after taking 2 different Java classes I would suggest it to anyone as a good starter language to get down the practice of syntax and the such.

again - just my .02 (and im sure many will disagree with me)
 
As much as I hate to believe that im giving out this advice -

try out Java first. I did VB.NET first and was pretty happy with it but now after taking 2 different Java classes I would suggest it to anyone as a good starter language to get down the practice of syntax and the such.

again - just my .02 (and im sure many will disagree with me)

I know Java is really nice because it's cross-platform, however I've also always heard it's much, much slower than C languages.
 
Did you read An Essay for Programming Students? It's linked from the sticky. I think that assembly langauge meets all of your requirements.
I know Java is really nice because it's cross-platform, however I've also always heard it's much, much slower than C languages.
Since you're just starting out, why is runtime performance a concern to you?
 
The first language I really learned was PHP, but a lot of the job req's we put out at work state .NET experience, so I have been wondering if I need to jump on that bandwagon.

At the end of the day, I'd look at what industry/career path you think you want to take and learn in that direction. I work for a large defense contractor, but the bulk of the jobs in either IT or software development that get posted for my company say .NET, Java and VB. There are some C's listed, but from what I've seen they're not as widespread as the others. Again that's just one company though and there's people here who do IT for a living and could probably give better advice on the topic, I'm just pointing out my observations.
 
Because I think I'd rather learn something that is efficient from the ground up, focus on one.
Why is efficiency a concern? Will you be writing code where you'd even notice the overhead of VM langauges like Java or C#?

I think career path is irrelevant, as well. If software development is your career, you'll learn plenty of languages. Start with the fundamentals.
 
Learn C.

It has a very small library, and as such you'll be forced to think of clever ways of doing things yourself. With Java, C++, and C#, there will be a lot of built-in functions to do things for you.
 
right now, don't worry about feature X of a language that makes it fast,slow, cross-platform, or whatever your particular pet bell or whistle is. find something that is easy to learn the fundamentals.

at this stage, i can write a program in PHP to sort 2 million numbers, and let you write one in C to do the same thing, and mine will guarantee to finish at least an hour sooner than yours... and that is considering that C is probably the fastest language in use today, and PHP is one of the slowest... this is assuming that PHP can handle that many numbers. other than that, the illustration fits.

another illustration... we can both program this one in java, or both do it in C, whatever... give me a Pentium I, and i will give you the beefiest PC on the market now. Let's have a contest to see who can calculate the factorial operation of the numbers 1-2000 fastest. my program will finish in under a second... i am fairly certain that with little programming knowledge right now, yours would never finish before the computer failed.

these illustrations are to say that mikeblas is correct, your concerns about efficiency aren't what you should be worried about right now. learn the basics of programming (variable declarations, conditional code execution, repetition) and build off of that.

remember.. until you are getting ready to go into a production environment, your focus should be to hone your skills and to also learn more...
 
I'm starting to think that PHP might be the best idea. Considering how many things are going web-based now-a-days. However, hasn't PHP recently evolved from web-only platform to standalone?
I honestly don't know if I'll be looking for a job that need a programmer, but maybe instead doing my own projects separate from my day job, possibly make some money on the side somehow.

Learn C.

It has a very small library, and as such you'll be forced to think of clever ways of doing things yourself. With Java, C++, and C#, there will be a lot of built-in functions to do things for you.
So C might be quicker to learn, due to it's small library, but be more difficult to work with. In the end, is it more limited than C++ or C# due to it's smaller library? Would C++ or C# take much longer to learn as a trade off for doing more things?
 
I'm still struggling to learn the reasoning behind your goals. If you want to become a dev, then you should learn the fundamentals. You should choose the language that makes it easiest for you to learn the fundamentals. I explain this path in my essay. Have you read it?

If you're going to do something else as a career, I think you should pick up one of the friendly scripting languages, like Perl or Python.
 
I read Mike's essay last night and it gave me a new perspective on learning. He's right. It doesn't matter if you don't know a language, but are an expert at another. A lot of concepts are the same thing, it's the syntax of the language you just need to learn.

So find one that's easy and fun to learn, and go on your way.
 
I'm still struggling to learn the reasoning behind your goals.

I guess I'm still trying to figure that out myself. I mean, I'm currently working for a electronics repair company, and fairly enjoy my job. But I harken back to when I was leaning about programming in VB and rather enjoyed creating programs. So I think to myself, "Whats a 'modern' language I can pick up that I can learn relatively easily, and use for purposes that I might enjoy (such as game modding, creating personal programs to simplify what I do on a day-to-day basis, or even applications that I can sell independently.)

So really, I don't necessarily want to learn programming as a "professional" but more personal.
 
Python would be my vote. It's cross-platform, easy to pick up, and incredibly powerful once you master it (Google is written in Python).
 
If you just want to do personal projects, you might think through what those projects usually are. Game mods often use LUA, for example--so why not focus on learning that? When you want a little program, is it a script in the command line, or a tool with a nice UI? If you write shareware, what kind of computers would it run on and what would it do?

Thinking more carefully about these questions will probably help you find an answer.

Python would be my vote. It's cross-platform, easy to pick up, and incredibly powerful once you master it (Google is written in Python).
Why is cross-platform important for a beginnging programmer? Some parts of Google are written in Python; it's entirely false to say that such a system is written in only one language.
 
When you want a little program, is it a script in the command line, or a tool with a nice UI? If you write shareware, what kind of computers would it run on and what would it do?

Mostly I'd want it to be something with a UI.
And I suppose LUA is going to be the best choice when it comes to game modding, but isn't that just for scripting resources that are already in the game itself? Wouldn't you need a more indepth language to change the fundamentals of a game?
 
I'm starting to think that PHP might be the best idea. Considering how many things are going web-based now-a-days. However, hasn't PHP recently evolved from web-only platform to standalone?
I honestly don't know if I'll be looking for a job that need a programmer, but maybe instead doing my own projects separate from my day job, possibly make some money on the side somehow.


So C might be quicker to learn, due to it's small library, but be more difficult to work with. In the end, is it more limited than C++ or C# due to it's smaller library? Would C++ or C# take much longer to learn as a trade off for doing more things?

Odds are you'll only learn about certain library functions as you need then. Your best bet is to learn basic programming (dealing with data types, programming logic, function and return values, etc) then jump into the world of object-oriented programming.

If you want to do OOP, you'll need C++, C#, or Java. C++ and C are incredibly similar so you can start on C then jump to C++ with no problem... and C# sort of blends Java structure and C++ syntax. A lot of it depends on what you want to program. If you want to program for the web, PHP and HTML are pretty much prerequisites.
 
Why is cross-platform important for a beginnging programmer? Some parts of Google are written in Python; it's entirely false to say that such a system is written in only one language.

Python is a great language to start with, because it has a fairly easy to understand syntax. It was my first programming language, and continues to be taught in schools to beginning programmers because it's one of the easiest languages to just jump into and build something useful without a whole lot of prep work. A cross-platform language is an excellent starting point because it gives you the flexibility at a base level to code for many operating systems. From a base like Python, a coder can continue their education by drilling down to more optimized, platform-specific languages or methods of coding. Python was my first language. I learned it my freshman year in high school and I still use it to this day. It gave me a great starting point for scripting and programming and I don't hesitate to recommend it to others because it was so useful for me.

Most of Google's web-facing stuff is written in Python. Some of the backends are C++ and Java, but the search engine itself started out as a Python-based project.
 
Most of Google's web-facing stuff is written in Python. Some of the backends are C++ and Java, but the search engine itself started out as a Python-based project.

Which is a vastly different claim than "Google is written in Python".

A cross-platform language is an excellent starting point because it gives you the flexibility at a base level to code for many operating systems.
I'm well aware of what cross-platform languages do. What I'm wondering is specifically why the attribute of being platform independent is an important discriminator in languages for a beginner.
 
So I think to myself, "Whats a 'modern' language I can pick up that I can learn relatively easily, and use for purposes that I might enjoy (such as game modding, creating personal programs to simplify what I do on a day-to-day basis, or even applications that I can sell independently.)
And I suppose LUA is going to be the best choice when it comes to game modding, but isn't that just for scripting resources that are already in the game itself? Wouldn't you need a more indepth language to change the fundamentals of a game?

We finally get down to something concrete. Do you have any particular games you are looking to mod or tasks you'd like to automate?

Lua is only really useful in modding games that have Lua embedded in them (IE - the developers designed them to be extended/modded w/ Lua) the degree of extensibility and the language used to do so is entirely dependent upon the developer (IE - World of Warcraft limits you to UI modifications where you can make a completely new game from a Source Engine 'mod'). There is no real standard.

I'm starting to think that PHP might be the best idea. Considering how many things are going web-based now-a-days. However, hasn't PHP recently evolved from web-only platform to standalone?
Just because you -can- use PHP for non-web projects doesn't mean that it's a good idea. Personally, I think PHP is piss-poor noob language; it's ugly, inconsistent, encourages a plethora of bad programming practices and the community is full of self-styled 'experts' that preach downright stupid things as gospel.
 
Indeed. While it's nice to make some progress fast and combat frustration, languages that isolate beginners from important details (like structure and data types, for example) seem like they're giving something up to more rigorous languages. PHP enforces very little, and has unique constructs in its grammar to combat the corners where that lax policy resolves in trouble. Languages like Python are at least slightly more rigorous, but still leave an awful lot of rope ...

Even so, the end goal of the student (or language user) is the driving force in the decision, overriding these more academic issues as well as things like portability.
 
Which is a vastly different claim than "Google is written in Python".

I'm well aware of what cross-platform languages do. What I'm wondering is specifically why the attribute of being platform independent is an important discriminator in languages for a beginner.

You're right. Google is a company, not an individual piece of software. I should have specified that I was talking about the search engine.

I just don't feel it's wise to lock yourself into a specific OS when you first start coding. There are all sorts of things you can do with a language without limiting yourself to an OS. Plus there's the advantage of never having a "shit, I already made a utility that does this, but it's Cocoa and won't work on my Vista box" moment.
 
You're right. Google is a company, not an individual piece of software. I should have specified that I was talking about the search engine.

I just don't feel it's wise to lock yourself into a specific OS when you first start coding. There are all sorts of things you can do with a language without limiting yourself to an OS. Plus there's the advantage of never having a "shit, I already made a utility that does this, but it's Cocoa and won't work on my Vista box" moment.

Their search engine is definitely not written in Python ;)
 
Their search engine is definitely not written in Python ;)

I was under the impression that it had at least started out that way, and that the web-facing portion of it was still Python-based. Google employs Guido van Rossum, the lead Python developer, to spend most of his time working on the language. In addition, YouTube is written mostly in Python. So however you slice it, Google has a large investment in the language and uses it for all sorts of stuff.
 
I was under the impression that it had at least started out that way, and that the web-facing portion of it was still Python-based. Google employs Guido van Rossum, the lead Python developer, to spend most of his time working on the language. In addition, YouTube is written mostly in Python. So however you slice it, Google has a large investment in the language and uses it for all sorts of stuff.

Absolutely. I love Python. I use it all the time when I can take advantage of its many strengths.

Massively high volume/throughput computations/queries (like the google search engine) are definitely not Python's strength.

http://panela.blog-city.com/python_at_google_greg_stein__sdforum.htm

Greg mentioned that to create code.google.com took about 100 lines of python code.

...and he wasn't just bragging about writing something with few lines of code. He was expressing how easy it is to rapidly deploy and maintain Python apps.
 
We finally get down to something concrete. Do you have any particular games you are looking to mod or tasks you'd like to automate?

Lua is only really useful in modding games that have Lua embedded in them (IE - the developers designed them to be extended/modded w/ Lua) the degree of extensibility and the language used to do so is entirely dependent upon the developer (IE - World of Warcraft limits you to UI modifications where you can make a completely new game from a Source Engine 'mod'). There is no real standard.

Exactly. The problem is that once I pick up a language for a specific game, by the time I'm any good at coding in that language, then everyone will have moved on to probably something totally different.
But really, game coding is not necessarily my biggest interest.

So it's starting to sound like no one language is going to fulfill what I'm looking for in the end. I suppose I should start out with dabbling in LUA and also try my hand at C/C++/C#. Would starting with C++ and then moving to C# be a good choice, or is starting with C really "essential"?

Also, one of my co-workers says that Cobalt, despite being ancient, might be a good thing to get into since it's still heavily used in major companies (such at Caterpillar, which is based out of my town of Peoria, IL).
 
Exactly. The problem is that once I pick up a language for a specific game, by the time I'm any good at coding in that language, then everyone will have moved on to probably something totally different.
But really, game coding is not necessarily my biggest interest.

So it's starting to sound like no one language is going to fulfill what I'm looking for in the end. I suppose I should start out with dabbling in LUA and also try my hand at C/C++/C#. Would starting with C++ and then moving to C# be a good choice, or is starting with C really "essential"?

Also, one of my co-workers says that Cobalt, despite being ancient, might be a good thing to get into since it's still heavily used in major companies (such at Caterpillar, which is based out of my town of Peoria, IL).

C is low-level high-level language. It has features like explicit pointers and you are expected to manage your own memory. It is a 'simple' language in that it doesn't have constructs like classes, templates, operator overloading, and I think when people recommend C they really mean you should learn things like manual garbage collection and pointers, which languages like Java and C# hide from you since they are managed languages.

I would not say C is essential to learn, but it really depends on you, how you learn, how you want to approach learning. Some people start from Assembly level, others learn C, some start with a high level language like Java or C# or what have you. If you have a reason to use C#, just go for C#. If you have a need for C++ immediately, go there. Really, what you want to do will dictate what you should probably do. If you want to write web applications running on Windows servers, for example, you'll probably want to look at using a language in the .NET platform, like C# or VB.net. If you want to do web programming that will work on various platforms/servers, then perhaps you might want to look into another language and its platform like Java, or Python, or Perl, or Ruby.

Don't be worried about people jumping to other languages, considering that some of the most widely used languages (like C++, C, Perl, Java, COBOL, FORTRAN) have been around for decades, and some languages like Lisp and Fortran have been around for half a century. And really, the fundamentals of programing and program design you learn will be applicable in another language, though syntax and how you approach using those methods will be different. Don't get into the mindset that languages are like computer parts and you will be changing what you use every 1 - 2 years, because that will likely not be true (unless you want it to be). Thinking like this usually stops you from actually doing something with the language.

Again, I'll have to reiterate mikeblas' earlier statement about reading his essay, if you have not - http://www.hardforum.com/showthread.php?p=1029612365

And it's not Cobalt, it's COBOL, which is a very common language in old business apps (it's almost 50 years old too), and if I remember correctly it holds the honor of having the most code in existence written using it. The number of COBOL programmers is small relative to the number of 'programmers' out there, since COBOL has been demonized as a language, most famously be Dijkstra. I won't stop you from learning it, but unless you're actually going to use it actively, you'll likely forget most of what you learn. If you'll be going for a job that involves it, whatever you want.
 
So it's starting to sound like no one language is going to fulfill what I'm looking for in the end.
...that's why there's so many of them.

I suppose I should start out with dabbling in LUA and also try my hand at C/C++/C#. Would starting with C++ and then moving to C# be a good choice, or is starting with C really "essential"?
If you don't see yourself becoming a 'serious' programmer, learning either C or C++ would be kind of pointless. I'd personally go for something a bit 'friendlier', like Python, but you could learn C# and (assuming that MSFT keeps the platform alive) never have to learn another language/platform the rest of your programming life.

Also, one of my co-workers says that Cobalt, despite being ancient, might be a good thing to get into since it's still heavily used in major companies (such at Caterpillar, which is based out of my town of Peoria, IL).
Picking up COBOL would be great if you want to get a data-processing job supporting 20+ year old business systems. It doesn't really have much else going for it.
 
If you don't see yourself becoming a 'serious' programmer, learning either C or C++ would be kind of pointless. I'd personally go for something a bit 'friendlier', like Python, but you could learn C# and (assuming that MSFT keeps the platform alive) never have to learn another language/platform the rest of your programming life.

I figure I'm going to try my hand at C++ first, see how easily I can pick it up. I'll move on to C# if I'm having way too much trouble or after I learn a good deal of C++. Maybe dabble in VB.net and LUA as well.

Thanks for all the help and information guys! :D
 
So it's starting to sound like no one language is going to fulfill what I'm looking for in the end.
What is it that you're looking for?

Exactly. The problem is that once I pick up a language for a specific game, by the time I'm any good at coding in that language, then everyone will have moved on to probably something totally different.
This is why it's important to know the fundamentals. After that point, learning a new language doesn't take very long at all. You just learn different ways to express the same ideas.
 
This is why it's important to know the fundamentals. After that point, learning a new language doesn't take very long at all. You just learn different ways to express the same ideas.
Just for clarity, what would you describe to be the fundamentals?
 
Just for clarity, what would you describe to be the fundamentals?

I'm sure if you ask 20 programmers, you'll get 20 different answers :)

Algorithms, Design Patterns

Variables, Types, Functions, Loops, Conditionals, Scope, Errors / Error Handling.

If it's an object oriented language (or even if not), classes, constructors, destructors, objects, namespaces, singletons, member variables, stack vs heap (maybe...).

If you have a language that doesn't do your garbage collection (or even if not), pointers/references, memory management.

It can be useful to have a high level knowledge of how processors work and what bytecode is.

Bytes / bits / basics of how data is stored to disk or RAM -
 
I wouldn't restrict yourself to just learning one langauge (probably be hard not to now). Do something like c# with xml, c# with sql or php with mysql.

Pick up one of the 'teach yourself in 24' hours or the like, and just see how it goes, think what interests you, what apps do you like already.
 
I think Caleb has a decent list, though I wouldn't include OO programming ideas. What I'm thinking about are all the things about how data is represented that most people don't know; the difference between data types and data representations; that "35" can mean six or eight different things; that "3.55" can be stored dozens of different ways. This is something that's before data structures, really.

I don't know if students need to understand assembler, but knowing what the CPU actually does with data and instructions is a logical next step. If I wanted to add "35" to "61", what would be the best representations? What can the CPU do natively, and what must it do with a conversion or in multiple steps? How does floating point work?

How is data pushed to the screen, and how is it represented once it gets there?

How is memory organized? That leads to memory management and pointers and so on.

How does code execute? That helps with conditionals and branching and the stack; flags.

Once those matters are understood, then move on to designing simple algorithms.

All of these things are language independent. Some of them sound like assembler, but I think that knowing them gives insight into how higher-level languages work. C programmers care how memory is laid out, but Python programmer's don't. Knowing how memory is laid out gives insight into understanding why the language is inherently slower than native code, and where the biggest expenses might be.
 
Learn C# if you're a Windows user. Do NOT learn Visual Basic, even VB.Net, unless you have to or you've already spent time learning at least one good language (C, C++, C#, etc.).
 
I'd recommend learning to code in C++. From there you can make the jump to java quite easily and even .net. C#, J# are just derivatives of the formers so if you can get the concepts that C++ demands, you can deal with pretty much any language thrown at you.
 
WhiteZero, if you're interested in doing games, have you considered learning Flash? The syntax for ActionScript is pretty standard and there's the whole graphic aspect built into it. Further many designers already know Flash, so if you're looking to partner up with a graphics person you're set.

GUI application development for Windows only, just use the .NET platform.

Cross-platform GUI application development, probably go for Java.

I do web application development, normally in PHP and Perl, though a bit of ColdFusion and Java.

I noticed in one of your posts you said, "...everyone will have moved on to probably something totally different." Who cares? Just learn something! :)
 
I would suggest C# unless you're thinking that whatever you write in Java or any other so-called cross-platform language will actually be used and sold to both Win32 and *unix customers. If you're still a bit doubtful, also look at Mono 2.0
 
If you want to do games then most major games are written in C/C++.
If you want to create programmes to automate stuff in everday life or your job then look at scripting languages such as ruby or python - they are also good for website creation.

They all revolve around the same principle as do all programmes so leanring a second language will be relatively painless. Its learning how to be slick in a language that requires time as with learning spoken languages. We can all learn how to order a beer in spanish but how about writing a dissertation in it.

I was in your position 7 years ago but wanted to do games so C++ it was. I was told it was a tough language to learn for a newbie but I sat down for months with some books and finally got a tetris clone and pacman clone done. Dont let that put you off it but be prepapred for having to learn a lot in one go to get one thing done compared to some of the easier scripting languages.

You also dont sound so sure as to why you really really really want to learn programming. Do you really want to learn programming or is it one of those things we all say to ourselves like "I really want to learn the saxaphone" yet it stays on the todo list till we die - the reason - we never really wanted to learn it that much, it just sounded cool.

I dont want to discourage you but once you find a solid reason it will make this decision so much easier. You can start on a language suitable for your situation and never have any doubts about turning back and starting on another language.

If you want to just get your feet wet again and rediscover an old hobby and see what doors it opens then go for the relatively easy scripting languages above. They have great free resources and have fantastic libaries and methods meaning you spend more time on solving the bigger picture of your problem rather than on some anal details like pointers pointing to pointers pointing to ...you get the idea.

For me, going from c++ to ruby was so easy!!! im still learning it thouh but here are some links for you to get going. How about a 15min trial in your browser, yes you can try it out in your browser right now!!! with no downloading here

http://tryruby.hobix.com/

if you like that then you try the full FREE thing and buy chris pines "Introduction to Programming" but why buy it when the author has his first edition up for free here which includes all the setup instructions http://pine.fm/LearnToProgram/ (dont confuse this for some crappy online tutorial, its a well written easy flowing book!)

if your hooked after that then a great book on automating tasks is this one
http://www.amazon.com/Everyday-Scripting-Ruby-Teams-Testers/dp/0977616614

dont let the testers part in the title put you off. Its a book for everybody. It had a chapter on scraping amazon and from that i made my own ebay scraper that analyzed sales performance of individual products e.g. which camera model was the top seller for march in america.

if its games then go here www.gamedev.net and investigate more. They have a modding section I belive. Thats where I started. Great for tutorials and discussion and very supportive.

anyway its become long, good luck (and apologies for spelling - red wine and 3 years in Japan are to blame!)
 
As an Amazon Associate, HardForum may earn from qualifying purchases.
WhiteZero, if you're interested in doing games, have you considered learning Flash? The syntax for ActionScript is pretty standard and there's the whole graphic aspect built into it. Further many designers already know Flash, so if you're looking to partner up with a graphics person you're set.

Flash/ActionScript are horrible, horrible products that are VERY lacking of structure and form with a very bad designer UI and about 10000 places that code can be for any given task. I did it at my last job and I never want to deal with it again.
 
Back
Top