Bonum Certa Men Certa

A Look Back (and Forward) at Friendly Programming

Guest post by figosdev

Java



Summary: Historical perspective on computer languages and how to do better

I have stayed interested in friendly programming languages for decades now. My favourite language, fig, came from another language inspired by the way people talk to the computer on Star Trek. On the Enterprise, people create "programs" used in places such as the holodeck, though most of the lines from the show remind me more of search queries and similar parameters:



"Alexa, please stop spying on us."

"Unable to comply, authorisation from a CEO or higher is needed."

"Alexa, initiate self-destruct sequence, authorisation Bezos-Four-Seven-Alpha-Tango."

This could also be looked at as a command line sequence, with three parts:

1. [ So-called "Wakeup" Command ] 2. [ Initiate command | command parameters ] 3. [ Password syntax | parameter (the password itself) ]

In GNU Bash this might look something like:

# sudo systemctl selfdestruct Password: Bezos-Four-Seven-Alpha-Tango systemctl: self-destruct sequence unnecessary, Systemd already running

Most (not all) common and/or friendly programming languages have a simple convention of:

1. a command name 2. command parameters after the name 3. some symbol that goes between commands (or just a newline)

For example, to say "Hello, world" on the screen in Bash, Python, and BASIC:

echo "Hello, world" print "Hello, world" PRINT "Hello, world"

First comes the command, then the parameters-- the things you want the command to know or work with.

To the computer, this is all translated into instructions that can be expressed as a long numeric sequence. To simplify this a bit, you can think of the command to put text on the screen as a the number 8:

8 "hello, world"

Of course to the computer, there is no such thing as "put text on the screen." The screen shows the display buffer, the display buffer to the computer is a series of numeric locations, the real job of the computer is to copy certain numeric values to these locations. It doesn't matter whether you're listening to music or running an interactive online 3d simulation, the computer is just a glorified calculator moving numeric values around-- to and from numeric locations.

The job of a compiler author (especially the first of them) used to be to worry about getting simple instructions like "print" translated to these simpler numeric routines (simpler to the computer, more complicated to many of us.) Someone still has to worry about that, but most people don't. Thanks to decades of innovation, if you implement or create a conventional programming language, you will probably use another existing computer language to do so.

For example, CoffeeScript is implemented in (and has since influenced development of) JavaScript. JavaScript was originally written (implemented) in the C language. V8 is a JavaScript implementation in C++. These languages are in many ways easier to work with than the native, numeric "machine language" the computer actually uses.

The pioneer of compiled languages, Grace Hopper, taught university level mathematics-- yet still decided that computer languages would be more useful to a greater number of people if they were based on words, rather than "symbols."

This is a great boon to the general understanding of computing, because these "words" can perfectly abstract the computer hardware itself. How well can they do that? Alan Turing mathematically proved they can do so, but in more practical terms, an emulator program like Qemu that lets you run a second operating system in a window from a "host" operating system is better proof for most people. If we can teach more people to code, we will have more people who are happy to say they are computer literate. We must offer greater computer literacy to everyone, if we are going to make informed political decisions about life and liberty in the 21st century.

The history of the GUI is one of creating a clumsier, more vague language for certain tasks. A GUI is very useful for things that require pointing or drawing, and sometimes very useful for other tasks (such as managing term windows.) But just like when you try to use a hammer for every carpentry task, sometimes our workarounds for not using the command line are a cure worse than the disease. Teaching a GUI is closer to application training-- next year, Microsoft or Apple or IBM will move things around and you'll need to retrain again. You probably won't understand computing by poking at things on a menu. But you can, from learning just the basics of coding.

Believe it or not, the first code written by Linus Torvalds was not in C. His first program went more like this:

10 PRINT "Sara is the best" 20 GOTO 10

