💾 Archived View for splint.rs › ooo.gmi captured on 2024-08-18 at 17:55:17. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-07-09)

🚧 View Differences

-=-=-=-=-=-=-

Learning Programming Languages

When learning computer languages, order matters a lot, and I think I got lucky by learning them in roughly the best possible order.

Just like a linguistic ladder[a], it’s better to take many small steps than a couple of big steps.

[a]

bash

Bash is a great first language because you can start instantly, and do regular things easily.

Consider the following python commands to see which files are in a directory:

    os.listdirs

Whereas in bash, we have:


The Python equivalent of grep sounds positively terrifying.

And for python, downloading some new library involves pip (or pip3 on some systems), then you’ll need to decide if you’re installing that locally, system-wide, or using a virtual environment. Alternatively, some of those python packages could be in the system’s package manager, but then you need to ensure you don’t get those packages mixed up with a system-wide installation from pip.

Once installed, the package must be imported every time it’s called, and when using multiple files, the package must be called in the correct place.

With bash, it’s just ‘apt install fd’, and you’re good to go.

These little programs[a] can let you know when a big download’s complete, find where you stuck some old project, or search for and download torrents.

[a]

python

Of course, once a bash script grows over a hundred lines, and starts to need some structured data, python becomes the easier tool, and you can breathe a sigh of relief that you no longer have to tell bash that a number is not a string every time you want to work with it.

C

I did a couple of afternoons of C++ shortly after the python. I don’t have any use for it, but learning the basics about memory management gave me a better idea of how python (or any computer process) works.

JavaScript

I’ve just started JavaScript, and would definitely not recommend this as a beginner’s language, and I feel bad for everyone who wanted to be a web developer and began with JavaScript. Its focus on events to refresh objects provide an additional block to just declaring some functions and variables like python.

While one could just create a nodejs program, the standard use of web-pages mean you’ll come across three languages within the documentation, as so many examples include HTML and CSS specifications.

The wrong-headed approach of putting JavaScript first becomes shiningly apparent when you see how many websites have ‘try JavaScript free here’ pages. Anyone with a basic understanding of bash can just install nodejs and start coding locally - restricting one’s learning to a foreign playground, available only on-line, suggests someone doesn’t really understand how to use their computer.