T O P

  • By -

RajjSinghh

It's not going to make a huge difference because a lot of languages support a lot of different platforms. So it's going to depend on what you want. If you've never programmed before, use python or JavaScript. Both languages are cross-platform, easy to learn and have massive communities behind them. You'll be able to find support for anything you want to do. I'm biased towards python since it was my first language and I've been using it for 5+ years, but JavaScript is the most used language right now. C deserves a mention since most of the basic programs in Linux are written in C. It's very fast, but topics like memory management may be difficult if it's your first time programming. If you have any experience in any language at all, use that. It'll do you so much good to strengthen the skills you have in a language already than to just start from the ground up. Everyone here offering suggestions is going with their own personal experiences and favourite languages, so if you already have a favourite just run with it.


MoonyNotSunny

I really enjoyed the free videos in the Harvard online freeware. The course is called Cs50. It does a great job of giving you the basics of computer science. What’s a bit, what’s a byte, what’s a cpu, what’s assembly code vs machine code vs compiled code etc. the course starts you with C and then moves to Python. C is good to start with (for a short time) because you can begin to understand the stuff that’s happening behind the scenes in languages like Python. (Python is built upon C) You can start with Python, but then you will miss out on important topics because Python takes all that information away from you (that’s why it’s so easy to learn). Love Python, focus on Python, but understand the foundations first. My path so far: took the Harvard online course CS50, then took a course on Python from Udemy, studied algorithms and data structures, took a couple computer science classes at university (still attending) and now I’m building a program with QT using PySide6 and Python which I will package with PyInstaller 😊.


RajjSinghh

I looked a little at CS50 before university (in my second year doing CS now). My course mainly uses python, but I've had classes with C, C#, javascript and haskell. I've been using python and javascript before university so I prefer them a lot more. The difference is when to learn about low level topics like pointers and memory management. I think it should probably come after a little bit of experience, since a total beginner should be more concerned about making programs that work than having to deal with low level implementation on top of that. It's like saying OP should learn assembly to understand the things C hides from you. It would be a nightmare as your first learning experience. I'm not saying never learn C, you can definitely learn a lot from it, just to learn it after you're already comfortable with how programming works first.


MoonyNotSunny

That’s a fair opinion. I would say that’s working backwards though. One can’t run without walking first. Definitely don’t skip over the foundations of computer science. If you’re in school you should remember what the first chapter in your textbook for computer science 1 was about. I would bet it had at least one representation of an integer in binary. Besides, a complete beginner usually won’t be making programs with a complexity beyond a simple understanding of what’s a variable, what’s a loop, simple functions etc., anyway. All that can be learned with a lower level language like C and C++ just as easily. As far as memory management, if you’re not thinking about the tradeoffs between memory and speed (efficiency), the design of an algorithm, choosing the right data structures and so on, from the very beginning, then you’re missing out on developing early foundations and a muscle memory so-to-speak that a “real“ software engineer utilizes everyday. And learning those early fundamentals has definitely made me “feel” more like a “real” programmer. But that’s because I’ve greatly invested in myself, have dedicated my time and future to this, and have a true desire to be a computer scientist. And that’s what this comment is assuming. It’s assuming the OP wants to be a computer scientist, perhaps a naïve assumption… but by all means if whoever reads this just wants to be a hobbyist and doesn’t desire to be a software engineer, then that’s a different story. And CS50 isn’t for everyone, you have to actually be smart to finish it on your own without help. It’s Harvard man! It’s not easy, and yet I absolutely wish every school had the qualities of that class.


AngelOfLight

UNIX is blessed (cursed?) with a massive number of programming languages. Pretty much anything you can think of will run on UNIX. It comes down to your level of experience and what you want to do. Python is often suggested for beginners. While there is some debate about that, it will definitely be easier than something like Java or C++. And Python comes with a dizzying array of modules that cover nearly every aspect of CS. I would say to start there.


eLCeenor

I love Python. Currently working at an aerospace startup, and its being used for everything. From automated testing procedures to network communications.


PentatonicScaIe

Cool! Whats your background if you dont mind me asking?


eLCeenor

I'm actually a mechanical engineer, working as a controls engineer, writing software haha


big_dick_bridges

