New episodes every weekday Monday through Friday. This page was generated by The HPR Robot at
Welcome to HPR, the Community Podcast
We started producing shows as Today with a Techie on 2005-09-19, 19 years, 1 months, 10 days ago. Our shows are produced by listeners like you and can be on any topics that "are of interest to hackers". If you listen to HPR then please consider contributing one show a year. If you record your show now it could be released in 7 days.
Call for shows
We are running very low on shows at the moment. Have a look at the hosts page and if you don't see "2024-??-??" next to your name, or if your name is not listed, you might consider sending us in something.
Today I'm going to go into more detail about what I mean when I say
Plain Text Program. I want to emphasize that this is just me. Others may
have different ideas on this topic. This is how I try to write Plain
Text Programs. I will feature other people's work that I still consider
to be Plain Text Programs that do not follow all of these
guidelines.
I want to thank the hosts on the monthly HPR Community News podcast
for inspiring me. They had questions. I also want to thank those making
comments. I'm new to Hacker Public Radio and I will try to be more
timely responding to comments in the future.
What Is A Plain Text File?
Text files are usually edited in a text editor or in a word processor
and saved with the .txt extension. They consist of a string of
characters. Text files can be divided into lines using the newline
character, \n, or the carriage return and newline
characters, \r\n. You don't have to type these characters.
Your editor puts them in for you.
Text files do not have to use the .txt extension. Most programming
files, like .php or .c files are plain text. I will only be discussing
programs that are open source and that store their code in text
files.
Plain text configuration files often have no extension. For my Plain
Text Programs I use config.inc.
There is no difference between text files and plain text files.
People often say plain text files to distinguish them from word
processor files like .doc or .odt files.
Plain Text Programs use text files to store text like a title or a
blog post. When I talk about Plain Text Programs I also mean something
more than this. That's what this podcast is about.
No Database?
Plain Text Programs do not use a database like mysql or postgres.
Also the file system does not imitate a database, creating keys,
indexing, etc.
Instead the file system performs the database functions by accessing
files which can be text files, graphics files, or other files. These
files can be all in one directory or in multiple directories in a single
directory tree.
If password security is required in a Plain Text Program that runs on
the internet I make an exception to the single tree rule to allow
passwords to be stored outside of the webspace.
So the assets a Plain Text Program accesses are just files in the
file system.
No HTML Or Other Markup
Required
I have no rule against allowing html or other markup. But I do not
assume that the maintainer knows how to do this or wants to learn it.
The reason I started writing Plain Text Programs was to avoid html
markup. I want to be able to type text files, save them, and upload
them, without being concerned about anything except the text itself.
The text files holding the content are written in block paragraph
style with a blank line between paragraphs. Text files are not required
in a Plain Text Program but most Plain Text Programs do use some text
data which should be stored in text files.
If this is a web application, links can be copied and pasted from the
browser with no additional markup required.
Other assets in the directory, like .gif, .jpg, or .png images,
display automatically.
I use the file names for meta data like title, caption, or sort
order. I can also sort chronologically using the file timestamps.
If there is a hierarchy of directories the program can use the
directory name of the child directories for the link text. For instance
the Delta Musicians directory tree can have a Table Of Contents at the
top level that lists the musicians in alphabetical order. Each musician
gets their own subdirectory and the name of that subdirectory is used to
generate the link and link text for that page.
Then, each page can use Dirt Simple Photo Gallery and the program
generates the caption from the image's file name.
All configuration is also done in a text file. I use a well
documented config.inc file that initializes php variables.
The maintainer of the application is never required to edit source
code.
Does Plain Text
Mean There Is No GUI Interface?
No. I write mostly web apps so they run in the browser interface.
Also, Plain Text Programs do not require a GUI. It could run in a
terminal or as a cron job. The program could play a music playlist or
run a slideshow with no input at all.
What Do
I Have To Know To Maintain A Plain Text Program?
The maintainer of the program will have to be able to 1. Create and
edit text files in a text editor or word processor 2. Copy and paste
links, iframe embeds, file names, titles, etc. 3. Rename files 4. Upload
and download with ftp
Executive Summary
A Plain Text Program does not use a database like sql. Instead it
stores the assets in the file system and accesses them using the file
system.
A Plain Text Program does not require html or other markup. Text
assets are written in block paragraph format. If the maintainer prefers
to use a word processor instead of a text editor that's fine as long as
the files are saved as text files with the .txt extension. Most word
processors support this.
Plain Text Programs can support links if the links are copied and
pasted into the text file with no markup required.
Plain Text Programs can support iframe embeds if the embed code is
copied and pasted onto its own line in the text file.
All of the assets for a Plain Text Program are stored in a single
directory tree. This is one of the main advantages of Plain Text
Programs because it makes them easy to backup and restore so they are
very portable. I sometimes make an exception to this if I want to save a
password on a webserver outside of the webspace.
A Plain Text Program uses the file and directory names for meta data
like titles, captions, or sort order. The file timestamps can be used
for chronological sorting.
All configuration is done by editing a well documented text file. The
maintainer should not have to edit the program code.
The maintainer should be allowed to edit the program code. I will
only discuss open source programs that store the program itself in text
files.
More Questions?
I thought so. Comment on Hacker Public Radio or at Gamer+DBN. I will
include links in the show notes.
Shows me attaching the leg of a resistor to the new backup battery. This
is to extend the battery terminal length so that it can be soldered
between the two connecting battery posts of the radio Printed Circuit
Board.
Picture 2
Shows the newly fitted PLL backup battery with it’s extended terminal
fitted directly below the EPROM labelled JAF7.
Picture 3
Shows the speaker sitting within a metal box. This box sits on top of
the screened metal box housing the PLL backup battery. When I was
refitting the speaker box I discovered there were extra badly soldered
grey wires attached to the speaker terminals. The other end of the wires
was covered with black electrical insulating tape. I removed these extra
grey wires from the speaker to prevent them from coming adrift and or
causing a short circuit within the radio.
I mention the trick of using blue-tak to hold a difficult screw when
inserting it into a tight recess. Wikipedia article about
Blu Tack
Create your image with your preferred disk image creation tool. I
used USB Image Tool to create an image from my "golden master" Windows
11 installation thumb drive A. USB Image Tool: https://www.alexpage.de/usb-image-tool
Prepare
your Tmux session on your Linux or BSD-based system.
'tmux new -s $sessionName' to create a new Tmux session
window with a session name of your choice.
'Ctrl-B-"' to create a horizontal split, putting one
pane over the other.
'Ctrl-B-%' to create a vertical split, putting one pane
next to the other.
'Ctrl-B-UpArrow' or 'Ctrl-B-DownArrow' to
move to the pane you want to split if you split the window with a
horizontal line.
'Ctrl-B-LeftArrow' or 'Ctrl-B-RightArrow'
to move to the pane you want to split if you split the window with a
vertical line.
Duplicate
4 USB thumb drives from a disk image within your new, split-paned Tmux
session:
CHECK DMESG FOR THE CORRECT DEVICE NAME AND WRITE IT
DOWN!!!
FreeBSD will show dmesg output on TTYv0, or you can use the dmesg
command on Linux or BSD. You don't want to end up wiping your system
drive!
Within your Tmux session:
Pane 1:
'dd if=$diskImageName of=/dev/da0 bs=1M status=progress' to
begin imaging USB thumb drive #1.
Pane 2:
'dd if=$diskImageName of=/dev/da1 bs=1M status=progress' to
begin imaging USB thumb drive #2.
Pane 3:
'dd if=$diskImageName of=/dev/da2 bs=1M status=progress' to
begin imaging USB thumb drive #3.
Pane 4:
'dd if=$diskImageName of=/dev/da3 bs=1M status=progress' to
begin imaging USB thumb drive #4.
'Ctrl-B-:' to call the Tmux command prompt, followed by
'setw synchronize-panes' to sync the 4 panes to your
commands. The primary pane will be highlighted in red, and the secondary
panes will copy whatever command it typed into that primary pane.
Hit Enter to begin the process on all 4 panes.
When the image finishes, you can remove the USB thumbs drives, pop
in 4 more, hit the Up arrow on the primary pane to pull up the previous
commands on their respective panes, and hit Enter. When in doubt, refer
to Step 0!!
Repeat as needed.
If you need to de-synchronize your Tmux panes, just type
'Ctrl-:' to call the Tmux command prompt, followed by
'setw synchronize-panes' to toggle pane synchronization on
and off (or you can use the up arrow at the Tmux command prompt to bring
up that previously-typed command).
The faster your USB ports and USB thumb drives, the better!
Lee talks to Matthew about the link between neurodiversity and using
systems in ways they were not designed for.
A short biography:
Matthew Bellringer is a neurodiversity and innovation specialist who
specialises in supporting work that addresses problems from a unique
perspective, co-production, and regenerative working practices. More
details on Matthew's
website.
Matthew is also Chair and Co-founder of NeurodiverseIT, a group for
neurodivergent IT professionals within BCS, the Chartered Institute of IT and
the organiser and founder of Curious
Being, a community for unconventional people who want to make the
world a better place. Matthew is a late-discovery autistic ADHDer.