Best programming langauge to learn

Soldato
Joined
4 Oct 2008
Posts
6,693
Location
London
Hey all,

So I'm looking for a new language to pick up, brief background of me; starting with Java at uni and did some C++ then went head first into PHP at work and I've been doing that for the last 3 years. PHP isn't bad but all the cool places I find either use a C language, python, ruby or Java. And I sort of want to move form just making websites to building much more interesting products.

I do about 50/50 between PHP and Angular, but if I had too choice I would pick a backend language over front end as you have a lot less PM/PO involvement in how something should look or behave, most of the time with them speaking from a point of no experience and forcing you to do what they want which I can only take for so long.

So over the last few weeks I tried out a number of languages, including Objective C, Python, .Net MVC, .Net sort of rubs me the wrong way since I have an irrational hate of MSFT after dealing with IE, Objective C just looked so weird, and Python didn't have types at all, not even things like private functions which scared me a little.

Anyways posting here to look for some recommendations/feedback from people who actual have experience in these things. I am also looking around as I might move to the states in a few years and I didn't find a whole lot of PHP there. I don't mind going into iOS development, or Python/C++/C#. Also it seems PHP developers don't make as much, I'm guessing since the barrier to entry is so low, and you can get a lot done with very ****** code compared to other languages.

Also things to mention are I don't mind about it being strongly typed or not, I like things that look neat, and I'm really enjoying OOP.
 
Associate
Joined
15 Oct 2009
Posts
579
I can give you a bit of advice along the Objective-C side of things:

You say that you are more comfortable doing something along the backend side of things, unfortunately ObjC isn't really used as a backend language, but thats not to say that it can't be. When I first started with ObjC I found it to be the strangest syntax for a language I had come across, but it doesn't take long to get into once you embrace it's quirks and oddities. One thing you should remember with ObjC is that it's simply a runtime built in C, whenever you compile it takes your code and converts your methods calls into C functions, your classes into structs etc.

Personally I love ObjC now, it's a brilliant language if you give it a chance, the only problem is you are limited to Apple platforms, but thats not to say ObjC itself is limited to Apple platforms, it's just that Apple doesn't support other platforms. These limitations come with other languages like c# on windows, but the beauty of ObjC is that you can mix in C and C++ wherever you see fit right along side ObjC if you need to get that extra performance or dive into things like OpenGL etc.

Moving on from that I think robotCocks is right in suggesting Node.js which is all Javascript, but unfortunately that moved away from your OOP and non website request, but it's still an interesting modern technology.

