Site Map - skip to main content

Hacker Public Radio

Your ideas, projects, opinions - podcasted.

New episodes every weekday Monday through Friday.
This page was generated by The HPR Robot at


hpr4208 :: 01 Plain Text Programs

Plain Text Programs-what they are-what they do-why they're good-and why they're not for everything

<< First, < Previous, , Latest >>

Hosted by hairylarry on Wednesday, 2024-09-18 is flagged as Clean and is released under a CC-BY-SA license.
programming, plaintext. 5.
The show is available on the Internet Archive at: https://archive.org/details/hpr4208

Listen in ogg, spx, or mp3 format. Play now:

Duration: 00:05:43

Programming 101.

A series focusing on concepts and the basics of programming

01 Plain Text Programs

Hi. I'm here to talk about Plain Text Programs, what they are, what they do, why they're good, and why they're not for everything. Right up front I'm requesting feedback on what I have to say. I'm on Mastodon and I'll start a thread for each podcast or you can reach me by email.

My Mastodon address is
@hairylarry@gamerplus.org

My profile is at
https://gamerplus.org/@hairylarry

And my email is
hairylarry@deltaboogie.com

Also you can Network With Hairy Larry at
https://deltaboogie.net.

In the future I plan on doing podcasts on specific Plain Text Programs, some that I wrote and some that were written by others. Any program that I will discuss will be licensed with a free culture license.

The first thing I want to emphasize about Plain Text Programs is that there's no database like SQL or LLM. All text data is written in plain text files stored on a file system.

Now, I love databases. Before I retired I was a database programmer. And as a database programmer I learned a lot about the difficulties maintaining programs that rely on databases. There's a lot of cool stuff you can do with a database that's just not reasonable to try with plain text. Now that I'm retired I don't really want to work that hard anymore. I want programming to be easy and fun.

Plain text does not mean there can't be images or other media. Image files like .jpg or .png can be stored in the file system just like text files. No worries.

A big advantage of Plain Text Programs is portability. To back up a working program you copy the directory tree that holds the program's files. To install or restore a Plain Text Program copy the tree onto a system or server.

I usually work on Linux using the PHP programming language. This is of course my preference. Any language running on any file system can be used to write Plain Text Programs.

My minimum install will usually have a configuration file, at least one program file, and a set of text files.

Some of the Plain Text Programs I use all the time that I wrote are

Websites

  • Dirt Simple Photo Gallery
  • Plain Text Blog
  • Not Actually Plain Text Blog
  • Network With Hairy Larry

Internet Radio

  • MixRemix - Creative Commons Jazz
  • KGPL

Utilities

  • Backup The Web Server

I also use Plain Text Programs that other programmers wrote

Links to these programs are in the script.

So these are mostly websites or web applications but Plain Text Programs do not have to be outward facing. They can just be an easy program that you write to automate a task that you have to do periodically. Like my Backup The Web Server program that I wrote in bash.

I write my Plain Text Programs websites so that updates and additions are made with FTP. FTP is a well established secure way to transfer files from your development system to your web server. Another good option, particularly for static websites that are generated on the development system and then mirrored up to the server, is rsync.

I believe that simplicity is the key. I have written complicated Plain Text Programs including the social network writing game, Collab. But I think a simple one page or few pages design fits the plain text paradigm better.

Well, I'm going to call this a wrap for now. I plan on covering specific Plain Text Programs in future podcasts and I may occasionally step back and look at the big picture or discuss ideas and specifications for future projects.

Thanks for listening. I appreciate all your comments.

You can find the plain text script with the link to the comment thread and all other links at home.gamerplus.org, a Not Actually Plain Text Blog.

Comment thread link.
https://gamerplus.org/deck/@hairylarry/113142858145586294


Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2024-09-18 12:58:29 by ClaudioM

Hello there, fellow SDFer! Great Episode!

Hey Hairylarry! Really enjoyed your episode, and looking forward to more like this. Nice to see more SDFers contributing episodes to Hacker Public Radio.

Comment #2 posted on 2024-09-18 13:31:33 by brian-in-ohio

The hook

Well I'm interested to see where this goes, don't delay too long, lets see that plain text 'hello world' demo, then a dice simulator.

Comment #3 posted on 2024-10-03 22:09:39 by Beeza

Plaintext Programs

Hi Hairy Larry

Some years ago, for my own amusement, I experimented with using the file system as an alternative to a database.

I had an index file containing all keys beginning with "A", another for "B" and so on. This was read sequentially. The key was followed by a long integer which was the file pointer offset in another file containing the actual data - again one for "A", "B" etc.

For fixed length data I was amazed at how fast retrieval was, but it was impractical for anything else. An update that altered the length of just one record in the data file required recalculating all the file pointers in that group.

Also, the lack of a flexible query mechanism limited its use.

I recall that VAX/VMS used indexed files, but the index and the data were somehow combined into a single file. Super fast retrieval but, again, no query mechanism beyond the record key.

It was an interesting exercise but I've found SQLite to be the ideal way of handling data in standalone applications.

Comment #4 posted on 2024-10-04 10:36:05 by Dave Morriss

Regarding VMS and indexed files

Hi Beeza,
I managed a VAX/VMS cluster in late 1987, and then OpenVMS on a DEC Alpha from around 1995 at Heriot-Watt University in Edinburgh. I implemented a system for managing VMS accounts in 1988, which really needed a database. Since we had no budget for this I used ISAM (Indexed Sequential Access Method) files to make a "poor man's database".

VMS ISAM files were configured through a command interface, and later with an editor accessing Record Management Services (RMS) facilities. Records were fixed-length, but could have many keys. The indexes and data records were in the same file.

I remember being shocked that there was nothing similar in Unix as we moved away from VMS, and then I discovered PostgreSQL...

Comment #5 posted on 2024-10-07 16:41:31 by hairylarry

Thanks for the comments

I really appreciate everyone who took time to comment. Sorry I didn't respond sooner. I guess I'm spending too much time on Mastodon.

I also want to thank the hosts at HPR Community News. Questions were asked. Good questions.

I have decided to do a "What Is Plain Text Programming?" podcast to try to answer these questions specifically and go into more detail describing Plain Text Programs than I did on my introductory episode.

Leave Comment

Note to Verbose Commenters
If you can't fit everything you want to say in the comment below then you really should record a response show instead.

Note to Spammers
All comments are moderated. All links are checked by humans. We strip out all html. Feel free to record a show about yourself, or your industry, or any other topic we may find interesting. We also check shows for spam :).

Provide feedback
Your Name/Handle:
Title:
Comment:
Anti Spam Question: What does the letter P in HPR stand for?
Are you a spammer?
Who is the host of this show?
What does HPR mean to you?