Jump to content

what's a good programming language to learn?


ecoli

Recommended Posts

 

Yes. Any programming language can be used to do any task.

 

Not true.

You can't make f.e. 3d game with PHP/JavaScript.

You can't write drivers using high level languages.

You can't make operating system using high level languages.

You can't write memory monitor in Java/JS/PHP/Basic.

etc. etc.

 

There are many things that won't have sense doing in interpreted language, because the way they are working, program would have to run years to finish..

 

If you have to use 3rd party library written in C/C++ in some high level language to do something (f.e. render 3d graphics using CPU (pixel by pixel)), it just proves inability of doing it natively in given language.

Edited by Sensei
Link to comment
Share on other sites

 

Not true.

You can't make f.e. 3d game with PHP/JavaScript.

You can't write drivers using high level languages.

You can't make operating system using high level languages.

 

Of course you can. All useful programming languages are Turing complete.

 

3D graphics in Javascript: http://ctho.org/toys/3d.html

PCI driver in C: http://www.cs.fsu.edu/~baker/devices/lxr/source/2.6.25/ldd-examples/pci/pci_skel.c

And, of course, C was developed with the main purpose of writing the Unix operating system.

Edited by Strange
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?

...

Perhaps this is OT, but the door was opened. You represent a common misconception -if not insidious meme- in understanding scientific thought and progress. You show the contradiction yourself because most certainly those 3 historical characters knew full well what went before, i.e. they did their due diligence in research. No one discovers anything of import in a knowledge vacuum.

 

Back on topic, a good programming language to learn is one that does what you need. I first learned GW-Basic (we called it Gee Whiz Basic back then). Later took some required course work in Pascal but never used it outside of class. Now when I need programming I tell someone what I want done and let them choose the language and work out themselves what isn't giving me what I asked for.

Link to comment
Share on other sites

 

PCI driver in C: http://www.cs.fsu.edu/~baker/devices/lxr/source/2.6.25/ldd-examples/pci/pci_skel.c

And, of course, C was developed with the main purpose of writing the Unix operating system.

 

Of course I thought about C/C++ as pretty low-level languages.

(I even wrote sound card driver for C-Media PCI card 15 years ago)

 

I meant that you don't write driver/OS in f.e. interpreted languages.

Link to comment
Share on other sites

  • 2 weeks later...

Java is the best language for you to learn , that is used globally. It is platform independent language, so it can be used on every type of machines.

So can Python, C# .net with Mono, and both are arguably more platform independent than Java, Java heavily depends on the runtime environment, libraries available in Oracle JRE for example are not all avilable in OpenJRE or Dalvik. And Java doesn't run on every machine, if oracle doesn't make a JRE for a platform, Java doesn't run on the platform, at least well, take Raspberry Pi for example...

 

Mr Greg, JS many beautiful things exist; jquery (i use it all the time), angular, node (can be very useful) and the ones i've been looking into lately three and ember which is kind of like RoR, but in JS and for browser-side apps...

Link to comment
Share on other sites

  • 2 weeks later...

If you want to learn on how to write programs, I would suggest Python, since with Garbage Collection, terse and readable code, a nice set of libraries, it will ease a lot of the beginner's mind on how to write the program, instead of wrangling with how to make my program work.

 

As you progress along python, you will slowly meet obstacles that would require an in-depth understanding of how memory work, etc. This is done gradually after you have developed a consistent model of how to write a program (this is the most important thing of all) since python is beginner friendly and consistent.

 

As for programs where you'll start to need the speed of compiled languages, try out D, which is essentially C++ done right. D leaves a lot of freedom to the programmer, yet provide a safe place to test their limits.

 

I've used Python and only started C++/Java/D in that order after the need for faster execution. However, I still maintain the coding style I've used in Python: Write by humans, for humans.

 

Python encourages you to focus on the content of the code, not the words(syntax) of it.

Link to comment
Share on other sites

Wait if you wanted C++ done differently, wouldn't you do Go? Also C++ is C++ done right, just because someone doesn't learn their language history doesn't meand that C++ is all of a sudden somehow wrong...

 

Python was designed to teach students how to write code correctly, yes, it is a great language to start with.

Link to comment
Share on other sites

  • 3 weeks later...
If you are selecting a programming language to someone learn as his/her first one, I think a very important thin to consider is how didactic it could be.

I think its complexity is an important point, but I would mind first about how the language syntax presents the concepts of the elements of programming, such as conditionals, blocks, subroutine calls, loops, etc.

Link to comment
Share on other sites