Getting back on track; Java is a very widely used language, I know you started with that in uni but it's used to develop applications on most platforms, backend and front end, mobile desktop and server, it's OOP like you requested and includes your beloved data types. Maybe you should consider going back and having a look at it again and picking something like Android ADK to have a play with (although eclipse isn't my favourite IDE, so maybe try Android studio).

Failing all of that you could say "**** the world and your boring languages!' and try something totally on the bleeding edge with quantum computing (I think you might need to wait another 10 years before this becomes high in demand though): http://qcplayground.withgoogle.com/#/home
 
Soldato
Joined
18 Oct 2002
Posts
3,926
Location
SW London
Node.js

and aspnet web api

Neither of which are languages.

To the OP, what is it you're actually trying to achieve?
Do you want a more interesting job and are looking for what to learn to get that?
IMO functional stuff is the way forward, and if you like things being neat it will probably appeal. I'd probably be looking to something like Scala or Clojure in your position. Both languages seem to be getting traction across fairly wide areas at the moment.
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
C++ gets might vote. Pretty easy, fast, very flexible, strong compiler support, industry standard, wide spread online, support growing in popularity and serves as a strong basis for other languages. In m Y fields it is still the de facto standard and has stood the test of time, updating and evolving when compiler and processor technology is suitable. If you are good C++ programmer there will always be work for you while many of the modern higher level languages come and go every few years. since the early 60s all these different high level languages with (then) advanced thing such as type-free, lambda expressions, interpreted code, strong abstraction. None of them really stick, the concepts although profound either don't leave academic circles, don't receive that much industrial support, or simply get re-written as a completely new syntax in a totally different language a few years later. Moreover, if you have a solid c++ background throwing together some c# or Java is very straight forward.

Whatever you do I would avoid fairly niche things like objective C or node.js. They have a very limited acceptance. Don't want to touch iPhones, then forget objective c.


However, most importantly the programming language is just a tool. A good programmer can be comfortable in many languages, can choose the best tool for the job, can quickly learn a new tool/language and is abstracted way from language constructs and limitations. The language is just the communication medium with the processor. It like doing a car, you don't learn to drive a ford mondo and Are unable to cope with a focus - a good driver can drive a wide range of cars, some might be rear wheel drive, some might be fast, some might have powers steering, some might be left hand drive- others might not.


On a near weekly basis I program C++, C, python, java, C#, fortran, JavaScript, bash, perl (and some html and SQL) . 90% is C++ , we do use python/perl/bash for simple scripting and very simple web purposes, some back end performance critical code is in fortran. We have interfaces with partner software systems and unfortunately have to code some java and C# (although mostly simple stuff to pass data to our c++ back end).


Focus on good software practices, algorithms, data structures, how computers and operating system work, testing, design, develop processes, software architecture.
 
Last edited:
Soldato
Joined
18 Oct 2002
Posts
15,411
Location
The land of milk & beans
Assembler.

Seriously though, there is no 'best' language to learn. The best way to learn is to just get stuck in. Think of a project you want to do, do a quick bit of research to determine which languages would be best suited to that, and pick one.

Once you've got the idea behind the priniciples of one language, learning another becomes much easier.
 
Soldato
OP
Joined
4 Oct 2008
Posts
6,693
Location
London
I can give you a bit of advice along the Objective-C side of things SNIP

Thanks for the info, I have a friend that does Objective C and he also loves it, but it does look extremely weird. I might give it a shot thou.

Neither of which are languages.

To the OP, what is it you're actually trying to achieve?
Do you want a more interesting job and are looking for what to learn to get that?
IMO functional stuff is the way forward, and if you like things being neat it will probably appeal. I'd probably be looking to something like Scala or Clojure in your position. Both languages seem to be getting traction across fairly wide areas at the moment.

Basically just want a job where I get to do more interesting stuff with code, typically with PHP its getting some data from the database, changing it, and passing it too the front end. I do much more API development, but it is still the same thing more or less, and your just returning some json.

So I want something where your doing more interesting things with data, I'm not sure what but anytime I do find something that does really interesting stuff its not in PHP, a lot of places do use Javascript on the front end and I really enjoy that. But I feel like I need a better/more backend languages. I will take a look at Scala or Clojure, which are both Java IIRC.

python is simple to pick up if you have prior knowledge.

Personally, I'd go the mobile route. You've Java experience, move to android dev :)

I have set up a Python project and will play around with it on the weekend. I did make a Android app during uni and it was ok so I might take a look at that again.

C++ gets might vote ...

Focus on good software practices, algorithms, data structures, how computers and operating system work, testing, design, develop processes, software architecture.

This is basically what I want, work where Algorithms and data structures are really important, PHP sort of abstractions everything and its great when your picking it up but now I want to move onto something more serious. I'm reading about C now and thinking thats a great place to start. Its low level, you have to care about memory which is something I've never put thought into, it has all sorts of data structures.

Once you've got the idea behind the priniciples of one language, learning another becomes much easier.

I think I'm at this place now, where I can look at source code for something and understand it, I had to debug some .Net at work a few days ago and I understood it pretty well outside of its idiosyncrasies and I think its a great time to pick up a few new languages.

Cheers for all the advice btw guys given me a lot to think about and play around with over the weekend, and coming weeks.
 
