Language to learn next?

@John-freeCodeCamp

As i have never used C++ before, but from what i can guess its not as good as JS at editing HTML’s and doing working on websites.

No, C++ is not made for that. It would be like comparing a hammer and can opener for how good they are at opening cans. They’re both great tools, just for different jobs. But you mentioned backend - there aren’t many people (if any) using C++ as a a backend language. True, there might be little services running that are written in that, but the actual server will be running in a more typical backend: Node, Python, Ruby, C#, Go, Java, etc.

Microsoft made a version of Minecraft in C++ and it ran way better compared to the Java version. That is what i am talking about, its what languages are best in what ways.

My perception is that C++ is going to generate lower level code, as opposed to Java’s metacode. C++ will probably be faster and lighter, but will have to be compiled separately for each operating system. Java is a little slower but will run on anything. Again, different tools.

My idea was learning a decent back end language that is useful for making API’s or something that really has nothing to do with HTML.

Well any backend language can server HTML or it can choose not to and just be an API endpoint. That is an architecture choice, not a language choice.

What is better, C or C++ for doing the heavy back-end work of just computing stuff very fast. Granted i have seen

Yes, they will both be faster. C will probably be a little faster but you loose the OOP and other features of C++. But the question is: Do you need the speed? If I am converting 100 temps from Fahrenheit to celsius, then it really doesn’t matter. If I’m doing computations for 3D ballistics in an FPS, then it will matter and I’ll want to write something in lower level language. I may still write my server in Node (or whatever) but for that calculation I’m going to call a program written in C or Assembly or whatever.

But is C++ easier to learn and close enough to put off the learning cost?

I hate cliches, but the old chestnut, “Learn concepts, not languages” has a lot of truth to it. Once you learn the OOP of Java, the OOP of C++ is pretty straight forward, and vice versa. Are they easy languages? I wouldn’t say that.

I think you have some misconceptions about what languages do what. Take a step back.

What do you ultimately want to do? Build web pages? Build servers? Build games? If you’re building games, is it on PC or mobile or gaming console? Do you want to code complex math and engineering problems? There are so many things to choose and there is no one language to rule them all. Even within one of those specialties there is often not one clear choice.

What do you want to do? Got it? Now go on linked in or whatever and find 10 people who do exactly that and ask them what they think. Or find blogs by people in that field.

1 Like

There are many programming languages with appropriate frameworks that can be used to write a back-end application, and they all have their pros and cons. Some of these have already been mentioned, others have not:

C# has .NET (ASP.NET on Windows, or .NET Core for multi-platform)
Elixir has Phoenix
Golang has Revel and Beego (among others)
Java has Spring (among others)
JavaScript has Node.js + Express.js (among others)
Ruby has Ruby on Rails
PHP has Laravel and Symfony (among others)
Python has Django and Flask
Scala has Play and Lift (among others)

So there are lots of options to choose from, it depends on what your goal is.

1 Like

I hate to link to Wikipedia, but I thought this chart was pretty interesting:

C++ is definitely not out of date, but I don’t know that I’ve ever seen it used in web app backends. I guess it’s possible, but I believe it’s more often used for compilers and image processing. I have personally stayed far away from Java, not because it’s not in demand, but because of the types of companies who are demanding it. That’s just my experience of course.

Language is going to depend on how performant you really want your search engine to be. Have you done any backend work before? If not, Python (specifically the Flask framework) is a really good starting point. It’s about as readable as you can possibly get with a programming language, and it’s been proven to run at scale. Same thing with Ruby (and Rails) - super popular, relatively easy to learn, and you can get a job with it later if you want.

Both of these are dynamically typed though, so they’re simply not going to be as fast as a compiled language. You probably won’t notice until you hit a very large scale or a certain point of complexity, but it’s important to know.

I would advocate against PHP for the same reason I’ve never gotten into Java, but again that’s just my experience. It’s got a huge community and there are plenty of job opportunities, so if that’s your ultimate goal it’s not a bad option at all.

