digital literacy for everyone


[lit]

fig programming concepts

[lit] although fig was designed to teach 7 programming concepts, these concepts are common or illustrative to some degree in many, if not all programming languages. ultimately, the computer just performs binary arithmetic on data and runs related instructions based on numbers, which are its commands. but that is used to create programming languages, which let you instead focus on easier concepts like: [[variables]] -- supply a word or a codename to refer to a piece of data like a number or collection of alphanumeric characters [[input]] -- get data from the keyboard, mouse, local file or online resource [[output]] -- send data from the program to the screen, local file or network [[basic-math]] -- process number data, or deal with other data such as colours or letters in numeric terms [[loops]] -- designate a section of code to run more than once [[conditionals]] -- designate a section of code to run, or a loop to stop, if certain values match or exceed others [[functions]] -- designate a section of code to be accessed like the commands which are built into the language you could learn functions in less than a day, and if you are good at math then you already understand them on some level. functions are the hardest feature of fig for a first-time coder to understand, because they seem to do something that is only useful if you already understand coding and code enough to use them. in fact you can technically do without them-- though you would miss out on a feature that makes coding so much easier to understand and easier to do, that not understanding functions would actually make a lot of coding tasks seem more difficult, not easier. on the other hand, if you understand functions then you understand coding in fig-- and if you understand the six other (easier) concepts, you understand most of what functions do already. fig is designed to teach [[variables]] first. other languages, including python and bash, javascript, lua and c++ all use these 7 concepts, and while there are other related concepts, i have done alright using mostly just the features of fig for a few years since i designed it for teaching. [lit]figplus[lit] is a recent extension to fig with more features, but it too is designed around the idea that programming in general is based around concepts like these 7. with fewer than 100 commands to illustrate these concepts and build working programs, fig makes it easy to obtain and firmly grasp the fundamentals and essence of of coding. you dont need to learn every example of each concept-- it would be ideal to learn to recognise the simpler concept behind each example, however. doing so will help you learn how to read (and ultimately write) programs. [fig] #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ # a very boring example of basic math in fig x 1 plus 15 plus 25000 times 4.5 print x 1 : plus 15 : plus 25000 : times 4.5 : print
fig main page: [url]https://codeinfig.neocities.org/fig/index.html[url] home: [lit]https://codeinfig.neocities.org[lit]