Soldato
Joined
30 Dec 2010
Posts
14,762
Location
Over here
From a purely hobbyist POV I really like C#, the 'speed' of C++ really isn't a factor for what I'm doing so things that make life easier in respect to drawing a window etc are a godsend.
 
Associate
Joined
19 Feb 2009
Posts
137
What about something more extreme and going down the 3D apps/games route with Unity 3D. You have a choice of languages between C# (recommended), Javascript or Boo. It is something different to what it seems you are used to, and it's free to use.
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
From a purely hobbyist POV I really like C#, the 'speed' of C++ really isn't a factor for what I'm doing so things that make life easier in respect to drawing a window etc are a godsend.

Then why not just python?

For me coding java or C++ is about the same productivity once you are up an running. (C++ will take a it more time with compilers, environments! linking etc but this is only harder for big projects and is more of a one off cost). If I have 10k lines of code to write it will be about the same time in Java as C++, if I have a large problem it will be in about the same number of lines in each. Java and C# have big library! but then C++ has STL, boost, poco, and code/lib for pretty much everything (because pretty much everything is developed in C++) and if you use C++ a lot then you develop your own code base filled its helper functions a tit bits that make life easy.

I do like java, but I don't see the big gains in productivity C# or java gains you over C++. Especially with C++11. I've had plenty of horrible experiences in both java and C# that are as bad as the worst C++ issues.

Now if I take python then I can develop something simple far quicker typically. But it is also not immune to horrible issues. And sometimes going higher doesn't make life easier. No strict variable types might seem easy but it leads to no end of bugs a compiler would catch before you even needed to test tour program!
 
Last edited:
Soldato
Joined
11 Sep 2007
Posts
5,740
Location
from the internet
Python seems nice, then it suddenly has all these weird inconsistencies like:

Iterating through a list gives you values, iterating through a dictionary gives you keys. wat.

And naturally if you chose to change the type of something in your program then it's probably going to go wrong unexpectedly at some point.
 

daz

daz

Soldato
Joined
18 Oct 2002
Posts
24,079
Location
Bucks
Basically just want a job where I get to do more interesting stuff with code, typically with PHP its getting some data from the database, changing it, and passing it too the front end.

I don't think that's going to change by learning a new language - that's what I expect you'd end up doing in most, simply because that's what there is commercial demand for. Interesting projects aren't a function of the language you're coding in (unless you're coding in FORTRAN or COBOL...).

I think mobile application development is probably where you would want to be looking - so probably Java would be where I would focus my efforts.
 
Associate
Joined
6 Jun 2004
Posts
2,389
Location
London
Granted I haven't used C++11 but I would have to disagree with the above view that productivity of C# over C++ isn't that great. If you don't need outright performance or multiplatform binaries then in my opinion C# is significantly more productive and efficient for the average developer. The amount of time I spent sorting out builds, linking issues and other menial problems in C++ was significant - especially when first kicking off a project. You can have a fairly advanced GUI up and running, with CI builds etc within a day in C# with Visual Studio and unless you are extremely well versed in C++, it's 3rd party libraries and other such projects, I don't believe you could have the same in C++ (more than happy to be proven wrong).

I am now 100% C# based developer as of 4 years ago, before which I slowly migrated over 5 years from C++ to C#.
 
Soldato
OP
Joined
4 Oct 2008
Posts
6,693
Location
London
Thanks for all the feedback guys. I feel have a lack of appreciation for data structures, memory managment and more of the low level stuff going on. And I feel this will help improve my programming, so I'm going to make a few basic apps in C/C++.

Then I will give Java/Python/C# a try, I don't want to actual make programs where I have to always worry about memory, and where I can have a risk of things like segfault. I think I will give them all a fair chance and see what fits with me better.

I might give Objective C a chance too, I'm not too sure. This will mostly be done on weekends for fun. I miss just programming for fun I'm sure a lot of you would agree, it sort of relaxing when your making something at your own pace in your free time, compared to heavy deadlines we work to these days.
 