This example from the Basic programming language includes the much-maligned GOTO statement. This statement corresponds to the JMP command, one of those numeric instructions mentioned earlier. JMP is a "mnemonic" (useful imaginary association) of the number reserved for that fundamental computing task. Most modern languages avoid use of this command, because it makes it more difficult to maintain larger programs.

Again we see the command name followed by the parameters, and we also see the line numbers that the Dartmouth Time Sharing System (DTSS) used to mark each line of text, or code. Dartmouth is the university where Basic was developed in the early 1960s.

Prior to the existence of Basic for teaching, Grace Hopper influenced the design of COBOL that contained TERSE-ENGLISH-PHRASES that were JOINED-BY-DASHES. Some early computers, even some from Apple, Inc., relied on character sets that did not include lower case letters. Some of the earlier languages (such as Basic) tended towards commands and other text expressed in ALL UPPER CASE.

Around the same time as Basic, the language known as Logo was developed as part of an entire philosophy of teaching. In Massachusetts, the MIT Media Lab continues to explore applications of languages in the same family as Logo, such as AppInventor, Lego Mindstorms and Scratch.

The feature of Logo that is best known, as (like Basic) it was used to introduce many children to coding, is Turtle Graphics. Apart from not requiring graphics initialisation commands like the SCREEN command in Microsoft QuickBasic, Turtle Graphics does not (in many implementations) require much or anything in the way of punctuation in its syntax.

To draw a square is this simple:

UP 5 RIGHT 5 DOWN 5 LEFT 5

There is no symbol required between commands, it simply follows from left to right and continues taking parameters until it finds another keyword. (as with math, statements put in nested parentheses might change this.)

So in Logo, this text:

UP 5 RIGHT 5 DOWN 5 LEFT 5

Translates (conceptually) into English instructions such as:

"Draw upwards 5 points in length, then draw to the right 5 points in length, then draw downwards 5 points in length, then draw to the left 5 points in length."

Other dialects may offer additional options or simply different commands:

TURN 90 FWD 5 TURN 90 FWD 5 TURN 90 FWD 5 TURN 90 FWD 5

This violates a useful convention in coding known as D-R-Y or "Don't Repeat Yourself." A better way to code the same task is:

REPEAT 4 TURN 90 FWD 5

You can change this from a square to a diamond simply by turning 45 degrees first:

TURN 45 REPEAT 4 TURN 90 FWD 5

One of the things that truly limited Basic in the 1980s and early 90s, when the PC revolution was taking place, was not just the lack of processing power but the constraints on RAM and what size a program could be. As the PC moved from 8 and 16-bit platforms to 32-bit, it was more trivial to access large amounts of RAM and have larger programs with larger units of information handling.

For example, a string of characters such as "Hello, world" in the 80s was limited to somewhere between 256 characters and 32,768 characters. You could have string arrays, which are collections of strings with a common name, but loading a large file into an array was costly. Basic traditionally has very rudimentary commands for dealing with strings.

Python deals with strings in a more flexible, modern fashion. A "list" in Python, similar to an array in Basic, can for starters mix types of data-- instead of having to initialise an array as being for strings or numeric data, Python lists can contain one or both at once. Basic has a MID$ function to get part of a string, but Python has a syntax that lets you get part of a string a list.

With increases in RAM and ease of addressing it came a greater use for more flexible commands, which were more practical to implement.

This does not mean Python is easier to learn than Basic-- one of the nice things about Basic is that you could master a good portion of the entire language, and feel like you definitely knew how to write programs in it. Sure, you wouldn't actually learn every command. But you probably knew which commands did something you didn't need for your programs.

Python has in many ways supplanted Basic in education, while Logo continues to provide inspiration for new languages that are easy to learn as a first language. Python can also be taught as a first language, although probably in later school years than Logo-based languages.

Getting back to the earliest languages designed for general education, Basic and Logo both had strengths. Basic was more obviously practical, being used to create video games, accounting programs and even point-of-sale software. There were often better languages (such as C++) for creating commercial software, but Basic enjoyed notoriety from both its success via Dartmouth and its inclusion in chips on board 8-bit computers.