Programmers have to learn how to program, syntax is merely a language in which you express your programming ideas, it's like a color in a painting, you have to know form, you have to know shape, you have to know how your idea will read before you draw something, color, while important, is not the end of the world, you can have a painting in one color that still conveys your idea. Same thing with programming, when you know how to program, syntax is merely the language to expressing your solution. It can limit you, and there are some different programming types which make that not a blanket statement, but for the most part, it is true, you know what structures you need, what constructs, what constrains, what data, etc depending on the complexity of your program (could be contexts, namespaces, semaphores, locks, sockets, etc, etc). Once you know what you need to do, you can look up the syntax of doing it in whatever language you are using, you also learn its constraints and so you have to sometimes find other solutions, but that is what makes it fun in the first place to learn a new language :)

Link to comment
Share on other sites

  • 3 weeks later...

I should explain that I don't have any modeling project in mind, per se. I just want to learn something that would be adaptable to future use. I've heard of C and python, and got a recommendation of Java from a friend of mine...

What's R, klaynos?

Don't start with Java. Java is an object-oriented language and is very complex. I wouldn't suggest it to start, but C and Python would be good starters.

Link to comment
Share on other sites

Java is no more, and i would argue is less complex than C and Python. You can express object design in C, while cumbersome, it is doable. And Python is also an object-oriented language. Objects are just ways to represent your data, there is nothing scary about them :)

Link to comment
Share on other sites

.... Objects are just ways to represent your data, there is nothing scary about them :)

 

I think that's a bit simplistic (though you may not have meant it quite as simply as it reads).

 

This sort of thinking leads to (what seems to me a very common structure) where the data is model "OO-ishly" but then for processing the data objects are just passed to business logic in separate classes. That's actually fine for many uses, but when the business logic is modelled with the data you start to get a lot more of the benefits of OO (polymorphism and all that).

 

For example, it's very common to see a Person object and a Dog object, then see them passed to the EstimateLifeSpan class, which then uses a switch/case statement to see what type of object it was passed, and do the appropriate calculation. It can be nicer for the Person and Dog objects to not only encapsulate their own data, but also the relevant methods (or calculations wrapped in properties), so something wanting the animals life span can just - whichever kind of animal object it has - call the EstimateLifeSpan method on the object itself. No big case/switch statement. (All helped along by interfaces and all that, with common properties and methods coming from some base Animal class ...)

 

I do think the first structure is quite common, and most often the style people can be used to; the second "more OO-ish" structure can be "scary" to them.

 

 

Anyway, my two cents on the OP (I'm sure I'm not the first), if someone has a Windows PC - just get one of the free "Express" versions of Visual Studio and go with C#. Plenty of help. Plenty of forums. A good free IDE. From there it's no big stretch to go Java or C++ or similar if required.

Edited by pzkpfw
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 2 months later...
  • 2 weeks later...

If it requires significant speed to be useful, C is the obvious choice. C is also, in my experience, rather painful to use.

 

If you want something relatively simple that can do the modeling (just not as quickly), try Python. It's fairly simple to learn and you can probably find pre-existing Python code that'll help you do what you want. O'Reilly's Learning Python is a good place to start.

Whilst I agree. I have to say LUA as my recommendation. Simply as it normally is used to modify c scripts that can be overwhelming at times. Applications mainly include games in my experience. If you want to also understand the electronics behind the exe then I suggest ASM

 

Regards to asm. Pick your processor and look up the specs.

 

Don't worry MigL.us youngens still use asm...as a torturing excorsise :P

Edited by Sirshelley
Link to comment
Share on other sites

  • 2 weeks later...

I would say that it depends on your temperament or comfort level when considering which programming language to learn first. Typically Python is recommended as a first learning language due to its ease of use and also because its learning curve is not anywhere near as steep as, say, Java or C. However, if you do want to get into serious programming or want a deep understanding of computer science, then C++ is a must. I'm currently in the process of learning C++ for this reason, though I have already learned Python and Ruby to a certain degree.

Edited by 2501
Link to comment
Share on other sites

  • 3 months later...

It is very good that you want to learn a programming language, they are all the language of the future.

 

Beyond this, if you haven't learned any languages at all, HTML is a VERY good starter. This is because you dont need a specific compiler, notpad or textedit with both do, and you can instantly see the results of it in a web browser. After this CSS is good, PHP is also a good intro to variables and information communication across pages (you will need XAMPP, a free testing server software), and JS is always good.

 

Java is good if you are wanting a strictly computational language, but it can be tricky. C and C++ are cool, but on the same level as Java.

 

Hope this helps

Edited by rmcwho901
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.