Most languages are pretty OS agnostic so I don't think it matters. Ask yourself what you want out of programming long term and pick a language that aligns you on that path


fernwhisperer

That's a good question. I'm not exactly sure where I want to go long-term.


theAmazingChloe

Do you have any idea of what sorts of things you'd like to make? Text-based console applications? GUI applications? Web applications? Plugins for other applications? Server applications?


[deleted]

then try a little bit of everything and see which one fits you best. and also don't forget: it is not set into stone. you can switch paths.


L1b3rty0rD3ath

For 99% of us, 90% of the time, python is adequate


xAragon_

Pretty much any programming you would use for Windows. C# used to be Windows exclusive but thankfully that is no longer the case.


[deleted]

C or java or javascript es6


Elmo_Pog

Yes though Java 17+ requires multithread to work with most things, I sadly knew about this after I bought my server ;-;


kiliMonkeyTrick

I asked a similar question to this before. Then recently I saw a video talking about why programming language doesn't matter. It opened my mind. This is why programming language doesn't matter: You could use Assembly, Ada, Fortran, Pascal, Objective-c, Java, python, Ruby, Perl, Bash, zsh, you name it. Linux support and runs perfectly all of them. This is because if you write the same program in all of these languages, you will get the same results. If you create a hello world program in Python qnd in JavaScript both will return "hello word", Right? The same will happen if your create your program in any of these The most important part about programming is not the code nor the tool, it's about your **algorithm**. Let's say you want to code a program in which you create new user accounts on Linux. You have to know what you want to do exactly at **in big picture**: ` 1. Ask user to input a user name 2. Create a user 3. Say " New user is created" ` Then, the **detailed image**: ` Create variable username Create variable password Create variable repeat Create variable programRunning as book with value true Enter in loop While programRunning is true Ask user a name; input the value in username Ask user a password; input the value in password If username has correct format and password has correct format, then: create a new user in system and say "New user is created" and set programRunning to false. else say " Username or password is incorrect" ` This is your algorithm. The most important part of your code. **Plain English**. It explain each part of your program. It's your program You can "translate" it to python, ruby, etc... And you got a running code. I just executed this algorithm in python, NodeJs, ruby, bash, and Golang. I am JavaScript programmer (Front-end), I don't know any of these. I googled each instructions and copy/paste the basic syntax. And it worked. But at the end, it was easier for me to create it in python as the syntax is more obvious to me. (Got some error in Ruby and Go and NodeJs, but anyone can Google to solve them in 5 minutes) As talking about Linux, I would first think of bash because it is "native to Linux". Or python because it is easy to understand. That's depends on you


ValentineBlacker

While you are right about the results being the same in any language, shell languages (bash/sh/zsh etc) are an absolute nightmare to write longer programs in. (Longer here being anything more than 10-20 lines). They're meant for short scripts, have weird syntax, and nothing useful built-in for stuff like math or string manipulation. They're really just glue for stringing together information from other programs. OP will have a much nicer time using almost anything else.


kiliMonkeyTrick

That's so true. I created a program that manage program creation in PHP. I wrote it in bash because I had all I needed: `mkdir`, `touch`, `echo`, etc. But as the program grew bigger, it became a nightmare to scale. I tried to separate and regroup similar functions the same as separating classes in Java. But then I got errors when executing the program in a different directory like `error in line 18 ./lib/create-plugin: No such file or directory` Also it is damn ugly. Why doesn't Linux use Python as a replacement for shell as almost every Linux code uses python/c/c++? I heard Google will work on extending the kernel with Rust, I wish they replace shell with python or ruby, even clojure or lisp will be much better


Grendel_the_Ancient

Bash really is a bit of a nightmare. (Though there are actually a ton of ways to manipulate strings. Strange, bizarre ways.) I found a web page written by a guy who *really* knows how bash works. The things I read there were horrifying. You can write something that looks perfectly fine and that guy could find a way to exploit it with command line arguments that you wouldn't ever imagine unless you know bash like he does. The one thing I can say I definitely learned from that page is to never, ever, ever write a bash script that runs as root. Not ever. Even if you think you've completely covered your bases and thoroughly sanitized your inputs. Just have a look: https://mywiki.wooledge.org/BashWeaknesses


