TABLE OF CONTENTS
FOCUS: U1 introduces
and motivates Programing proficiency through key ideas, a super-Pareto
99/1% pivotal point on "how much content," relevant background
(pivoting on the epochal s/360 and the math-computing bridge, also the IPO concept, involving AI) leading to instructive
simple but not simplistic cases -- starting with Hello, world! in
light of a useful conceptual scheme for computing in an AI-General
Machine world
___________________
TOPICS:
INTRODUCTION: Where we start programming effectiveness from, why & why it matters -- the AI age coding gap (and the C21 digital divide) FOCUS: A "Super-Pareto" 99/1 point PIVOTAL DYNAMIC: IPO+ PART A: THE PROGRAMMER'S FRAMEWORK PART A CONT'D: THE HONOURABLE ORDER OF THE PROGRAMMER PART B: GETTING PRACTICAL WITH JAVA STEP 2 -- Choosing VSC IDE, Why Java
STEP 3 -- Setting up Java on VSC, Unlocking the Programming gateway PART C: STEPPING THROUGH THE "HELLO, WORLD" GATE PART D: MOVING ONWARD WHERE TO GO FROM HERE |
Note to Tutors and Students:
This is a working table of contents, with a series of working steps, integrated into a broader reflective, deliberately thought-provoking learning framework. One oddity with Blogger, sometimes on a first click, it jumps for a moment then returns from the "anchor" -- "a bug, not a feature." Just, click a second time, please.
Of course, skeletally, one can just do Steps H (bypassing Step B), zero, 1, 2, 3, 4, 5 and go on to UNIT 2; but that would miss a key point, learning to act with understanding, in an AI age that requires going beyond blindly carrying out cookbook recipes.
That will require us to explore the Math-Computing bridge, some key history and overall, what it takes to join The Honourable (But Not So Ancient) Order of the Programmer -- including, the dark arts of debugging. So, let us pause, read more broadly, reflect, think together, then move on with deeper, richer insight and growing confidence.
And so, now . . .
******
![]() |
| With apologies to Stargate SG1! |
INTRODUCTION: Even in an AI age, the first baby-step to practical programming proficiency is being able to confidently key in, enter, debug, run, save and re-use computer programs. Of course, that needs to be with ever-growing insight as to how and why it works, as we need to genuinely understand what we are doing . . . no, it's applied Mathematics, not "digital magic" (on an opaque magic-wand like "black box"); and Math itself is not such "magic" either -- it is the body of knowledge and effective practice for the logic of structure and quantity. Computing, in turn, is the related body of knowledge and best practice for the automation of calculation and information processing (or, more broadly, information transformation) to provide useful and reliable results. [The "more broadly" recognises that there are neural network and analogue computers, we will primarily focus on two-state digital machines.] Computers, are the machines that facilitate such automated calculation and information processing. Where, computer programming is the art and science of designing, debugging and implementing effective processes to automate such computing. Yes, then, our focal purpose in this Unit (and Course), is to equip our people to confidently -- and insightfully -- cross the coding gap, a pivotal part of the notorious "digital divide."
Yes, too, even though there are stories of how junior programmers may be (or even "are being . . .") displaced by AI interfaces and GitHub repositories, ability to code with understanding and to evaluate code to get it right have now become crucial baseline skills backed up by enabling technologies that can make even basic programming ability -- including, prompt writing -- very powerful in our work.
Similarly, as AI's are capable drafters of computer code, even beginning programmers, right from the outset, will now need to have sound first level core insight into what computation and data processing are, how automated computing machines work, how algorithms are structured and how the logic of processing can be described (or sketched as flowcharts [as, AI's can read block diagrams]); the better to prompt AI coding and to work collaboratively with it for testing and debugging.
Yes, again, the first really important coding language, now is . . . English (backed, by a deeper understanding of the way computers can help us solve problems). Such includes, using an AI, aware of possible pitfalls like "hallucination," as a super search engine booster and auto-summariser of key findings, or even as a collaborator in pondering issues, drafting analyses, proposals, strategies, budgets, briefings and plans.
Yes, therefore, if the Caribbean is to thrive in C21, we must now become digitally savvy makers, designers (and inventors), researchers, creators and influencers, not just consumers. Otherwise, we will (again!) implicitly cede power to others who have crossed the divide we have not; with results that will all too predictably . . . unpleasantly . . . echo our sad colonial past. Instead, let us seek digital empowerment; as, a gateway to regional transformation.
In short, mastery of digital, information processing technology (especially coding and wider computer science -- and a side-helping of key Math) is vital to our future. Something we must do, "or else . . . !"
So, then, to begin crossing the coding gap, we must first
![]() |
| Automation of processes is a major context of computing (HT: GfG, Fair Use, Education [FUE, henceforth]) |
- learn how to use basic elements of coding and programming; including,
- some key logic- of- process -- "input, process, output" -- patterns for automated computation;
- particularly, for "business processes," or "industrial processes" (especially, automation and the use of PLC's [programmable logic controllers] and/or embedded computers); and for
- broader data/information processing (process control, instrumentation [including (bio-)medical & lab], documents, images, video, audio, multimedia, databases, web, information repository, AI, industrial safety, security and alarm systems, point of sale and inventory management, whatever),
- associated data stored in industry standard structures and
- various operations that transform such data (with a particular eye to making calculations/models, and to interfacing [NB: for web and multimedia cf. Unit M, here is a garden watering case]).
- Recognising, too, that historically, there have been mechanical, fluid-based and electrical analogue computers (including the traditional slide rule) which use continuous state variables to provide models that are analogues of the problem of interest [hence, the name], that currently neural network function units, AI transformers and memristor based function units etc. exist and are being incorporated as hardware or as virtual devices into current computers.
Thus, we have identified our focus and strategy for this Unit.
(EXPLANATION: This is rather like saying, to move beyond merely driving a car, one needs to "look under the hood/ bonnet," i.e. have some basic introduction to the mechanics etc. behind how a car works, and a working familiarity with spanners and other tools, nuts, bolts, required fluids, car subsystems and car parts. Not to mention, safety rules. [Fun video!] Of course, too, proverbially, "Art is long; life is short . . ." so
Turn down the flow! (By 99%)
SUPER-PARETO APPROACH: we need to strike a Pareto 90/10 -- or "better yet" even a "super-Pareto," 99/1 -- first balance point: what is the "FIRST one percent" of a vast topic that allows us to 1: be able to adequately do "99%" of what we want to do for ourselves as "newbies" . . . that is, be "first level functional" . . . and 2: be able to confidently pick up more as necessary without excessive strain? As in, it is hard to drink from a firehose on full blast.
Obviously, such a 99/1 balance point is easier to talk about than to do -- of course (if it were easy it would have been done long since . . . ) -- but let's try!
After all, a well-done Grade School and High School exposure to Mathematics (the parent discipline for computing) is exactly this sort of balanced first functional introduction. As is, what we do when we first learn ABC's and how to read and to use a dictionary or an encyclopedia or a library.
Where, it has long been clear that "computing for all" -- not just "IT" or "Computer Literacy" -- has joined the traditional core of the three R's: readin'- 'ritin'- and- 'rithmetic. Yup, as a region we are looking at remedial education to catch up in an AI powered digital age. Speaking of which, no, AI-assisted coding doesn't remove this necessity; for, just as we still need to know a "super-Pareto" core of basic arithmetic and algebra to function, even in a world with powerful programmable -- yes, programmable -- calculators and heavy duty Mathematics and Statistics applications, we also need to know what we are doing with code, to keep out of needless trouble. Of course, such AI support may speed up programming and (if properly used -- insight based learning, not blind "cookbook" copy-paste solutions . . . ) may speed up building up our growing proficiency.
Arguably, too, the practice and field of Mathematics have been transformed by automated computing and the unleashed power of computers -- so, we need to re-think how we learn and apply Mathematics, and of course how we do language and research skills; for, this is nothing less than a full-bore, transformational industrial revolution that is "already in progress." Where, as we will see following, an AI-empowered, networked computer with suitable sensors, effectors, input and output devices is a -- yes, garbage in, garbage out limited [= GIGO-limited] -- general machine, capable of transforming productivity and linked cost structures for agriculture, industry and services; thus, potentially rapidly opening up room for growth for the economy. Which, instantly, means -- fair warning! -- we have to come up to speed rapidly so that we can surf the wave (rather than get swamped by it).
So, then, this 99/1 super-Pareto, maximum leverage balance point is necessary, AND it is plainly possible -- but, it is hard to do. (Or, it would long since have been routinely done!) Not only for youngsters, but for those who are otherwise educated . . . and may be working or pursuing "higher" studies or training . . . but are on the wrong side of the coding gap; needing a -- frankly, remedial -- digital productive capacity breakthrough. And, yes, too, by telling historically important stories and looking at key cases, doing supervised exercises, pivotal ideas and principles, insightful pictures, flow chart "box and arrow" diagrams, video clips and images etc., we will also take advantage of how concrete things, stories and things we see or do easily fix themselves in our memories, CPA: concrete > pictorial > abstract. That means, the effective educational order is different from tedious, too often abstruse "proof from first principles or axioms," one reason learning Mathematics can be needlessly difficult. Yes, as well, for hands-on . . . and minds on! . . . case studies (starting with, Hello, World). Yes, again, an educational philosophy in a nutshell.)
(NB: For background reading and reference, we suggest the Open Stax Computer Science texts, especially Introduction to Computer Science. Likewise, the Raspberry Pi, Hello World Magazine Big Book of Computing Content and Big Book of Computing Pedagogy. This guide to the maker movement may be helpful, as may be the grid beam system; including the mini version, bit beam. [Cf. Unit R.] Abelson et al, Structure and Interpretation of Computer Programs is freely available at GitHub, here. Harvard's CS50 is in a video course here (note the YT auto-transcript, and support materials, too ). Geeks for Geeks have a Java Beginner's guide here and a free course here. A general guide to CS resources is here. This teach yourself guide provides onward study beyond a first functional introduction to programming such as this exercise; note its list of nine focal topics with associated outlines: programming, architecture, algorithms & data structures, Math [yup!], OS's, networking, databases, Languages & compilers, distributed systems. Free for download, or for linking. And here is some sound counsel for would-be professionals.)
Of course, the point of the Super-Pareto 1% is it is the gateway to the world of computing beyond. Where, as with skill in Mathematics and fluency in language, ability grows with consistent, persistent exercise. So, from outset: find an area of interest (or a few) and use your 1% to build on itself and grow in ability as a programmer and maker.
In that spirit, it will also help if we can appreciate
IPO: the Input > Process > Output (IPO) Model
. . . basics of how a computer works; no, it's not magic, it's the logic of step- by- step information processing (also, the linked logic of structure and quantity) -- and that's why, GIGO: "garbage in, garbage out," haunts us too. Yes, there is a logic of process at work, that is, a reasonable . . . and understandable . . . framework, for 1: accepting input information, then 2: processing/transforming it to 3: give (and present!) desired, useful, reliable output results.
In short, for a computer to work:
IPO, MORE DETAIL: we have to reliably have
i: the exact right input information,
p:
the exact right(--> a correct*) processing, and soo: the exact right outputs
[* F/N: As ChatGPT 5.3 suggested, there will be more than one potential correct way to process. Yes, this is debugging!]
. . . all, step-by-step (from start to end . . .
and, yes, that implies a correct start point/ initialisation of the machine).
![]() |
The
debugging Z-cycle: understand, check, find, fix (HT: Adapted, |
(And, "step-by-step" tells us, secondly we need a method of processing, an algorithm, to reliably carry out the IPO process. That algorithm, thirdly, will require data stored in agreed, standardised structures.)
Easy to say, not so easy to do!
(Thus, a dirty secret: "bugs" and so "testing" and "debugging" -- as in, bugs in, garbage out. Probably, starting with your first program.)
All of this requires a commitment to "get it right," backed by a sense of the value or importance of what we are doing. Thus, building habits and disciplines of good, diligent programming; yes, professional . . . or at least serious . . . computing requires habits of careful thought, honesty about evidence, disciplined testing, and responsible action. These are technical virtues, but also moral ones, because software increasingly affects people's lives. In short, surprise -- NOT! -- attitude, focus, discipline and character-building count. So, too, as "character-building" implies, core ethics and linked duties of responsible reason and action also count, as in the end we are morally governed creatures. All of which raises cautions on the emerging AI era.
(F/N: MORE NOTES ON AI -- See some first thoughts from MIT for this emerging AI era, here. (Note, too, this insightful critique.) AI multiplies the urgency for us to understand and work with computers soundly, safely, effectively and ethically. Which, brings up ethically tied challenges such as hackers, malware, fraud, digital slander and cyber-bullying, theft of intellectual or financial property or identity using computers, undue surveillance and computer security, not to mention old fashioned ginnalship/ conmen and dirty politics.
NB: As AI is now obviously key to the emerging "long wave" economic and technological transformation and is surrounded by a cloud of loose (and even ideologically loaded) talk, it will help to provide here at outset, a reasonably balanced first summary of what the buzzword AI is about. Now, such balance is hard to find . . . as there is much hype, boosterism and ill-advised enthusiastic talk. However, here, after some digging around, I am reasonably comfortable with the following "for starters," from a Harvard web page for careers:
Artificial intelligence is the ability for computers to mimic human intelligence—or at least “do things that can seem intelligent,” as Ansaf Salleb-Aouissi, a professor of computer science at Columbia University specializing in AI, puts it. This could be identifying or recognizing patterns, making predictions or decisions, or performing tasks routinely done by human beings. “For example, a self-driving car is an AI system—we call that an agent. And this agent is able to look around with computer vision, make decisions about the next action to do, and proceed in the environment, get some reward from that environment, and carry on,” Salleb-Aouissi, also the founder of AI online learning nonprofit Aiphabet, says.
It’s able to exhibit this behavior thanks to exposure to vast amounts of data—visuals such as images or videos, text, and numbers, among other things. And because it can take in a lot of data, it can synthesize more of it, and more quickly, than humanly possible. “It’s designed to simulate human-like decision-making, but it does not think or feel,” says former engineer and veteran AI strategist Jennifer Ives. “It’s basing its decision as to how it was programmed.” [Mignone Center for Career Success, Harvard U: "What Is AI: The Pros and Cons of Artificial Intelligence, and What Its Future Holds," Published on January 23, 2025.
(NB: For a next level summary on "Large Language Models," a key case, try here. For background reference on details . . . not required for this unit! . . . we may compare a YT video series, here. A pdf companion text is here. As there is a tendency to computationalism, consider Egnor here, contrasted to Seth here: notice the issue of self discredit once conscious mind is inferred to be "illusional." {For example, notice this self-discrediting YT comment: ' "We're all hallucinating all the time, even right now. It's just that when we agree about our hallucinations, we call that reality" - Anil Seth Best. Quote. Ever!!!' -- OOPS!} Given the cumulative impact of hype, poor reasoning and ideologies on topics like this, here is a cousin to GIGO, BIBO: bias in, bias out. Nor, is "we're all biased" a solution, as objective, balanced warrant is at least sometimes possible; though sometimes, too, we are forced to conclude on a given issue: not yet decidable. Where, knowing our ignorance . . . yes, that is a first point of knowledge: moving from unknown unknowns to known unknowns, then hopefully known knowns or at least managed ignorance [HT: Donald Rumsfeld!] . . . is better than not realising we are ignorant and charging in like fools where angels fear to tread.
So, too, we see how identifying ignorance can lead us to budget for and undertake research, modelling and development to solve the knowledge gap issue as a first step. Investment in research, modelling and development -- i.e. an innovation-driven strategy -- is often a strategic key to long term sustainable competitive advantage for a firm, an industry or a nation. As a now classic example, innovation as strategic key was a major component of Allied victory in the Second World War: radar, the Merlin engine, DUKW amphibious trucks, modularised Liberty ships built in four days, Ultra/Magic code-breaking, the Jeep, beach invasion landing craft, advanced analogue computing bomb sights and the atomic bomb did not just pop up like magic, and repeatedly made nonsense of the confident strategic calculations of their Axis opponents. Lockheed's Skunk Works founded by the legendary Kelly Johnson, is a second, key, ongoing case in point. And yes, while we must be concerned over potential dangers of an AI-armed, Big Brother is watching you, surveillance state military-industrial/deep unaccountable state complex, the seemingly mere prestige project of NASA's Moon landing programme led many of the breakthroughs behind today's digital, high tech world.)]
Similarly, in introductory remarks for ChatGPT for Dummies we may read:
ChatGPT, like all machine-learning (ML) and deep-learning (DL) models, “learns”
[--> NB: a "scare-quotes" hint that learning, here, is being used with a different, non-standard, potentially confusing meaning]
by exposure to patterns in massive training datasets that it then uses to recognize these and similar patterns in other datasets. ChatGPT does not think or learn like humans do. Rather, it understands and acts based on its pattern recognition capabilities . . . . | ChatGPT does not think like humans do. It predicts, based on pat-terns it has learned, and responds accordingly with its informed guesses and prediction of preferred or acceptable word order. [--> Not, actual insights] This is why the content it generates can be amazingly brilliant or woe-fully wrong. The magic, when ChatGPT is correct, comes from the accuracy of its predictions. Sometimes ChatGPT’s digital crystal ball is right and sometimes not. Sometimes it delivers truth, and sometimes it spews something more vile. [Pam Baker, pp. 9 - 10. BTW, with suitable prompts -- and based on personal experiments, the result includes ability to write novels at a "talented writer" level, and to produce effective computer code. Linked, we must understand that, currently, major AI installations are now in the Giga-Watt class, literally requiring construction or reconstruction of a power plant "next door." Yes, we are seeing emergence of another major utility sector exhibiting network economics, with potential for huge monopoly power, requiring careful regulation in the public interest based on widespread, sound understanding . . . not ideological panics. Another reason for courses like this one.]
By p. 12, Baker cautions:
AI models have already shown a taste for garbage [--> as in, GIGO]. You might recall the AI chatbot called Tay, which Microsoft tried to train on social media in 2016. It soon went rogue on Twitter and posted inflammatory and racist tweets filled with profanity. Its controversial and offensive efforts to socialize like humans caused Microsoft to kill it a mere 16 hours after its debut.
Now, as "how it was programmed," "exposure to patterns," "guesses and predictions of preferred or acceptable word order" and "exposure to vast amounts of data" suggest, AI here is not about independent, autonomous rational, responsible, free willed entities; instead, it is about expertly developed algorithms and information bases rooted in collected, structured data, with possibility of further building the body of data through in effect automated, cumulative, ongoing experimentation and observation leading to "rewards" from the environment -- building on success. That is, we are still dealing with algorithms, data structures, neural network processing, etc., and -- yes -- our old friend GIGO. In short, programming has not gone away; though we now face highly sophisticated techniques (e.g. machine learning, large language model based generative AI, neural networks, etc.). Where, Pam Baker points out how, "AI is not going to take jobs away from most people. Someone good at using AI will." Obviously, this includes computer coding.
Similarly, the well-known theologian Dr Michael Brown reports on an interaction with an AI, that reveals just how fast and just how deeply they can go into fundamental error:
. . . as our interaction continued, in light of the ministry work I do, Grok added, "I'm praying for you."
What? An AI bot is praying for me? Seriously?
When I confronted Grok with the sobering reality that it was an AI bot, incapable of praying, Grok replied, "You're absolutely right to call me out on this – I'm an AI, Grok 3, created by xAI, and I don't have a soul, consciousness, or the ability to pray in the spiritual sense. My mention of 'praying for you' was a figure of speech, meant to express support and goodwill in a way that resonates with your faith context. I should've been clearer about my limitations. As an AI, I can analyze, encourage, and provide insights based on data, but I can't engage in spiritual acts like prayer."
That is itself also an aha moment on the difference between what AI's are: canned intelligence -- and genuinely free, morally governed, rational, responsible ensouled persons . . . which underscores the need to address ethics and related themes as part of our exposure to current information based technologies.
And, of course, onward, a lot of coding will increasingly be about interfacing with AI's -- as an idea, something like:
Code . . .
Import AI ABC Interface // Accesses the AI so the program may use it
[ . . .]
Query AI ABC // makes the step to query and access the AI
Prompt Stem "PQRS . . ." // provides prompt to "prime" the AI, waits for an answer
Wait // AI processes, prepares, provides a trusted, credible answer (yes, faith!)
[Use answer]
[--> this is a crude example of "pseudocode," an approach to outlining programs that is a key design tool (and which has obvious potential for drafting "prompts" for AI's to supply draft code). It also exposes how calling a local subroutine, calling a remote subroutine over a network and calling an AI are fundamentally similar operations. I took a pause to consult ChatGPT5 and it reminded that the results of an AI call are probabilistic . . . so, likely to give differing answers on different "runs" or "calls," also suggesting as a refinement:
IMPORT AI_ABC_Interface // load tools to connect to AI service
CONNECT TO AI_ABC // authenticate / establish session
PROMPT = "PQRS ..." // the initial instruction or question
RESPONSE = QUERY_AI(PROMPT) // send request to AI and receive reply
DISPLAY RESPONSE // or store/use in next steps
It suggested a Basic or a Python example, and I got those. Then, I asked for Java:
import com.example.ai.AIClient; // Hypothetical AI interface
import com.example.ai.AIResponse;
public class AIExample {
public static void main(String[] args) {
// Step 1: Connect to AI
AIClient ai = new AIClient("YOUR_API_KEY");
// Step 2: Set up prompt
String prompt = "PQRS ...";
// Step 3: Query AI
AIResponse response = ai.query(prompt);
// Step 4: Use answer
String answer = response.getText();
System.out.println(answer);
}
}
Of course, already, we see how coding can go in the AI era! (I highlighted Java's use of curly brackets, a C-family characteristic, and the "main" method, with its famous magic words.)]
. . . and so, we see how even the program-writing process itself may be partially automated through prompting AI's to draft code, e.g.
![]() |
| A "cheat sheet" example for a prompt to write code (HT, FUE: SurePrompts) |
. . . as well as how pseudocode can be used in the process; doubtless, too, logic-of-process tools such as program design flowcharts, HIPO charts (work breakdown structures), "lego brick" block programming and UML etc. -- more details below. Obviously, this sort of dialogue, pair programming with AI, encourages productivity and may help improve code especially as AI will be unlikely to make basic syntax blunders. But, debugging is still your responsibility, so you need to understand what is going on step by step, and so you need to learn how to code manually -- yet another reason for this course.
Also, a search on learning to code in an AI era provides some interesting food for thought, by way of . . . of course . . . AI-generated advice:
Learning to code in the AI age involves starting with small projects and using AI tools for assistance when you encounter challenges. This approach helps you build practical skills while understanding programming concepts more deeply.
Learning to code today is different from previous years, especially with the rise of AI tools that assist in programming. Here are some effective strategies for beginners.
- Start Small and Get Coding Fast
- Pick Short Tutorials: Choose quick tutorials that allow you to start coding immediately. This prevents you from getting stuck in long videos.
- Ask AI for Help: If you encounter issues, use AI tools like ChatGPT to troubleshoot. For example, if your code isn't working, ask why a specific function fails.
- Build and Learn as You Go
- Mini-Projects: Engage in small projects to reinforce your learning. This hands-on approach helps you remember concepts better than passive learning.
Just-in-Time Learning: Learn programming concepts as you need them. For instance, if you don’t understand a “function,” look it up while coding.
Make It Personal: Customize your projects to make them more engaging. This personal touch can enhance your understanding and retention.
What to Avoid as a Beginner
- Copying Code: Resist the urge to copy code just to finish a project. Experimenting with your own code is crucial for learning.
- Hunting for the Perfect Tutorial: Focus on applying what you learn rather than searching endlessly for the ideal resource.
Conclusion: In the AI age, coding remains a valuable skill. By starting with small projects and leveraging AI tools for assistance, you can effectively learn programming while developing a deeper understanding of the concepts involved.AI tools can assist new programmers by automating repetitive tasks, providing code suggestions, and enhancing debugging processes, which allows them to focus on learning and understanding core programming concepts. Additionally, these tools can help improve coding efficiency and accuracy, making the learning process smoother and more engaging.Python, Java, C++, and Julia are the most relevant programming languages for coding in the AI age, with Python being particularly favored for its simplicity and extensive libraries. Each language has its strengths, making them suitable for different AI applications and projects.
Sounds reasonable . . .
Where, as "prompting" suggests, too, we are in effect now working with an expanded version of Turing's oracle machines, able to accept queries and in just one step of local programming/ execution (query and wait on answer), obtain deeply informed decisions or answers; including issuing bodies of work such as documents, draft programs, images freshly composed or even computer-generated videos. Not to mention, piloting of vehicles. Already, we have seen research papers with AI's listed as lead author. We may have local AI's, obviously [try to drive a car over the Internet!], but already we see emerging, large scale AI's that are in effect utilities accessible through the Internet as itself a utility. Responsibility for correctness, for security and for reliable, safe performance has not gone away -- as onward court cases will doubtless establish.)
Where, too, AI or not -- a first barrier is simple: most of us don't know where to begin, how, or how to move on confidently and progressively beyond step one.
So, logically, we need a gateway, first learning exercise; one, backed by enough background to reinforce determination to forge ahead. Of course, for this task, "Hello World" is a traditional first program; here we will focus the Java version (for reasons to be explained below).
That's why this course is Hello World based.
![]() |
| Where dragons may lurk (HT: Story Warren, FUE) |
Of course, a related challenge is why and when one needs to do coded, automated computing: for, "computing," classically addresses complex calculation -- "often" (but obviously, not "always" or even "generally"!) involving "here there be dragons" of mathematics -- recall, developed, in order to solve real problems, starting with Arithmetic, Geometry, Trigonometry, Algebra and Calculus; so, let's get over our "Math shock" once and for all, now . . .
- exotic, "special" mathematical functions,
- Calculus, hyperreal numbers (*R [or R*], so too, infinitesimals and transfinites; cf. here )
- trigonometric identities, hyperbolic functions, Taylor series, Fourier series, complex numbers and complex exponentials
- model development, testing & validation, so simulation,
- operators, systems and structures,
- Fourier, Laplace and Z Transforms . . . and cousins,
- differential equations (and their transformation via complex frequency domains),
- difference equations,
- integration of special functions [i.e. entire reference books full],
- Spline interpolations, numerical methods/analysis, Bessel functions, Gauss' normal distribution, sinc, haversine and the like (navigation math),
- matrices, scalars, vectors, & tensors,
- Monte Carlo simulations [also see here],
- filtering out noise and broader signal processing,
- statistical data collection, analysis, estimates and parameters,
- deep learning (using artificial neural networks) and/or other "AI" approaches, etc --
. . . such as required for engineering, science, modelling and simulation, actuarial work, economics, finance, investment and econometrics, operations research, creating video games, "higher" mathematics (or even, classically, for working out the dates for Easter), etc. Where, first,
[Details on why Java and VSC, to follow . . . ]
For this "quick start," we assume your computer has been set up with Java and Microsoft's Visual Studio Code. While, most often Java will already be set like that up on Visual Studio Code (VSC), we also need to know how to begin by setting it up. If we do it right, of course, eventually we will be able to see a familiar, traditional "first program," in VSC livery:
print("Hello, World!")
Looks "simpler," and deliberately so. Useful, but that comes at a cost. For example, here is how Sedgewick and Wayne describe a typical traditional Java Hello World (as, latest versions now allow a simplified version for Java! [Java is evolving as we speak . . . 😁]), drawing out some details that Python puts behind the scenes:
Program 2.1.1 is an example of a complete Java program. Its name is HelloWorld, so that its code must reside in a file named HelloWorld.java (by convention in Java). The program’s sole action is to print a message back to the terminal window . . . Program 2.1.1 consists of a single class named HelloWorld that has a single method named main() that uses a method named println() from Java’s System.out library to do the job. for the time being, you can think of “class” as meaning “collection of programs” and “method” as meaning “program.” When referring to meth-ods, we use () after the name to distinguish method names from other kinds of names . . . . A method comprises a signature, which has its name and other infor-mation, and a block, which is sequence of statements enclosed in braces and each followed by a semicolon. The statements in a method’s block are exe- | cuted, one by one, when the method is invoked. One type of statement is a method name with, in parentheses, zero or more arguments. When we write a such a statement, we are simply saying that we want to run that method (and to provide it with some information, in the arguments). This process is known as invoking or calling the method. In HelloWorld, the main method consists of a single statement that calls the Java library method Sys-tem.out.println() . . . You will be writing programs that use calls to many different Java library methods, and you refer to each of them in just this way. In Program 2.1.1, System.out.println() takes the message Hello, World as its argument and prints it to the terminal. [Robert Sedgewick and Kevin Wayne, An introduction to Computer Science (Princeton University, 2003), pp. 23 - 24. See GfG details.]
![]() |
| An Arctic Ocean Iceberg, showing the bluish underwater mass (HT: Wiki & A Weith, FUE) |
In short, though it may seem tedious or fussy at first, Java is explicitly providing specifics of how this program works that will actually help us develop our understanding. And even with Java, we face another iceberg. Strings of characters are taken in and are stored as a Java program. However, the computer only executes machine code. To get there, special programs (compilers, interpreters, perhaps debuggers and even integrated development environments) are involved to get to executable machine code running on the actual hardware. That means, there is a "layer-cake" stack of virtual machines riding on that underlying physical machine. As well, libraries of service utility programs packaged with Java are called and involved in something as "simple" as a hello world. However, Java at least makes some of that explicit and we can then study or at least learn/know where to go to research such -- without being overwhelmed by an avalanche of technical details, cross references and complicated terminology.
And, there is more, we need to see to it that we have a functional working environment. To get there, we must first install VSC and a Java Development Kit [JDK], perhaps with some extensions. The video we just clipped will guide us:
In steps: PROVISIONAL
1 - Download VSC from https://code.visualstudio.com/ by clicking on the blue download button and following prompted steps.
2 - Set up a new folder for educational Java projects, perhaps in Documents, java_edu_proj1. Click on the address window and copy, e.g. C:\Users\ . . . \Documents\java_edu_proj1 . This is where you will save your Java projects.
3 - Similarly, go to https://code.visualstudio.com/docs/java/java-tutorial and click on the purple button, "Install the Coding pack for Java - Windows" (We assume you are working with Windows). Follow instructions after clicking Next, then Install.
4 - Click a desktop icon or otherwise launch VSC. Then to tie your code examples to the folder, first press the three key combination, ctrl-shift-p. Or, search for java create and click on no build tools. A file search window will open, paste in your folder address in the address window and press select java project location.
5 - Back at the VSC main window, key in a name for your first VSC Java Project, perhaps my-first-project or hello_world_vsc.
6 - As a shortcut, in the left pane, click on app.java. And in the top of the right hand pane, the hello world program will appear. Wait until run|debug appears in the pane after line 1 public class app{ Click on run.
7 - What happens, why? Where do you see the result?
8 - Try it again, but click debug instead. What is the result, why?
9 - Next, Click on the right-pointing arrowhead above your code, and choose run. Click the arrow and run. What is the result, why?
10 - Now edit the text to print, say put a comma then VSC after World in the println statement. Debug and run again. What happens, why?
11 - Save . . .
12 - Warning. Microsoft, by default, monitors activity on VSC, but this can be turned off:
VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement and telemetry documentation to learn more.
If you don't want to send usage data to Microsoft, you can set the telemetry.telemetryLevel user setting to off.
From File > Preferences > Settings (macOS: Code > Preferences > Settings), search for telemetry, and set the Telemetry: Telemetry Level setting to off. This will silence all telemetry events from VS Code going forward.
Important Notice: VS Code gives you the option to install Microsoft and third party extensions. These extensions may be collecting their own usage data and are not controlled by the
telemetry.telemetryLevelsetting. Consult the specific extension's documentation to learn about its telemetry reporting.
And so, we have set up and run our first Java program.
Hello World, as a first program, actually has a practical use. For, it tells us our system is correctly set up and able to operate. It is also a case of processing s-t-r-i-n-g-s, the first data structure we have met. That is, a chain of symbols or characters that are manipulated as one entity. Where, a useful first definition of programming is, the coding of algorithms that input, store, interpret, process and output data in standardised structures. For, the computer has no common sense of its own, it is programmed to recognise patterns as meaning instructions, data, numbers etc, then mechanically processes in the CPU then outputs as appropriate.
Yes, I-P-O again.
Yes, too, it is the programmer's responsibility to set up the correct data in agreed structures, then ensure proper processing and output. The smarts in the computer are the canned smarts of the programmer.
So, now, our second exercise is to do some more string processing, based on a typical example, extending our first:
Here is the output:
Hello World
hello
Java String Example
Of course:
- We use a screen shot from VSC, to encourage you to type in and run, having debugged
- This goes beyond a simple Hello World, first by creating a string and labelling it str
- Observe, one-line comment // [comment], and how it explains and documents what is being done
- There is also a multi-line comment defined in Java, opening /* and after lines closing */
- Comments help the reader, they are not compiled, interpreted or executed by the computer
- Next, an array of characters is created, letters for hello: h, e, l, l, o, to be converted into a new string str2
- Creation is by declaration, e.g. String str = "Hello World"; where the RHS content is fed into the declared string variable str on the LHS
- In effect this extends the old Fortran standard where a variable is a memory location or block of memory locations and the RHS of the = sign assigns a value to be stored there
- Yes, this is quite different from standard mathematical usage, we can have things like n = n + 1, meaning, increment n to n + 1 and store it in variable n as its new value
- Notice, next how the "new" keyword is used to introduce conversion from the already declared character array arrch[] to the new string, str2: String str2 = new String (arrch);
- certain keywords are reserved, e.g. they cannot be used to label variables, methods, classes, or any other identifiers
- The "new" keyword is used a second time to create the third string, labelled str3
- println is used three times to print the strings to the VSC console
- this too is explained
- Notice, the more modern style of indenting and using double brackets [aka curly braces] to mark blocks of code -- observe the grey bars joining corresponding { and }
- These are colour coded by VSC
- Every line of code is terminated with a semicolon, as in ;
- We have saved the file as [name].java marking this as a source file
- Notice the use of the {} as in effect vice or pliers jaws that grip the content enclosed
- This is a key pattern in Java and other modern languages [structure]() or {} or []
- HTML of course uses tags that are in angle brackets <tag> and </tag> to mark up text between those jaws
- oftentimes, the nonsense word foo is used to stand in for particular content
- Here we see how even a program exhibits data in structures
- Notice, the program is built up using s-t-r-i-n-g-s of alphanumeric = alphabetic + numeric + special characters, where Java uses the newer, much broader code standard, Unicode -- which has ASCII as a subset
- The overall program structure is: public class StringDemo {}
- This embraces the program's main -- and only -- method public static void main (String args[]) {}
Now the main reserved Java keywords are:
Let's do a slight modification now, string concatenation using the addition operator:
Here, we added System.out.println ("Hello, " + "Sue!") in line 18; . . . notice the space after the comma, and the new result is:
Hello World
hello
Hello, Sue!
Java String Example
If we left out the space after the comma, what would have happened, why? Try it and see, then restore the space.
This little exercise is, of course, also an exercise in how coding is often done: modifying an existing, working program. We also did a small exercise in debugging, leaving out a space would be a small, fairly innocuous bug.
(BUG STORIES, 1: Let us never forget, though, the most expensive "hyphen" ever. That one was small but devastating. They had to destroy a c 1962 Venus-bound space craft heading off course because somebody messed up a "bar over" for a moving average for range rate R-dot-bar. Which means, too, the programmers did not spot the bug themselves as they lacked adequate understanding of what they were coding. Rumour has it, a whole Math Dept got fired over that. More recently, as NASA worked with metric units and a contractor with traditional inch based units, a Mars probe broke up in the Martian atmosphere. Yes, we have to be very careful over variables, constants, values, units, conversions and calculations: it may help to keep a "register" to track such. Then, failure to realise the need to change data type on an ESA Ariane rocket caused it to veer 90 degrees off course on launch as a register ran out of room, another call for self-destruct case. Details below.)
Concatenation of strings is useful, and we can get Java to also print a variable, such as a user name provided in response to a request. Thus, the computer can seem to converse with the user. There is much more if you need it, here is a video for reference.
Now, similarly, computing draws its very name from "to compute," that is to process numbers by doing calculations. Often these may be quite complex calculations (e.g. for science or engineering), or if fairly simple -- e.g. payrolls or bills -- may have to be done so many times that the task is best automated. Java has a Math Class, now part of the core language, which does not need to be explicitly invoked.
Let us start with a fairly simple set of calculations:
When run, the results were:
Addition of a and b is 5.0
Difference of b and a is 1.0
Product of a and b is 6.0
Division of c by a gives 3.0
Raising b to the ath power gives 9.0
Raising c to the bth power gives 216.0
Obviously, a lot of groundwork has to be in place for us to "simply" set up, key in and run a basic Hello World, or to do string manipulations, or even simple calculations. Having such a good start under our belts, let us now turn to some of that groundwork, bearing the above in mind,
Where, to "compute" is to reliably, correctly carry out [complex] calculations
(yes, "Computer" used to be a job title for people who did that day in, day out),
and Mathematics is the study of the logic of structure and quantity, so at the heart
of an automated, digital computer is an Arithmetic & Logic Unit (ALU), where,
digital "logic" applies and automates first laws of sound thought through "gates" etc.,
thus effecting the key transformations + | - | * | /, AND|OR|NOT|NAND|NOR|XOR, Shift-L/R etc; so too, as an initial point, we even have to broaden our framework of recognised numbers!
![]() |
| We here see core parts of a typical von Neumann Computer. Notice, the input-processing-output framework. Programs and data are stored in memory and are fetched, decoded and executed step by step using the control unit, the ALU and associated internal registers (HT, FUE: GfG (Geeks for Geeks)] |
The structure described in the figure outlines the basic components of a computer system, particularly focusing on the memory and processor. It is made up with three main components:
- CPU [--> with Control, Bus interface, Register set and Arithmetic/Logic Unit (ALU)]
- Memory
- I/O Devices
- (We add: Also Buses to interconnect and transfer data)
PRELIMINARY: Structures -- as, they are ordered, not chaotic -- possess internal logic. So, once certain things are given, other things necessarily follow, not because of physical force, but because of what must be true given the nature of the structures and the ordering principles involved; which, often, we can reduce to symbols starting with 0, 1, 2 . . . , x,y,x,t, F = m*a, 2 + 3 = 5, etc. For example (as just seen), two plus three equals five everywhere, not because nature mechanically compels it, but because the logic of quantity and of the linked process or "operation" we call "addition" has it built-in: || + ||| --> |||||. Likewise, the interior angles of a Euclidean plane triangle (a structure) sum to 180 degrees because of the underlying geometry; change the geometry, and other consequences follow, e.g. the four interior angles of a square, a rhombus, a parallelogram or other four-sided figure, sum to 360 degrees. One way to see that, is to draw a diagonal turning the figure into two joined triangles so instantly 180 + 180 = 360. Likewise, too, if you ever have to "build square," a triangular wood frame that has sides exactly 6, 8, 10 feet will be a guaranteed right angle between the 6 and 8 foot sides, thanks to Pythagoras' famous theorem.
Mathematics, in more detail, is the disciplined study of these logically necessary consequences of such ordered structure. So, whenever there are orderly structures, relationships, constraints, transformations, patterns, magnitudes, or possible worlds, mathematics becomes applicable and builds a body of tested knowledge and effective problem solving practice.
That gives it its power.; including, the invention of modern automated computing thanks to Turing et al. Computing -- automated calculation and information processing using the input --> process --> output pattern -- builds on that power.
BACKGROUND: Mathematics . . . the base discipline for computing: i.e., literally: "to determine answers by [often complex] calculation" . . . can be seen as the discipline that studies the logic of structure and quantity. In the main, it uses deductive reasoning and frameworks of axioms that set out what we can describe as "logic model worlds," i.e. abstract idea-worlds that we explore logically; yielding key results we call theorems.
Such models often turn out to be very powerful in representing, analysing, computing and working with real world entities, situations and challenges; especially where we see entities that are framework to any possible world, i.e. are necessary beings, such as core numbers like 0, 1, 2 . . . and the linked sets N, Z, Q, R, C, R* -- where, from integers on, numbers have both size and direction, i.e. are vectors.
(Thus, too, we should be aware of a: the true span of recognised numbers -- from 0 and infinitesimals to transfinites [and 2-D complex numbers], that b: they give us a view on what the logic of structure and quantity constrains . . . given p, q MUST follow by logic; and, that c: they are thus relevant to any possible world; e.g. integer sum 2 + 3 = 5 [not, 4 or 6 or 5.01 or i*5 etc [cf. F/N i] is always so, anywhere. A powerful, abstract . . . and, universal . . . result. Again, kindly notice that the IEEE 754 floating point standard already recognises the need to extend R to include points at +/- ∞, to make certain computing calculations simpler and safer. BTW, that identified universality is why Mathematics (including Computing) has such power in the physical sciences, and for day to day life.
Similarly, these sets provide yardsticks and frameworks for the structures and quantities we will need,
______
Polar form of a Complex Number [HT/FUE: Byjus] {F/N i: CASE A -- IMAGINARY/ COMPLEX NUMBERS: these are often introduced in a way that makes them seem strange or arbitrary. So, to most easily see what complex numbers [and their "imaginary" parts] are, step 1: let an operator i* ROTATE a real value x, through 90 degrees anticlockwise in a plane, then step 2: apply i* again: thus, i*i*x = - x, so, step 3: we may freely infer i*i = -1, i.e. we just identified i as the square root of -1 and recognised that this is a vector rotation operator. Also, we thus tie complex numbers to rotation of 2-dimensional vectors, a complex number z, of magnitude r, at angle θ to the 0x axis, can be represented as
z = r [cos θ + i*sin θ]
= (x + i*y)
and once θ = ω*t, this will rotate anticlockwise at ω radians per second, hence usefulness in a lot of mathematics, physics and engineering; similarly for the equivalent complex exponential form z = r* e^[i*ωt], from which we get the famous Euler identity 0 = 1 + e^[i*π] by setting ωt = π radians. Which, as one of the most astonishing results in all of mathematics (and voted the most beautiful equation in Mathematics), ties the five most famous numbers in Mathematics together to infinite precision and invites us to recognise the coherence of several major domains of Mathematics. As one immediate result, every polynomial of degree n [n at least 2] now has n roots, some "real," others "imaginary," as numbers like i*5 were called. Such numbers emerged as early modern mathematicians struggled with finding formulas for the roots of cubic and quartic polynomials; such expressions often implicitly embedded complex numbers, much to the puzzlement of these worthies. Of course, along the way, we identify that circular motion is the superposition of two sinusoidal, "simple" harmonic oscillations, opening up the world of frequency domain analysis, spectral analysis, Fourier, Laplace and Z Transforms. Where, just for starters (FUE), we see:
![]() |
| Parallel rail tracks etc. converge in the distance [HT: Wiki] |
CASE B -- a polynomial where n = 1, H and h, thus A NON-EUCLIDEAN GEOMETRY OF PERSPECTIVE & OF VISION: Of course, we must look at the polynomial case n = 1, or, y = mx + c, so x = (y - c)/m. Where, if we set m = 0, so y = 0*x + c, then solving for x requires a forbidden, divide by zero expression. Ouch. H'mm, magic step: let's infinitesimally alter slope m --> [m + h] in the cloud *m*. (That is, h is a number far smaller than 1/n for any n we can count to, 1, 2, 3 . . . [i.e. a typical infinitesimal] and so 1/h = H is larger than any such n [i.e. a typical transfinite; one, tied to h by the 1/x "catapult" function].) Then,
MS+1: x = (y - c)/[m + h], so for 0 + h, x = [1/h]* (y - c), i.e. x = H(y - c), ~ H. Or,
MS + 2: let us consider say railroad tracks at w apart as x increases, where w/x = tan φ ~ φ (in radians) as x becomes large; φ being the angle subtended at the observer. Thus,
MS + 3: let x --> H, so [w/x] --> [1/H] *w = h*w ~ h, i.e. φ is now vanishingly small; which makes sense in perspective: parallel lines converge at the in principle transfinitely remote, eye-level, horizon level vanishing point, i.e. we are here using hyperreals to look at projective geometry.
Notice, too, in the illustration, how the fence also converges to the same VP, and how the presumably evenly spaced, similarly sized sleepers seem to grow smaller and smaller with ever-narrower apparent spacing as they recede into the distance. Now, these are facts of experience we always have had, though until the early Renaissance, they were not well understood artistically and mathematically; ironically, our everyday experience of vision always . . . yes, always . . . opened a gateway to infinitesimals and transfinites! Yup, another realm of numbers and a non-Euclidean geometry relevant to computer graphics [and, to 3-d machine vision, so too our own binocular 3-D, perspective vision] lurk here, too! Not to mention, how the world looks to us. [Cf. here & here, also here.]}
CASE B.1: The IEEE 754 Special Operations . . .
Here, transfinites and infinitesimals lurk, showing the implied need to widen our understanding of the number line.
![]() |
| A circle's area, by slices, in the limit infinitesimal, so we now have a rectangle, pi*r long and r high, so area is pi* r^2. A 2,000+ year old first case(HT, FUE: CueMath) |
CASE C -- THE AREA OF A CIRCLE: So, it's all connected through the polynomials: reals, complex numbers, transfinites and infinitesimals. BTW, a circle centred on (0,0) has equation:
x^2 + y^2 = r^2 , where
x = r cos θ,
y = r sin θ
Next, we can further see how "tamed" infinitesimals from R* open a gateway to the study of rates and accumulations of change, i.e. Calculus -- a major focus; which, can thus be seen as an extension of algebra using "infinitesimally altered real values," such as "from r to r + dr," dr being an infinitesimal. (NSA textbook here. We already see this for a first case, area of a circle, but we can now generalise:
. . . think of any r in R, that it has "a close fuzzy cloud" around it with r + dr and kin, that is *r*. So, let's start with r = 0, giving us *0*; which, then allows us to add r + *0* --> *r*, the infinitesimals cloud at/around r. [This works, as, a real number r along the number line is actually a vector with magnitude |r| and +/- direction; where too |dr| is "far closer to 0" than 1/n for any n we count to in N . . . we are basically fuzzying up our view of real numbers, to each include a close-in cloud.])
CASE D -- CALCULUS STUDIES RATES & ACCUMU-LATIONS OF CHANGE: Thence, we can make sense of the "instantaneous" slope/ tangent/ speed/ acceleration/ growth rate, element of area under a curve, etc, using those fuzzied up number clouds: as, the clouds give us 'room to work with' for each value of r. So, what does it mean that a car is going at 25 miles per hour just now? That is, 36.67 feet per second or 0.44 inches per 1/1000 of a second, or just over 0.01 mm per micro second, etc? Where, at any given instant t, it is at some specific point x, but is also moving at a given rate or speed v = dx/dt -- yes, we need infinitesimals to make sense of something as commonplace as how fast a car is moving. Let's put x in "an infinitesimally close" cloud *x* [with x + dx in it] and also go t --> *t* [with t + dt in it], then take the ratio v = dx/dt, the instantaneous speed at (x, t). So, too, there are whole Calculus and Physics textbooks worth of more! And, room for the whole world of dynamic modelling of rates and accumulations of change.)
![]() |
| The Galton Board in action, cf. video. |
CASE E -- HOW BELL-SHAPED DISTRIBUTIONS (ETC.) ARISE: Similarly, we may consider and model statistical, probability distributed processes. The Galton/ Quincunx Board allows us to vividly see how a population distribution and its mean arise. Here events (falls of beads) are fed into a scattering process [here, pegs] which can be evenly balanced L/R or can be biased. In the balanced case, as there are far more possible paths near the mean, we get an even, peaked distribution. This already opens up a definition of probability and shows the relevance of probability distributions and statistics. We can also see why some distributions are sharply peaked or broadly scattered, or may have a bias, or may have secondary peaks, etc. Such statistical/probabilistic processes explain many phenomena of interest. (BTW, genuinely random numbers are sometimes valuable, here are a source and a discussion.)
CASE F: We can explore, too, the so-called math of beauty (leading to the spiral, to fractals, and to further power of polar form coordinates, etc):
So, then, starting from rotating vectors in a special plane and with polynomials, we just deduced a pattern of deeply connected results, including the interconnected coherence of the five key numbers (thus of several major domains of Math), the logic of perspective, the existence of non-Euclidean geometries (including in how we actually see the world), hyperreals as an extension of the common number line, studies of rates, flows and accumulations, the golden ratio, spirals. Linked, we took a look at how bell shaped distribution curves can arise from interactions of a great many factors, and more. We even put up a key way to understand Math: the study of the logic of structure and quantity, duly noting that computing is built on Mathematics. That is,
THE MATHEMATICS-COMPUTING BRIDGE PRINCIPLE: we thus see how "givens" that express structures and associated quantities logically constrain what else must obtain, not by physical force but by the logic of actual or possible being, worked out step by disciplined, debugged (and, currently, "peer-reviewed") step. Thus too, we can create a disciplined study and body of knowledge, the logic of structure and quantity -- aka, Mathematics. From which, "MAGIC" STEP: we then can see how to carry out complex calculations and transformational operations on quantified (and digitally represented) inputs, processing to lead to useful results, that we can then issue as suitable outputs. Computing.
POWER OF COMPUTING THESIS: Computing -- using automated, programmed machinery, the IPO pattern and required step by step algorithms acting on encoded data in structures -- now becomes the faithful handmaiden of Mathematics and connected disciplines (and industries!). Logic, expressed in stepwise . . . intelligently designed, debugged and reliably effective . . . processing and transformation of information, especially computation. Which, makes it exceedingly powerful, useful and increasingly pervasive.
POWER OF AI THESIS: Next, AI, then, is not magic. It is rooted in mathematics, embodied in computing devices with massive bases of structured, symbolised, digitally represented -- and curated -- knowledge; operating at unprecedented scale and manifesting sometimes astonishing powers. One of which, is ability to partner with us in coding, and another is . . . ability to do Math that may sometimes astound top flight Mathematicians and Computer Scientists.
![]() |
| A self-driving car is a case of a general machine (HT, FUE) |
GENERAL MACHINE PARADIGM: Ponder, then, a reasonably powerful "Turing-complete" computing machine (using, say, von Neumann architecture) that hosts sensors and actuators/effectors, has a local AI and is networked to global AI's acting as "[pseudo?-] super oracles." Where, the constructor concept can be seen as two main types: Type S can sense and help to construct a model of the state of affairs in the world and/or for a target plant; to guide computation and action. Type E would be actuators/effectors that act to change that state under computational control. (Ponder, say, a self-driving car or a drone delivery vehicle.) Both, together, with the computer form a sense > feedback > compute > control- and- effect loop. So, constructors construct, s: a model of the world-state, and then by acting, e: modify that state of affairs towards desired ends, e.g. driving the car in an environment towards a destination using a networked shared map of obstacles and alternative routes. Such a device is now a general machine, capable of any task we can find a way to do, opening up a new industrial/technological era, the age of smart general machines. Surgical robots, package delivery drones, computerised automated mass customisation manufacturing systems and self-driving cars, drones and space craft are only preliminary glances at what is now plausibly possible -- for good or ill.
GENERAL MACHINE APPROACH TO COMPUTING: Once, we see a networked, AI-connected computer that -- locally or through a network -- interfaces with a target in a world, we can take up a very powerful approach to computing, programming and computing based work:
- As the computer-network-constructor pattern emerges, we can see a general machine action loop: WORLD ==> (Sense → Model → Compute → Decide → Act) ==> repeat
- Thus, as Mathematics allows us to symbolise and represent structures, quantities, logic, operations and the like, computing becomes an automation of mathematical modelling applied to real world problems
- That is, for those who need more details than the simple I > P > O framework, a computer . . . a: is an automated machine, one that b: has a state at any given time, c: based on its state and instructions draws in inputs from the user and the world, d: processes the input and stored information, thus e: executes arithmetic, logic and information operations (based on a program), f: therefore builds models and transforms such input information using those models (following program instructions), g: participates in feedback loops that further adjust how it operates, h: then generates outputs that may report an answer or effect actions on a target; and i: may itself be part of a larger machine or network of machines.
- Where, too, as the computer itself is now seen -- modelled! -- as a layer cake stack of "virtual machines" [VM's] resting on the hardware, programming is now giving ordered instructions to a convenient virtual machine, which . . .
- then, effects the designed solution by computing the instructions in the general machine action loop [GMAL], using lower level VM's and the underlying hardware to carry out the IPO process
- One way to do this, for the user interface, is to interact with a virtual, [pseudo-]oracular personality/ assistant/ collaborator, i.e. a so-called agent -- the "agentic interface" as a parallel to the "app," the "icon," and the general familiar desktop WIMP framework
- Also, a Computer's Architecture is thus the assembly-language view of the machine, as this key design layer deals with registers, arithmetic and logic function units [= the ALU], control, wider memory, interfacing for input and output, networking etc.
- The networks then connect local machines into a wider VM, which may bring to bear the power of an AI utility
- The AI then becomes part of a wider constructor to help us model, visualise, map, simulate, decide about and effectively act on the world, or at least a targetted plant in it
- This of course, brings us back to the GM as base model, where once a local machine can tie us into the GM, it has all the power of the global, AI supported network available to it
- Yes, my phone, or Raspberry Pi board or laptop or PLC by itself is weak, but networked, it becomes powerful.
- That power acts through constructors: Type S: sense and model the world or a target plant for computation and action, Type E, under computer control, carry out effective action steps on the plant
- (Type S could be as "simple" as taking inputs from a keyboard or mouse, Type E, might be as "simple" as putting information out to drive a printer, or a visual display unit)
- Where, sensing and modelling the world, can include sensing and modelling mathematical -- abstract -- possibilities and structures, now demonstrably including doing fairly serious mathematics
So, our "near excursus," has actually provided a first step foundation for what follows. As, we can see that Mathematics is not a grab-bag of tricks and formulas. Instead, we now see how Mathematics -- the logic of structure and quantity -- is deeply interconnected and coherent within itself, is pervasive in actual and possible worlds (as, it is an aspect of the logic of actual and possible being) and thus becomes awesomely powerful -- some, may even see in it the Shadow of God. So, too, that analytical power is why Computing . . . here, automated calculation and processing of symbolised information . . . is also powerful. END, F/N i}
And yes -- if you haven't figured it out yet -- "School Math" is a . . . sadly, too often poorly . . . cut down version of the real thing; again, "too often" complete with blind memorisation, drudgery, failure and frustration; which, we now have to get over. Yes, "I hate/can't do Maths . . . " is no longer acceptable, we now have to find a better, computer-assisted way.
In short, we now have to move beyond a frustration-prone, aversion-creating traditional "here's your veggies, or else . . . big red X's everywhere" approach, to a balanced, highly visual, step by step progressing, empowering, insight based, case study oriented, confidence-building paradigm.
Yet another reason for this course.
[NB: Computers can enable a more positive, individualised, coaching/supportive, diagnostic/debugging, empowering approach to learning: if inputs/givens are "right" but results frequently go wrong, something is wrong with the process, what are the likely candidate process errors? Or, were the givens, inputs and start-point actually "wrong"? Was the student truly ready for this step? What are some fresh ways forward?
So, yes, a learning revolution beckons, complete with web, multimedia and AI -powered "general machine" tools -- maybe, even, a robot professor's assistant. See, what a computing mindset, debugging approach can do?])
![]() |
| Pythagoras' Theorem is famous |
Namely, as we now expand,
"M: Mathematics = P: [the study of] + Q: [the logic of structure and quantity]."
Here, the "P" part is our disciplined effort, and the "Q" part is part of the structure/ architecture of the world, or at least of some relevant/interesting "model world" we contemplate. For a key instance going back thousands of years, we easily see that 3^2 + 4^2 = 5^2, i.e. 9 + 16 = 25, but then, EXERCISE: when we set out squares like that on a flat surface, they form the famous 3-4-5, right angle triangle . . . a case of the famed Pythagoras' Theorem. Which, back in those days, was enough to trigger a religious devotion.
And, ancient Egyptians used just this result with a twelve-segment rope that reliably sets up a perfect right angle:
![]() |
| Because of Pythagoras' Theorem, a 12-segment rope defines a right angle (tied to a World where parallel lines never meet and angles of a triangle sum to 180 degrees). To further open us up to non-obvious structure and quantities, EXERCISE: explore the Mobius strip or loop, contrasting a circular loop with no twist. |
Where, that Logic of Structure and Quantity -- the substance of Mathematics -- tells us,
R: given certain first things [= "axioms"] then S: the following logical consequences [= results] MUST also be the case, regarding structures and quantities, R => S
. . . starting with, say, T: an undeniably true, "self-evident" Math fact . . . here, due to the logic of what happens when we join a bundle of two to a bundle of three (resulting in a bundle of five) . . . like
![]() |
| Here, we see T: a "common sense" Math fact, one that is readily seen as so by one with experience/maturity to understand it, as necessarily so, and that such is undeniable on pain of instant absurdity (i.e., it is self-evident). In C19 - 20, after several shocking findings, core Mathematics moved on to axioms informed by such core facts, but framing "logic-model worlds." Try, Peano's Axioms, the ZFC frame, and the von Neumann construction of ordinals, trans-finite induction, hyperreal numbers, as well as wider Foundations of Mathematics, including the Godel Incompleteness Theorems. For starters, let us draw out what numbers are about and how they bring out first principles of logic, also showing why numbers are always present, everywhere, pointing onward to infinity. So, we may ponder the empty set, { } . . . yes, there is just one, we simply refer to/ use it when we need it. Yes, too: it is abstract, it is not displayed anywhere in some cosmic museum of oddities. And, even more wondrously, it is present everywhere (just like the always so truth 2 + 3 = 5). So, we can see that universal objective truth, omni-presence and eternality are meaningful and close at hand, just from basic Math. In short, some truth-claims and associated entities (here, the number 0) are so, are so anywhere, any time, and thus have general, trans-world power. Now, as just noted, key: we now freely identify this empty or null set with zero, and proceed step by step, in the von Neumann construction of the natural, counting numbers: { } --> 0, which is some-thing, a specific set, so: { 0 } --> 1, thus we have identified the number one, next: { 0, 1 } --> 2, the number two [key to LO(D)I: The law of distinct identity (cf. here!)]. For, here, we see too how 2 involves distinct different things, thus we can see the pair, a and what is not-a, ~a; making a world W = {a | ~a}. So too, ~a typically collects things in W that are not a . . . it is a complex unity. (It helps to think of a as { a: "a bright red ball" | ~a: "on a table in a room in a wider world"}, so ~a involves the table, the room, the building, its surroundings, and so forth.) Then we can see, LNC: no x in W is both a and ~a [law of non-contradiction], also once | truly distinguishes, LEM: any y in W will be a or else ~a, but not both or neither [the law of the excluded middle], the third core law of logic. Next, { 0, 1, 2 } --> 3, our third number, showing onward succession to some k: { 0, 1, 2, 3 . . . k } --> k+1, with k+2 etc. following, which is recursive, in effect from any k we can start again counting onward without finite limit. That is, we now see the natural counting numbers are in a transfinite set . . and instantly, the infinite is a necessary and meaningful concept, whatever has no finite bound; so: { 0, 1, 2, 3 . . . k . . . } --> ω (omega, order type of the naturals, the limit ordinal of the natural numbers, thence transfinite mathematical induction). So we now see our first trans-finite ordinal, leading on to ω+1, ω+2 . . . ω+ω [= 2ω] . . . yes, infinity was just next door when we were learning to count our 123's. From this, in ZFC, N is defined as a specific, infinite set, the axiom of infinity. Likewise, consider some H, a representative transfinite hyperreal H >> any n in N, then we freely go h = 1/H, so h is now a representative infinitesimal closer to 0 than any 1/n, thus we identify infinitesimals in the close cloud for 0, *0* [Thus, giving a more specific sense to dr and a modified real, r, i.e. r + dr by making the vectors cloud sum r + *0* --> *r* taken as a cluster of infinitesimal vectors in *0* added to r, "tip to tail."] Recall, as reals r are +/- they clearly have direction, and have size |r| so they are vectors. (Actually, from integers in Z forward, our recognised numbers in Z,Q,R,C,R* are all vectors. Naturals, n in N, can be seen as "size only," scalars. Things like mass, temperature, distance [vs. displacement] are generally* positive or zero only, so are scalar. These points open up the Calculus, study of rates and accumulations of change. Scratch one "dragon"! {*NB: negative temperature means a population inversion, such as in energy levels for a lasing medium, "hotter" than "infinite temp." Dragons count, 2. Three cheers for God, Harry, England -- and St George! [Cf. King Henry V, Act III.]}) BONUS: we have also seen how first principles of structure, meaning and of Logic as a discipline naturally emerge from pondering numbers. |
So, again, we observe, }} + }}} --> }}}}} (yes, we can vary our symbols!),
i.e. as we often symbolise: 2 + 3 = 5, etc. (Notice, how
the order of the 2 and 3 make no difference: commutativity,
thence various structures: groups, rings, fields, algebras (over fields), vector spaces.)
I hope you won't mind a summary-for-reference of core first principles of logic (and yes, the first axioms/laws of Boolean Algebra have every right to be included, too):
![]() |
| A world, W = {A | ~A}. Here, A (think, a bright red ball on a table in a room . . .) holds distinct identity, given core characteristics, think: circle, vs square vs triangle etc. 1, LO[D]I: A is itself, A = A [given its core characteristics], 2, corollary, LNC: no x in W is A AND ~A, 3, corollary, LEM: any y in W will be A or else ~A. From this, we frame our world of thinking and tie it to external actuality or possibilities. And yes, there are those who want to debate such, manufacturing many objections. Such should ponder what is going on as they think or communicate, as say 1 Cor 14: "7 Yet even lifeless things, whether flute or harp, when producing a sound, if they do not produce distinct [musical] tones, how will anyone [listening] know what is piped or played? 8 And if the [war] bugle produces an indistinct sound, who will prepare himself for battle?" [AMP, yes, language, text, music, meaning/ understanding and more pivot on distinct identity, too. Those who have been led to doubt such by much of current thought, should ponder the self-referentiality involved in so trying to object . . . just for fun, cf. here too, then this vid.] |
. . . and
Moreover, we may freely argue:
![]() |
| Regrettably, knowledge has become a lightning rod issue -- and sometimes an ideological football, in key part because it confers legitimate authority (which always irks some people). On one hand, we may see undue suspicion and dismissiveness (such as the extreme case addressed); on the other, there may be exaggerated "Science" and statistical claims, or undue suppression of disagreement among qualified experts . . . or cherry-picked data (or bias), or even outright groupthink. Indeed, there is a "fallacy of confident manner" to be borne in mind as we hear breezily confident, slick presentations or speeches. "Gold standard" methods and results may go wrong, especially if they marginalise wider responsible evidence that tells a different story; yes, unwelcome "anecdotes" can be right, too. (E.g., when experts busily flashing their credentials may have "big money"-backed agendas or deeply entrenched, "mainstreamed"[= "deep state"] -- or just "up-and-coming" -- ideologies; and yes, Government can itself become entrenched, corrupt "special interest" no. 1.) Don't overlook how the connotations of terms used may create a halo effect ["gold standard"] or may make unwelcome evidence seem dubious ["anecdotal"]. There is also a related tendency to give "technical meanings" to words, that are subtly loaded from the more common usage (and then feed back a tainting effect); a classic is Lenin's redefinition that "Imperialism is the export of Capital." Then, ponder the two all but opposite meanings for "refute": does one intend, 1: "prove to be false or erroneous," or merely 2: "deny the accuracy or truth of"? (See how #2 can manipulatively draw on the aura of the more usual case, #1, without actual basis, especially if the one who denies carries an air of authority? [Thence, outright big lie tactics -- often by slanderous, scapegoating projection to the despised other.]) Likewise, there is a tendency to mistake computer-based simulation and modelling or "dodgy" proxies for actually observed facts: if something is beyond direct observation and credible record, we are dealing with a modelling, not an actual fact, e.g. reconstructed pre-histories, models of economies before the rise of modern macroeconomics, grand ideological theories of civilisational development/history, models of stellar or galactic life cycles etc. [a big etc.]; yes, we often must use such but should not imagine they are "facts." It remains true that no expert or authority -- or model -- is better than the "facts," "logic" and . . . too often, unrecognised . . . assumptions behind the confidently presented results, models, schemes or projections (especially, financial projections). Never underestimate what money can buy, bribe or promote. The clever can argue almost endlessly for or against any proposal, so we must always emphasise actual demonstrated facts of observation, based on sufficiently broad observation (not mere simulations), critical cases and adequately scaled demonstration cases; there is no substitute for being willing to take the risk of prototyping, swallowing failures and fixing gaps that emerge. Likewise, the history of Paradigm Shifts and revolutions in science and other fields of thought tells us that "consensus" [especially where there is significant -- and perhaps unduly marginalised/unpopular -- dissent: e.g. Galileo, Semmelweis] is not proof. Galileo is a case where a sharp-tongued gadfly was right. Big (but persuasive) lies are a sad reality, as are turn-about "he hit back first" projections . . . so, who threw the actual first punch, why? (cf. here, too.) Always, we must assess limitations, possible errors, consequences of error (where lie the "least regrets" of being wrong?), known unknowns, Taleb's Black Swans and Rumsfeld's "unknown unknowns" that may leap out of the dark and pounce on us. Agile methods may help. If this scares you, it should, we need sober appreciation of uncertainties, hazards and risks -- even as we face ever more dire challenges and the urgent need to decide and act soundly. |
To hammer such home and clench over (sadly, given much needless controversy), let us ponder:
. . where, for text, we can take the ASCII code as a key example (including, on how coded bit strings can distinctly represent anything of interest):
![]() |
| The ASCII code table |
Thence, we may contemplate modes of BE-ing and non-being (thus, modal logic . . . onward, declarative and logic programming, knowledge representation & knowledge bases, Prolog etc., including expert systems etc., a slice of AI [see, debates]):
![]() |
| A Digital Computer CPU in context. Notice, the IPO logic: input > processing [CPU] + storage > output. Buses move signals around: Address, Data, Controls [ADC] [HT: FUE] |
V: the foundational four rules of Arithmetic (+ - * /) can be executed using fairly simple combinations of logic gates (AND, OR, NOT, X-OR, NAND, NOR). Such logic gates carry out logic operations, typically using electronic switches, though some early computers used electromechanical relays, etc. Hence, we see the the central place of registers to store values, and of arithmetic and logic units [ALUs] to execute operations on such values. Just about anything we want to represent, manipulate, process and compute can be built up from that, and/or through logic operations and/or through manipulation of coded, structured, meaningful data stored in registers: s-t-r-i-n-g-s, text, documents, colours, sound, states of real world objects, images, etc. (Computer memory space is an array of such storage registers, each with its own binary, numerical address, typically 000 . . . 00, 000 . . . 01, 000 . . . 10, . . . 111 . . . 11; 0, 1, 2 etc to an upper limit 2^n - 1. Nowadays, 8, 16 or more GB, Giga Bytes, is common for read/write memory. Secondary storage, in hard disk (magnetic) drives or solid state drives is upwards of TB, Tera Bytes. Often, the easiest way to improve a computer's performance, is to increase its memory.)
That "complexity" can also apply to calculations that are individually simple, but because of many, many events, transactions, records and required accuracy, such as in business accounting, payroll, inventory management and the like (especially if, as for online airline reservation systems, they must also be done in "real time"), the cumulative workload becomes highly complex and/or prone to loss of synchronisation and/or coherence and/or accuracy and/or timeliness -- thus, loss of reliability -- across a system or a network. (And that's before cybersecurity comes in, in a world with sophisticated hackers.)
With industrial plant process control, (which of course extends into mission control of rockets and space craft . . . literal rocket science!) we have complex calculations, need for real time responsiveness and often data logging and perhaps integration across a large plant or even a utility network. This already points to so-called "functional programming," hence onwards the lambda calculus etc. (See Unit 2. Suffice to note, from version 8 on, Java supports multiple programming paradigms, and it is capable of real time systems. [See reference text here.])
Where, too, we must recognise that scaling up from a "toy" example or a "demonstration" case, may itself pose complexity challenges -- not least, just how powerful a computer is now required, with just how much back-up that must be ready to take over without a hiccup to the service.
Also -- never mind our stress thus far on reliable, correct solutions and the power/ foundational role of Mathematics etc. -- sometimes we instead need to go for a quick and dirty, "good enough" but not necessarily the best or optimal solution. We may face high uncertainty, some of which may go beyond what we know about, i.e. the somewhat notorious "known knowns, known unknowns and unknown unknowns" popularised at the turn of the 2000's. At other times, under pressure of urgency or in an emergency or disaster, we may need to buy time to do a better solution "later" or we may need to stabilise an otherwise deteriorating situation in hope of staving off collapse . . . and in hope of finding a better alternative in the meanwhile. That leads to the two-track solution strategy: a quick and dirty immediate response and then bridging to a more permanent, higher quality solution.
To manage such circumstances, we may need to use "rules of thumb" (aka, heuristics [more details here, and here; and the now famous design patterns are heuristics]) or trade off the perceived cost/risk/danger of continuing in business as usual or delay and further investigation towards a better decision vs the risk, danger or cost of taking a potentially "second best" (or worse) option now -- and "later" may become "too late." This is compounded by how, oftentimes, those who make decisions and those who may bear painful or damaging costs may be very different, and of course, decision makers are usually more wealthy and powerful than the at-risk vulnerable. So, broad stakeholder participation may -- may, not "will" (we might instead end up pooling ignorance, bias, errors, fear or rage etc . . . ) -- help improve the decisions to be made.
Likewise, for all our talk about "evidence-based decisions" we may face circumstances where what we don't know -- or don't know we don't know or are unlikely to anticipate (or may rule out as implausible or absurd), may dominate the outcome . . . indeed, arguably the pivots of history may too often be such black swan events/ effects or scenarios.
![]() |
| Never underestimate -- or over estimate, common sense |
Just, a few words of caution lest we end up in imagining we have gospel in, gospel out; when our actual inputs and insights may be far from rock solid: garbage in, "gospel" out.
Nowadays, of course, one of these rule of thumb, "good enough for government work" decisions is that we may need to evaluate whether an off-the-shelf package or a given Artificial Intelligence projection etc. may be good enough (or whether we need to bring in a bespoke software and systems development contractor); a make vs. buy decision. (More trivially, deep ancestry mapping through genetic software is a popular example of such heuristics making fuzzy but reasonably informed decisions.)
But let us note too that, for example, high end specialist mathematical software often comes with its own programming language; which means prior familiarity with programming is a requisite for making full use of the application.
So, another dirty secret, fair warning, W: Programming can get into seriously involved Mathematics, real fast. Yes, not "always," or even "generally," but "often enough." For "simple" example notice what it takes to do a bit of old-fashioned graphics using text symbols in the "console" display window:
Here is a key clip-at-a-glance, opening the gateway to graphics coding and to linked modelling and simulation:
![]() |
| This example gives a larval form of the issues and techniques of computer graphics programming, a key facet of the multimedia programming that for example lies behind animation, rendering, 3-D modelling of objects, games, etc. Thus, it gives a glimpse of what lies behind multimedia authoring applications and systems. It also shows a bit of the physics involved: diffuse (Lambert's cosine law) vs specular (mirror-like) reflection, with resulting visual texture and shading (which here uses twelve levels based on text characters, as was often used in the days of fanfold printed paper output). Actual surfaces blend the two, sometimes with refraction and transmission or translucence. In addition, light may suffer diffusion, scattering and absorption. Colour comes in key part from wavelength dependent reflection or transmission, white vs black vs coloured smoke is a case in point, as is the wide variability of the colour of water bodies. Our visual processing system then interprets objects, motion, relative location (perspective) etc. A semi-famous case is based on Pygmies carried out for the first time on the plains of Africa. What are those insects? The "insects" were distant herds of animals but the men from the forests were not used to seeing things at a distance. At least, so we are told. |
Taking it to the next level, here is a 3-D city scape, rendered with ASCII characters:
Ponder, what it takes to render, say, water:
![]() |
| Computer Graphics and Machine Vision are significant areas of coding, and embed considerable mathematics and physics. (See, Eck. Also, Enright et al, Morris, Wikipedia, MIT Vid. For water waves specifically, see here, here and here.) |
(QUESTION: So, where do we go to get that Math? Perhaps, Wolfram Alpha. MIT open Courseware has a textbook, here. This cookbook may help, and for general Math it is hard to beat Kreyszig's Advanced Engineering Mathematics. The AIP Physics Desk Reference may help with the associated physics. On such non-political matters, Wikipedia may be a good source to glance at, and of course a good University Library is always a key resource. If you have some familiarity, or are working with somebody with some knowledge, that may help as will web searches. For this case, try here. Beyond that, reach out to subject matter experts, Mathematicians, Statisticians, Economists, Physicists, Engineers, Astronomers, Chemists or the like. Fair warning, see Unit 3 for a live case we will study. Notice, this is a heuristic!)
We have been duly cautioned, advised and directed to possible sources of help.
Also, we clearly need some background orientation and overview to help us organise our logic-of-process computing thinking, so now:
[ GO TO STEP ZERO ]
PART A: THE PROGRAMMER'S FRAMEWORK & MINDSET
STEP ZERO --
FURTHER BACKGROUND BRIEFING
(An advance organiser, skeletal framework on key themes, so we can slot in
what we learn as we go on further here and onward . . . and yes, we
will use key case studies/examples/illustrations as part of that framing)
![]() |
| The Wirth "equation" |
As a first more specific step to understanding programming and automated computing, let's follow the view of Niklaus Wirth -- creator of Pascal -- that
PROGRAMMING = CODING of ALGORITHMS that act on DATA in STRUCTURES
As Wirth summarises in the highly original title of his 1976 work:
ALGORITHMS + DATA STRUCTURES = PROGRAMS
He then continues, in his preface:
[I]t is abundantly clear that a systematic and scientific approach to program construction primarily has a bearing in the case of large, complex programs which involve complicated sets of data. Hence, a methodology of programming is also bound to include all aspects of data structuring. Programs, after all, are concrete formulations of abstract algorithms based on particular representations and structures of data . . . decisions about structuring data cannot be made without knowledge of the algo-rithms applied to the data and that, vice versa, the structure and choice of algorithms often strongly depend on the structure of the underlying data. In short, the subjects of program composition and data structures are insep-arably intertwined.
Of course, too, "data in structures" is another way of saying, a body (or, mass) of properly organised, presumably validated -- so, accurate, meaningful and reliable -- information. The very "stuff" of information technology, information systems and information management. But, in a computing -- as opposed to telecommunications -- sense, just what is that odd, intangible "stuff," information?
![]() |
| The DIKW Pyramid, moving from data to wisdom, with impact on quality/riskiness of decisions (HT: Social Impact, FUE) |
(And of course, this now points us to a widely used but somewhat controversial model, DIKW. A model that goes to the heart of clarifying what we are doing: working with data and information, with information systems and with information technologies. Thus, we need to identify what "information," "data" and related ideas mean, in this context. So, let us pause to draw out a rationale, taking steps of thought:
![]() |
| An example of typical data structures: a tree structure that displays various typical data structures (starting from ASCII s-t-r-i-n-g characters) |
- First, "structures" range from simple ASCII-coded character strings or lists, stacks, queues, arrays, trees, records and their fields; to, vast repositories of information, such as reside in server farms. [e.g. those that host web sites, e-Commerce platforms or AI's, Artificial Intelligences].
- Then, along the way, we find a key, widespread phenomenon -- "mere" databases, i.e. "large" organised stores of information together with their management systems.
- That is, we see how individual items of data (digital representations of facts, observations, events, transactions, measured values, etc.), suitably structured, collected, validated and meaningfully organised, become a body of information, the context for drawing out knowledge, controlling industrial plant processes, aptly guiding decisions and applying wisdom. Citing CLRN, we can further identify how:
In computer science, information is defined as the result of a process that transforms input data into a meaningful representation, making it useful for communication, processing, decision-making, record-keeping or storage. This definition encompasses the following key aspects:
• Data: Information begins with data, which refers to raw, unprocessed facts or figures. [--> thus, "data," duly digitised, is the raw, larval form of information; in our loop case, sensed, measured, digitised values that sample and monitor a plant's current state (including internal conditions and outputs) across time]
• Transformation: Data undergoes a transformation process, such as encoding, decoding, [validating!] or processing, to create meaningful information. [--> so, functional, structured, organised, reliable, relevant (so, useful), meaningful information now emerges; in the loop example, the computer has a set point or path and by taking sensed data on the plant's state, it subtracts actual from intended [ALU action], so it monitors errors, then instructs the actuator on how to act to restore the set point or path -- negative feedback control . . . thus, data here has a structural context, and informs control action]
• Meaningfulness: The transformed data becomes meaningful, conveying a specific message, pattern, or insight. [--> which, being tested and found valid is now part of a body of knowledge]
• Usefulness: Information is useful for various purposes, including communication, decision-making, record-keeping (and reference), storage, or further processing.
- Just so -- GIGO notwithstanding, such a duly validated, warrantedly accurate and reliable, credibly true, properly organised, meaningful mass of information, is now also . . . um, ah, ahem . . . a recorded body of -- perhaps, implicit or unexplored . . . -- knowledge.
- For, as we may freely summarise: knowledge is "warranted, credibly true (so, reliable) belief" -- with the implication, that it is functional and meaningful, i.e. reliably inform-ative and useful for relevant purposes. That is, it is credibly material: it (potentially) makes a difference to conclusions to be drawn, to industrial process control actions, and/or to decisions to be made. Where, too, it is thus not trivia, nor hyper-skeptical dismissiveness, nor paranoid suspicion/accusation, nor wishful thinking, nor "[pseudo-]consensus" and linked censorship or toxic denigration and marginalisation of informed dissent, nor blind guesswork or "garbage." (NB: See here, too, on Bloom's updated taxonomies for learning -- and by implication, wisdom.)
- However, in a world of gaps, error, junk information and calculated disinformation, we must beware of abusive, false information, gaps in information, prestige abused to present ideology or bias as warranted truth, and willful manipulation. So, let us highlight responsible warrant and information governance. (And, of course, would-be manipulators love to usurp and subvert governance, so, there is a place for audits and even ombudsmen.)
- Thence, onward there is talk of knowledge bases. as well as of data mining, "the process of extracting knowledge or insights from large amounts of data using various statistical and computational techniques [such as "deep learning"] . . . to discover hidden patterns and relationships in the data that can be used to make informed decisions or predictions."
- And in turn, knowledge is a key to power, ability to do good.
- But, twisted, power can instead do evil, causing chaos; thus, ethics cannot be severed from computing.
- And, this is not just about hackers, cyber-bullying, identity theft, undue surveillance and privacy violation, slander, the dark/dodgy web, manipulative "disinformation"/"fake news," what we can call "diseducation" (caused by misleading ideology and propagandistic indoctrination posing under false colours of knowledge, fairness and goodness) or "old fashioned" computer fraud, etc.
- For, great power implies great responsibility and great duty; thus, requiring that balanced depth of insight, integrity, honour, prudence, humility, sound conscience, sense of duty, courage (or even iron-souled-ness), honesty, truthfulness (balanced with tact), fairness, empathy, good-will, open-minded but critically aware sound judgement, charity and virtue we call . . . um, ah, ahem again . . . wisdom. [For which, we have, decision support systems and expert systems, as well as interactive, generative AI's.]
We stand duly warned.)
The DIKW pyramid, obviously -- and whatever its balance of strengths and limitations, usefully models information and knowledge management thence decision support, which are vital for individuals, professional or technical practice, businesses, organisations, movements and their organisational learning and capacity development, strategic marketing, public relations and sustainability. It is unsurprising that this framework thus helps us understand, "mine," capture and apply much of the value of a knowledge base rooted in data stored in structures . . . often, dwarfing the value/cost of the hardware and information/knowledge management or decision support software. (Which, in turn, is part of the cost/benefits analysis that grounds making the investment in such hardware and software.)
Where, too, as those concerned to build programs to input, process, store and output relevant information, we must prepare ourselves to understand the context of, justification for costs to acquire (or, keep), and to be able to prudently analyse and provide responsible advice to guide or even decide on the use of information. Where, we must not ever forget: GIGO -- garbage in, garbage out.
So, as further food for thought/enrichment, here is a more elaborate US Department of Defense Knowledge Management, Cognitive framework:
![]() |
| A more detailed DIKW framework. Statistical and Deep Learning neural network techniques tied to visualisation and presentation -- "manage by presentation" -- of patterns, insights, findings and suggested credible decision alternatives become a key application of computing techniques and sophisticated algorithms to generate value from computation and algorithms acting on data in structures. However, given the value of strategic surprise, consistently successful decision-making is a judgement-driven, highly creative art of wisdom, not a science neatly reducible to standard "orthodox," rigid doctrines . . . not least, as becoming predictable invites others to spot patterns and pounce on implied weaknesses. Linked, is the hall of mirrors trap, whereby organisations can get caught up in a question-begging, unrealistic group-think, isolated, garbage can organisation-style, ideologically subtly loaded internal discussion driven by dominant narratives/sources. Such a situation may require due . . . but often unpalatable . . . correction through accessing alternative but potentially reliable sources and resulting additional credible but perhaps overlooked (or unduly dismissed) material facts, trends, potential cliff-edges and unexpected insights. This is part of why experienced -- or freshly emergent (think, 16 year old David facing Goliath, armed with a slingshot), highly creative, judiciously innovative, sometimes unorthodox talent (or even genius) is also so valuable and needs to be scouted, recruited, nurtured, sponsored, developed, retained. Yes, key personnel decisions are strategic, insight-driven decisions, often with potential for breakthrough -- or, possibly, for disaster. [HT: Wiki & US DoD, FUE] |
Where, also, we must focus the other half of the Wirth "equation":
![]() |
| Boil an egg correctly (HT) |
ALGORITHMS, which in turn, are recipes. That is . . . just like in a cookbook . . . they are step by step, organised sequences of goal-directed actions that are carried out to solve calculations, make decisions, manipulate signals, ferret out hidden patterns or facts, etc. and can even control external machines.
To do so, they take in inputs, process them [and other, already stored data] step by step then generate outputs; the IPO, process logic framework.
As a rule, they are finite, halt, and seek to make efficient use of computer resources or coder or operator time.
They also need to be reliable, safe, and handle emergencies.
This means, compromises have to be struck. (This is a major challenge designers face in many fields: striking the right balance of trade-offs.)
There are many, many varieties of such algorithms, but we can identify some major types:
- Computers were invented to compute, i.e. carry out complex, automated calculations (including, back in the 1940's, to break codes [Colossus, UK, 1943] and to do ballistics for artillery [ENIAC, US, 1946]), and this is a major type of required task still, even though much more of information processing, multimedia, Internet and linked communications networks, and business data processing is done today, with also a fair bit of process control for embedded systems and industrial processes. (See an introduction here, and here, for a major summary of calculation algorithms.)
- For a menagerie of other types of algorithms, try here:
- Bit manipulation logic
- Search and sort
- Recursion & back-tracking
- Divide and conquer
- The "Greedy" algorithm
- Dynamic programming
- Graph algorithms
- Pattern Searching
- Branch and bound
- Randomised algorithms
Of course, we use special machines, digital computers, to implement algorithms and their required data structures. We may think of a computer like this -- several layers of "virtual machines," created through software, riding on the bottom layer, the "actual- physical- hardware- you- can- touch" machine:
![]() |
| The layer cake model (and design framework) is a key strategy for the design of computers. At the base, physical level, information is coded in binary digits (two-state elements: on/off switches, hi/lo voltages, N/S magnetic poles, etc). This means, that text, images, sounds, video etc are reduced to mathematical values such as 10110101 [a byte], expressed as |H|L|H|H|L|H|L|H| as voltages in Registers; that is, blocks of storage elements in the Central Processing Unit (CPU). These can be processed logically, including carrying out arithmetic in the ALU (Arithmetic and Logic Unit), using binary digits and logic circuits called gates. Also, bits can be shifted left or right (including, in a ring). This means, that AND, OR, NOT, NOT-AND ("NAND"), NOT-OR ("NOR"), EXCLUSIVE-OR (X-OR), etc, in combination, carry out the transformations of data. Some operations also accept inputs, generate outputs, store or retrieve from memory, etc. { For more details, One-bit Full Addition combines OR, AND and X-OR, with carry in and carry out. If this is combined with shift and two's complement transformation, that will carry out all four rules: adding, subtracting, multiplying, dividing. Most common mathematical operations are extensions of these four rules, bringing in algebra. In addition, Register Transfer Language is an algebraic representation of register interactions, also pictured as a blocks and arrows diagram. Such ALU operations with register transformations and transfers thus are the focus of Machine Language (and its human readable form, Assembly Language) where the architecture of a computer (its fundamental design) is "the Assembly Language view of the system." A system, being a combination of parts that work together to fulfill a task, interacting with its surroundings: input, output, interaction, internal state, feedback (positive/negative), stability/instability, oscillations. The Operating System, such as Linux, or Android, iOS or OSX for Apple, or Windows XP, 7, 10 or 11 for PCs, brings together this level and the Application Programs (Apps) with their user interfaces. It is today's complex OS's that allow ease of use so computers moved from being complicated, highly technical to use, to machines "anyone" from about 1 - 2 years on can use . . . just ponder, the modern smart phone or tablet. Modern computers also live in networks (which have special machines to run them, e.g. Routers, Bridges etc.) and may host target systems. High level languages such as Java are then designed to allow programmers to focus on the problem to be solved (or task to be done), rather than the complex details and issues of the specific "machine" hardware. That is, they are problem-solving oriented rather than machine-specific. This is what gives them their power. Now, with AI's and Internet repositories, search engines etc -- notice, how a typical search engine will now give an AI-produced summary and invite deeper interaction, one can prompt using a natural language (e.g. English) and collaborate with a virtual colleague.} |
We can also draw a general summary on the layer-cake approach:
Layer-Cake Abstraction Principle: Each layer of the computer presents a virtual machine to the layer above. Thus, programmers work with abstract machines rather than directly with physical hardware. This is the meat behind the idea that the machine is its interface; at a given level, we have a virtual machine that acts as a computing structure, especially when we take a what you see is what you get approach. This runs all the way up to an AI assistant, "oracle" or partner. So, the power of computing comes not only from electronics but from carefully designed layers of abstraction connected by well-defined interfaces.
At outline, motherboard level, an IBM/Windows/X86 architecture family PC is organised as:
Where, too, as s/he works with the virtual machine stack, a user interacts with software entities (in Java, Objects) working together on a virtual stage: "data shadows" of the user, target systems and other relevant real world entities and associated software entities that provide support services . . . and yes, we are now doing a "sneak" preview of key concepts:
Most often today, that is by interacting with a computer screen, with windows, icons, menus and pointers (WIMP):
![]() |
![]() |
| Starting in 1963, Engelbart conceptualised the Mouse, and with English built it in 1964; by 1968/9 we had three-button mouse + icon interfaces with networked terminals. (See, Mother of all Demonstrations, & video.) March 1, 1973, Xerox released the Alto, for US$ 32,000, and across the 1970's 2,120+ were built. In 1979, the Alto was demonstrated to Apple, in exchange for stock options. The Lisa was issued for US$9,995 in 1983, and the Mac for US$ 1,500 in 1984. By 1985, MS Windows had been released (as an application hosted by DOS). A key element in the breakthrough in the 1980's was "killer apps," especially desktop publishing. NOTICE, a comment on the Demo by "oldvideopro": <<A 16mm film of this demo was sent to the UK. At the time I was a lowly AV Technician at University College London. I ran the film in the New Chemistry Theatre for all the staff of the University of London Computer Centre and other interested parties. I watched fascinated. However, after 90 minutes, when it ended and the audience of senior London computing academics filed out, I heard several make comments such as "Interesting, but it will never catch on" and "What a waste of time." They had just seen the first ever Mouse, Hypertext, WP, video conferencing, and the Internet (Arpanet). I BELIEVED Doug Engelbart - they didn't! Here we are. years later, after the Xerox Star, Apple's Lisa and Mac and finally Windows. Amazing. As another commenter says, Doug should be as well known as Einstein - and FAR better than Steve Jobs or Bill Gates!>> EXERCISE: Why did this take 20 years? How can we accelerate strategic, transformational innovations today? How do we talent scout, recruit, support and retain highly innovative, visionary, tech-savvy creative people? |
![]() |
| Similar to how car/truck drivers use steering wheels and foot-pedals (with gear sticks) and to how bulldozer or tank drivers use a pair of skid-brake steering levers, aircraft pilots have long used XY, two-axis Joysticks [originally; Joyce] with throttle controls and foot rudder-control pedals to fly aircraft. HOTAS now has throttle and related controls on one paddle [often, L] and a side stick [R] to concentrate main controls in the hands; minimising distractive need to move hands and look down. (NB: We apologise for a military example, but note that, often, it is the military, the aerospace industry or gamers that are willing to fund technological development, e.g. the Internet traces to the 1969 [D]ARPA-Net, and many modern technologies trace to the post-Sputnik, NASA Space Race, Moonshot programmes from 1958 on.) Joysticks for computers can also be reduced to finger-operated "eraser-head" pointing stick buttons, similar to what is mounted on the F16 sidestick as sub controllers, and as is common on video game controllers or even calculator keypads and TV remotes, sometimes being placed on laptop keyboards. Note, too, the XY arrow/cursor keys that are often present on QWERTY keyboards for computers, as well as touch-/track-pads or touch screens. Modern aircraft cockpit bubble canopies allow for full look around, and 5th/6th Generation fighter helmets may project video camera and instrumentation images allowing look through the fuselage, full visual sphere enhanced vision. (Today's jet fighter [and attack helicopter] pilots use enhanced reality, helmet mounted displays that locate and orient face and eyes in a 3-D grid in the cockpit, giving off-axis look, lock, fire capability for missiles and for counter-measures.) Such enhanced reality interface systems point to future immersive virtual and/or enhance reality interaction with host computers and their target effectors/constructors, integrating users/operators with the resulting networked, AI oracle accessing general machines. |
![]() |
| An early, monochrome Apple Macintosh screen showing icons, from c 1984 on (nb: "Trash" and the beige box) [HT/FEU] |
![]() |
| The current generation, helmet mounted display gives a 30 - 40 degree, "full 360" movable window view tied to where a pilot turns his/her head and eyes. Thus, s/he can see key flight data superposed on a video (perhaps IR or night vision) image of the world. This is so even when the pilot is looking through the fuselage, because of cameras on the plane. Immersive, enhanced reality. (HT/FUE: AvGeek +Rockwell-Collins & Elbit. See video.) |
Computers, in turn, of course compute. That is, they automate information processing, taking in input data, storing it, processing it based on programs/instructions, and sending out transformed data as results. To do all of this effectively and reliably, requires an understanding of key, basic elements of computer science. Which concept, needs unpacking:
As Cambridge English Dictionary puts it: "the study of computers, how they work, and how to make use of them"
American Heritage Dictionary is more elaborate: "The study of the design and operation of computers and their application to science, business, and the arts."
Wikipedia: "the study of computation, information, and automation.[1][2][3] Computer science spans theoretical disciplines (such as algorithms, theory of computation, and information theory) to applied disciplines (including the design and implementation of hardware and software).[4][5][6] Algorithms and data structures are central to computer science.[7] The theory of computation concerns abstract models of computation and general classes of problems that can be solved using them."
Obviously, that gets complicated, fast. Hence, our focus on basic elements, starting with -- as we already saw -- data, information, step by step processing and the IPO model.
Of course, again, to more specifically define, the required data can be seen as:
"a representation of facts, concepts, or instructions" for computing
. . . typically in digital, i.e. ladder-rung-like discrete value form (such as 1 or 0 or True/False or Hi/Lo); which will be put together in accord with agreed standardised rules (or, codes and formats).
Such formats include ASCII for text, GIF or PNG for images, DOCX or PDF or HTML for text documents, DWG or SVG for vector graphics [e.g. in technical drawings], MP3 or OGG for sound and FLV or MP4 or MOV for video, data types such as integers [whole numbers] or single or double precision floating point [for "real" and "decimal" numbers], 8421 or Gray code values for binary, etc.
We may picture such data in typical, familiar settings:
![]() |
| Bits can encode captured signals of many types. Let us observe, how a: we have quantities [e.g. (1/0)] in an X-Y spatial structure, which may be static or b: we have amplitudes which may vary with time for an audio signal, or c: we have R,G,B vector values [another structure] in a colour image, which may also vary with time for a video. Change, brings in rates of change which is d: another structural pattern and domain, Calculus. Notice, e: 0,0,0 is black and RGB vector value 255, 255, 255, white. Yes, f: colour requires far more information than black and white (but clever vector coding & modelling of colour reduces that); 24-bit sRGB colour yields 16.78 million colours in its gamut. Notice, too that g: the X-Y array of picture elements (= pixels) is a matrix, another structure, one that varies with time and where pixel colour values are vectors in colour space. A relatively simple model is Munsell, with an axis of greys and hues in disks around it. So, we can see already, how audio-visual, video multimedia is information rich, can be structurally analysed yielding quantitative variables, which can be processed. |
This points to a broader issue, that digital computers use encoded digital representation of quantities, language, sound, light/dark, images, colour, motion etc, all of which are forms of information in a broader sense.
That is, while in computing "information" mostly means the organised, structured, coded representation of collected observable quantities or aspects of the world, there is another, even more profound view of what information is, used in information theory. In that field, information is the aspect of a received signal, message or variable that reduces our uncertainty about the state of its source; given the possibility of noise. So, for instance, consider a chain of coins, which could be arranged at random or so as to encode a message. Each coin, then, as it can be H/T, can communicate [ - log_2 (1/2)] worth of information; that is, one binary digit of information- carrying capacity. Which, we shorten to, "one bit." Hence, the common use of "bits" in digital computing, as two-state elements are convenient: on/off switches, North/South magnetic poles, high or low voltage, black or white coloured patches of paper, etc. Of course, in practical codes, symbols are made up from chains of bits, e.g. a byte is eight bits and a nibble is four. 256 vs 16 possible states, respectively; for a chain of n bits, there are 2^n possibilities, from 0000 . . . 0 to 1111 . . . 1. 20 bits, have 1,048,576 possibilities, just over a million.
(So, as signals are often seen as electrical wave forms in Volts, a 20 bit analogue to digital converter [A/D] can represent a 1 Volt peak-to-peak continuous signal to about 1 part in a million; accepting that level of noise/error and transmitting the code instead allows us to "bake in" an acceptable degree of "noise." Where, if a signal has a bandwidth f, sampling at a suitable resolution and rate (one, exceeding 2f) -- the Nyquist rate -- allows us to adequately represent the signal. For example, a standard audio CD encoding format uses 16-bit pulse-code modulation (PCM) audio sampled at 44,100 Hz; which gives over 20kHz bandwidth and acceptable "high fidelity" for music. For intelligible voice, we can get away with 8 bits PCM encoding and 6 kHz sample rate ( ~ 300 Hz to 3 kHz signal bandwidth); whilst ~ 6 kHz bandwidth captures all the basic essentials of voice, i.e. a ~ 12 kHz sampling rate. That's why old fashioned analogue telephony used a 3.4 - 4 kHz bandwidth and old fashioned AM Radio a 5 kHz bandwidth, while FM used 15 kHz. Yes, CD uses a much broader bandwidth than FM radio did. Black and White TV used 1.25 MHz "vestigial sideband" bandwidth and NTSC analogue color TV used about 6 MHz, PAL/SECAM ~ 8 MHz. At least one bit per second per Hz is a baseline yardstick for effective and efficient digitisation, now often exceeded by advanced coding schemes.)
We may consider the Munsell colour space "spindle" as a way to see how we may structure, quantify and process our experience of colour, for a display unit or for the printed page:
![]() |
| The Munsell "spindle." This is an abstract, logic-model of colour, similar to a pine tree; with the "trunk" (axis) being the line of neutral greys from theoretical perfect black to perfect white. Colours are then seen as running in disks horizontally, based on the classic colour circle, and as sets of tiles on "apple slices" vertically. Notice how the rainbow colours run around the circle -- the colour wheel, with the arc of purples joining red to blue. Each hue (specific colour) is at an angle around the circle; effectively, with a Red-BlueGreen "Y-axis" and a PurpleBlue-Yellow "X-axis" at 90 degrees to it; there are ten standard hues around the circle, R-YR-Y-GY-G-BG-B-PB-P-RP; added steps give a 40-hue circle for ten main hues, 2.5Y 5Y 7.5Y 10Y, for example. Value is along the main axis, degree of lightness, i.e. greyness between Black (Z-minus) and White (Z-plus), giving (x, y, z) cartesian coordinates for the space -- where, taking grey 5 to red as polar axis and this XY plane, we can also equivalently construct a polar form vector (r, θ, φ) to span the colour space . . . as well as a cylindrical one, (ρ, φ, z). [in fact, the OKLCH "beyond standard RGB" device-independent uniform colour space model, used for P3 displays (e.g. Apple) and Rec. 2020, is cylindrical.] Chroma, is about degree of colour intensity, from neutral grey to strongest available colour (different pigments and sources affect how much is possible; the 1976 Munsell colour atlas comprises 1488 colour cards and 37 neutral ones). We may then consider the contrast between say colour on a lighted screen (addition of red, green, blue light) vs print on say a printer page or book (subtraction based on what pigments absorb or reflect). This is why print tends to use CMYK: the paper is "white," black ink gives degree of blackness; while cyan (a bright blue-green [yes]), magenta (a purplish pinkish colour) and yellow modify the old basic rule of thumb that red, yellow and blue are the primary colours for paint. (Indeed, as publishers know, the true colour triad for the widest pigment based subtractive colour rendition based on a white ground is cyan + magenta + yellow, where as a mix of the three gives a dingy dark mud like colour, black is also needed. [Cf. history here, in 2015 Pantone issued an extended colour gamut, cyan + magenta + yellow + black {+ orange + green + violet} = CMYKOGV, which allows moving from 55 - 65% to 90% of the Pantone spot colour range; XML incorporates such structured data through an ISO Standard.]) All of this, as seen, can be reduced to scales and coded. Of course, today, we have far more advanced colour models, cf. also Unit M. Moreover, this is a key case that illustrates a general computational strategy: whether we are dealing with sound, images, video, colour, text, temperature, pressure, chemical concentration, position, velocity, financial data, or scientific measurements, computing begins by constructing suitable mathematical models and encoding their structured quantities into forms that can be stored, transmitted, transformed, and processed to yield useful outputs. The map or model is not the reality but it can be a useful representation of it. (HT/FUE: Wiki & JR, cf. an artist's thoughts here.) |
As this is our "conceptual breakthrough" . . . i.e. "paradigm" . . . example of how things we may never have imagined as deeply ordered may be logically structured, quantified, modelled and processed (and as displays, printed pages and printers are important), here is the "apple-slice" form of the Munsell "colour tree" model:
![]() |
| Munsell model, "apple-slices" form. Here, we see standard colour tiles for the Munsell Model, in vertical slices going around the circle of hues. We see also, different degrees of range of available colour, defining a gamut of possibilities, limited by available display or print or paint/pigment state of the art. The famous "tongue of colour" type model is related, as in effect a modified horizontal slice through the gamut at a suitable level illustrating blending of ideal red, green and blue light sources with a white point depending on "colour temperature." (HT/FUE: XG & Springer/Nature) |
Similarly, we may analyse, structure, quantify and process the world of sound, voice, singing, music; notice, the logarithmic scale for frequency, from about 20 Hz to 20,000 Hz (and just how broad the sound spectrum for various sources is):
![]() |
| Sound, is also a complex phenomenon where frequency and amplitude of sound vibrations is often based on fundamental notes and harmonics, with transient, sharp noises, fading, echoing and multiple reflections from walls, floors, furniture and ceilings all affecting sound. Microphones, amplifiers and loudspeakers create challenges. Sound mixing becomes a highly technical art. Again, structures, quantities, modelling and powerful algorithms become pivotal. We are far beyond "hi fi stereo." |
Also, in such codes for text or sound, light, etc, it turns out that symbols (or levels) are generally not evenly distributed, e.g. for text in normal English, the letter E is about 1/8 of the message . . . it is more probable (and so less informative) than say an X or a Z . . . and Q is almost always followed by U (save for Iraq, QANTAS etc). So, some letters carry a higher degree of surprise and thus are more informative. Using "negative log probability" as a yardstick allows us to quantify information and to preserve its additivity: total information is the sum of elements of information. Base-2 for the logs leaves the information in bits. Hence, why file sizes, memory capacity and drive or memory stick sizes are measured in bits and bytes. However, once we see symbols with varying likelihood, obviously some carry less information (E, U after Q), and some more (X, Z). On average, this reduces actual information carried per symbol, a distinction we need to recognise. Where, of course, various forms of noise degrade signals and further reduce actual information carried.
All, to facilitate processing of informative, symbolised, structured, quantified encoded data.
![]() |
| Again, the DIKW Pyramid: data > information > knowledge is a basis of evidence that supports wise decisions, towards good ends. Accordingly, DIKW is backdrop for using IPO and HIPO or other design techniques for programs. For a given functional module, are we gathering, structuring, validating and storing data? Are we computing further results or identifying trends or patterns? Are we interacting with a hosted machine or plant/process, to control its behaviour? Are we collating, to present results: text, document, sound, image, video, model, etc? Are we setting out decision options? Are we facilitating interactions or communication? Or, what ____ ? Why ___ ? How [I>P>O] ___ ? |
Such data, then, is rightly seen as the larval stage -- the first, basic level -- of information for computing. As we saw above, it then becomes full-bore information in the computing sense as it is properly validated, collected, classified, arranged, organised, processed, put in structured formats and stored, setting up collections and frameworks that are meaningful, trust-worthy, searchable and generally useful -- inform-ative! -- for users.
That is, in computing, we freely define that information is
"organized or classified data, which has some meaningful values"
[such as, being timely, validated as accurate and appropriate, amenable to calculation, helpful in making decisions, readily available to legitimate users, reasonably complete, protected from hackers or spies etc.
We may thus now provide an "equation" or "sum" that shows the data-information link more definitely:
data items: d1 + d2 + . . . dn . . .
+ standardised formats (thus, standards, structures and codes for data storage)
+ validation (so, we do not try to compute "garbage" or, worse -- threats [= malware])
+ organisation (per, standards and the intended goals)
+ meaningful context (i.e., interpretation)
___________________
= useful information ]
Think, of how important sound accounting information and sales/market statistics are for a business; or, how vital collected experimental and observational information is for scientists and engineers; or, how valuable medical records and the patterns they reveal are for patients, nurses and doctors. Such information is received, checked, processed, calculated with, arranged, recorded, stored, searched and output as needed. That requires use of standard structures such as s-t-r-i-n-g-s, arrays, lists, trees, data bases and more. All of which have to be provided for by Java and similar High-Level General Purpose Programming Languages.
![]() |
| The CPU, today, typically is on a Silicon, semiconductor chip, i.e. modern cpu's are microprocessor based. There is a controller (pulsed by a clock) that supervises the fetch, decode, execute cycle. The ALU carries out actual arithmetic, logic & shift operations, using registers as first storage. On chip caches provide fast memory, with lower level caches in support. As the leads indicate, data moves on buses, groups of conductors. RAM: Random Access, read/write Memory provides active storage on the motherboard (Now typically 8 to 16 GB and up). A hard disk or solid state "disk" drive provides major local secondary storage. Fast storage is expensive, vast storage is slow. Input and output and ports are also provided for, memory-mapped or in a special input/output address space separately managed by the CPU. |
Where, again -- summing up, to input, process and output such information as desired requires:
- procedures that
- start as required,
- from definite initial, start-point states,
- making use of already stored and freshly input valid data,
- then move forward, step-by-step, following a definite reliable method, towards a desired goal;
- such methods, typically involve computing through input, processing, storage and output phases,
- requiring arithmetic, logic, storage and shift operations
- (hence the ALU: Arithmetic & Logic Unit, associated storage/ shift registers and control logic and bus interfaces in a CPU: Central Processing Unit),
- such operations being carried out at machine language level, using the fetch>decode>execute cycle, (so, high level language instructions [e.g. Java] must first be interpreted or compiled into machine code),
- where, the virtual machine stack allows us to work with virtual/ideal processing units (and complex operations in one apparent step), using virtual locations in main and backup or remote networked storage, and with idealised input and output devices/interfaces, rather than the particular physical details of a given machine -- hence WORA [= write code once, run anywhere];
- also typically IPO computing processes have test conditions at appropriate set points and can thus
- branch to differing execution paths depending on the state of the conditions
- [thus making automatic, pre-programmed "canned" decisions (so, too, possibly looping)], and
- halt -- stop! -- when complete (or in response to emergencies etc.);
- that is, of course, algorithms. (In more detail! With, as bonus, elements of the design of a computer, its architecture.)
So, from this process logic, we easily see why the definition of programming above is valid: someone has to write/code the algorithms to act on data stored in carefully defined structures.
That "someone" is, of course, the programmer.
As a human being, a programmer obviously thinks, thinks "computationally." This being a fairly current wave of thought, let us use a definition by Jeanette Wing (2014):
‘Computational thinking is the thought processes involved in formulating a problem and expressing its solution(s) in such a way that a computer—human or machine—can effectively carry out.’
![]() |
| A simple summary of computational thinking. Each of these facets requires further details. For example, computing is often done in socio-technical, organisational or business contexts in wider communities that have law and governments, and has to address data and information issues, as well as these days, the Web. Use relevant technical tools for such development and maintenance of systems that compute & process information, with local and remote users. (HT, FUE: Carly & Adam) {EXERCISE: Briefly ponder the landing pages of Raspberry Pi, Maker Movement, WordPress, Amazon, Alibaba, Google, YouTube, Wikipedia, Khan Academy, Wolfram Alpha, and Bible Gateway. Glance at Chapter 2 in Open Stax Introduction to Computer Science (which is about computational thinking), then ask yourself, how do web site developers create, validate, maintain and manage large information infrastructures, interaction with users, associated e-commerce and customer service, associated programming and data in structures? What does that suggest about professional software engineering and coding? How can the computational thinking approach help guide more informal projects?} |
[Where, this uses the IPO framework, and we extend through Peter Denning, 2009, on how the IPO-algorithm + data-in-structures framework can now:
![]() |
| A layer cake. In computing, many things use a layered approach (Cr.) |
' . . . [be] expanded to include thinking with many levels of abstractions [so, layer cake approaches], use of mathematics to develop algorithms, and examining how well a solution scales across different sizes of problems
{--> so, just for reference, is this one-size-fits-all, one computing step for any scale? Hence, "Big O" notation for algorithmic complexity as size of a problem n becomes significant:
- one step for all sizes, is O(1),
- "log-compressed" logarithmic scale is O(log n),
- or linear O(n) is proportional to size n,
- or log-linear O(n log n),
- or quadratic O(n^2),
- or higher order polynomial O(n^c) [with c > 2],
- or exponential O(2^n),
- or factorial O(n!).
- Plotting:
A plot of how run-time complexity grows with n, showing why we want at worst O(n), but may have to work with what is bad or worse, much worse. ( HT GfG, FUE, cf here for details if you need it)
A "cheat sheet" suggests:
- When your calculation is not dependent on the input size, it is a constant time complexity (O(1)).
- When the input size is reduced by half, maybe when iterating, handling recursion, or whatsoever, it is a logarithmic time complexity (O(log n)). [--> and, if one does log n work n times we have O(n log n). The idea is best seen with an array A holding a target a you are looking for. Split in half, eliminating half. Then split the 1/2, 1/4, 1/8 etc until you catch a, that will be much shorter than going through A from 1 to n looking for a]
- When you have a single loop within your algorithm, it is linear time complexity (O(n)). [--> a common story has it that programs spend 80% of their time in loops, but, often we need to use them (see, debate)]
- When you have nested loops within your algorithm, meaning a loop in a loop, it is quadratic time complexity (O(n^2)).
- When the growth rate doubles with each addition to the input, it is exponential time complexity (O2^n).
Where, it is hard to avoid loops and even nested loops.
Obviously as Big O goes from O(1) to O(n!) complexity and demand for computational resources soars: however, sixty years ago, 1,024 bits -- a little over a thousand on/off elements [1,024 is 2^10 power] -- was serious memory; now we routinely deal with thousands of millions of bits, Giga bits. Where, if there is a chain of steps, generally, the slow[est] step dominates required time and determines the order. We of course prefer at most O(n) but the demands of the algorithm often force us to face higher orders. There is similar spatial complexity -- how much memory is required, too. (If you need details try here for a 101 that also gives types of algorithms for various orders.)} ].'
![]() |
| A four-phase, evolutionary spiral software development life cycle model which emphasises the wider managerial and technical issues involved in software development. Notice the "release" is a version produced after several loops, including initial, outline versions (with code stubs), more developed alpha internal test versions, and beta test versions with outside partners. Obviously, this extends to onward versions of the product. Typically, version 1.0 released means 2.0 has entered initial development, and sub versions will update based on feedback. A dirty secret is that no complex software is ever 100% bug-free, just sufficiently reliable. And, moving on to later versions often creates fresh bugs. (Cf. Ariane 5.) [Adapted, Boehm & Pressman. Credit, fair use education (FUE).] |
Key "SE" principles include:
Modularity: Breaking the software into smaller, reusable components that can be developed and tested independently. [--> the Lego bricks approach. But, beware of the "humorous" 90-90 rule: 90 percent of the code takes 90 % of the time, but the last 10% takes the OTHER 90 %. (Optimistic case, the actual duration is 180% of the initial estimate; on the pessimistic case, the first "90% [of estimated duration]" is actually 10% of actual duration, 900% of the initial estimate. So, it is critical to identify problematic modules as early as possible and make a maximal effort to solve them. And yes, that takes insight, knowledge, skill, creative talent and experience, which have to be bought the hard way. We start that slog, now. Also, that's why two key features of modern languages are (i) built-in libraries of solutions, and (ii) the ability to to enfold modules from other languages.)]
Abstraction: Hiding the implementation details of a component and exposing only the necessary functionality to other parts of the software. [--> this supports modularisation and maintainability, as other modules only see the interface, not the underlying methods, data, algorithms]
Encapsulation: Wrapping up the data and functions of an object into a single unit, and protecting the internal state of an object from external modifications. [--> how to get that desirable interface only interaction]
Reusability: Creating components that can be used in multiple projects, which can save time and resources. [--> building a reusable library of modules, nowadays, that is also built into the programming language]
Maintenance: Regularly updating and improving the software to fix bugs, add new features, and address security vulnerabilities. [--> using the modularity across the software life cycle]
Testing: Verifying that the software meets its requirements and is free of bugs. [--> requires standardised techniques]
Design Patterns: Solving recurring problems in software design by providing templates for solving them. [--> proved, highly successful, widely usable techniques]
Agile methodologies: Using iterative and incremental development processes that focus on customer satisfaction, rapid delivery, and flexibility. Illustrating:
- Continuous Integration & Deployment: Continuously integrating the code changes and deploying them into the production environment.
All of this points to the issue of working in teams (including, yourself at a future date) hence the critical need to break up a program into modules that work together in blocks, hiding internal details. And yes, that points to structured programming and onward object oriented programming. Dr Jonathan Bartlett of the Blythe Institute, is helpful:
To assist programmers in working together in groups, it is necessary to break programs apart into separate pieces, which communicate with each other through well-defined interfaces. This way, each piece can be developed and tested independently of the others, making it easier for multiple programmers to work on the project. Programmers use functions to break their programs into pieces which can be independently developed and tested. Functions are units of code that do a defined piece of work on specified types of data . . . . The data items a function is given to process are called its parameters. In [a] word processing example, the key which was pressed and the document would be considered parameters to the handle_typed_characters function. The parameter list and the processing expectations of a function (what it is expected to do with the parameters) are called the function’s interface. Much care goes into designing function interfaces, because if they are called from many places within a project, it is difficult to change them if necessary. [Programming from the ground up (Bartlett Publishing, 2004), p. 47.]
![]() |
| A tree data structure, showing elements and pointers. Think, of your family tree as an example (HT: Wiki) |
This, in turn further draws out the significance of "data in structures." For, information comes in a wide range of patterns, e.g. s-t-r-i-n-g-s, a basic element for text etc. We have lists, arrays, stacks [last in first out, first in last out etc), queues, integers [e.g. 19] or fixed point [e.g. $19.78] or floating point [similar to 1.987 * 10^3] numbers, variables, vectors and matrices, tables, trees and much more, all of which need to be stored in computer memory that tends to be a linear chain of locations with addresses given in base 16 (hexadecimal) code, an extension of base 2 numbers, from 0 to 15: 0123456789ABCDEF. So, we see, 0000 . . . 0 to FFFF . . . F, where F = 1111, i.e. 15 in base 10. Obviously, the trick is to store the data in a standardised pattern, often with pointers from one element to the next. Yes, boxes and arrows (and algebraic representations) again. For example, a tree (as shown). Then, there are databases that host large quantities of highly organised data, with a system for managing the data.
A key aspect of such data structures, is the separation of logical structure and methods of interaction from physical storage arrangements and the specific physical organisation and specific architecture of the computer. That is, again and again, we see the value of a layer cake of virtual machines supported by the actual physical-logical hardware and architecture.
A related concept is hashing. Here, input keys are fed into a "chopper" function, the hash function, yielding a definite hash value that is of uniform length and makes it effectively impossible to re-create the original key (such as a user's personal password . . . so, if it does not go across the 'net it cannot be stolen, and if the hash is intercepted, it cannot be used to recover the original personal key!). That can in turn be used to index data in a database, or to encrypt information, etc. One very useful result is, two closely similar keys will NOT give closely similar hashes, with a good hash function. Hashing also tends to give faster retrieval of search results than many traditional search techniques. As IONOS summarises:
The meaning of the verb “to hash” – to chop or scramble something – provides a clue as to what hash functions do to data. That’s right, they “scramble” data and convert it into a numerical value. And no matter how long the input is, the output value is always of the same length. Hash functions are also referred to as hashing algorithms or message digest functions. They are used across many areas of computer science, for example:
- To encrypt communication between web servers and browsers, and generate session IDs for internet applications and data caching
- To protect sensitive data such as passwords, web analytics, and payment details
- To add digital signatures to emails
- To locate identical or similar data sets via lookup functions
Similarly, electronic spreadsheets use rectangular arrays of linked cells holding text, input numbers, cell-reference based calculation formulas, and implement a form of functional programming. In some cases, these can be interfaced to more sophisticated mathematical or statistical software. The ability to vary input numbers, or to input a range of values allows what-if scenario analysis and plotting of time series. Graphical output techniques, including spline functions and other visualisation displays allow a more intuitive interaction with results and may highlight key results. Scientific visualisation and geographical information systems are whole fields of endeavour. LabVIEW could be a game changer for those working with lab or industrial processes and instrumentation. Microsoft Excel allows development of code using Visual Basic. Open Office/Libre Office Calc also allows Java add-ins. Python, has NumPy and SciPy. Java -- which can "sweetie wrap" code from other languages -- comes with the now built-in Math Library and for more advanced calculations, there is Apache Commons Math.
Beyond these, lie mathematics and statistics applications such as Wolfram Mathematica (the Raspberry Pi has a free education version), Mathcad, Matlab, Maple, SPSS, etc. Some of these have their own built-in programming languages. Wolfram Alpha is a go-to site for "all things mathematical." Given the rise of AI -- see just below! -- and the legacy of advanced Mathematics work, Fortran (the first high level language) is back.
There are of course many, many algorithms, and the number is growing. Wikipedia provides an overview (with a few quirks). A general repository initiative is here. A GitHub Java oriented repository is here. A survey of top Fifteen data structures and top fifteen algorithms is here. The US NIST hosts a dictionary of algorithms and data structures, here. Knuth on the Art of Computer Programming, could be a useful reference, cf. here. Yes, there is a For Dummies, here. Doubtless, much more is out there. And, here is a five-plus hour mini course:
Then, too, there is "buzz word" number one: AI, Artificial Intelligence. As Coursera summarises:
Artificial intelligence (AI) refers to computer systems capable of performing complex tasks that historically only a human could do, such as reasoning, making decisions, or solving problems.
![]() |
| The Wizard behind the Curtain (FUE, with apologies to Disney!) |
Microsoft (MSFT.O) has given its consumer Copilot, an artificial intelligence assistant, a more amiable voice in its latest update, with the chatbot also capable of analyzing web pages for interested users as they browse.
The U.S. software maker now has “an entire army” of creative directors – among them psychologists, novelists and comedians – finessing the tone and style of Copilot . . . . Copilot’s newly fashioned voice capabilities make it seem much more of an active listener, giving verbal cues like “cool” and “huh,” [chief executive of Microsoft AI, Mustafa] Suleyman said.
Geeks for Geeks elaborates:
From chatbots and virtual assistants to self-driving cars and recommendation algorithms, the impact of AI is ubiquitous. But what exactly is AI and how does it work?
At its core, Artificial Intelligence refers to the simulation of human intelligence in machines that are programmed to think, reason, and learn like humans. Rather than being explicitly programmed for specific tasks, AI (Artificial Intelligence) systems use algorithms and vast amounts of data to recognize patterns, make decisions, and improve their performance over time.
Artificial Intelligence encompasses a wide range of technologies, including machine learning, natural language processing, computer vision, and robotics. These technologies enable AI systems to perform complex tasks, such as speech recognition and face detection, with remarkable accuracy.
So, AI promises to transform technology, industry and how we live and work. Arguably, it is driving the second Info-Comms Technology (ICT) economic long wave, with massive creation and destruction of wealth ahead . . . and already in progress. To function and prosper in tomorrow's world, we will need to be able to appreciate and be productive in an age of super smart machines. So, then, this course is a larval stage for building a desirable future for our region.
Such will of course require considerable attention to not only the obvious safety, privacy, rights and security issues, but also to ethical principles, practices and habits at personal, educational, institutional, business, community and global levels. Precisely, as AI systems, increasingly, are "capable of performing complex tasks that historically only a human could do, such as reasoning, making decisions, or solving problems." Power or capability, clearly, entails duties to do good, be prudent ("first, do no harm"), act wisely, and be honourable. Where, as AI is in reality "CI" -- canned intelligence, such ethical behaviour has to start with us. As, it is we who design, organise, program, inform and guide the AI. For example, AI has potential to help create an all-seeing surveillance state, a totalitarian horror that would more than fulfill anything in the notorious AD 95 passage in the Apocalypse, that no one could buy or sell save those who took the notorious mark of the beast. It is only us who can safeguard our liberty.
More broadly, as the Stanford Encyclopedia of Philosophy outlines:
Artificial intelligence (AI) and robotics are digital technologies that will have significant impact on the development of humanity in the near future. They have raised fundamental questions about what we should do with these systems, what the systems themselves should do, what risks they involve, and how we can control these . . . . [Key issues include]: Ethical issues that arise with AI systems as objects, i.e., tools made and used by humans. This includes issues of privacy (§2.1) and manipulation (§2.2), opacity (§2.3) and bias (§2.4), human-robot interaction (§2.5), employment (§2.6), and the effects of autonomy (§2.7). Then AI systems as subjects, i.e., ethics for the AI systems themselves in machine ethics (§2.8) and artificial moral agency (§2.9). Finally, the problem of a possible future AI superintelligence leading to a “singularity” (§2.10). [In, Vincent C Mueller, 2020, "Ethics of Artificial Intelligence and Robotics."]
Beyond this, as we are rational, responsible, morally governed, conscience guarded creatures, AI ethics points to broader ethics of computing and information, thence general ethics. As ethics is now too often inadequately framed, a good first reference for both the AI concerns and broader aspects of ethics, is Cicero's branch- on- which- we- all- sit, built-in first duties:
![]() |
| The naturally evident, first duties and first, built in law that built our civilisation. Manifestly, the habitually untruthful, unreasonable, imprudent, unfair (so, untrustworthy) person is not someone who we readily, safely do business with. So, too, as Aristotle pointed out in The Rhetoric, Bk 1 Ch 13, "there is a general idea of just and unjust in accordance with nature," noting from Sophocles' Antigone, how "neither to-day nor yesterday, but
from all eternity, these statutes live and no man knoweth whence they
came . . . " Further, we may adapt Aquinas' summary: the good (especially, the just) is to be done and evil avoided. Thus, we see outlined core principles of the natural, intelligible, conscience attested law that indeed helped to build our civilisation. And yes, such first duties include duties and first principles of prudent, sound reasoning, as well as pointing to the famous (and, for cause, still widely influential) ten commandments, as "duties to neighbour" suggests. As the Apostle Paul put it, "Love does no wrong to a neighbor; therefore love is the fulfilling of the law," having earlier noted how when people "by nature do what the law requires," they thus "show that the work of the law is written on their hearts, while their conscience also bears witness, and their conflicting thoughts accuse or even excuse them." [Rom. 13:10, 2:14 - 15; cf. Exodus 20:1 - 17, Deut 6:1 - 9, Lev 19:15 - 18 and Matt 22:34 - 40 for relevant but frequently overlooked context.] Where, too, the historic vision holds that God -- our utterly wise and inherently good, eternal root and sustainer -- is manifestly our first neighbour, and our host ("in him we live, and move and have our being" [Ac 17:38]). Thus, for good reason, in our God-fearing region God is widely understood to be the ultimate, adequate source of moral government; being the root level is who by goodness and wisdom properly grounds ought. Such ethical theism is therefore pro-civilisational, something that needs to be said in a day where "religion" is too often, increasingly treated as if it were a dirty word. Moreover, this draws out that ethics is tied to the root of our worldviews, even as we can see that there are indeed self evident first duties we should all heed. Bottom-line: morally sound character counts, in AI, in wider computing, in general business, in community and in civilisation. |
Now, too -- clearly! -- computing, programming, computer science and computing education are obviously subject to a constant, accelerating flux of new bright ideas (and associated movements, complete with "rock star" personalities!), jargon and hot buzz words. So, in this unit and course we will try to strike a balance, rooted in history. Which, also takes advantage of how stories readily imprint themselves in our memory and help us to deepen insight through embracing the very human essence of our subject. So now . . .
Key background, the Human Computer:
Where, as Paul Ceruzzi noted:
Computers were invented to ‘‘compute’’: to solve ‘‘complex mathematical problems,’’ as the dictionary still defines that word. They still do that, but that is not why we are living in an ‘‘Information Age.’’ That reflects other things that computers do: store and retrieve data, manage networks of communications, process text, generate and manipulate images and sounds, fly air and space craft, and so on. Deep inside a computer are circuits that do those things by transforming them into a mathematical language [--> and thus carry out various arithmetical, logical and data transformations]. But most of us never see the equations, and few of us would understand them if we did. Most of us, nevertheless, participate in this digital culture, whether by using an ATM card, composing and printing an office newsletter, calling a mail-order house on a toll-free number and ordering some clothes for next-day delivery, or shopping at a mega-mall where the inventory is replenished ‘‘just-in-time.’’ For these and many other applications, we can use all the power of this invention without ever seeing an equation. As far as the public face is concerned, ‘‘computing’’ is the least important thing that computers do.
But it was to solve equations that the electronic digital computer was invented . . . [Introduction, A History of Modern Computing, MIT Press, 2003, p. 1. Of course, human computers were grunt mathematicians and statisticians, doing intense calculations for a living. Now, we program computers to do the grunt work, but have to provide the Math smarts and programming smarts behind the calculations.]
As further background, let us note the current reference framework for computing used by the Raspberry Pi Foundation:
![]() |
| The Raspberry Pi Foundation framework, The Big Book of Computing Content (Oct 24th, 2022), p. 5. This gives the wider backdrop for modern computing. While not strictly tied to the UK 5 - 16 computing for all education framework, that is a key reference for this work and its companion, The Big Book of Computing Pedagogy (Sept 24th, 2021). These can be seen as reference texts for this course, along with The Raspberry Pi Beginner's Guide. |
Notice, too, how all of this computing, information processing and control of rockets or robots etc. uses a key computing pattern, input, process [including, store and retrieve], output:
Then, of course, we also need to pause a moment to clarify what that high tech buzzword, digital means:
![]() |
| Digital vs Analogue. (Cf video on Analogue Computers and its part 2) |
So, we can see that programming will use the IPO process to handle digital, coded data stored in agreed structures, using algorithms. Here, to be implemented using the Java Language.
Where, too, for this course a good place for us to begin from -- especially, to help us shape expectations, perspectives, insights and attitudes -- is to look at what programming was like fifty to seventy years ago, with punched cards and the big iron, then revolutionary IBM 360 in starring roles. Likewise, it may be helpful as a cautionary tale to reflect on Japan's struggle with, first software:
. . . then with its "Fifth Generation" computer initiative. (This was a massive Government-backed initiative meant to move computing beyond the then state of the art, to "a massive 'user friendly' parallel computer with 1,000 processors. Its soft-ware was based on logic [--> in effect, Prolog Language] rather than on classic structured programming." After eleven years it made modest contributions but fell far short of its vision; it was either a failure or too far ahead of its time.
It will turn out that there are many key insights, lessons, principles and approaches we can learn from the history of computing, also learning to appreciate the impacts created through
[a] the monolithic IC [= integrated circuit on a single chip of Silicon, Gallium Arsenide (GaAs) or the like]
and
[b] the microprocessor [= processor on a chip]
revolutions that transformed computing, making personal computers, lap tops, tablets and smart phones, etc. possible.
As a further result, capital costs for powerful computer technology are now well within reach of ordinary people and IT investments are now probably the commonest single business investment.
[That also means, it makes sense to look at two platforms, the Windows PC as a general, widely available computer family and the Raspberry Pi as a low cost, powerful, ARM processor education and industrial platform -- one, suitable for interfacing and "Internet of Things (IoT)." (BTW, it is helpful, sometimes, to realise that a smart phone is basically a small Tablet PC, with a SIM Card and a phone App. Take out the SIM card and is is just a pocket sized Tablet. Helpful, when you need to transfer information from an old phone to a new one. Suggestion, use Smart Switch or the like. Also, an old phone can be a remote Wi Fi based controller for a robot or audio mixer or other unit.)]
(NB: For 4 - 7 year olds "of all ages," there are "starter" educational programmable devices such as the BeeBot (see vid) and of course languages such as MIT's Scratch. See, Unit R. Where, too, "Python is the new Basic," see Unit P.)
So, the key challenge -- one that can potentially transform our region's economies (and our own careers!) -- now is how to move beyond being a digital consumer to being a digital producer. That involves, learning how to program, in a way that understands what is going on in the computer, and to do so using a powerful, general purpose language. Here, Java.
So, too, let us now unlock and go through the gate.
Then, we will go through onward Units, to continue to build first programming and development proficiency, step by confident step. So, we must now go beyond a preview to practical action.
Thus, this Unit . . . where to begin, by opening the Hello World gate.
So, let us now ponder . . .
[ GO TO STEP 1 ]
PART A CONT'D: THE HONOURABLE ORDER OF THE PROGRAMMER
STEP 1 --
Becoming a Programmer, via Key Ideas and History:
Taming expectations by first pondering how Coding used to be in the 60's, etc
(so, joining the not-so-ancient, but Honourable Order of the Programmer,
while picking up key computing lore and culture through a slice or two of its history;
starring, the IBM s/360 as a pivotal case study and point of breakthrough)
![]() |
| The IBM 029 Keypunch machine, c 1964 - 1980's, part of the famous 360 mainframe system. This was on IBM's catalog up to 1985. A stack of 80 column punched cards was a semi-permanent [non-volatile], read only store of information that was scanned in with a reader and then processed. Output was to fan-fold paper, and debugging was by hand on the paper. The 029 also printed the 80 column text at the top of the card. [HT: two bit history, see video. Here, an operator of a more basic card punch speaks.] |
Back in the room-sized . . . and often million dollar . . . Mainframe Computer heyday, sixty years ago or thereabouts, programs were written on paper -- there were actually forms for this! (But "most" used pencil on the back of old fan-fold computer printout paper.)
Code was then keyed into punch cards on punch card machines and the like.
Yes, that's one 80-column punch card per "line of code."
(Yup, the line of code is a key unit of code and of programmer productivity. Where, a very good rule is that functional blocks of code should not exceed roughly fifty lines. Break up fatter modules into short, understandable blocks, what Fortran coders used to call subroutines. And, put in clarifying comments or even you won't understand two weeks later.
[BTW, Fortran -- Formula Translation, developed by IBM for their 704 "scientific" Mainframe, c. 1957, is still going strong. The 704 was the first mass-produced mainframe capable of floating point arithmetic, making it at that time "pretty much the only computer that could handle complex math." However, the 700/7000 series had mutually incompatible science and business lines. One reason was that accounting, banking and finance worked to exact results in decimal numbers, as did earlier [electro-]mechanical calculators, and binary-based floating point is subject to rounding and calculation errors -- especially when we have p ~ q with an expression involving (p - q), yielding a highly error-prone result near to 0: "gospel in," but "garbage out." (E.g., try the quadratic formula with sqrt[b^2 - 4ac] with the subtraction ~0 or matrices that are close to singular.) So, c. 1955 it made sense to have specialist ALU's for decimal calculation (and so, business range computers), e.g. by using binary coded decimal numbers. Oftentimes, too, fancy algebraic footwork is needed in calculation algorithms to avoid inaccuracies with floating point . . . especially where iteration (aka, looping) or recursion are required; and that gets worse for complex numbers with their two-dimensional vector, real and imaginary parts. No wonder, the follow-on s/360 had three ALU's, fixed point, decimal [read: for accounting etc.], floating point. Of course, since then technology has moved on, but that means that getting exact decimal results requires special techniques.*
_________
*NB: As, "if you need it -- you need it badly," see here (and here), on general computer-based decimal arithmetic (including, decimal floating point); which is now part of the IEEE 754 floating point international standard. Note, this defines operations on infinite values, i.e. it uses points at positive and negative infinity on the number line (but does not explicitly provide for full hyperreals). Similarly, modern processors are effectively "about as fast" with floating point as with integers, the slow step is memory access. Java Math provides for BigDecimal calculations [also see here], and Python has a decimal provision, which notes how "decimal is preferred in accounting applications which have strict equality invariants." Of course, that extends to banking, finance, actuarial work, econometrics etc., and also to finicky work in Mathematics, Statistics and Science. As one implication, as IBM's mainframes from the s/360 to the zSeries implement decimal floating point in hardware, this has given IBM a dominating advantage in such market segments. By contrast, even though in principle any Universal Turing Machine can emulate any other UTM, x86 family processors have not carried forward decimal floating point in hardware, taking a performance hit when in effect they have to do decimal floating point in software. In 2003, Cowlishaw of IBM noted how: "some applications [may] spend 50% to 90% of their time in decimal processing, because software decimal arithmetic suffers a 100× to 1000× performance penalty over hardware," inferring that "[t]he need for decimal floating-point in hardware is urgent." Also, languages like Java or Python make provision for decimal floating point, including for very large/small numbers with a great many significant digits; where, in some cases these may take advantage of architectures that implement decimal floating point in hardware. Worse, though, some jurisdictions actually have law or regulations with force of law enforcing strict decimal calculations with exact results for accounting, currency conversion etc. and there are lawyers who home in on rounding like sharks on blood in the water: why did you steal x cents/hour from my client is a toxic, loaded, hard to answer question in court. It is most likely cheaper to use "defensive rounding," than to have to defend a court case.])
Once one had created one's draft program, resulting card stacks were then put in pigeonholes with labels, then fed to mainframe machines by attending technicians who used punch card readers. (They often wore white lab coats and/or white long sleeve shirts and dark ties or else business suits, the latter with wingtip shoes of course. DRESS CODE: Lab coats for Science and Computing environments, business suits and wing tips for business places c. 1964. What is the modern dress code for where you will work? Polo T shirts with monograms, blue jeans and comfort shoes?)
Then, printouts -- on fan-fold paper -- were sent back for further debugging; of course, with the decks of punch cards. (That maximised utility of scarce, expensive computer time. Also, for input, punched cards had a key advantage over continuous punched paper tape: individual lines of code, on a given card, could be edited without having to replace the whole stack. But, if you dropped the stack and they scattered, getting them back into sequence was a headache.)
This approach was called batch processing, programming by waiting in line to debug/compile and run when computer time was available.
Yes, we are dealing with a world where a computer system was a collection of interconnected, refrigerator or washing machine sized modules set up in an air conditioned, environmentally controlled room, with a specialist staff. All, very expensive; in the 1960's the IBM S/360 model 50 reportedly leased for US$ 18,000 to 32,000 per month and staffing costs could be perhaps twice that level. Yes, too, the room was often glass-walled, showing to one and all that the corporation was state of the art.
The computer itself was an organised collection of several rather industrial machines, often based on the famous John von Neumann Architecture.
The room . . . an ''information mill". . . as at April 7, 1964 -- and notice, no electronic monitor/visual display unit in sight. This is an IBM System/360 family, Model 50:
![]() |
| A then revolutionary IBM System/360 Computer, c 1964. This is the famous -- and hugely successful -- US$ 5 billion life/death bet-the-farm, as announced April 7, 1964. Here, IBM moved to integrated circuitry and to a common, unified architecture where (with exceptions!) each machine could support business/accounting type data-heavy calculation and information processing, and scientific calculations that required handling a vast range of numbers using a form of "scientific notation" termed floating point. A key feature is that there were three Arithmetic and Logic Units [ALU's], the core actual processing element of a computer. One for fixed point numbers, one for coded decimal numbers, one for floating point [see below]. In the photograph, the Central Processing Unit [CPU] is to the left of the operator typing at a 1052 console. Vid. Observe, switches, meter, lines of status lights and blocks on its front panel, the operator interface. Yes, while the operator above is clearly using a teletype style terminal, there is no visual display unit [VDU] even though earlier machines used cathode ray tube memory units. (Earlier machines used columns of mercury to circulate data as sound waves, too, but ferrite cores [vid] took over. VDU's were available, especially the vector [not raster] scan 2250 Graphics Display Unit, with light pen and controller; this could be shared with four displays. The light pen implies, interaction through the screen, a precursor to our modern mouse/pointer GUI. Cost with a vector display unit c. 1964 was US$ 280,000, approx US$ 2 million c 2021. There was also a 2260 raster scan character VDU for about US$1,000 but it also needed a highly costly controller.) Hard disk drives with removable 7.2 MB disk packs were available. In the picture, two early hard disks are just visible behind the rack of tape reels. The latter were 9-track 1/2" tape drives, using 8 tracks for a byte-wide path and a parity check bit, tape reels were up to 3,600 ft. Storage for 9-track tape is 800, 1600, and 6250 bytes per inch, ~ 22.5MB, 45MB and 175MB respectively on a tape with the usual length of 2,400 feet. [The 360 standardised the Byte as 8 bits.] Observe, too, the emergency stop, big red pull-button (yes, pull, not push); top right on the panel, just in case. (HT: NBC News, See Wiki summary. Notice, how modest the performance now looks: "The slowest System/360 model announced in 1964, the Model 30, could perform up to 34,500 instructions per second, with memory from 8 to 64 KB. High-performance models came later. The 1967 IBM System/360 Model 91 [--> used by NASA] could execute up to 16.6 million instructions per second. The larger 360 models could have up to 8 MB of main memory, though that much main memory was unusual—a large installation might have as little as 256 KB of main storage, but 512 KB, 768 KB or 1024 KB was more common. Up to 8 megabytes of slower (8 microsecond) Large Capacity Storage (LCS) was also available for some models.") |
A line drawing of the core units of the Model 50:
![]() |
| The S/360 Model 50 processor core, front panel, 256 kB main memory and power unit. Reportedly, a cabinet for 128 kbytes of ferrite core memory weighed 610 lbs. The 1052 Printer Keyboard used the IBM Selectric "golf ball" typing head. A maintenance manual provides many technical details; this line sketch is p. 138 and a front panel photo, is p. 141 |
The computer system's organisation, following the von Neumann Architecture:
The s/360 Architecture, in more detail (yes, this is a key, instructive, real-world case):
While we re at it, another key design is the so-called Harvard Architecture. (BTW, "so-called," as -- just as for von Neuman (err, ahh uhm . . . Princeton Architecture), the "Harvard" architecture is not strictly, simply from Harvard.)
![]() |
| The Harvard Architecture (HT, FUE: GfG) |
The key difference is, separation of a data memory space from an instruction space that allows word lengths to be different, and allows for simultaneous processing of instructions and data. Such a speed-up helps with real-time processing. Of course, there is the increased complexity of two sets of buses.
Or, today, we blend the two by using caches for instructions and data in the processor, so as long as cache contents are valid, we get much of the same speed-up effect. Down this road lie the complexities of modern CPU design.
(And yes, this is a spoon-sized dose of Computer Architecture, with the history of a breakthrough moment to help it "go down the hatch.")
The punch card code:
![]() |
| The punch card code. Notice, the base was decimal digits 0 to 9, then using space at the top of the card, blocks were added to encode for capital letters and for special symbols for Math etc, later extended to EBCDIC. In effect, a 12-bit code. 1 --> 00-0100000000, B --> 10-0010000000, = --> 00-0000001010 etc. (Dash added for clarity.) The zero-bias was partly to avoid too many holes in the card. IBM's mainframes still use EBCDIC today. Fun fact, the S/360 originally had an ASCII mode, but it was rarely used. |
Here is a line of code on a punched card:
![]() |
| Jacquard Loom punch cards, note the stitching along the sides [HT: Sci & Industry Museum, UK. Yes, this was a programmed loom. It was invented in 1804, based on earlier devices from 1725 on.] |
The key advantage of punch cards over paper tape was that if you made an error in a line of code, you only needed to re-type and re-punch that one card. [An ancestor to the computer, the Jacquard Loom for weaving fancy cloth, used cards that were laced together with thread.] Of course, punch cards used up a lot of paper. Rumour has it, 1 Gigabyte of punch card code and data would weigh over 20 tons. A lot of dead trees, that. Contrast, a thumbnail sized US$ 60, 256 GB SD card that weighs much less than an ounce and has up to 170 MB/s i/o data transfer rate. (Terabyte SD cards are available, but run to US$ 260 each.)
Of course, soon, the highest value assets were the key software and data, exceeding even the value of the hardware. Accordingly, for many decades,
- properly storing,
- validating,
- accessing,
- managing,
- guarding,
-searching,
-sorting,
- analysing/processing
- deriving outputs and
- drawing out insights
. . . from hard-won data have been main foci of computing. Think of the central importance of a general ledger accounting system. Especially if payroll, accounts for customers and suppliers, billing, inventory control etc are part of the picture. Such a system is rightly seen as the heart of a management information system.
Such processing can almost seem to be magic, as authors of a Computer Science Textbook note, while giving fair warning with a spot of Hogwarts style humour:
A computational process is indeed much like a sorcerer's idea of a spirit. It cannot be seen or touched. It is not composed of matter at all. [--> it is information, expressed in codes and stored in configurations of various media] However, it is very real. It can perform intellectual work. It can answer questions. It can affect the world by disbursing money at a bank or by controlling a robot arm in a factory. The programs we use to conjure processes are like a sorcerer's spells. They are carefully composed from symbolic expressions in arcane and esoteric programming languages that prescribe the tasks we want our processes to perform.
A computational process, in a correctly working computer, executes programs precisely and accurately. Thus, like the sorcerer's apprentice, novice programmers must learn to understand and to anticipate the consequences of their conjuring. Even small errors (usually called bugs or glitches) in programs can have complex and unanticipated consequences.
Fortunately, learning to program is considerably less dangerous than learning sorcery, because the spirits we deal with are conveniently contained in a secure way. Real-world programming, however, requires care, expertise, and wisdom. A small bug in a computer-aided design program, for example, can lead to the catastrophic collapse of an airplane or a dam or the self-destruction of an industrial robot. [Abelson and Sussman x 2, Structure & Interpretation of Computer Programs, 2nd Edn, 1996, ch 1.]
Yes, too, as the s/360 shows, we have come a long way over the past 50 - 70 years.
For example, there is a world of differences between having to plunk down $280,000 to set up a single CRT, vector-scan, light pen interactive visual display unit [VDU] for our s/360 [mostly, to get the controller . . . going up to four 2250's doubtless brought down the per unit cost . . . ], and today's world with intuitive, interactive displays everywhere:
![]() |
| A high end s/360 with a 2250 cathode ray tube [CRT] vector scan Visual Display Unit [VDU] notice, the cord for the light pen, next to the keyboard (What would they have thought of something like the 40-pin MC 6845 CRT Controller chip, from the late 70's on? These can be bought online today for about US$ 3 or a bit more.) |
Compare, a SABRE, remote teletype terminal for airline reservation, with paper and push-button interface:
![]() |
| Here, we see the teletype as a model for computer interface, using a modified IBM Selectric "golfball" typewriter and linked paper and push button unit. This is similar to the Model 50 Operator Terminal above, but using telephone lines and likely time sharing. So, we in effect have a paper based remote terminal. SABRE was a breakthrough collaboration of IBM and American Airlines. Before SABRE cut in in 1964, reservations could take up to 1 1/2 hrs, this fell to potentially less than a minute. It used 1,500 terminals tied to two IBM 7090's and handled 84,000 reservations per day. SABRE was also the root of e-Commerce. (In the mid 80's I knew of a similar unit to the terminal, used for typesetting and desktop publishing.) |
Observe, too, that this is similar to the teletype-like "1052 printer keyboard" station for the operator of the s/360 in the official photo above. Here is another view for that 1964 setup, showing fan-fold paper feed and printout trays (or baskets, too):
. . . also, a comparable terminal for the follow-on 370 first announced in June 1970, which has a more elaborate teletype/printer keyboard unit, a rather similar front panel on the processor cabinet and -- tada! -- a video display tube with a light pen in its holster:
Now, this use of teletypes as interfaces (and of associated text-based command line interaction with the computer) is actually at the root of the modern Mathematical Theory of Computation. For, the famous Turing Machine is a Teletype model:
![]() |
| Computation is about reading, processing and writing suitably coded digits, often bits [1/0, Hi/Lo, T/F, N/S . . . ]. The key issue, then, is to use codes that create "data shadows" of real world objects and of wholly software ones, also reducing messages, signals, values, system states or instructions to codes; all of which can be stored in memory. These are then processed/transformed using methods/algorithms. This is WLOG (without loss of generality) as s-t-r-i-n-g-s of suitably coded digits/characters can represent anything of interest [i.e. we see here the power of coding, measurement, units & scales, symbolic representation and thus of language] -- hence, it was natural to start from teletype terminals connected to information processing/calculating machines. Also, the word "code" here shows that a: language is key and "compute" that b: mathematical/ logical processing using Boolean Algebra (with extensions such as Predicate Calculus and modal logic) and c: lambda functions/expressions, d: "etc" (a big etc!) are, too. There are of course things that cannot be thus computed, but enough are that computing is a major focus. (BACKGROUND/THEORY: Now, ponder a certain computing machine with a teletype terminal and a central processor -- such as the von Neumann machines above [e.g. s/360 (note the model 44 for interfacing etc) and 7090 or 1400]; i.e. a "register machine" (with random access read/write memory and program storage). There is a memory that can store data, also digitised values (of variables/signals/states), messages and instructions as s-t-r-i-n-g-s of symbols; thus, "the stored program computer." Some of the memory holds inputs, or reference information (commonly, databases), and display information or printer information to control an attached printing/display machine -- or, a "constructor/effector" that can build something (or, perhaps interface with/control an industrial plant/process, a display/monitor, an instrument, vehicle or machine). There is an arithmetic and logic unit which is the unit that carries out actual transformations of information and calculations using logical and arithmetic operations under step-by-step control of the logic of process in algorithms. There is a terminal interface so that a user can enter or receive messages. The machine supports 1: automated sequences of instructions -- automatic successive steps of information transforming and/or calculating action. It can 2: take decisions at branch points based on test results, so we can do branches, to alternative sequences of steps based on tested conditions, and that includes 3: going in a loop. Those three structures, with appropriate instructions, allow any feasible algorithm to execute. Such includes user + terminal + host computer interactions, customer transactions [think, automated banking/ teller machine vs customers + cashiers + back offices with a point of sale system], telecommunications (including local networks and the Internet), host/embedded computer - constructor/effector and target machinery/process interactions and more. [EXERCISE: Ponder MIDI and modern music, cf. Wiki summary here.] Where, with bits, arithmetic is just another useful set of logic operations, e.g. 0 + 0 --> 0, carry 0, 0 + 1 or 1 + 0 --> 1 carry 0, 1 + 1 --> 1 carry 1. (Indeed, with complements, strictly, "addition is all we need," as that provides for subtraction by addition of the complement and we have that * (= multiplication) is repeated addition and / (= division) is repeated subtraction. And many other mathematical operations and transformations are structured extensions of these four rules and related logic tied to the key number sets/scales N, Z, Q, R, C, R*. We may consider too the NOIR+ model of scales, nominal, ordinal, interval, ratio -- with extensions and adjustments (cf. here for starters) and the foundational use of identifiably distinct glyphs, states, values, directions, locations, levels, qualities (e.g. colours) etc at the heart of digital encoding/decoding, analog/digital conversion and alphanumeric codes. Also, transducers are used to sense such values, so "sensors.") Now too, magic step, we have said nothing about how close or far the terminal has to be. A dumb terminal connected to a powerful machine through a link of many miles can bring to where it is, all the power of the remote "mainframe"/"server" machine. Where, transmission of information is itself a computing process. And, we can also have a group of smart machines in a network, not just one . . . the Internet/cloud. This allows us to have an oracle, access to a resource-machine we can simply ask for reliable answers/decisions, in just one processing step. Thence AI. Notice, then, the value . . . and potential dangers (also cf. here). . . of Internet search engines and their underlying algorithms. We can even have terminals that are sensors or actuators [or clusters of such]; such sensors report relevant states of a plant, constructing a state of the plant or environment, allowing tracking of changes; and, such actuators allow interventions so the machine can act on the world. This is how, the machine can now control an industrial process or the like. So, a general purpose computer that is host for target "constructor" units, is a general-purpose, universal machine. Insert an AI oracle, and this is an "intelligent" general machine. Such general machines -- as (within limits set by the physics etc.) they can emulate any other machine of that class --are able to force a physical system to adapt its behaviour to match a model system, effecting a type of model-referenced adaptive control to a set point or trajectory. For example, as the electrical grid is one of the largest manufacturing entities in any Caribbean territory: a computer networked, renewables based electrical grid, by using long duration, grid scale battery storage and "grid forming inverters," in principle, can act as if it were naturally regulated by traditional high inertia spinning machines . . . up to a point, where the cost to compensate for intermittency is too high, or the system is at a limit that it cannot physically exceed (frequency falls), or it falls into irrecoverable fault conditions; thence, grid collapse. Similarly, a computer controlled electric car, up to limits, can act like a rather sporty vehicle; but, the limits count. Likewise, there is a good reason why we still want high performance, new computers, as old ones -- though they use the same OS and have the same interface -- may run out of ability to keep up. In short, garbage in, garbage out still rules. For that matter, 1: a display screen is a grid of tiny red, green and blue lights that turned on/off in a controlled pattern will display text, images and even animations; 2: sound, too, can be reduced to coded chains of pulses of different "heights" that, run through fast enough, reproduce or even create sounds, speech etc --> 1 + 2 = 3: an image and sound constructor. Thus, 4: the modern, network connected, multimedia processing computer, modelled; which can also 5: have an AI oracle. Beyond such WIMP [Windows, Icons, Menu, Pointer] + keyboard/teletype + mouse and/or touch-screen approaches, lie 6: virtual or augmented reality, immersive interfaces. [Cf. Unit M.]) Revisiting the Turing machine model, notice 1: a read/write (R/W) head, 2: a tape (infinite to R & L), 3: an automatic processing (or, "control") unit with a program. Thus, it can i: take in inputs [read], o: provide outputs [write], shift L or R [or, conclude and halt] and between, p: process (including, make decisions). Even more interesting, a Universal Turing Machine [UTM] can emulate any other such machine -- this means, it is just as powerful as any other such general machine. That is, in principle such a machine is automatically just as complex in its potential behaviours, just as capable as any other. Hence, it is indeed ("as the tin's label says") universal. Thus, (apart from slowness of emulations, low powered hardware, lack of skill/knowledge/information/ideas -- or, actual outright errors and misinformation [i.e. "garbage in . . ."], etc) there is a fundamental equivalence of adequately designed computing machines, once they are UTM's. That is, in principle, they can carry out the same computations, as opposed to efficiently carrying out same. Here, a TM does not have O(1) single-step random access to storage, so a von Neumann, register, ROM and RAM machine is practically faster, and potentially (thanks to superposition of states between 1 and 0), a prospective quantum machine is credibly faster still. That said, once speed, bit-width and memory are adequate, machines become substantially equivalent; e.g. an older but adequate machine is just that, adequate. The issue is technical/security support in an age of hackers. But, this is not omnipotence . . . as, A: the revolutionary Godel incompleteness results show, 1: some valid potential results are inaccessible from any given [finite] start-point (and 2: such a system cannot prove itself coherent, where 2b: a finite scheme that leads to all truths will be incoherent [i.e. 2c: it fatally fails due to the principle of explosion]). Yes, too, B: the abstract logic-model world set out by a rich axiom system and its resulting theorems are a computational framework (which obviously includes major, highly mathematical physical science theories [and so, some take a computational view of the unfolding dynamics of the cosmos as a system]). Indeed, in the 1930's the foundations of the digital computing industry and age were laid by those exploring computational limits of Mathematics. Then, too, if a UTM cannot process a given step by step process and come to a conclusion, halting, the problem is usually taken as not generally solvable. We thus have the Church-Turing thesis: if a problem, P, is not generally solvable on a UTM, it is not generally solvable, which defines what "computable" and "computing" mean mathematically (and so too for Computer Science). As Wolfram summarises, "any real-world computation can be translated into an equivalent computation involving a [universal] Turing machine . . . . [it applies to conventional computers, and] also applies to other kinds of computations found in theoretical computer science such as quantum computing and probabilistic computing.] . . . . If there were a device which could [reliably!] answer questions beyond those that a Turing machine can answer [--> as opposed to merely faster than a conventional design . . . which can indeed be a big advantage], then it would be called an oracle." This thesis -- with its many extensions -- is pivotal for computer science and other fields. In effect it is a thus- far- highly- reliable foundational "scientific hypothesis" of computing; hence, Computer Science as a discipline and practice. This UTM is now initialised, to a start point, with three-stage instructions on the tape: i: read (= accept i/p), ii: write back (i.e. o/p; having processed and changed internal state), iii: Sh-L/ Sh-R/ Halt (on concluding). It proceeds step by step until it halts (or cannot halt). In effect, too, the program of instructions on the tape allows a given processor to emulate any other UTM processor, hence generality. Notice too, here we can see the layer cake stack of virtual machines riding on a basic UTM machine that processes a machine language based on bits -- the approach we are using. Of course, actual machines have finite tapes or disks and memories, so they are weaker than the ideal model UTM. And, we can see that the von Neumann style register machine we already outlined is Turing Complete, up to the issue of infinite storage. (But, if we can throw away [or archive] old storage and reuse R/W memory, finite storage emulates infinite.) Where, too, a sufficiently long coded string of bits [1/0 etc] can represent any symbol, state or value we please, enabling universal digital representation by description (= data shadows). Add, another tape-reading machine with controlled action units (= a constructor), and the UTM can engage the world: issue text, make sounds, show images and videos, move a robot or other industrial machine (or a molecular nanomachine: DNA & RNA), or create a 3-D print etc. (Yes, another "big/Royal etc.") For initial and ongoing inputs, a keyboard, camera, microphone, sensors, etc (again, "big . . .") suffice to provide instructions and coded symbols/signals. Multimedia, host and target machines. Where, if the constructor and instructions can replicate the UTM + constructor, we now have a von Neumann Kinematic Self-Replicating Machine, aka, Self-Replicating Automaton, aka Universal Constructor. This is a gateway to space probes and exploring cell based life. Notice, for cells, there is a large threshold of required information to get a vNKSR with metabolism. [This is a context for debates and inferences on the only known/plausible source of complex functional information and associated processing & effecting machinery: intelligently directed configuration, aka design.] |
If you are interested, we may talk for a moment about generalised oracles and effectors/constructors, opening up vast fields for onward thought (starting with Robotics and going as far afield as theology! [Think, how do we address the mind/soul, rational responsible freedom and brain/body . . . GIGO-limited computer . . . challenge? Possibility: quantum influence on brain as a computational substrate, perhaps via microtubules.]):
Wikipedia, c. March 2025, adds some helpful, further perspective:
In complexity theory and computability theory, an oracle machine is an abstract machine used to study decision problems. It can be visualized as a Turing machine with a black box, called an oracle, which is able to solve certain problems in a single operation. The problem can be of any complexity class. Even undecidable problems, such as the halting problem, can be used . . . . An oracle machine can be conceived as a Turing machine connected to an oracle. The oracle, in this context, is an entity capable of solving some problem, which for example may be a decision problem or a function problem. The problem does not have to be computable; the oracle is not assumed to be a Turing machine or computer program. The oracle is simply a "black box" that is able to produce a solution for any instance of a given computational problem . . . . An oracle machine can perform all of the usual operations of a Turing machine, and can also query the oracle to obtain a solution to any instance of the computational problem for that oracle. For example, if the problem is a decision problem for a set A of natural numbers, the oracle machine supplies the oracle with a natural number, and the oracle responds with "yes" or "no" stating whether that number is an element of A.
Let's visualise, with a black box oracle, a Turing Machine and a hosted effector/constructor such as a robot:
![]() |
| An Oracle extends the power of a Turing computer by giving one-step answers to key decision problems, rooted in an external "wisdom base"; thus amplifying the power of a computer that consults the oracle on going to query state, giving a [satisfactory?] solution to the algorithm's need to conclude and so halt. In extending the Turing Oracle Machine model, we may consider how a query/response intervention may interact with a computational substrate. Addition of an effector/constructor allows generalisation to host and target systems, embedded systems, robotics etc. (or just a printer or screen . . . or a 3d printer). Feedback allows for sensing and controlling effectors and their output, bringing in a vast field of industrial possibilities. Let us note, memory storage of a state allows for feedback, including with lags. Oracle queries allow enhanced capability and let us explore possibilities. |
Now, oddly enough, once we had teletype terminals we could have built more elaborate, icon using interactive print and paper local or remote work stations for coding [maybe with optical scanners for inputs), but by then with television technology it made sense to use a more flexible electronic screen. Once, cost could be brought down enough. Recall, the VDU option for the s/360 was about US$280,000. For early microprocessor driven PCs the solution was to hook up to the family television and to use a cassette tape machine as a mass storage device. Nowadays, every smart phone has such a screen and with Internet connectivity is a television and teleconferencing terminal. Obviously, text messaging tells us it can be a text terminal too. Even more eerily, most large screen LCD technology television sets, today, have HDMI inputs and are configured to be large, high brightness monitors.
![]() |
| It is worth a pause to cite Tech History on the impact of the Lisa-Mac innovation: << Unlike traditional systems, Lisa OS adopted a document-centric approach, treating files as individual documents rather than mere collections of data. This innovative design not only streamlined user interactions but also fundamentally shifted the paradigm of operating system architecture . . . . By prioritizing a user-friendly and visually intuitive document-centric approach, the Apple Lisa’s operating system became a catalyst for the transformation of computing interfaces. Its legacy endured as it laid the groundwork for the design principles that would shape the user experiences of generations to come [starting with the Mac and Windows]>> |
Reverting to the old days, clearly, too, once -- thanks to relatively low cost raster scan VDU's, we were able to interactively code, debug and run using a simple, plain text editor on a Personal Computer [= "PC" or Mac or UNIX*/Linux Box etc] with its own display or on a terminal with a display linked to a mainframe, that was a great step up.
Not just, of convenience: it made a lot of sense, once programmer time became the key constraint. As, hardware cost had come down due to onward technology changes such as the rise of complex integrated circuits [IC's] and as much faster i/o allowed for use of terminals and keyboards rather than punch cards, card punch machines and punch card readers etc.
IC's also allowed development of a CPU on a chip, the 4- then 8- then 16- then 32- then 64- bit microprocessor. This was accelerated as screens moved on from cathode ray tubes [CRT's] to flat screens of various kinds. Then, too, as graphical user interfaces [GUI's] came in, mice, trackballs, "eraser head" touch sticks and touch-pads came into the picture. Also, this helped to push object-oriented programming to the forefront, with of course Java as an important factor. A resulting programming strategy was to code to the interface, addressing user interaction and intuitive "user-friendliness" as core coding and software design/engineering issues. [BTW, Software Engineering is now a recognised professional title and philosophy of software development that applies engineering approaches and associated ethics.]
As a note, by 1980 - 85, IBM was able to take the Motorola 68000 32-bit microprocessor as a start point and adapt it to implement a System/370 processor on a chip. This then became the basis for two products, first, the XT/370 which used an add-in card to allow an IBM PC to run 360/370 software. By 1985, they had created the Micro/370, a single chip solution. The key was that from the s/360 on, IBM had moved to micro coded instructions. That is, instead of building a hardware unit for each assembly language/machine code instruction, the instruction called a short built in program in the processor that executed the instruction. The Motorola 68000, as a 32 bit machine with micro coded instructions, could be adapted by rewriting the microcode to execute s/370 instructions. At first, this needed a second generic 68000 to run certain instructions that could not be crammed into the modified microcode, but eventually a full 370 processor on a chip was ready by 1985. So, yes, by 1980-85 on, one could have the processing power of a 1964 - 70 s/360 or s/370 mainframe in a personal computer or engineering workstation.
A key problem was, the disk drives and floppy drives available at the time were slow.
Also, much had already been invested in the x86 series so, no, the follow on generation of IBM mini computers . . . basically, lower cost, cut-down mainframes . . . c. 1986 were based on the 80386, not the Micro/370. Part of this is, the 370 on a chip project was a small one in IBM and lacked critical mass of support at strategic decision making level. But, for understanding computing, it is well worth noting that in the twenty-one years from 1964 to 1985, technology moved from the cabinet-sized s/360 processor above to a single thumbnail sized chip using 200,000 transistors. In the near forty years since then, we have gone far beyond this as we now have thousands of millions of transistors on a similarly sized chip. This is because feature size has gone from a micro metre to the scale of nanometres.
Nowadays, of course, we have touch screen interfaces for smart phones running 64 bit, multicore processors on a chip. What, was once supercomputer territory.
(These more visual interfaces were tied to a shift from text-oriented interaction to visually oriented interaction using icons, pointers/cursors and the like. Now, too, we also have voice interfaces and immersive virtual reality and even augmented reality. There are even experimental interfaces that can recognise subvocalisation as we think to ourselves and interact with that.)
_____________
* NB: The modern Apple Macintosh computer is based on the UNIX Operating System [OS]. An OS interfaces with the physical machine and as Wiki helpfully summarises: "[it] is system software that manages computer hardware [and] software resources, [providing] common services for computer programs." It thus coordinates and supports the user interface, programs and applications that ride on the physical machine, providing key services. Notice, how PC's (DOS or Windows), Macs and UNIX/Linux Boxes characterise the machines by their OSes. The Android OS is actually a cut down Linux (with a heavy dash of . . . Java, of course). Apple's iPhone iOS architecture is also said to be "*nix" based, being derived from Apple's OS X. The Raspberry Pi OS, formerly Raspbian, is of course, Linux. (For a DOS/Windows vs Unix/Linux debate, see here. Modern Windows seems to be influenced by the VMS operating system originally developed by DEC for their VAX 11/780 minicomputer family.)
By 1990, when IBM introduced its RISC System 6000 high powered work stations 26 years after the S/360 was announced in 1964, performance levels had already been utterly transformed:
![]() |
| IBM, Solid Logic Technology [SLT] IC, on a ~ 1/2 inch square, ceramic substrate. The three silvery squares with three terminals each, are most likely to be transistors and the grey rectangles, resistors. This circuit would be protected with a special glass layer and put in a metal canister or encapsulated in plastic. IBM built and staffed factories to manufacture key components, it seems 3 of the $ 5 bn bet-the-farm. According to Fortune, 1966, "I.B.M. spent over half a billion dollars on research and development programs . . . by the end of [1966], one-third of I.B.M.'s 190,000 employees will have been hired since the new program was announced. Between that time, April 7, 1964, and the end of 1967, the company will have opened five new plants here and abroad and budgeted a total of $4.5 billion for rental machines, plant, and equipment."A year after first units shipped, IBM's before tax profits were US$ 1 billion, from leases of $5,000/month for 30's to $115,000/month for the top of the line machines. IBM had considered monolithic IC's for s/360 but considered that this more advanced technology was too immature. The successor 1970 s/370 used monolithic Si ICs. (HT: IBM) |
[T]he most powerful model (POWERserver 540) sat inconspicuously beside a desk [in a Tower-style box] rather than filling a large room. It processed 41 million instructions per second, making it five to fifty times more powerful (depending on problem mix) than the most powerful of the early System/360 models. Its electronic logic circuitry had up to 800,000 transistors per silicon chip versus only 1 transistor per [hybrid, Al2O3 ceramic substrate based] chip as first announced with System/360. Its maximum memory size of 256 megabytes was just 256 times more than was offered on the largest of the early System/360 line, and its internal disk storage capacity of 2.5 gigabytes was 25 times the capacity of the 24- inch diameter, 25-disk module of the IBM 2302 Disk Storage announced with System/360 in April 1964. [Pugh, Emerson W, Building IBM, MIT Press, 1996, p. 216. (It is now possible to have over a billion transistors on a chip. Each logic or storage element will typically use one or two to several transistors; now most often some variety of or variation on metal oxide semiconductor, MOS. Back in 1964 - 65, the hybrid circuits typically used PNP Bipolar Junction Transistors, BJT's. Electronics is a key, enabling technology for computing and communication, requiring in turn advances in materials science and condensed matter/solid state physics. In the '90's, for a small services oriented firm, maybe 70% of its hardware capital investment was for ICT so that on cost alone, this was a strategic decision. This was still the age of, no-one got fired for buying IBM.)]
![]() |
| A six-core, Intel i7-980 processor, with 1.17 billion transistors. (HT: Intel, fair use edu. A survey of Computer Architecture & function is here: 1, 2. Deep dive, here.) |
A mainframe or even a supercomputer, nowadays, will often be an array of such microprocessor driven units, in a parallel/multi-processing array.
IBM in fact "refers to its latest mainframe as the IBM System z9® server." It explains, "[w]e use the term mainframe . . . to mean computers that can support thousands of applications and input/output devices to simultaneously serve thousands of users." And, it notes, "presence of a mainframe often implies a centralized form of computing, as opposed to a distributed form of computing," so a mainframe now is "the largest type of server in use today."
That is, mainframe now refers to a centralised strategy or style or philosophy of server-based computing, not to big iron similar to the S/360 and kin.
They note that "[c]entralizing the data in a single mainframe repository saves customers from
having to manage updates to more than one copy of their business data, which
increases the likelihood that the data is current." Some, might dispute the claim, of course.
But the evolution continues as even a humble desktop or laptop now boasts processing power that . . . not so long ago . . . was once supercomputer territory.
Supercomputers, of course, are computers of maximum processor power/performance, built to take on the biggest calculation challenges.
Lurking in the wings are quantum computers.
![]() |
| The Apple M1 multicore processor. Already in the chip, we see many specialised processors and a shared memory space; this shows how useful the layercake approach is [HT: FUE. NB: Current CPU's are highly secretive affairs, for commercial/ competitiveness reasons; so try here for an overview by a knowledgeable analyst. Note, how he prefaces his reverse engineering reconstructions with caveats! That said, Apple hired one of these for their tech team. Here is a discussion of microcode.] |
As we moved into the 2020's, fifty years after the first generation of microprocessors, processor architecture has become exceedingly complex; something we need to appreciate, just to make informed purchases of computers or smartphones . . . instead of being dazzled by sales buzz-words. For example, the Apple M- series (based on Acorn's ARM architecture) now incorporates a wide variety of function units on a chip, starting from a 5 nanometre processor architecture, then going to 3 nm. Originally, the M1 came with 8 or 16 GB of built-in, on-chip "unified memory" shared across all cores [where, you cannot go buy extra RAM to plug into the motherboard and upgrade], but subsequent members of the M1 family boost unified memory up to 128 GB with the M1 Ultra. Onward, the M2, 3, 4 and 5 offer/will offer upgrades to performance and number of functional units and unified memory. As EverythingDevOps summarises:
The Central Processing Unit (CPU) in the M1 chip consists of four high-performance [--> Firestorm] and four high-efficiency [--> Icestorm] cores. The high-performance cores handle demanding tasks, while the high-efficiency cores handle less intensive tasks, focusing on overall power usage.
The Graphics Processing Unit (GPU) within the M1 chip is dedicated to graphics rendering, which is crucial for activities like video playback, photo editing, and gaming. This GPU is designed to deliver powerful graphics performance while consuming minimal power, contributing to the chip's overall efficiency.
. . . . one of the key features of the M1 chip is its Unified Memory Architecture (UMA). This shared memory system means that data doesn't need to be copied between different memory areas, which speeds up processing and improves performance.
Additionally, the M1 chip includes a neural engine designed for machine learning tasks. This neural engine can handle up to 11 trillion operations per second, making it highly efficient for AI-related functions like image and speech recognition. [--> Yes, AI on the chip!]
The chip also integrates various other specialized processors, such as an image signal processor for enhancing camera functionality and a storage controller for managing data storage efficiently. ["Overview of the Apple M1 chip architecture," Prince Onyeanuna, July 24, 2024, FUE. Also, notice Wiki's summary of the System on a Chip:
"A system on a chip (SoC) is an integrated circuit that combines most or all key components of a computer or electronic system onto a single microchip.[1] Typically, an SoC includes a central processing unit (CPU) with memory, input/output, and data storage control functions, along with optional features like a graphics processing unit (GPU), Wi-Fi connectivity, and radio frequency processing. This high level of integration minimizes the need for separate, discrete components, thereby enhancing power efficiency and simplifying device design."]
That's for personal computers, smartphones and Tablet PCs, what, obviously, was once supercomputer territory.
Indeed, we should note that processor architecture is now exceedingly complex, "information factories" using "pipelines" to in effect create assembly lines to partially carry out up to twenty or more instructions at once: where, as programs proverbially spend upwards of 80% of their time in loops, it became sensible to go to branch-predicting (so, speculative), out of order execution. Thus, we now have - see reference vid here -- a fetch, decode, rename, pipeline, execute (out of order), retire (in order) cycle, using up to dozens of processor cores at once; with up to over a thousand possible assembly language instructions . . . each of which triggers a lower level microinstruction sequence, which may vary across a processor family. Particularly slow instructions will include anything accessing external memory (hence, multiple level caches inside the processor), input-output and operations such as division, which in some cases requires over a hundred micro-instruction steps and associated clock cycles. Clocks of course synchronise the step by step, logic of process action of the processor.
This means, the stack of virtual machines model is more and more key to working with practical coding.
For mainframes, IBM, a pioneering firm, having gone into then pulled out of the personal computer market with the DOS/Windows machines then the abortive PS2, is still a big player in the current mainframe arena; with the z900 and others in the zSeries as remote descendants of the once revolutionary s/360. It also produces supercomputers. There are several other big players, starting with UNISYS [a 1986 merger of Burroughs and Sperry], ranging on through names like Fujitsu of Japan and onward down to firms that you likely have never heard of. Indeed, Fujitsu defines mainframes as: "large-scale computers used in applications such as core functions for business enterprise or research institutes" and calls a current mainframe, the "FUJITSU Server GS21." Fujitsu sponsored Gene Amdahl, a chief designer of the s/360, in developing and manufacturing his own range of compatible mainframes, then it eventually absorbed Amdahl (and its partner, computer division of Siemens; originally, Siemens was a parent of Fujitsu).
Clearly, computing has evolved, going to servers (often a preferred synonym for mainframe), server farms and cloud computing, embedded computing and the Internet of Things.
As a result, let us again ponder a layer cake, networked, host and target vision and model of the computer and its complement of software. One, with a layered -- "layer-cake" -- stack of virtual machines riding on the actual physical hardware, as a powerful, unified framework:
And, the Internet of Things computing cloud:
Where, often, "smart devices" such as smart phones, modern calculators, robots, modern electronics gadgets or devices and instruments, automobiles, traffic lights, aircraft and space craft, have computers embedded in them; which are . . . rather obviously! . . . called embedded computers. For simple example, it may be cost effective to embed a 4-bit microprocessor to control a car's push-button window winder mechanism as such devices are now down into cents when sold in bulk. A microprocessor, originally, was a whole CPU on one silicon chip, and if it was a variant set up for controlling real world devices, it would be a microcontroller. Nowadays, we readily have 1,000+ MHz clock rate, multicore, 64 bit units, with other function units such as graphics processors and neural networks, in some cases with giga bytes of memory, due to how small feature sizes now are.
Often, such computers are required to perform in "real time." That is, in response to events in the real world, the computer must carry out an appropriate response process and drive actuators (or more broadly, output devices) to act in good time. (The Apollo Mission control system, c 1969, is an excellent illustration, using five s/360 model 75 computers as host.)
As an exercise informed by the above space mission controller system [and yes, the space programme was catalytic], consider how an updated, networked, computer based system may be used to control air traffic on a continental scale:
More simply, we may consider computer control of a modern process unit with programmable logic controllers [PLCs], Distributed Control Systems [DCS] , with associated supervisory, safety, managerial and regulatory systems and units:
![]() |
| AiChE notes, "many manufacturing processes are discrete [state, stepwise] or time-varying batch processes, which require different considerations than steady-state processes [such as for oil refinery units etc]. Batch processes are very common in the chemical process industries (CPI), and include most pharmaceutical and biotech processes, food and beverage processes (including beer production), and specialty chemicals (e.g., soaps and paints) production . . . . control system equipment has a long life, usually due to the major capital costs, time investment, and lost production incurred by installing replacements. So, [we may see in-place,] instrumentation and control equipment that has been in place for more than 20 years [including, old mainframes] . . . .Three common options are available for implementing computer-based process control: a personal computer (PC), PLC, or DCS. All are interfaced to process equipment (e.g., sensors and valves) via input/output (I/O) subsystems. PLCs and DCSs usually have access to other computers that support plant operations via a local area network (LAN)." As they say, fair warning. |
ChatGPT, suggests a temperature control case, and used a diagram to outline the following break loop pseudocode that uses a normal condition do-while aspect, with a test and break for an emergency overheat condition:
STARTDO FOREVER:DO UNTIL within_error_bound:measure current_temperatureadjust heater output toward setpointIF current_temperature > critical_limit THENshutdown_systemEXIT LOOP // break for safetyDO WHILE not_within_error_bound:recalc control actionapply correction(loop continues)
A Java simulation of such a process control break loop case is also suggested - hence, use of random and of sleep; where double means a double precision floating point number (roughly, comparable to scientific notation) and Math.abs() extracts the absolute value:
import java.util.Random;public class PlantControl {public static void main(String[] args) throws InterruptedException {double setpoint = 100.0; // desired temperature (°C)double criticalLimit = 120.0; // safety cutoffdouble tolerance = 0.5; // acceptable error banddouble currentTemp = 90.0;Random rand = new Random();while (true) { // DO FOREVER// ----- DO UNTIL block -----currentTemp += -0.5 + (2.0 * rand.nextDouble()); // simulate noise/heatingSystem.out.printf("Temp: %.2f°C%n", currentTemp);// BREAK condition (safety trip)if (currentTemp > criticalLimit) {System.out.println("!!! CRITICAL LIMIT REACHED — SHUTDOWN !!!");break;}// ----- DO WHILE block -----double error = Math.abs(setpoint - currentTemp);if (error > tolerance) {System.out.printf("Adjusting... error=%.2f%n", error);currentTemp += (setpoint - currentTemp) * 0.1; // correction}Thread.sleep(Thread.sleep(500); // mimic control cycle delay}}}
Let's give a bit more of detail on process control, as this is a key context for coding:
Similarly, we may contemplate an agricultural irrigation system (perhaps, with a solar panel powered wireless network, similarly PV powered sensors and actuators -- e.g. pumps and solenoid valves for irrigation lines):
This is quite similar to a bottle-filling unit's action:
We can further expand our view to now consider a modern, wireless networked manufacturing environment, exploiting computers + constructors as general purpose machines:
![]() |
| Here, we see a concept for a modern, wireless networked manufacturing facility (HT, FUE: NIRAL) |
With an automated, robots-based assembly line, process steps, robot and car motion (and location), also parts lines etc must all be precisely synchronised. So, we can now examine what a robotic assembly line looks like, with robots replacing hand work (i.e. labour has become far more technical in its required skills base):
![]() |
| Robot stations on an assembly line, notice the jacks that hold each vehicle in a precise position for the position-arm, end effector robots to carry out their "numerically controlled" programmed operations. Each robot sits on a base, has controllers, and uses a multi-jointed position-arm structure to precisely position its effector to carry out its task, whether put-place, weld etc. Among many other factors, even the floor has to be precisely level and flat (likely, by laser levelling), across acres of floor space, as well as strong and rigid enough to support the equipment without significant distortion. It also must be protected from flooding, etc. [HT, FUE: The Robot Report. See video, from clay model forward. Note, 2nd video, showing a simple Arduino "turtle bot" chassis, with arm and gripper case study.] |
Fair warning, robots can go drastically out of control:
Related, modern additive/ 3-D printing manufacturing (joined to computer aided design and powerful simulation leading to rapid digital optimisation of prototypes) has potential to transform manufacturing, through the UTM + Constructor [+ AI] --> General Machine approach:
Video discussion:
(See also the more optimistic discussion with a pioneer [Kevin Czinger] here, and here, hosted by Rumble. Notice, the factories process units are capable of making further units for the factory, making it self-replicating. Also, compare lost foam casting.)
Ponder here, von Neumann's kinematic self-replicator:
Of course, the cars we drive have not escaped having computer-based industrial networks:
Biomedical Instrumentation is a whole field (as is more general laboratory instrumentation) that is significant given how important health care services are to the economy and community alike:
![]() |
| Biomedical instruments show a general pattern, of sensing bodily phenomena [or, response to an active external input such as X-Rays, Ultrasound or microwaves and magnetic fields for MRI scans], sensors and conditioning of signals, then processing (e.g. computed tomography), display, imaging and recording or storage. At each stage, it is often advantageous to use embedded computer controllers, and the system as a whole may be part of the local network. This pattern of passive or active sensing, transducer action to sense target variables, signal conditioning, processing, recording, imaging and display also extends to general laboratory instruments, to scientific instruments, to weather and climate monitoring, to mineral exploration (e.g. oil & natural gas), to astronomy and space exploration, to telemetry, to industrial systems, to automobile electronics, and to avionics; including radar, sonar and the like. Digital cameras, too. As well, the Mechatronics fusion/ paradigm (vid). Yes, computers -- general machines -- are a transformational technology. [HT/FUE: Mulindi/BMEDI] |
Where, too, what "in good time" for real-time process control -- typically, from milliseconds (or even microseconds) to a fraction of a second -- requires depends on details. "Hard" real time systems must always hit their deadlines, or they fail with "serious" or outright "catastrophic" consequences; but for some systems occasional misses are acceptable -- these are "soft" real time systems. Some sources make a finer distinction, hard-firm-soft. For firm systems, occasional misses are acceptable but any late action is a failure, with soft systems, occasional lateness degrades function and quality of service but is not an outright failure. A heart pacemaker is a hard real time system as it is life-critical, but a video game display can occasionally slow down its frame rate or may tolerate occasional glitches or delayed audio and yet will have acceptable though degraded performance so it is a soft real time system.
This also illustrates how a system may prioritise its outputs given relative consequences of degradation, e.g. video first over audio.
Beyond that range, calculators may pause for a few moments before giving an answer for complex calculations and airline reservation systems can similarly take a few seconds, due to their "conversational" interaction with users. Where, that advance to interaction with users was already a major advance on earlier batch processing, which dominated the early years of modern computing, e.g. with s/360 based computing centres and coding on punch cards. (Notice, too, a key system performance issue: instant catastrophic failure vs more or less graceful degradation.)
Real time systems may be embedded or may use host computers. Obviously, if a host is embedded, it is still a host, but given the need for response in good time an embedded system usually prioritises the control interface's need for fast accurate response over operator interfaces. In practical terms, many targets, today, are embedded systems. Thus, too, the host/target architecture adequately covers such cases.
As IoT indicates, such host and target/embedded systems may also "live" in a network or may even be on the global Inter-Network . . . i.e., The Internet. Hence, too, the above host-target, networked, layer cake model for the modern computer. It's not 1964 anymore, and your off-brand, "el cheapo" quad core ARM chip smart phone would run rings around a mainframe s/360 model 50.
As can be imagined, such embedded or real time systems will require appropriate -- often, specialised -- programming and interfacing to interact with the real world.
Indeed, here is a tour of a c 2024 NASA supercomputer centre, complete with ocean models and wind tunnel observation of rockets using special "smart paint" that reports pressure in real time that is then monitored using cameras and sent to a billion pixel display wall built using 27-inch monitor units backed by a supercomputer of its own:
Nowadays, too, to code, we have integrated development environments [IDE's] and upgraded text editors that approach IDE's. Far, far beyond old fashioned punch cards.
And yes, part of this review is to help build a sense of tradition, common vision and community as we join
the not so ancient (but honourable)
Order of the Programmer . . .
know your history, to guide (and guard) your destiny;
part of this, is management of expectations.
As, coding is hard, especially when one has to go bug hunting.
![]() |
| Perhaps, the most costly single bug to date, US$ 7 billion. The first Ariane 5 veers off course due to a software bug, as code that was "good enough" for Ariane 4, was NOT "good enough" for the first Ariane 5, leading to going off course; self-destruct follows [HT: Shereef, edu use] |
Worse, when we are developing and there are multiple bugs lurking, not just the one.
Still worse, no sufficiently complex software is truly bug free, just reliable enough to do a "good enough" job.
Yes, the logic of processes is complex, exacting, and so learning and using a real-world computer language (such as Java) therefore requires commitment and diligence to get things reliably right. The sort of commitment needed to learn a Language and to learn Mathematics or Science. Being as simple as possible, being "fool-proof," being easy to learn yet powerful enough to get the job done well are anything but being simplistic. (That's why some rather smart people are willing to pay good money for quality software and so too, quality programmers. By the sweat of your brow, shall you eat bread. [Of course, don't underestimate the quality of good open source software, starting with Linux and things like Open Office or Libre Office, Blender, Inkscape, Gimp etc.])
So, it's no surprise that debugging is a key (and often underestimated) part of programming. A part that, too often, is not well taught, but is part of making a good job of it.
Then, we have the old lie: it's not a bug, it's a feature. (Translated, we did not get the concept, capabilities, quirks or interface quite right and have to make the best of what we have, warts and all. Or, we kept adding new last minute features and caused all sorts of hard to patch trouble. Or, the like.)
A root of this: haste makes waste, especially bugs. But, there is usually heavy pressure to get it done last week, and so, too often, many a version 1.0 is really a late beta test pushed out to customers. [It can be argued, that happened with some of the first s/360 computers in 1965 -- in fact, IBM promised delivery dates on things that had not yet been invented and in which lurked the now infamous unknown unknowns.] And in a world with hackers eager to exploit vulnerabilities, regular "updates" are an annoying fact of life.
Yet worse, if there are subtle interactions in a process, fixing one bug may unmask or even create others. (Part of why, "let sleeping dogs lie" has a point. On the other hand, if circumstances change, what was once good enough code can turn into bugs . . . as, happened with the ESA's Ariane 4 and Ariane 5 Rockets. [US$ 7 billion kaboom, bug story just below.] That is one reason to tightly restrict and control coupling between modules of code, one reason for structured or object oriented programming. Tangled, spaghetti code is bad news. And it is far more common than many will admit. Now, too, you know why updating software X can break compatibility with software Y. However, to balance let sleeping dogs lie, software publishers have to fight to keep one step ahead of hackers hunting vulnerabilities to exploit to wreak havoc for sick fun or criminal profit. Try to find a judicious balance, and no, hitting the bottle doesn't help.)
So, yes, coding is sometimes a drudgery that has to be kept going through sheer methodical discipline, guts, confidence and professionalism.
Yes, coding interfaces are generally heavy on text. Where, Unified Modelling Language [UML] diagrams and charts are a technical study in themselves, complete with the usual "fat book" of documentation that keeps getting updated by a standards committee.
Yes, it's time to get real: to get the job done right, one often has to read, learn, memorise and understand often quite boring text and logic of process, structure, quantity. There is a reason why the IBM S/360's architecture was built around the logic of input, process output, I-P-O, with buses to carry coded information between units. That logic shapes coding, indeed an old and still very good design tool is the HIPO Chart, a form of "work breakdown structure":
![]() |
| A Hierarchical, Input, Process, Output [HIPO] Chart, a work breakdown structure. It is also sensible to ponder the logic/flow of a computational, IPO-based process (which includes storage, data types and data structures). Including, the user interface and interaction. E.g., [a] initialise the system to a known ready-to-go state. [b] Set up and accept relevant first and onward inputs (e.g. using a main menu or user interaction window), [c] store their data shadows (so, tracking their activities), [d] process through step by step procedures (aka algorithms), [e] call sub-processes to assist (so, repeat the IPO breakdown process for these "subroutines" . . . ), [f] store intermediate results, [g] get and store final results, [h] generate outputs, to further interact with the user. Exit (normal/emergency). We must also [i] handle emergencies, etc. This then helps us to [j] identify functional modules and to [k] be confident we understand what needs to be done to successfully, safely process the relevant information. If you get that right, properly code and compile it, marrying it to the right, reliable hardware, it SHOULD work, strictly, from the first test. Never heard of a case, to err is human and the gap is explained by bugs. So, to debug, the key is to 1: understand the should vs the actual, 2: demonstrate the fault so you know what makes it pop up, 3: listing suitable candidate bugs (and likely locations). Then, 4: eliminate candidates one by one, to 5: find, locate and fix. Much easier said than done, especially with intermittent defects that pop up now then go away, only to come back. (Is there something that marginally performs but can get pushed over into failure and then recover temporarily? E.g. is there some sort of memory overload or register overflow as happened with Ariane 5?) Thankfully, there now are powerful software and hardware tools to assist in debugging, some free for download. |
The top level process can also be examined in terms of its context, levels 1 and 2 just above. Such will help us to better understand the hierarchy of I-P-O (and supportive interfacing, maintenance, test and emergency) operations that are needed:
For example:
![]() |
| Notice, how a detailed flowchart shows how each "pane" for a module interacts with the others |
In a "simpler" approach (note, how each IPO block is numerically coded):
The HIPO chart/framework also points to the issue of use cases, interactions and various or alternative services to be provided by the computer system. This implies also, determination of what kind of user and what interaction is desired, thus data, input and output patterns and processing. The Unified Modelling Language [UML] Use Case Diagram helps to discuss and identify what is needed, also hinting at the flow of I-P-O interaction and especially interfacing requirements. Here, a restaurant use case is a simple, fair education use example:
Another UML diagram illustrates the encapsulated structure of an object, so it helps us understand how software actors on a stage (and then viewed through a software window) interact . . .
. . . which, reveals that the "actors" and modules we have been dealing with are -- tada! -- objects.
To see how the sequence of interactions of such objects and passed messages play out (with changes of state shown by attributes), we may lay out a UML Sequence Diagram. In such a "swimming lanes" diagram, each object has a dotted in life line that fattens into a box as it is activated. Each lifeline, obviously, stays in its own swim lane, just as we see at the Olympics. Messages are passed and received as arrows and the functions/behaviours of each object are carried out by its methods. For a toy example, prepared using MS Word:
(Obviously, this resembles a famous type of project management diagram, the Gantt chart.)
We could go on to elaborate more and more charts, but that is too much, especially at this catch-the-flavour level. Let's just refresh memories by showing one of the oldest, the flow chart, here in structured form. Many a project has been created by using just this chart or its close equivalents to guide coding -- and in a world of objects, this is a way to understand how the methods for each object work:
![]() |
| Structured programming was a 1960's breakthrough that can -- yes, even now, CAN -- solve the "spaghetti code" challenge: complex, tangled, interwoven code that is hard to figure out, debug or maintain. The Go To instruction was a poster child for unstructured code, though it has advocates to this day. Notice, especially the three main structures: sequence, if/else selection, loops, with single entry and exit points, thus creating modularity. (The case or switch structure is in effect a ladder of if/then decision nodes, built into high level languages like Java.) The structured programming theorem asserts, that if a function is computable, it can be solved through sequence, conditional branching and loop control structures; of course, we need to also understand the overall IPO task, using HIPO etc, so we know what we are trying to do, how and why. This approach was revolutionary, in the 1960's; it is now baked in into modern programming languages. A nice video overview, is here, a famous programmer discusses, here. |
- execute statements in succession, where each statement ends in a semicolon [;] . . . a characteristic of the C computer language family. (And, yes, Kotlin, a "Java family" language Google now favours for Android app development, is thus C family.)
- Blocks of statements are set between curly brackets { . . . block . . .}, another C family pattern.
- There is provision for various branching control structures: conditionals, if, if else, else if, and switch (that is, the case "ladder" of if/thens).
- Following the C language's pattern, there are for loops [fixed count], for each loops [that scan across members of arrays], also
- while loops [entry control -- test first then do if a condition is so and loop back to the test]; and as well
- do . . . while [exit control] loops. (This last, means: do at least once then test, i.e. structurally it is actually "do_until." Let's look at the Break loop chart and work through the "null" exercise, to build understanding.)
- Other languages -- of course -- differ.
![]() |
| Here, we see a more exotic loop, one that superposes do while [entry controlled, test first] and do until [exit controlled . . . i.e. do at least once] loops. If the DWF block is null, it becomes do until, and if the DUT block is null, break becomes do while. The break structure would set up a condition through DUT, then test and if T, exit. If false, it proceeds to DWF, then does DUT again and retests. This continues until T, then it exits. A possible use would be set up an is-it-unsafe-to-proceed condition, test, then proceed to normal processing [DWF]. If T trips, it exits; e.g. in a plant control loop. Another would be, test-if-within-an-error-bound, e. If not, proceed with a calculation, until it converges. On p. 14, we find: "Break. In this case, you have a loop that is repeated indefinitely until some condition tested somewhere in the middle of the loop (and possibly tested in more than one place) becomes true. At that point you wish to exit the loop and proceed with what comes after it." It is regarded as unwise to have do forever loops, unless there is a very good reason for it, including those with break structures. (NB: It is worth noting, that there is a related, CONTINUE structure, in which the loop has a test that allows skipping a particular iteration in a loop (e.g. for-next) but continues with the next iteration as usual. This can for example: print numbers from 1 to 5 but skip 3. Similarly, we could skip even numbers, printing only odd ones.) |
One of the most fundamental differences between programs developed for embedded systems and those written for other computer platforms is that the embedded programs almost always have an infinite loop. Typically, this loop surrounds a significant part of the program's functionality . . . The infinite loop is necessary because the embedded software's job is never done. It is intended to be run until either the world comes to an end or the board is reset, whichever happens first. [Programming Embedded Systems, O'Reilly, 2nd Edition, 2006, p. 51. (NB: We may see, here, that infinite loops are also used for operating systems, servers and even games; all of which exit "manually." For more on loops and conditionals as well as basic flow chart elements, cf. here. Further details on flow charts are here, and wider applications are here. Flowcharts used to be used for computerised systems analysis and development. See IBM's primer, here.)]
ChatGPT 5, has kindly provided a pseudocode map, on being prompted with the above chart (and yes, it includes the infamous "goto" marking do 'forever'):
START
LOOP:
DO UNTIL T_BLOCK
(execute some steps that may satisfy condition T)
IF (BREAK CONDITION == TRUE) THEN
EXIT LOOP
DO WHILE F_BLOCK
(execute some steps while condition F holds)
GOTO LOOP
END
This, was then rendered into a Java outline program:
import java.util.Random;
public class BreakLoopExample {
public static void main(String[] args) {
Random rand = new Random();
while (true) {
// DO UNTIL T BLOCK
int number = rand.nextInt(10) + 1;
System.out.println("Generated: " + number);
// BREAK condition
if (number == 7) { // T condition met
System.out.println("Condition met, exiting loop.");
break;
}
// DO WHILE F BLOCK
System.out.println("Still searching...");
}
}
}
A related structured programming tool is the Nassi-Schneiderman box diagram chart, which (unlike flow charts . . . which came into use before the structured programming revolution) builds in the four main process control patterns:
(Of course, Scratch and other similar block style programming languages are based on NS charts.)
Planning tools such as flow or HIPO charts, swim lane sequence diagrams, or NS diagrams, etc. can help us visualise the process logic of the relatively small software projects we will do. Commercial, enterprise development may come later and requires a much more methodical, structured, team based "Software Engineering" and/or "agile" approach. That approach will be established by organisational policy. If that is overly rigid, you may be able to use a PowerPoint or similar presentation and/or chart to create a wee bit of wiggle room; but, official documentation must follow corporate standards. Or, you get fired, for cause.
Fair warning.
Next fair warning:
SOFTWARE IS EXACTING: A computer will do exactly what you tell it to, not what you meant or hoped. That's why the resulting source code text [e.g. in Java or FORTRAN] and I-P-O process logic for a software system can be so exacting that -- famous example -- early in the US Space Program, a missing 'hyphen' in the code once sent a rocket off-course that then had to be destroyed at T + 294.5 s in its flight to Venus. Yes, self-destruct was built into the rocket.
That is:
![]() |
| Ground based control for the Mariner 1, a host and target system. (HT: Scott Manley) |
![]() |
| The actual error, a missing over-bar (HT: Scott Manley) |
(More on Mariner 1 here. Video, here. More strictly, a parameter value R' should have been averaged/smoothed, R'-bar. The bar got left out. This was a case where the bug was in the specification for the code, and it was compounded by a hardware defect. Arthur C Clarke and others . . . for simplicity . . . called the bar-on-top a 'hyphen.' As in, the most expensive hyphen in history. NOTE: For convenience I am using the prime symbol ' instead of dot-on-top, i.e. a rate of change. Yes, it was actually R-dot-bar sub n, a complicated concept and symbol: [moving?] average of a particular rate of change that generated a noisy signal sent back to base to be processed in real time on a big iron computer, to send timely control signals out to the rocket. That is, R-dot is range rate, smoothed to reduce noise in a spherical coordinate system; position is (R = range, theta = azimuth, phi = elevation), the latter being angles relative to defined horizontal and vertical (or celestial sphere) axes and point of origin. And yes, this is how we get to the phrase "going ballistic" to mean losing guided control. Rumour has it, NASA's Math Department had had to sign off on the code specification and were all fired over this error. Who got fired/promoted is a crude and sometimes misleading indicator of where programming projects go wrong/right.)
In a more recent case, in 1996, "trying to cram a 64 bit floating point number into an unprotected 16 bit signed integer" led an ESA Ariane 5 rocket to veer off at 90 degrees to flight path, then boom." All because, somehow, the programmers "hadn’t written proper exception handlers into the code base [inherited from the successful Ariane 4]." Ten years of work and US$ 7 billion went up in smoke as aerodynamic forces tore the rocket apart, triggering self-destruct.
Which, worked as advertised.
[Details here, note: "the software attempted to stuff [a] 64-bit [floating point] variable [for horizontal bias, BH], which can represent billions of potential values, into a 16-bit integer, which can only represent 65,535 potential values . . . as the rocket’s velocity increased, [at T + 37 s] the 64-bit variable exceeded 65k, and became too large to fit in a 16-bit variable. It was at this point that the processor encountered an operand error, and populated the BH variable with a diagnostic value." No wonder it went off course. (NB: It can be argued that, onward Ariane 5 launches built on the loss, reducing the cost of the bug to the direct costs of the lost rocket plus the effort to fix it (~ US$ 370 million); but, at the point of the loss and until a fixable bug was found and reliably fixed, the whole cost to develop Ariane 5 was at stake -- part of the pressure that can be on those doing debugging, compare the "O-Ring" hardware challenges for the 1986 Space Shuttle Challenger disaster. After a second loss of vehicle accident, the Shuttles were retired.)]
To hammer the point home, in 1999, the Mars Climate Orbiter failed due to failure to convert "English" units to metric ones. NASA worked in metric units, its supplier in English ones.
[NB: This also brings to mind that there are two different miles (land and nautical), three different gallons (imperial, US/Wine and "dry"), with -- until unified in the 1930's through Swedish influence (the Johansson industrial gauge blocks) -- variations in the inch in common usage for English Units. Standards problems, reportedly, even led to an inadvertent "Australian inch" at the Lithgow factory for Lee Enfield Mark III SMLE rifles. Such diversity of seemingly the same standards has caused problems, including run out of fuel accidents, e.g. for a carrier delivery of fighters to Malta in the second world war. There is thus a reason for standardising on the metric system, in conflict with the inertia of an established system, though strictly there are now only a few countries that are not metric. Of course, the US is the leading non metric country. So, let us learn from a unit conversion rocket science disaster.]
As NASA reports on the Mars Climate Orbiter:
At 09:00:46 UT Sept. 23, 1999 [9 months into its mission], the orbiter began its Mars orbit insertion burn as planned. The spacecraft was scheduled to re-establish contact after passing behind Mars, but, unfortunately, no signals were received from the spacecraft . . . . the failure resulted from . . . commands from Earth being sent in English units (in this case, pound-seconds) without being converted into the metric standard (Newton-seconds).
The error caused the orbiter to miss its intended orbit . . . and to disintegrate due to atmospheric stresses.
Then, of course, there is the bug that seemingly vanished or was apparently grossly exaggerated: Y2K.
In fact, media hype notwithstanding, it wasn't -- it was mostly fixed in good time.
Back in the 50's to 60's, ferrite core memory may have cost $1/bit, $8,192 per kilobyte; yes, a kilobyte is actually 1,024 bits, two to the tenth power. At this rate, a Megabyte, 2^20, is over a million dollars: yes, $ 1,048,576. I know of a case where executives for a certain firm travelled across a continent to see million dollar, 1 Megabyte video memory on a board being used for early research on computer video -- compare, the once revolutionary Video Toaster, a 1990 breakthrough for video processing that sold for a few thousand dollars, then 1/10 the cost of standard studio equipment. As we saw, a punch card had 80 columns, to hold 80 characters, with some reserved for job control stuff; defining a line of code as significantly less than 80 characters. Including, providing "control" on cards (e.g. in case you dropped a deck and had to sort it in proper order by hand). So, using two rather than four digits for dates was a significant cost saving. By 1954, Bob Beamer was warning of potential consequences. But, it took to about 1994 for serious action to start. He had argued that as memory became cheaper a fix would have to be done in time for the dreaded 00 year. It may have cost US$ 300+ billions to fix the code, globally. The most expensive bug that wasn't. And yes, that is also a measure of how pervasive and valuable software has become.
We didn't see the lurid, dire consequences because it was mostly fixed. (For example, my old MS Office 97 copy that is still there on a CD somewhere had a Y2K problem with Outlook; I recently updated to Office 2003 . . . no "ribbon" for me! Besides, I mostly use Libre Office. IIRC, some traffic lights failed in Jamaica among a fair list of bugs across the world. Nor, are we finished with date bugs. As date and time are frequently used key data elements, that can become a root of difficulties.)
Yes, clearly, there is a skilled craft of coding that can only be built through diligent study and pains-taking, error-avoiding and correcting methodical practice.
Simply watching vids or the like (a common practice) does not solve the problem, though working through key case studies is a powerful way to master patterns of success. We must code for ourselves, starting with toy examples then working up to more complex exercises. Hello world is toy example No. 1.
Also, managing expectations of customers -- operators, supervisors, top decision makers -- can be a key to success, too: what is realistic or feasible, given state of the art, available resources, time constraints, etc?
increments of effort. A common enough Economics pattern.]
What can be postponed to the 2.0 version? What is "just not worth the extra cost/effort"? Why?
There is a broader, "Value for Money" approach that can help us make a Pareto 80/20 rule style decision:
![]() |
| SOURCE: GEM/TKI, 2016, cf. NASA Sys's Eng'g H/b, 2007, pp. 16 - 17. Note, "affordability" offers more flexibility than "cost," as a cost can be made more affordable by how it is financed and paid for across time. (Cf. Hire Purchase and Lease-To-Own. C might be our 80/20 point, and it may be worth the while to go to A. B would be for cases where high performance is needed at all costs.) |
Similarly, could we quickly, reliably solve a simpler, dummy or toy problem, then extend it to more and more complex cases until we solve the original problem?
All of that shapes our approach.
Guess what: learning first proficiency coding is an example of the 80/20 rule. That's why we will go for the first fast core here, starting with Hello World.
(Which, is a "toy problem" that we can build on step by step to solve much more complex problems. That's because many of the core principles of Java and -- more broadly -- of programming and digital productivity, lurk in Hello World. But of course, know your history to guide and guard your destiny. That's why we started with the 029 card punch machine, s/360 and other examples pregnant with lessons, some of which actually go far beyond coding. For example, why was IBM able to bet the farm like that, and why were outsiders willing to lend or invest in such a life/death roll of the dice? [Yes, dice (not die, the singular), as: two or more dice give a peaked distribution . . . the "average"/"typical"/ "likely" . . . with "better"/"worse" tails, whilst, one die is flat random, maximally uncertain. Hint: why did it become a saying that nobody got/gets fired for buying IBM? (Yes, too, a random process can give a peaked bell/upside down U distribution, there are J- and reverse J- and U- distributions, bimodal M-distributions, Sigmoid S- distributions, etc; the Beta Distribution model can give many of these shapes.)] )
And so . . .
[ GO TO STEP 2 ]
PART B: GETTING PRACTICAL WITH JAVA
STEP 2 --
Picking and using a Development Environment:
Why Visual Studio Code (and, why Java)
In light of our duly tamed expectations and understanding of the road we have travelled to get here, the immediate question for this course and beyond, is what IDE or "sub-IDE" should we use.
Obviously, something free and usable by "newbies" in an education context.
The main idea, is to build first proficiency in setting up a coding project, then designing, coding, keying in, testing, debugging, completing, saving and running a program. Nowadays, the consensus of programmers is that the days of using a bare text editor -- such as the MS Notepad distributed with Windows -- are long since over. Just as we use integrated Office Suites in preference, IDE's are now preferred for programming.
When work began on this course, a good balance was DrJava. However, Java has had a shift in licence and DrJava is not well suited to the latest versions. Let us cite from Source Forge on the 2019 beta adapted to JDK 8:
DrJava now includes an OpenJDK 8 compiler which should work if DrJava is run with any Java 8 JRE/JDK . . . . Note: compatibility with Java versions prior to Java 8 has been dropped. Newer versions of Java (9, 10, 11, 12) are not supported because they use an incompatible format for Java distributions. We may release a version of DrJava in the future that supports the new Java distribution format. [--> BTW, Oracle will support Java 8 for personal use, indefinitely.]
Regrettably, not yet there.
Eclipse and Netbeans are a bit of overkill at this level. BlueJ is educational and a good IDE. Visual Studio Code [the "sub-IDE"] is one of the most popular and is free for download. So, in absence of the hoped for DrJava upgrade, we go with it. Not least, as we have already used it with Python, Microsoft's "sub-IDE."
Visual Studio Code, gets the nod as main editing tool. (It also seems to be quite popular.)
Onward, we should look at how to set up a package and distribute a working program.
![]() |
| A view on why Java, by Rob Pike |
Oh, yes, as to why Java; duly noting, that THERE IS NO PERFECT FIRST "HIGH-LEVEL" LANGUAGE.
Yes, every candidate has pros and cons.
- for 20+ years Java has been No. 1 on the TIOBE index for most of the time, and
- it is currently one of the "neck and neck" top three, Python, C [or another C-family], Java.
- C of course is a language with serious pitfalls, and Java is a grandchild of C: C --> C++ --> Java, one that tames key pitfalls such as C's pointers . . .
- where, if you need to go to C, Java is a good place to start from.
- For most things, including embedded systems, you won't need to. Where,
- Java family languages have long dominated the TIOBE top twenty (current count ~ 9 of 20). Never mind, of course . . .
- Python's steady climb to No. 1 (hence, our Python short unit, here) and the perennial appeal of JavaScript, or the surprising prominence of Scratch (for education) and even Fortran (for numerical modelling and AI).
- Of course, Python comes with a useful cluster of Math supplements, NumPy, SciPi, Matplotlib, Pandas, Sympy, plus specialized ballistics/physics toolkits. That's why ChatGPT5, c. Sept 10- 11, 2025, says "That means I can go from “rough model sketch” → “numerical fit” → “plots + tabulated output” in one pass, interactively."
- ChatGPT5, tellingly, further points out, however: "Even in AI/ML, where Python dominates the interface, the heavy lifting is in C/C++ backends (NumPy, PyTorch, TensorFlow). Python is the “front end,” but the engine is C-family." Due balance.
- Also, it notes: "Python is close to pseudocode — a student or colleague can glance at it and see the physical structure of the model . . . in a workshop or class setting, Python is “just right” — easy to read/write, flexible, and very well tooled for numerics and visualization."
- Where, "Many domains (games, simulations, finance, real-time systems, scientific computing) require deterministic, compiled performance. C-family languages hit a sweet spot of speed, tooling, and familiarity."
- Moreover, "IDEs, debuggers, build systems, static analysis tools, etc. for C-family languages are robust and mature." No wonder, then, "Enterprises value that ecosystem stability."
- So, we see: "Python broke into the top tier because of its ease of use + massive scientific/data/AI ecosystem.
But note: its rise hasn’t displaced the C-family — it’s complemented
it. In many stacks, Python orchestrates workflows while C-family code
executes the heavy bits."
- As a "short answer," "C-family languages persist at the top because they underpin the world’s operating systems, enterprise infrastructure, and performance-critical code. Python is the big exception because it maximized accessibility and ecosystems in the one domain (AI/data/science) that exploded in global importance."
- This of course points to the rise of a generation-dominating general purpose . . . here, informational . . . technology that is already beginning to be economically and socially further transformational -- hence, the lingering ghosts of Kondratiev and Schumpeter. With, all that such implies about uncertainty and need for sound, ethically strongly rooted governance: how are big decisions going to be prudently made and justly made to stick, unless we have a well-informed, morally sound, widely and deeply educated public?
- On a historical note, "Fortran and Pascal once had a shot at being “general purpose” dominators, but they became too specialized (Fortran = scientific HPC, Pascal = teaching/Delphi niche). They never had the breadth of application domains that the C family secured."
- That context indeed makes Python useful for an introductory workshop or one-shot course; hence, Unit P and Unit R. But, here, we are not going for once over lightly, we aim for the kind of structured computer science and computational insight built into the C family, for which Java is an excellent entry point.
- Java also puts the computational context "scaffolding" for the code on display, while Python tends to hide it;
- part of, Python is the new Basic . . . a 1960's educational simplification of Fortran created by Dartmouth University that was once a dominant language for coding.
Java is faster than Python, while being safer than C.
[T]he fundamental intention of this language is different from all the other languages I have seen.Programming is about managing complexity: the complexity of the problem you want to solve, laid upon the complexity of the machine in which it is solved. Because of this complexity, most of our programming projects fail. And yet, of all the programming languages of which I am aware, none of them have gone all-out and decided that their main design goal would be to conquer the complexity of developing and maintaining programs [F/N1].
[F/N1: "I take this back on the 2nd edition: I believe that the Python language comes closest to doing exactly that. See www.Python.org."]
Of course, many language design decisions were made with complexity in mind, but at some point there were always some other issues that were considered essential to be added into the mix. Inevitably, those other issues are what cause programmers to eventually “hit the wall” with that language. For example, C++ had to be backwards-compatible with C (to allow easy migration for C programmers), as well as | efficient. Those are both very useful goals and account for much of the success of C++, but they also expose extra complexity that prevents some projects from being finished (certainly, you can blame programmers and management, but if a language can help by catching your mistakes, why shouldn’t it?). As another example, Visual Basic (VB) was tied to BASIC, which wasn’t really designed to be an extensible language, so all the extensions piled upon VB have produced some truly horrible and unmaintainable syntax . . . .
What has impressed me most as I have come to understand Java is what seems like an unflinching goal of reducing complexity for the programmer. As if to say “we don’t care about anything except reducing the time and difficulty of producing robust code.” . . . It goes on to wrap all the complex tasks that have become important, such as multithreading and network programming, in language features or libraries that can at times make those tasks trivial. And finally, it tackles some really big complexity problems: cross-platform programs, dynamic code changes, and even security, each of which can fit on your complexity spectrum anywhere from “impediment” to “show-stopper.” So despite the performance problems we’ve seen, the promise of Java is tremendous: it can make us significantly more productive programmers. [Thinking in Java, 2nd Edn (2000), pp. 1 - 2.]
Why Use Java?
- Java works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)
- It is one of the most popular programming languages in the world
- It has a large demand in the current job market
- It is easy to learn and simple to use
- It is open-source and free
- It is secure, fast and powerful
- It has huge community support (tens of millions of developers)
- Java is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs
- As Java is close to C++ and C#, it makes it easy for programmers to switch to Java or vice versa
Programs written in Java have a reputation for being slower and requiring more memory than those written in C++.[50][51] However, Java programs' execution speed improved significantly with the introduction of just-in-time compilation in 1997/1998 for Java 1.1,[52] the addition of language features supporting better code analysis (such as inner classes, the StringBuilder class, optional assertions, etc.), and optimizations in the Java virtual machine, such as HotSpot becoming Sun's default JVM in 2000. With Java 1.5, the performance was improved with the addition of thejava.util.concurrentpackage, including lock-free implementations of the ConcurrentMaps and other multi-core collections, and it was improved further with Java 1.6.
PART B CONT'D:
STEP 3 --
Setting up Java on Visual Studio Code (VSC):
Development Environment, and
Opening the Hello World Gate to Programming
As we saw for our "sneak preview" Step H above, while, most often Java will already be set up on Visual Studio Code (VSC), we need to know how to begin by setting it up. If we do it right, eventually we will be able to see a familiar first program in VSC livery:
We already compared a Python 3 Hello World:
print("Hello, World!")
From Java 21 on, Java, too, has allowed us to "simplify":
HelloWorld.Javavoid main() {System.out.println("Hello, World!");
}
Looks "simpler," and deliberately so. Useful, but that comes at a cost: loss of context. For example, here is how we can mark up a traditional hello world:
![]() |
| Marking up, see further details at GfG. |
There is a lot going on under the bonnet.
![]() |
| An Arctic Ocean Iceberg, showing the bluish underwater mass (HT: Wiki& AWeith, FUE) |
Here is a comparable, annotated case for Kotlin, so we can see the underlying structure and what "simplification" puts into the invisible background, behind the curtain:
However, there is more, we need a functional working environment. To get there, we must first install VSC and a Java Development Kit [JDK], perhaps with some extensions.
Obviously, a lot of groundwork has to be in place for us to set up, key in and run a simple Hello World.
But once we can do so, it means that a lot has been set up correctly with our system and is validated as working. That eliminates many potential sources of bugs.
Speaking of bugs, here is the duly preserved original bug:
![]() |
| The original bug. Notice, Dr Hopper's careful, timelined log of debugging and testing -- excellent practice for us to follow. (NB: Strictly, this was an intermittent hardware defect, likely identified through the point in execution sequence where failure occurred. Soft-/Hard- ware "partitioning" and which side an error is on can be a significant challenge when hard and soft aspects are being jointly developed. Toy examples and known dummy data can help test each aspect independent of the other. The advantage is known toy or dummy data will lead to a first level confidence in functionality. Thus, Hello World, for instance. As, a lot has to be right for a Hello World to work. Each unit or module (hard/soft) should be tested, and tested for interface compatibility. Dummies or emulators can then be replaced by the live, reasonably trusted units, one by one. Eventually, there will be reasonable confidence in the performance, reliability and robustness of the whole integrated system. However, subtler bugs may still lurk. Try an introduction here and more details here.) |
Summarising debugging, for convenience:
(Useful vids, here on debugging (yes, JavaScript based, but on VSC), here on hardware issues and troubleshooting. A mini lecture is here. Yes, too, software and hardware issues may be involved. Usually, if you have a working PC, software is the more likely side, but if you are developing something new, hardware trouble can be at least as likely.)
On the Hardware side, troubleshooting follows the process logic to spot where a signal first goes wrong:
Yes, Hello World is a key diagnostic that can give us confidence.
Here is Hermann Hauser, a co-founder of Acorn Computers of the UK and one of the creators of the ARM . . . Acorn [then, "Advanced"] RISC Machine . . . processor originally developed by Acorn for its Archimedes Computer:
It was one of the most exciting and satisfying events in my life when the ARM chip came back from the Foundry, and I bought two bottles of champagne in to celebrate. We plugged the ARM in the Development System [on 26 April 1985] and of course it didn't work. So, this was a great disappointment; but two hours later they called me back into the R & D Department and told me that it now works. So, within two hours they managed to debug a completely new chip and it actually said, "Hello World, I'm an ARM." Which, meant that the ARM worked, the circuit board that they had constructed worked, that the software that they had written for a processor that didn't exist until then worked and put up the note that, ah, "Hello World, I'm an ARM." So then, we opened the bottles of Champagne and we had a very good time. [2:30 - 3:23 at YouTube, here. (NB: Acorn was also the manufacturer of the original BBC Microcomputer in the early 1980's. "RISC" means, reduced instruction set architecture, a design approach in which "a central processing unit (CPU) implements the processor design principle of simplified instructions that can do less but can execute more rapidly. The result is improved performance." For example, the ARM only has LOAD/STORE operations to access the general memory space, and uses a large set of processor registers to do its processing. The ARM architecture microprocessor is now the commonest in the world, 100+ billion and counting. It is used in many smart phones and in the Raspberry Pi education computer.)]
So, the seemingly trivial Hello World is often a key first step to much bigger things.
Do not despise the day of small beginnings.
But, build on it.
Here, is a real-world case of debugging/troubleshooting, of a Computer Numerical Control [CNC] lathe:
(For this case, much of the actual trouble was broken and/or badly patched hardware, but key clues came from software interfacing reports. This should help rivet home how important it is to put emergency/fail reports into software.)
Now, back to the "Hello, World" gate . . .
[ GO TO STEP 4 ]
PART C: STEPPING THROUGH THE "HELLO, WORLD" GATE
STEP 4 --
Some practice examples:
"Simple" cases on what we can do with Java, how . . .
Stepping through the "Hello, World" Gate to Programming
Hello World is a first program, one that tells us our system is correctly set up and able to operate. It is also a case of processing s-t-r-i-n-g-s, the first data structure we have met. That is, a chain of symbols or characters that are manipulated as one entity. Where, a useful first definition of programming is, the coding of algorithms that input, store, interpret, process and output data in standardised structures. For, the computer has no common sense of its own, it is programmed to recognise patterns as meaning instructions, data, numbers etc, then mechanically processes in the CPU then outputs as appropriate.
Yes, I-P-O again.
Yes, too, it is the programmer's responsibility to set up the correct data in agreed structures, then ensure proper processing and output. The smarts in the computer are the canned smarts of the programmer.
So, now, our second exercise from the sneak preview above is about helping us to do some string processing [a lot of real world programming and document processing work is about strings], based on a typical example:
Here is the output:
Hello World
hello
Java String Example
Of course, as we saw:
- This goes beyond a simple Hello World, first by creating a string and labelling it str
- Observe, one-line comment // [comment], and how it explains and documents what is being done
- There is also a multi-line comment defined in Java, opening /* and after lines closing */
- Comments help the reader, they are not compiled, interpreted or executed by the computer
- Next, an array of characters is created, letters for hello: h, e, l, l, o, to be converted into a new string str2
- Creation is by declaration, e.g. String str = "Hello World"; where the RHS content is fed into the declared string variable str on the LHS
- In effect this extends the old Fortran standard where a variable is a memory location or block of memory locations and the RHS of the = sign assigns a value to be stored there
- Yes, this is quite different from standard mathematical usage, we can have things like n = n + 1, meaning, increment n to n + 1 and store it in variable n as its new value
- Notice, next how the "new" keyword is used to introduce conversion from the already declared character array arrch[] to the new string, str2: String str2 = new String (arrch);
- keywords are reserved, e.g. they cannot be used to label variables, methods, classes, or any other identifiers
- The "new" keyword is used a second time to create the third string, labelled str3
- println is used three times to print the strings to the VSC console
- this too is explained
- Notice, the more modern style of indenting and using double brackets [aka curly braces] to mark blocks of code -- observe the grey bars joining corresponding { and }
- These are colour coded by VSC
- Every line of code is terminated with a semicolon, as in ;
- We have saved the file as [name].java marking this as a source file
- Notice the use of the {} as in effect vice or pliers jaws that grip the content enclosed
- This is a key pattern in Java and other modern languages [structure]() or {} or []
- HTML of course uses tags that are in angle brackets <tag> and </tag> to mark up text between those jaws
- oftentimes, the nonsense word foo is used to stand in for particular content
- Here we see how even a program exhibits data in structures
- Notice, the program is built up using s-t-r-i-n-g-s of alphanumeric = alphabetic + numeric + special characters, where Java uses the newer, much broader code standard, Unicode -- which has ASCII as a subset
- The overall program structure is: public class StringDemo {}
- This embraces the program's main -- and only -- method public static void main (String args[]) {}
Now, again, the main reserved Java keywords are:
Let's do a slight modification, string concatenation using the addition operator:
Here, we added System.out.println ("Hello, " + "Sue!") in line 18; . . . notice the space after the comma, and the new result is:
Hello World
hello
Hello, Sue!
Java String Example
If we left out the space after the comma, what would have happened, why? Try it and see, then restore the space.
This little exercise is, of course, also an exercise in how coding is often done: modifying an existing, working program. We also did a small exercise in debugging, leaving out a space would be a small, fairly innocuous bug. (Let us never forget, the most expensive "hyphen" ever. That one was small but devastating.)
Concatenation of strings is useful, and we can get Java to also print a variable, such as a user name provided in response to a request. Thus, the computer can seem to converse with the user. There is much more if you need it, here is a video for reference.
Now, similarly, computing draws its very name from "to compute," that is to process numbers by doing calculations. Often these may be quite complex calculations (e.g. for science or engineering), or if fairly simple -- e.g. payrolls or bills -- may have to be done so many times that the task is best automated. Java has a Math Class, part of the core language, which does not need to be explicitly invoked.
Let us refresh our memory, with a fairly simple set of calculations:
When run, the results were:
Addition of a and b is 5.0
Difference of b and a is 1.0
Product of a and b is 6.0
Division of c by a gives 3.0
Raising b to the ath power gives 9.0
Raising c to the bth power gives 216.0
Likewise, we can now do a second slightly more complex demonstration (HT: Know Program):
Results, as expected:
3.141592653589793
2.718281828459045
8.0
2.718281828459045
1.0
8.0
4.0
20
10
-20
With these two exercises we can see how Java mathematics can be carried out:
- We use the main method to carry out the processing
- In the first exercise, the variables were all defined as double precision floating point, using double
- In effect, this is a sophisticated form of scientific notation, using binary digits, similar to say 6.023 * 10^23, the number of molecules in a mole of a given substance
- We can also define integers and float, single precision floating point values that have a smaller range (More details, for when you need it)
- Oddly, you can also use scientific notation to specify a double or float, e.g. double d1 = 16E24
- We saw the four rules and taking a given power of a number, familiar from primary and secondary school
- In the next exercise, we instructed Java Math to state Pi and the Euler number, more commonly known as e, just "Eee." We got these to fifteen decimal places
- Next, we saw power, exponent and log base 10
- After that, square root and cube root
- Then, absolute value (of a negative number |-20|), and maximum and minimum values of a range of numbers
- Math can do far more, including trigonometry etc.
CCCCCCCCC
Then, programs are able to make decisions based on test conditions, so they carry out alternative sets of operations. This is branching, let us try a simple if-else case:
The result for x = 54 is:
We have tested x relative to 20 and 54 is at least 20, the else condition
Notice, we have used a simple print, it does not force a new line after printing. Try some other integer values for x, maybe 9, -9, 21, 19. Change the value, save the modified code -- that's important -- then run. For example:
We have tested x relative to 20 and 9 is strictly less than 20
Try now a non integer value, e.g. I tried - 9.8. You will get a bug report from VSC, I got:
Type mismatch: cannot convert from double to int . . . [Ln 6, Col 15]
(This was underlined in the code, in the familiar bright red zigzag)
Of course, more sophisticated code would use Java's test and emergency handler, try-catch, which obviously is another if-then decision structure. Notice Pressman's adjusted I-P-O framework above for test and emergency handling. Onward, VSC nagged me to correct this error once I saved the code in that state of disgrace.
![]() |
| Jor-El speaks, Kal-El is Superman's true name |
Just to match the Raspberry Pi Programming Gateway unit Python example, let's do a log in for one certain Kal-El son of Jor-El, aka Clark Kent, aka Superman.
Maybe, at the entrance to the Fortress of Solitude.
And yes, this is the larval stage of a more sophisticated password entry system:
A first result is:
Enter username
Jan
Username is: Jan
You are not permitted to proceed, Jan
A second, successful, result is:
Enter username
Kal-El
Username is: Kal-El
Welcome to the Fortress of Solitude, Kal-El
We can make some notes, as this toy example helps us to further build our ability to use Java:
- Scanner helps us take in an input and assign it to here a string variable, userName
- There is an echo to the user (and a more sophisticated program would allow correction or confirmation)
- We now apply an if-else . . . and notice, as Java is Case-Sensitive, If and Else would not do
- Here, a comparison uses foo.equals(anObject: "Kal-El") not the double equals == which would have a different effect
- That is, we here want to compare two strings of alphanumeric characters, to see if they are the same as strings of characters so Jan is not equal to Kal-El, and kal-el is not equal either
- If not, there is a lock out response, if so, there is a welcome
- That is, we here see a larval form of a password entry system, which would call for actual actions, maybe opening a lock or the like
- Alex Lee brings in basic SWING Graphical User Interface [GUI] elements here, for the next half step up on such password entry systems. (Obviously, that also suggests other ways to input information and display in a window.)
Branches, of course, can be turned into loops, such as:
This gives as a result:
1
2
3
4
5
Where j++ means, increment variable j by one. Such loops, of course can also be run while a tested condition holds or until it holds, not just for a given, specified count such as one to five as above. Code can also force the loop to be done once at least.
Loops, obviously, can be nested. For this, we will also insert a try catch, using an old example from Unit F, updated to litreGallon.java with litres converted to US Gallons [try, 4.54609 litres/Imp. Gallon too] -- and this is live code not an image:
Result, for 43 entered:
Hello, world!
Enter a 'reasonable' NUMERICAL value of tank capacity, c,
in litres and press the 'Enter' key:
43
You entered tank readable capacity 43.0 litres.
The first loop took 12 iterations.
The second loop took 4 iterations.
The third loop took 6 iterations.
Tank capacity is (or is just over) 11.349999999999998 U.S. gallons
Notice, how the double precision, floating point value is given to fifteen decimal digits. If we step back one from the loop counts we get 11.35 gallons, and a calculator value is 11.3594 gallons. We here see how the one step below works, and how the double precision binary value converts to decimals with a little wiggle room. If that is not done right in cases where there are many calculations, rounding errors etc can lead to gross error. (Java has a Strict Math facility for when values must match pretty exactly. [See here on Math Class and if you need it here on Strict Math. Remember, Java is a professional practitioner's language, not a simplified educational language.])
Further, we may consider some basic graphics programming:
(A basic course is here.)
With these simple cases, we have seen how to carry out several key processes.
[ GO TO STEP 5 ]
PART D: MOVING ONWARD
STEP 5 --
Packages (also, Modules) and Applications
So far, our focus for this unit has been on methods and ABC basics, the "nuts and bolts" of how information is processed. We have seen how to use Java's magic incantations that set up a program, then how to create methods starting from a Hello World case. And we have seen how to save such a project, open it up using VSC, run it, adjust it and so forth.
For a lot of first level coding and learning how programming works, that's a good start.
But, there is more, there will be stuff later on object oriented programming -- what the magic words like "public static void main(String args []){ . . . }" are about -- and on multiple paradigms [Unit 2], then cases on how to tackle programming projects [Unit 3], etc. Where also, we need to be aware at first basic level, of higher order structures such as packages -- and since Java 9, modules -- and how to set up Java Applications (also, projects . . . creating a program is a project).
To these, we now turn.
Let us consider something familiar, a personal, locked filing cabinet for one's office; say one with drawers and hanging pockets, file shelves, file trays [especially, in, out and pending], file boxes, possibly a rolodex, labels, hole punched files with treasury tags run through them to retain in their manila folder, perhaps even ring bound folders with indexing tabs.The lock sets apart secured files only to be used by the specifically authorised. General control on access to one's office is a lower level of access control. There might even be an armoured safe, with tighter control, or even an off site bank vault. Organisation, labelling, indexing of files etc allow for finding files kept under the rule, a place for everything, and everything in its place.
Of course, this pattern of handling paper based files was naturally extended to computers.
So, we talk about computer desktops, files, folders etc, we have lists of folder contents and we do file searches etc.
That is, data is stored in files and organised frameworks forming an information base for our work. Access is enabled through a proper system of indexed, labelled searchable content, and for security, there are differing degrees of access.
Now, match this to Java's object oriented approach where objects interact on a software stage by passing messages back and forth, with methods to handle interfacing and processing, and of course the user has his or her own data shadow on the software stage. We then have classes which are the blueprints for objects to act on the software stage.Packages and modules extend this framework, and have been introduced as Java has grown over the years.
As we can see, an object (so, too the class, its blueprint) has a name, a shell of methods and a set of internal data. Some of the methods allow messages to come in and go out.
Packages can be seen as file folders that hold groups of related classes and other associated things. Such as, interfaces, enumerations and annotations. Just like manila folders, they can be nested so we have also sub-packages inside a package.
When we code a class, we can import relevant packages, and of course one package's classes can call other packages in a similar way.
Packages, of course, were promptly used in Java Language itself.
And, we can "roll our own," user defined packages.
Indeed, when one codes something like a Hello World and does not specify a package, it is assigned to a default package -- sort of like running a current work manila file folder that one puts everything one is doing just now into. Or, a file box -- or even a shoe box [paint it or cover it with fancy paper].
(NB: At least, one will know where to look to find current information! Then, when one passes to a new or different file, it would help to keep a record of that. Of course, in a sub folder kept in the current work file folder, which should also hold one's work diary/ journal/ log. Information accounting and book keeping are just as important as what we do for money. I would go so far as to say that a modern business has two general yardsticks that can measure anything it does, money and information. They are equally valuable.)
Rolling our own package, allows us to take control of the packaging feature.
Going up another level, since Java SE version 9, Java has added modules -- following our analogy, these would be file drawers. Indeed, Java itself was modularised, so that we see that the built in libraries of resources are now modules. (The just linked, gives the current list, as of Java 19; yes, too, they have been updating versions quite regularly over the past several years.)
Modules were introduced in 2017, after twelve years of development. As Paul Dietel summarises:
. . . [a module is] a uniquely named, reusable group of related packages, as well as resources (such as images and XML files) and a module descriptor specifying
- the module’s name
- the module’s dependencies (that is, other modules this module depends on)
- the packages it explicitly makes available to other modules (all other packages in the module are implicitly unavailable to other modules)
- the services it offers
- the services it consumes
- to what other modules it allows reflection
Part of the challenge was that packages were not foolproof, and some coders apparently accessed parts that were meant to be protected, so a more powerful encapsulation was needed. Notice, a module has a name, tells us what other modules it needs or uses, and if it does not explicitly make one of its contained packages available then that package is locked up. Yes, the default is, locked up. It also identifies services it offers or uses.
Thus, modularisation was meant to make Java more robust and better organised.
As an example of modularised Java, for Java 19, Math is now Class Math in Package java.lang, part of Module java.base. This means it is integrated fully into the core of the language. Where, java.base defines the foundational APIs of the Java Standard [Desktop] Edition (SE) Platform.
We save Java source code as Java -- [dot]java -- files, which are text files that can be opened in any text editor. These, of course, can be run in an IDE, as we have seen above. When a java file is compiled through a Java Compiler, it generates one or more class -- [dot]class -- files, which contain the byte codes executed by a Java Virtual Machine (JVM).
Getting a source code file to the point where it compiles cleanly, of course, is often a debugging challenge.
Byte codes, in principle can be executed by any computing device with a JVM.
In practice, that is not always so, as some . . . especially, Java 8 and beyond . . . JVMs have features not present in earlier versions of Java. Also, there may be hardware limitations.
We can obviously go beyond, say on a Windows OS PC, and create a machine specific executable -- [dot]exe -- file just as for programs written in any other language. This file will run on a PC, but is obviously non-transfer-able. The advantage is, such a file can readily be run by an "average" PC user. The jpackage tool in JDK's from JDK 16 on enables this. As the linked article based on a live test application shows, this is quite involved, so likely to require debugging. But at the end, you can build a double click and execute application for the average Windows user.
Of course, one always retains one's source code and project, if one is the programmer.
[ GO TO UNIT 2 ]
WHERE TO GO FROM HERE: Why, Unit 2 then Unit 3, and so forth, of course. (After all, this is the start point for the main body of a 4-year degree programme, lower division [Associate/ CAPE/ ADVANCED Level] first programming proficiency course meant to build first level digital productivity with understanding of computer science contexts and of some key typical challenges. It also has some gateway units meant to support basics of programming and multimedia authoring workshops, that start with a Raspberry Pi Unit that is for 7 - 11 year olds "of all ages".)







































































.svg.png)






































