Logo was an easier language, but typically wasn't used (by most of its users, that is) to do anything very practical. Today, it is a good foundation for creating mobile apps or controlling robots, or animating a cartoon cat-- but Logo-based languages (though Logo was originally a general purpose language) are not typically used for a multitude of tasks.

As a teen, I often wondered what a cross between BASIC and Logo would be like, or if such a thing was even possible. To this day, I believe exploring this question and similar questions will make it possible for more people to implement reasonably complex and sophisticated programs, with relative ease. I do not think Python is going to get friendlier, in fact I find it going in a typical direction of expanding until it is much less easy to learn than in the beginning.

Basic too, has grown more complicated than it needs to be. But Python, JavaScript and Logo are all used in education.

For my own efforts added to the pot, I have finally explored the question of combining aspects of Logo and Basic, with fig. Like 1980s versions of Basic, it is case-insensitive. Like Logo, you can avoid most punctuation in syntax. You can also add it optionally.

It goes left to right, demonstrates a variety of tasks such as drawing, array and file handling, getting text from the Internet, and even transitioning to a more feature-rich language such as Python-- while allowing you to create native functions that contain inline Python code.

To make an installer less necessary, the fig translator is a single Python script. It takes a program written in fig, translates it into Python, and (as with interpreted languages in general) requires Python to run the output program.

Fig was featured, thanks to much-appreciated help from the late Robert Storey, in the first 2017 issue of DistroWatch Weekly: https://www.distrowatch.com/weekly.php?issue=20170102

But although I enjoy using it (quite often, actually) as a heavily simplified derivative of Python, fig was always an experiment and a prototype. I would be just as happy to see people explore the concepts of fig as an educational language, which I spent many more years thinking about even while I taught myself to code ("You know what would be cool? An array that uses a string index instead of a numeric one!" ...Linked lists, hash tables, Python dictionaries) than I would be for them to adopt fig itself.

The core idea of fig is simply this-- instead of teaching a programming class, try to sit down everyday people and teach them to code. That's what fig was designed to make possible-- as well as make easier.

I tried doing that with BASIC, it is possible. I tried it with Python, as well as JavaScript. That was harder, though overall I think Python has some advantages over Basic. It has some rough corners too-- "SCREEN 9: PSET(10, 10), 5" draws a dot in early 80s QuickBasic and GW-BASIC. Try doing that in Python, such as you might with Pygame. It's a bit more to begin with. Of course that particular matter could be solved with a different library-- but you still have to learn how to import it.

As you teach more people, and note what it is that gets in the way of them learning, you remove as many unnecessary requirements of coding as possible. I removed Python's case-sensitivity. Although a fan of indented code (I wasn't one until I learned Python) I decided to replace Python's mandatory indentation with Basic-like keywords. It's easier to implement than you might think-- I just use a variable to keep track of the indentation level and increase or decrease it when required.

Before fig, I attempted to create a language with no punctuation at all-- so the print command was like this:

todisplay hello there, world! (you can put any text of any sort on this line) display

This is tedious, but I was trying my hand at designing a Basic-inspired language to be spoken into a microphone instead of typed on a keyboard.

When I got bored with that effort and focused on fig (then "fig basic") instead, I still tried to keep punctuation and other syntax minimal. I used "quotes for strings" and # hashes for comments and as I received feedback, I thought it best to allow the option of putting a colon : between commands on the same line.

Ultimately I thought why not do like English, and have several characters available for grouping text together visually? You can teach fig as a way to introduce bash syntax and concepts:

p=5 ; ucase | print

or Basic:

P = 5 : UCASE : PRINT

or Python:

p = 5 ; ucase().print()

I realise these are caricatures, I can write actual code in the syntax of each of these languages.

But "why?" is a question I will answer in three parts:

1. We want more people to understand code, so they can understand computing and help write free software.

