I read the following statement a few days ago 'learning programming theory is more important than syntax because if I know the theory I can search the syntax and make what I want in any programming language" being new to programming I never really thought about theory before. Is it something that you just need to learn? And how soon do you need to start learning it? As far as I can see theory isn’t really taught, but I’m guessing to be a higher level programmer you would need to know theory. Also would this be a thing only taught to CS students?
Programming theory could be described as the patterns and practices inherent to practically all programming languages. This can range from basic data types like int, boolean, string etc. to patterns such as functions, composability, closures, IFFE, objects, inheritance. There are two main types of programming: functional and object oriented. Many programming languages like javascript support both approaches but there definitely exist preferences, pros and cons. It is true, however, that many of these concepts cross-over among practically all programming languages and as a foundation, it is important to grok.
To understand the difference between practice and theory, think about this: knowing how to program something is to be able to write a code that does what you expect.
Well, you could have a million different ways to write such a code. it means you have a million different algorithms. But they aren’t equivalent at all.
In practice maybe, one is good as another else. In theory, not at all.
Every algorithm has an own time of execution, an own allocated memory and so on… to be able to tell which one is good for your purpose is part of the theory.
Theory goes beyond “write something that does this stuff”, that’s a good starting point anyway. But theory helps you in understanding and planning what technologies and king of code could best fit your purpose.
And in many fields this is much more important than just “writing code”.
Many fields: APIs, Real Time programming, Machine Learning, Engineering and so on…
Let’s say you’re a monster hunter. You don’t need any knowledge to be a monster hunter, only willingness to fight monsters (and a weapon maybe). But knowing what types of monsters there are and what works best on them certainly increases your chances of defeating a monster.
Same goes for software engineers. Ability to categorize a problem you want to solve and knowledge what patterns work best for a given problem category are quite useful.
Some readers of the webpage initially thought that the content is about NUSA programming-language. No, it’s about programming theory. NUSA is the initial programming-language used.
How that programming theory is used? I use it to teach whatever programming-language. Hence I use the terms and definitions in that webpage to teach Java, SQL, HTML. The terms and definitions in my invented programming theory can be used to explain any programming-language virtually without adding any term. In fact, no extra basic terms. Few extra derived terms are needed, if any, and that is very rarely.