'Which programming language should I learn first?'
Spoiler alert: it's not automatically JavaScript
Saturday 27 January 2024
We have on our hands another contentious topic (at least according to Tech Twitter/X): recommending a language to learn. People are often so unfoundedly opinionated on which language to recommend to coders and staunchly back specific languages much like the fanboying behind PS2 vs. Xbox of yesteryear (yes, emo millennial present đđ˝ââď¸). Why arenât we recommending languages the way weâd pick them for projects - or do you just pick your âfavouriteâ language and roll with it regardless of whether itâs appropriate or not for every project?
Iâve encountered a variety of opinions on the web:
- Why do people even bother recommending C or C++
- Learn JavaScript or Python; itâs more beginner-friendly
- Everyone should recommend JavaScript because the barrier to entry is easier
and far too many other, equally grating statements.
I find the advice varies more with developers who are paradigm-agnostic and can code in a variety of languages; yâknow, the kind of expert who has their preferences but doesnât behave like their favourite fandom ship sailing around the very core of their identity is being attacked.
The List
The following scenarios I give are not exhaustive. Here are some languages and stacks Iâve recommended based on peopleâs situations:
âI need to freelance ASAP [with a future in web]â
WordPress, HTML+CSS, and PHP if they canât afford to be selective about clients. Any popular CMS stack works - see whatâs common in their local area. Copy and paste JavaScript to start with. Use a site builder they must. Doing work for small businesses is an easy way to get started, build a portfolio, and then raise rates. See also: Shopify and Liquid.
Some agencies just want basic templating skills from a beginner because they do work for smaller businesses or departments. Though few, there are roles that exist requiring just HTML and CSS with minimal JavaScript. UI design skills would likely be more beneficial here than advanced programming skills.
âI want to learn enough to get a web dev jobâ
Pick a popular backend/frontend language and/or framework that jobs popularly request in their local area and start building projects. Companies with a good culture want to invest in their employees and products; they will train them to have good habits. Companies with crappy cultures may not train new employees, or may encourage hacking (the quick-fix kind that breaks things down the line), so be wary. Agencies and companies might want different stacks; have a look.
The same applies to remote work, but itâll be more difficult to land a junior role without a solid portfolio, particularly without networking.
âI want to program wellâ
C (procedural), followed by object-oriented (perhaps some Objective C =/C++, then Java/C#), then Haskell/equivalent (for functional programming). Youâll cover a lot of paradigms, system knowledge, and hone habits you donât even know youâll benefit from until later. Throw in a logic programming language like PROLOG, or assembly (MIPS, anyone?) for additional pain. Algorithms and data structures are good to study. Theyâre prepared for this undergrad level of effort. Theyâll probably find it easier to pick up other languages after theyâve willingly spent time tearing their hair out. If my hair were thinning Iâd have a valid excuse.
âI want to work for govt or large institutional organisationsâ
Look at the job ads for positions in those departments, and the tech they use in their deliverables. Start with those languages. I can tell you straight off that in my area I know the government uses Java, Spring, .NET, and Angular. SharePoint too. Agencies tend to use Drupal for government department projects. Itâll be different in other locales and countries.
âI want to analyse my dataâ
Python, R, etc. Usually, academics or students are asking me this, and theyâre doing mostly light work: copying and pasting with a bit of editing. Whatever is most suited to the data they need to process should be the language and tool suite. Sometimes they might just need enough to use a Jupyter notebook and be done with it.
âI just feel I should know some codeâ
Tell code to piss off. If one must, learn problem-solving and planning skills because that is at least transferrable. Most people likely will not be set back by not knowing how to program in their lifetime. Sorry, Gen Alpha <3.
Juggling priorities
So to even get to the above, in choosing a language one should consider:
- What is being created and why
- The ultimate purpose of the projects
- The nature of the projects
- The intentions for the deliverable (some people only want to learn to code to bootstrap apps they can then use to generate income and do something else, and thatâs fine)
- The job market
- Whether the need for income is dire
- The intentions of the coder for themselves (not everyone cares about being an expert or becoming a senior developer)
- The level of tutorials and documentation available (newer languages often have far less support, especially at the beginner level)
In summary
Recommending a language or tool is subjective. It always should be. We spend time debating and considering stacks for every new project we undertake - why should someone seeking advice not benefit from an iota of that deliberation? If someone is already choosing a solution without understanding personal, user, and project needs, perhaps consider what that says about their attitude towards problem-solving.