2. An educational language didn't taint Torvalds, and most languages (even Basic) now lack the very problems that caused Dijkstra to moan about them so much. Indeed, many of them took a lot of what he said to heart. We can teach more people, more easily, if we have languages better suited to that task.

3. We can learn more about what makes languages easier to learn if we aren't afraid to experiment and collaborate more.

This is not a solved problem-- like with other tasks related to computing, the solutions are ongoing. Despite its revolutionary contributions to computer education, Basic no longer holds the title for most popular or most useful educational language. That title probably goes to Python now-- or perhaps Logo, if you consider it as a language family. Of course I still find great value in Basic as a concept, I would never be happy just switching from existing versions of Basic to existing versions of Logo.

The non-standard, computer language / computer educational philosophy that is Logo may well continue its legacy, but we know the language will continue to change to suit the needs of learners.

Regardless, not everyone is going to learn Python no matter how we try, and some languages are still easier to learn. I think it is trivial to prove (for those who are interested in the idea) that we can make a language that is both easier to teach than Python, and more generally practical than Logo.

I'm very interested in multiple takes on this idea, not just one or two. What kinds of friendly languages with powerful features can we imagine, and perhaps implement? What can we learn from educators in the field (many of whom have their own difficulties with computers and programming.)

This is less about reveling in the past than first learning what we can from historical and contemporary efforts, and hopefully creating greater success in the future.

It is not a requirement, though I really do like the idea of translating to something like Python. You can technically implement a language in almost any other language (provided certain minimal features exist in it) but starting out with a friendly language means the implementation can also be tweaked or inspire a larger number of people. Someone who learns fig can even learn how to implement a similar language. (I have considered, but never gone to the extra trouble, of implementing fig in fig itself. With its inline python feature it is certainly possible.)

License: Creative Commons CC0 1.0 (public domain)

Recent Techrights' Posts

IBM May Well Be Laying Off Over 13,500 and Up to 27,000 Staff This Week When It Says "Single-Digit Percentage of Our Global Workforce"
It's not yet possible to know how many people IBM gets rid of
Early Unverified Figures About Scale of Latest IBM Layoffs
the real scale of the RAs will remain elusive
How Techrights Search Works
Hopefully bots won't use it
Techrights Became a Lot More Productive as a Result of Attacks on It
By default, it's safe to assume anything on the Web is garbage, especially in social control media
Unverified Rumours: IBM Cuts Will Continue Another ~10 Days, Managers Will Invite Those Impacted for 1-on-1 Meetings
Right now IBM likes diversity because with adoption of low-paid demographies it gets to pay workers less for the same work
analytics.usa.gov: Vista 11 Scarcely Used, GNU/Linux Increasingly Dominant (Microsoft Loses "Goodwill", Depletes Cash Equivalents, and Debt Soars)
"Total current assets" fell by more than 2 billion dollars in the past 3 months
 