If you want a compiled language, Go is probably the hottest thing right now. It’s backed by Google and a bunch of large companies use it, so I think it’s safely out of “trendy” status and into “popular cause it’s actually good” status. Scala is also fairly hot, but job options are a lot more limited and the community is not quite as big, so you may have a harder time finding learning materials.

All that being said, I use Node on the backend for all my own projects. First, it’s relatively easy to make the transition if you already know JavaScript from the front end. Second, it actually performs really well when properly used. It does get bulky with dependencies, but there are a million success stories where large companies migrated to a Node architecture at scale. Walmart, for example, switched over right before Black Friday and according to them, their servers’ CPU maxed out at 1%. This deployment was done with 200 million users online, by the way. There are similar success stories with other languages, just wanted to point out that “bulky” doesn’t mean slow in every case.

Anyway, I think the best way to figure out what to learn is to watch a couple tutorials, do a couple very small projects in different languages and see what clicks for you. It’s not easy to pick up a new language, but at some point you’ll begin writing something and realize you’re having fun thinking in that language’s paradigm. You can’t go wrong with any of the languages mentioned in this thread, so take a couple of them for a test drive and see which one best matches your style of thinking about programming. It’ll be easier to learn in the long run if the language you choose coincides with your thought process, and they’ve all got very different things to offer. Performance is only one aspect to think about.

The original idea i had in mind was learning a popular and useful programming language for back-end.

I just want to have something that can do basic projects, easy to learn for a beginner, and widely used. I don’t have one idea in mind, i just want something that is generally good to use.

I know everyone has diff rent purposes, but they can do a decent job at the same small task if you try. Once you get bigger then it becomes more apparent on what you want to use.

What back-end language is best for someone to learn best to grasp it?

Here are the top choices i have heard and seen from these replies:

Go
Node
Python
C

1 Like

Yeah, Go, Node, and Python are all very popular. Ruby is popular too.

C is a great language, but I wouldn’t call it a “back end” language per se. It is a very powerful low level language that would teach you a lot, though.

To put it more simply then, python is the one most favored for teaching children how to code. But at high school level, most people prefer to teach java and it also used to be a popular first language to teach OOP in (i’ve been out of school for a long time so no idea what they’re using now, easy enough to check though).

I agree with what you said, but I would say that Python “ain’t just a kids language no more”. It is increasingly being seen in higher education. It is also used a lot in ML and DS.The last algorithm meetup I went to, half the people were doing it in Python. I think as those kids grow up, we will see it become almost the lingua franca. But maybe that is a bad thing - as the number of Python coders outreach the need, the demand and pay for it will drop.

We’re not living in the 80s or 90s anymore where you have to spend real $$$ to try out a programming language by buying the software in a box.

All the languages mentioned here, their tools, IDE, compilers, editors, etc. are all FREE. F.R.E.E.

Just download the packages. And just try them all out one by one. And make your own decision.

2 Likes

C isn’t generally easy to learn for beginners to programming. Learning it would be useful though, as it’ll give you a very strong understanding of how the computer and memory work. But there’s a reason it’s been phased out of a lot of colleges and universities in their CS curriculums, as it’s complex and obtuse. As already mentioned a few times in this thread, it’s really not a language for web development, and is used mostly for applications like operating systems, device drivers, embedded systems, and high-performance computing, which sometimes includes game programming (3D graphics in particular).

I’d be personally inclined to suggest Python or Ruby, as both of them are far easier to learn, especially if you know JavaScript, since all 3 languages have some similarities to each other. They’re also all used fairly widely in the industry, so you shouldn’t have too hard a time finding a job with any of them. Golang and Elixir are both getting more popular and prevalent though, and may be worth learning if you’re more interested in the latest technologies.

1 Like