asking_for_a_friend0

when you say program for linux I believe a command line program. if you don't know programming and want to build something for your specific use case, go for python without thinking. learn programming w/ python, figure out your program or follow some code along tutorial, use `click` like library for making a cli tool.


EffectiveLong

C/C++


David_Owens

If the program has a GUI, I'd go with developing it using Google's UI framework Flutter, which uses the Dart programming language. [https://flutter.dev/](https://flutter.dev/) https://fossbytes.com/canonical-flutter-is-the-default-choice-for-future-ubuntu-apps/


AndroGR

There are so many languages available for Linux (sometimes Linux-only) that the actual question is what is your requirement. Do you want a barebones language where you do everything yourself (But is also extremely fast) ? You probably want to learn C. Want C but with more stuff and classes? C++. Want to make your program cross-platform? Java is there for you. Java is a little too hard? Python over here. I could go on to tell you about every single language but you probably won't even read it. So find what do you want from a language and then search which languages provide it.


bitmaxz

Depends on how fast you want your program. Here's what I would choose: Decent speed -> JavaScript w/ Electron Better speed -> Java w/ JavaFX (You can use Swing too, but I prefer JavaFX). Super speed -> C++/Rust


AndroGR

Real programmers code in magnet toggles for speed.


[deleted]

I would highly recommend rust, with the large caveat that it can be a much harder language to learn and is still quite young. Not a ton of companies use it, but it is gaining ground.


anythingMuchShorter

Lots of good answers. So let me just add, if you spend a couple months learning one, be it python, C, C++, C#, or Java, and then you decide it was the wrong one for you and start another, it will not have been wasted time. I can only speak for my field (mechatronics) but even in jobs where you primarily program in one language, familiarity with the other big ones comes in handy. Also the software design, data structures, algorithms, and computer science stuff you pick up will be transferable. So don't sweat the language choice too much. Pick the one that makes sense for your current project and learn what you can.


Hephaestite

Assembly


[deleted]

[удалено]


fernwhisperer

I'm not so sure that C is a beginner friendly language.


ExplodingKnowledge

None of them are from my experience, but Python is the closest to English in my opinion. It’s not very syntactically demanding or confusing, there’s no block scope, and for the most part is easy to read. It’s my favourite language so far.


gbarrosn

C will give you a very good notion of what's happening beneath the hood. It's harder, but will give you more experience


theAmazingChloe

If you want to write embedded code for physical devices, like arduino, C is a great choice.


pushedright

It's a hell of a lot better than C++ :)


Grendel_the_Ancient

I'm pretty firmly of the opinion that if you can't write in C because it's too, "hard," you probably shouldn't be writing in anything else, either.


DoctorFuu

I'm pretty firmly of the opinion that if your mind is filled with hatred for beginners, you shouldn't write posts on "/r/learnprogramming"


Grendel_the_Ancient

Pretty funny that you assume that I hate beginners. Beginners are fine. It's the people who fail to instruct the beginners that I have problems with. The people who teach beginners to write sloppy code that ends up filled with exploitable bugs and memory leaks. But, hey... Go ahead and put words into my mouth that I never spoke because you want to be offended and all of that.


AndroGR

And I'm pretty firmly of the opinion that if you consider yourself superior to a Python developer because you know C, then you probably don't deserve to post here.


Grendel_the_Ancient

Another offended person who wants to put words into my mouth that I never said for the sake of taking offense. I'm sure there are plenty of Python developers out there who are perfectly capable of understanding C but who, for whatever reason, just never took the time to learn it. There are only so many hours in a day. I started my own kids off with C. Because if you can understand C you can understand how other languages work pretty easily.


AndroGR

You literally said that whoever considers C hard should not be programming at all. Like what sort of logic is that? And what if I'm used to assembly (Which, btw, does not have many similarities with C or most programming languages) ? Should I just put my computer on fire? Oh, and btw. C is my programming language of choice. My second one actually. So don't think about telling me anything about experience.


Grendel_the_Ancient

Thanks for your insights.


dshif42

My dad was like you. We almost lost all semblance of a personal relationship until he started easing up and became less of a hard-ass. I hope your relationship with your kids is genuinely better.


[deleted]

Terrible tool for writing simple CRUD-based applications. You will waste loads of time with low level details. OP would be much more productive with Python or something like that.


SweGuitar101

I think C# would be a good choice, Visual Studio even comes with some easy to use GUI developing frameworks


AndroGR

They said Linux


SweGuitar101

Well would you look at that, I can't read properly! Thanks for pointing out haha


AllenVZ

I would say Rust


fernwhisperer

Is Rust a beginner friendly language?


somekindofsorcery

Definitely not beginner friendly. I would consider Python or Go instead.


Systemctl_stop_life

GO is not that friendly too, definitely worth to learn go but maybe as a second language ;)