Soldato
Joined
30 Dec 2010
Posts
14,762
Location
Over here
Then why not just python?

I like that C# does the 'garbage collection' for me, I recall struggling with the concepts of dynamic memory allocation in C++, I'm unaware if Python is the same. I also like the support it has with things like Monogame, XNA and various other libraries. I should point out I have no interest in application programming.
I also love Visual Studio IDE.
 
Soldato
Joined
8 Jan 2009
Posts
4,819
Location
North East
Although many abandoned Delphi years ago it is on the rise again and for Windows development provides a solid IDE and blazing fast compiler, and recently have started on Android and for a few years now iOS.

The language is Object Pascal which is basically pascal but more neater and efficient, handles the Windows API very well and is a fairly easy language to learn with tons of examples to get you going. Also there are tons of 3rd party component libraries available and many top quality ones are free and open source.

Although possibly not the cheapest option I would highly reccomend Delphi / Rad Studio if it is mostly for personal home projects as in the jobs sector Delphi Programming jobs we're in decline years and years ago.
 
Associate
Joined
7 Nov 2013
Posts
255
Location
Kent, England
As an FYI, it seems Apple are going to be pushing their new language, Swift to replace Obj-C.

The advantages of C and C++ are becoming less and less as time progresses, you will find stability pretty much always trumps speed. But regardless of that, the benefits of JIT compilation can sometimes result in a faster managed application (e.g. C#) than native, this is because it is able to make use of instruction sets supported on the host, whereas C/C++ needs to be pre-compiled to the most widely supported sets.
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
As an FYI, it seems Apple are going to be pushing their new language, Swift to replace Obj-C.

The advantages of C and C++ are becoming less and less as time progresses, you will find stability pretty much always trumps speed. But regardless of that, the benefits of JIT compilation can sometimes result in a faster managed application (e.g. C#) than native, this is because it is able to make use of instruction sets supported on the host, whereas C/C++ needs to be pre-compiled to the most widely supported sets.



Actually the advantages of C and C++ are growing as more and more people are using more and more infrastructure. The costs of a JIT compiled language become less and less appealing because the programs become more and more expensive to run, and then things like garbage collection can be very disruptive. A firend of mine is porting a large server infrastructure to C++ from java because despite spending significant money on trying to tame the garbage collection it just was getting to intrusive, C# was trialled and was deemed worse for some reason, so everything is getting ported to c++ so there can be better control of resources.

The compilation issue for server side systems is meaningless because you have the program compiled for the specific architecture. Why compile a program every time you want to use it, nothing has changed since the last time you ran it. The architecture specific optimizations of JIT are typically way over stated. The last time I saw a comparisons (a few years ago no so things might have changed) there was typically only a few percent difference, while using c++ instead of C# or Java can easily get you a 500% speed up. And JIT suffers form the fact that it has very limited time to compile. Ideally you need need a combined system, precompiled but some form of online compilation that can make limited modifications.

The importance of c/C++ is supported by evidence with c and C++ continuing to remain steady with a significant market share, C still has the largest market share and c# only has 60% of the market share of C++. Java continues to be strong and more or less equal to C, and that is largely bolstered by android. Objective-C before the Iphone release was more or less unheard of but now sit at 12% or so, over 3X more than C# for example. It would be nice to know how much of the Java coding is specifically for android and remove this to see both the desktop and server market share in isolation. I'm very confident if you looked at server and desktop markets then c++ would equal Java for market penetration.


And lastly "you will find stability pretty much always trumps speed", yep, but c++ is more stable than many other languages. I've had a python server crash months after release because of the lack of type safety. And anything that uses garbage collection is dubious to be called stable - you can't gurnatee when the GC kicks in and your server stutters. We also have a c# server that falls over regularly due to a stack corruption in the CLR caused by a different c# process (this is .NET1.1 but we have no control over clients servers).
 
Back
Top Bottom