Beginner programming languages

Hope this wasn’t asked before; If one wants to start scripting/programming, what are the easiest to learn and some good resources to consider in ones journey…
Mind you, this would not be for a career, just as a hobby and perhaps contributions down the road.

Go is probably the simplest:

The only problem with it is that it’s (mis-)managed by Google:

Disclaimer: I can’t code.

1 Like

I’m not a programmer myself, I’m only doing bits and pieces or little tools for my own use, I always thought that Python is easier to grasp for a beginner mainly due to its syntax and you can learn allot just by looking at some examples then modify them.

1 Like

IMO the most friendly language is python. It also comes with a big number of libraries to choose from, and a great community. Whatever question you have, it’s likely to be answered on StackOverflow. If only it was faster… Among compiled languages, my latest discovery is Go. The learning curve is absolutely acceptable for a hobbyist coder. Online documentation is good enough to learn for free at home.

2 Likes

Maybe you just need to learn how to program in shell. Pick one shell, for example bash and start from there. Python is based on OO concepts, it might be a little challenging for beginners.

3 Likes

OOP, once understood, makes life unbelievably easy. For some reason it comes out of fashion, but class inheritance is the only thing I’m missing in Go.

2 Likes

True, especially when you work on a fairly large project. It makes coding and maintenance much easier.

2 Likes

Back in the day it was C and C++, but now a days just a little scripting in shell. I do like bash for the little scripts myself. Played around with one of my scripts yesterday and added a install / uninstall script, then changed the main script as some of the stuff wasn’t needed anymore.
https://github.com/Whinery/Hosts-Updater

3 Likes

I’d recommend shell, it’s much easier to do basic debugging and single line runs while still being powerful enough and having many common concepts of programming that once learned make it easy to branch out into other languages. Scripting can also be very useful in day to day work through automation.

Re OOP: I’d argue that oop should be considered harmful as a beginner, it makes things more complex by abstracting aways many process’ that are (in essence) fairly simple.

Python is nice because it doesn’t force you into this, it can do almost functional style and total procedural style, you aren’t made to use classes or methods in any way that’s different from a standard function call. The whole self bit can be confusing though.

3 Likes

I do agree that shell scripting is unavoidable on Linux, and everyone should at least know basics. Forgive me, however, but I don’t find shell a true language. If at all - a very archaic one, and limited to one class of devices.

3 Likes

No you’re very right, it’s scripting and not a real language. You call out to other programs and have to then learn their syntax and/or arguments but I stand by my original statement of it being a good starting point for a complete beginner, real programming languages can be very daunting especially to just try out something. You can do variables, assignment, functions with arguments, recursion, loops, and conditionals.

I should have really pointed these out but the post was getting long already. As you pointed out it really depends on the task and application, good luck doing graphical applications in shell XD.

2 Likes

LOL, I planned on one short answer, but this encourages me to add a comment on python.

I came to programming on Linux knowing just one “modern” language - Java. What I was doing 25 years ago doesn’t count. I read through a basic python course in one evening, in my bed. While reading, I kept thinking: “It’s brilliant. Why does Java complicate everything?”. I think I was wrong. Python is super easy to learn, but now I think it should not be ones first language. Anything else may be frustrating afterwards.

2 Likes

I wish we had more programming-related talks on the forum. I remember a thread on the EOS forum (I’m no longer a member), that I enjoyed:

How about a programming challenge?
Write a simple bash script that solves the following:
(…)

People would solve it in many languages, and it was really cool.

3 Likes

Im just now working through the Python 3.9 tutorial on python.org - seems fairly to the point.

2 Likes

Fingers crossed! :slight_smile:

LOL - of course, I have heard through certain “circles” that Python is bloated, lol

1 Like

Python is user-friendly. I prototyped 3 of my projects in python, and then translated into Java, C++ and Go.

2 Likes

I know this is old and out of fashion now, but in the years '98-20 I learned a bit of Pascal and then played some with Delphi in highschool, what I learned then is still useful to me today if I want to do a small program/script being in Python, Go, Javascript…its allot easier for me because I already know about procedures/functions, variables declaration and types, for(s), case(s) and while(s)…

2 Likes

:smile:
My “Formal” programming was in COBOL, then RPG(3 & 4) - none of which I care to even try to use today (albeit, there may be a niche for it but I digress). But as many have previously said, I’m Ok with shell scripting so moving on to something a bit more “useful” seems logical - if only for my own knowledge.

1 Like

I did it in excel VBA, if that counts as “solving” and even a “language”. Far from the most efficient, but it got the job done. :smiley:

1 Like