Personally I don’t think it really matters that much whether you learn python, php, java, … It’s important to understand how the backend of applications work, what design patterns are used and how objects are used in those. You can learn this in any of these languages and if you learn afterwards that you started with java but php would fit your needs better, it won’t be that hard to switch to php. There just isn’t a language that’s the best option in every scenario. It really depends on your project.

I’d suggest Node or Python if you’re looking for something that is fairly easy to grasp. Both Flask and Express (popular web frameworks for Python and Node, respectively) are good starting points for creating simple APIs and apps.

Go is a slightly more advanced option, so if you are just looking to get started, I would recommend one of the two above.

An abomination!

KILL IT WITH FIRE!

If you want to go all Microsoft you could consider C#/ASP. NET, but I wouldn’t really want to build a search engine using it. It’s more of backend framework for managing object persistence and database access, but if you’re looking for back end systems that have a growing demand, it’s definitely up there.

Although C/C++will be around for years, these days they’re mostly used for low level developent where preformance is a major factor, like embedded systems, and DSP.

So here is what i have contained from your responses

C/C++ is not the best language to be learning first i should be trying for simpler like Python, Node or Ruby.

Is this true?

The tech high school i will be in next year does learn Python, so should i go towards that as a help down the road?

1 Like

yes, Python is the one to go with if you are looking for easier to learn back-end language.

1 Like

Carl Cheo’s flowchart is probably going to be very helpful to you right now: http://carlcheo.com/startcoding

The question is where you’re trying to get to.

It’s not so much that it’s simpler: C is a much simpler language than anything else mentioned, it’s just that you have to do almost everything yourself. Its very low-level, you have to explain to the computer exactly what you want it to do, and in practice that gives you a million and one ways to mess things up.

Like if you wanted a simple HTTP server, in C you’re likely going to have know about how to implement the low-level parts of it, about how networking and HTTP protocols etc work, and you’re going to need to build all that yourself. In Python, you can just import and use the http.server module that comes as part of the standard library, just a few lines of code. Higher-level languages are much easier to work with at the cost of not being able to easily manipulate low-level stuff (in particular memory) [this is a simplification, but it’s basically true].

For what you want (simple HTTP APIs), don’t use a low-level language unless you want to learn all the low-level moving parts; that process would be incredibly instructive, but will take you 1000× as long to produce anything usable, and even that thing will not really be something you can use in the real world, it’ll be a toy.

If you want to make games, native GUI stuff, high-performance data processing stuff, C++ is a very good thing to learn. If your aim is to write web applications, it’s not so useful.

To focus on the original question:

What back-end language could I use for doing a lot of back-end work and making an API?

IMO, you need to ask yourself:

  1. Is it easy to learn and to use?
  2. Is the time between ‘start coding’ and ‘thing you wanted to code showing up on the screen’ quite short?
  3. Does it have good learning resources?
  4. Does it have a large community of users?
  5. Does it have a good standard library (i.e. out of the box, can you do most things)?
  6. Does it have good and well-supported libraries/frameworks for what you want to do?
  7. Does it teach you something new?

JS is ok on most points bar 5: it is diabolically bad in this respect, given it basically has no standard library (nb Node has an ok-ish library). Also, arguably bad on 1 as well, as it tends to do weird things (though ES6 fixes a lot). Personally, I don’t like it at all for backend stuff, but lots of people do.

Python is generally pretty good on all points except probably 7. It is like a hammer. It isn’t necessarily going to teach you anything deep but it’s pretty easy to hammer almost anything you want into shape. I want a web server, bang bang bang. I want to process all the files in this directory, bang bang bang. I’m sick of going through these spreadsheets by hand, bang bang bang. I want to do some maths, bang bang bang. Flask is a good lightweight web framework for Getting Shit Done.

Ruby is in many ways similar to Python but without the take-up in academia (so no fancy maths/science/machine learning/etc frameworks), and I would go Python given the choice; note Ruby seems to be dying off somewhat. Ruby on Rails is a good framework for getting fully-featured web apps out the door quickly.