Claim That IBM Has Another 8 Days to Lay Off 'Expensive' Staff
The consensus in comments we see is, IBM is a terrible place to work in, treatment of its workers is appalling, it's utterly foolish to relocate in an effort to retain a job at IBM, and it's foolish to join the company in the first place
Science Demands Facts, Not Dogma
Saying that restricted hardware is not secure hardware should be common sense
Site Anniversary is Tomorrow
The celebrations might delay our EPO series somewhat
Launching Techrights Search
New search interface and locally hosted back end
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Wednesday, November 05, 2025
IRC logs for Wednesday, November 05, 2025
Slopwatch: linuxbsdos.com, Linux Journal, LinuxSecurity, Brian Fagioli, and WebProNews
Either Google doesn't care about the integrity of Google News or it deems slop to be acceptable
Gemini Links 05/11/2025: Affirmation, GnuPG, and While Loops
Links for the day
Links 05/11/2025: Economic Trouble in France and US Bombing All Over the World Without Declaration of War or Congress Approving
Links for the day
Red Hat Staff Also Impacted by Latest IBM Layoffs With Focus on North America and Software, Infrastructure
After the bluewashing never expect to see news about "Red Hat layoffs", just as "Tivoli layoffs" aren't to be expected
Coming Soon: Part 4 About the EPO's Substance Abuse (Breaking Laws to Fake 'Production' and Profiting From Unlawful Monopolies)
Notice how quiet the EPO's management has been lately
For the Record: We Never Named Staff of the Law Firm That's Attacking Us, Except the One the Firm is Named After!
Just to affirm and be sure, I've used our new search facility
Links 05/11/2025: Medicare Privatisation and "Breaker Box Economy"
Links for the day
Techrights Search Will Come Early
Maybe tomorrow
It Seems Like GNOME/IBM Don't Like Women and When Budget is Limited Only Women Take the Fall
Seems like a very patriarchal, GAFAM-controlled Foundation
"Last Day" as in "IBM Sacked Me" (Cruel Euphemisms)
"The entire design and research technical leadership at IBM was laid off in the past year, including this round"
Shadow Crew and Ads Disguised as Articles
That The Register MS runs articles that are paid-for fluff isn't unprecedented
Vista 11 "Market Share" Has Fallen This Month, Based on statCounter
The US government's own data shows the same thing this month
This is How Mainstream Media, Boosted or Parroted by Slopfarms, Spins IBM's Commercial Failure and Mass Layoffs as "AI"
Some say "software focus", but most just resort to buzzwords and blame-shifting hype
Resisting Misogynists
Rianne has already added close to 100,000 pages to this site
Starting November on a Strong Note
All in all, this month started well for us as we have good, accurate publications with considerable impact
Fake Retirements Help IBM Keep the Layoff Figures Down
Yesterday we read that it was quite cruel how IBM (or Red Hat) compelled staff to pretend to be happily leaving or "retiring" when the reality was, they had been pushed out with some "package"
Cocaine at the European Patent Office Now a Subject in YouTube, Media Will Revisit the Topic
"The Cocaine Patent Office" is no joking matter
Gemini Links 05/11/2025: "Wuthering Heights" and "Winter is Coming"
Links for the day
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Tuesday, November 04, 2025
IRC logs for Tuesday, November 04, 2025
2 Days Until Site Anniversary Party, Search Likely to Launch Same Day
We're now just two days away from the nineteenth anniversary of the site
Not Only Mass Layoffs at IBM But Complete Shutdowns "Amid A.I. Boom"
apparently about 10,000 layoffs, not counting those who got pushed out by PIPs and other means
Richard Stallman's 2005 Article on Why Patents on Software Should be Denied
If patent law had been applied to novels in the 1880s, great books would not have been written. If the EU applies it to software, every computer user will be restricted, says Richard Stallman
"Last Day" at IBM and Red Hat as "Stealth Layoffs" (They Force People to Pretend It's Wilful)
So the real extent of the layoffs is being kept 'undercover'
Slopwatch: The WebProNews Slopfarm and the Serial Slopper
The Web is ill
Links 04/11/2025: Tensions Around Belarus Grow, Turkey’s Hype-inflation Continues
Links for the day
Corporate Media That Fails to Report Cocaine at EPO is Totally Failing to Report Mass Layoffs at IBM
How come nobody anywhere writes about this week's RAs?
Search @ Techrights: Almost There Now (Maybe an Anniversary Gift)
Just to be very clear, search would not be unprecedented at Techrights
At IBM, Layoffs Start at 1AM (at Night)
not a single English-speaking site covers the news about the layoffs
Links 04/11/2025: Google Cloud Account Engages in Censorship of the Innocent, arXiv Spammed by LLM Slop
Links for the day
EPO Cocaine Chronicles: Our Aim Will be to Ensure This Becomes a Mainstream Media Topic, Not a Suppressed Scandal (Which the German State Deems Embarrassing and Detrimental to Its Pan-European Patent Franchise)
At the EPO, and perhaps in German media as well, people "fall upwards" (they get rewarded for bad things)
Envy Makes People Do Self-Harming Things (and Harm to Others)
Online communities that can be deemed successful are built around trust, mutual respect, and collective accomplishment
Static Site Generators (SSGs) Made Techrights Better, Faster, Easier to Manage
Consider adopting SSGs if you still use a CMS such as WordPress
But he Was Born in Manchester! (Origin Stories)
Borussia Dortmund does not exist!
What Julian Darley Wrote About the Stallman Talk Regarding "AI" in Oxford (2025)
From LinkedIn (Microsoft)
GNU/Linux is American, Not Finnish
It started in Boston, not in Helsinki
'Hacker' 'News' Makes Dumb Assertions Against Smart People
A logical fallacy
We Turned Down Every Settlement Offer Because Truths Aren't Determined in Bank Accounts
Without free press, there won't be free society
"All truths are easy to understand once they are discovered; the point is to discover them." -Galileo Galilei
This site is educational
Why I'm Always Proud of the Site I've Devoted My Life to
As a graffiti around the corner from our home says, "be a better person"
Standing Up or Standing for What's True But Inconvenient
Bad actors need to be called out
Many People Have Said That They "Leave" IBM in Recent Days (Ahead of Mass Layoffs)
So the real extent of layoffs is greater than what's publicly stated (there are silent layoffs) [...] Whatever IBM says about the scope, scale, or magnitude of the "RAs", it doesn't tell the full story
Media Coverage Regarding IBM is Vapourware and LLM Slop
With slop images, too
statCounter Says GNU/Linux Rose to 4% in the Russian Federation
Adoption of Vista 11 has been embarrassingly weak
Corruption is Not a Joke
we'll try to limit our use of humour to avoid misunderstandings or misinterpretations
The Slopfarm WebProNews is Overwhelming "linux" Results in Google News
Google News is slop
The Fall of IBM: What Happened?
Just like the EPO continues riding some old reputation acquired in the 1970s IBM relies on old myths like, "nobody gets fired for buying IBM."
IBM's CEO Already Has the Excuse for the Latest Wave of Mass Layoffs
Only days ago the CEO told a bunch of nonsense
Links 04/11/2025: Conflicts, Politics, and IPv6 at Home
Links for the day
Gemini Links 04/11/2025: Entering WiFi Passwords and Programming Rambles
Links for the day
Arch Linux Seems Like the New Debian
Arch users (btw!) are growing in relative and absolute share
Analytics From US Government Affirm a Trend: Microsoft's "Market Share" in Search is Falling
the data set is large
Holding Institutions Such as the EPO Accountable Through Public Information
Speaking truth to power is never easy
Techrights Will Contact German Media About the EPO's Substance Abuse
This scandal won't "go to waste"
EPO Staff Losing Holidays, as Usual, as the Office Increases Profits by Illegally Granting Invalid Patents While Reducing Salaries
How much more can the staff endure and generally tolerate?
Free Software Does Not Always Speak for Itself, It Needs Advocates
Legal matters that relate to sharing of code will be discussed
Over at Tux Machines...
GNU/Linux news for the past day
IRC Proceedings: Monday, November 03, 2025
IRC logs for Monday, November 03, 2025
The Register MS Continues Looking for Money in Promotion of the "AI" Ponzi Scheme
That The Register MS participates in this deceit rather than tackle/debunk it says a lot about The Register MS
IBM Layoffs in "Software", This Likely Impacts Red Hat as Well
Many people say "software" people are impacted
Escaping Proprietary Software, Not Just Escaping Microsoft
To take control of your life adopt GNU/Linux
A Lot of Fake News About Microsoft Headcount (Also: Microsoft's Debt Rose by About 24 Billion Dollars in Past 12 Months)
If you see some headline about Microsoft's CEO making claims about hirings, look away
Techrights Turns 19 in Three Days
It would be nice to meet for a chat