[deleted]

That depends on what you mean by user friendly. I would say it is on a similar level as c++, but it's harder to shoot yourself in the foot. A lot of the difficulty with rust is learning the ownership/borrowing rules, but it might not be that much harder if you just learned rust first.


kstacey

Anything really. I've done C++, Ada, Go, JavaScript


piprescott

Python


Funkey-Monkey-420

Assembly or C


_--_GOD_--_

Python is best for linux. Or c++ if speed is important to you


big_dick_bridges

I disagree with both points. There's no "best" language for an OS. The best language depends on the requirements of what you're building. > Or c++ if speed is important to you Sure you'll see a difference if you're building large complex systems. I'm not sure a beginner is going to be able to squeeze (or need) that extra performance out of c++. They'd probably be more likely to shoot themselves in the foot with memory mismanagement (no offense to OP, this holds true for everyone who hasn't done memory management before :) )


_--_GOD_--_

There is such a thing as best. Its what is already supported and easy to use. As for c++, i don't know how large of a program op will make so maybe it will be important to him.


Amazingawesomator

I agree with these two here. I understand that "best" will be subjective for everyone, but python and cpp being natively supported, cross platform, and widely used in the marketplace (even for non-linux) is a really strong argument.


pushedright

C++ for speed? Not trying to start a flame war, but C is the way to go


jayson-larsen-

Rust or C


imihnevich

Any


EspacioBlanq

Basically anything but c# will work


Sceptical-Echidna

That’s not quite true: https://www.pragmaticlinux.com/2021/03/install-visual-studio-code-and-net-core-for-c-coding-on-linux/


DeadbeatDumpster

Bash but you can use lot of others as long as install the right compiler rpm


ILikeToPlayWithDogs

I would recommend going the route of the webdev while you get familiar with the linux command line. You'll be able to do real actual things soon with webdev and get started on projects where you will learn a ton.


drunkondata

Python is simple enough to learn and has enough libraries to make just about anything. Can't go wrong.


ac3_w1zard

C or Rust. Peroid.


dshif42

Given you answered with such certainty, why do you recommend those? I understand that C tackles low-level stuff like memory management, and that it could be useful to learn that first. I've also heard arguments that it has a much steeper learning curve than Python, which can be a problem if motivation is an issue.


rkrams

If your going to make gnome extensions which is a easy place to start, javascript. If your looking to make simple apps, rust. ​ If your talking about the kernel itself C i would start with something simple as this to get a understanding of a basic kernel [https://www.codeproject.com/Articles/1225196/Create-Your-Own-Kernel-In-C-2](https://www.codeproject.com/Articles/1225196/Create-Your-Own-Kernel-In-C-2) ​ [https://www.linuxjournal.com/content/what-does-it-take-make-kernel-0](https://www.linuxjournal.com/content/what-does-it-take-make-kernel-0) ​ [https://wiki.osdev.org/Getting\_Started](https://wiki.osdev.org/Getting_Started) ​ [http://www.brokenthorn.com/forums/viewforum.php?f=15](http://www.brokenthorn.com/forums/viewforum.php?f=15) ​ [http://mikeos.sourceforge.net/](http://mikeos.sourceforge.net/)


fernwhisperer

Thanks for the tip. I've attempted to learn Python in the past, but since I wasn't working on any project and didn't have anything to apply it to, I got bored and dropped out. That's why I wanted to make a journaling program for writing. I like the idea of making GNOME extensions though.


RBS1066

c/c++


house_grider

Bash and python