Java is very good on all points except probably 2. You need an IDE for it. Other very well-regarded languages (Kotlin and Clojure in particular) also run on the JVM (the thing that runs Java on yr computer) and you can use them alongside Java no problem, mix and match in one application. Small but crazy frustrating niggle: the JVM is famously very slow to start up.

C# is very good on all points bar probably 6: the ecosystem is obviously geared toward dotNet applications (the language is for building applications), and type of libraries available reflects this (this is definitely not an issue in your case). Also commonly used for game scripting (see Unity in particular). Like Java, need an IDE for it (Visual Studio is pretty great though). Also like Java, the thing that runs C# on your computer, the CLR, has several other high quality languages that interop seamlessly with C# (most importantly F#, which is a brilliant language).

Go is I guess good on all points, particularly 1 and 5. Less usage in the wild as it’s newish.

PHP has the benefit of everything being in one place: you can literally have a single file + a database with everything in it for a fully functional CRUD app. Whether this is a good idea, well… Having all your code in the same place is genuinely a great thing though (like an HTML form, and the logic to do stuff with it, to submit and deal with the response). It did have a deserved reputation for being a massive unholy mess, though it seems to be a bit better now. Similar to JS in that it’s very easy to get started and get something out. Also similar in that it wasn’t really designed to do the million and one things people try to do with it.


C kinda falls down on a load of those points; it’s simple but needs a fair amount of experience to use well, it can be a pig to get stuff compiling, many users, but they’re often skilled users and in disparate communities if at all etc etc. Maybe bad analogy: is a bit like learning Latin.

C++ can do everything C can do plus you get a load more stuff on top that: it has a huge surface area. The caveats for C still kinda apply, but much less strongly. It’s used all over the place, but w/r/t backend web stuff, generally only for parts of applications that need very high performance (ie parts of data processing pipelines). If you want to build web APIs it is not really the language for that.


Regarding point 7 (does it teach you something new), just pick one language and build stuff, it’s much of a muchness at this point.

I would also unequivocally recommend the Coursera Programming Languages series; not for building an API, just to understand different programming methods and paradigms, they are very, very good:

4 Likes

Python is my favorite for this kind of work, it’s a very clean and easy to read language. There are tons of mature, dependable libraries with excellent documentation as well.

Other viable choices are Javascript (Node), Ruby (Rails, Sinatra), and PHP (Laravel).

If getting a job is your primary goal, then I would recommend doing job searches for each language to see what is popular in your area. If you are in the U.S., then indeed.com is a good site. The popularity of languages varies a lot by location, so it’s worth taking the tome to research this before committing significant time to learning a language and its ecosystem.

It’s also worth looking through the listings for each to see what kinds of jobs are associated with each language. Java and C# have a reputation for being used by larger enterprises (think financial, insurance, etc.). PHP gets used by a lot of WordPress shops. Ruby is on the decline but still has a healthy market among smaller companies. Python is a rising star, but in my area I’ve noticed than most of the jobs listing it are sys admin, qa, and data scientist positions. And, of course, if you already know JavaScript, it would make sense to leverage your existing skills to learn Node.

2 Likes

I have waited until i had a lot of response’s to respond and i am happy.

I am going to go towards Python mainly and try Node.

@DanCouper 's table of what language is good for what is very good, and i thank you for typing all of that along with everyone else’s responses.

I asked because i have seen a lot of the languages before and they all seemed simple, so i wanted to know what you guys think.

As Dan pointed out about the web courses, do you know any sites like FCC that teach Python or node for free and teach it well? Not sits with page long explanations that go 5 steps at a time, simple 1 step learning like FCC does. I also wan’t to be coding not be playing any games or anything. Throw me in a lake to teach me how to swim type thing.

@DorInTheWall , Thanks for the image/ table :slight_smile:. Seems helpful, will be using it.

Thank you guys very much.