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


hpr3457 :: Tables

How and why I convert tables to lists

<< First, < Previous, , Latest >>

Hosted by Klaatu on Tuesday, 2021-11-02 is flagged as Clean and is released under a CC-BY-SA license.
data, tables, communication. 2.
The show is available on the Internet Archive at: https://archive.org/details/hpr3457

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

Duration: 00:37:40

Databases.

This series will attempt to discuss various different aspects of Database design and operation.

Mobile devices don't display them nicely. Most tables can be converted into a list:

OSInitPkg
Fedorasystemddnf
SlackwareBSD-styleslackpkg
GentooOpenRCemerge

Can be represented as a list. In YAML terms, this is a sequence of mappings.

  • Fedora
    • Init system: systemd
    • Package manager: dnf
  • Slackware
    • Init system: BSD-style
    • Package manager: slackpkg
  • Gentoo
    • Init system: OpenRC
    • Package manager: emerge

A table doesn't always translate exactly to a list, but it probably can be restructured.

OSOpen sourceLanded on Mars
LinuxYesYes
BSDYesNo
macOSNoNo

Could be written like this instead:

Linux and BSD are open source operating systems, while macOS is not. Of these POSIX-compliant systems, only Linux has landed on Mars so far.

That's pretty casual and loses the visual impact of a table or a list. So alternately, you could summarize what's common and highlight differences:

There are a few Linux systems on Mars. Neither BSD or macOS have yet landed on Mars.

  • Linux and BSD are both open source.
  • macOS is based partially on open source and includes components from the BSD, KDE, GNU, and other projects.

Comments

Subscribe to the comments RSS feed.

Comment #1 posted on 2021-11-07 11:41:02 by Jon Kulp

Tables and font sizes

I loved this episode, Klaatu. Somehow I find it really entertaining to hear all about the benefits and difficulties of tables and it's something I've dealt with a good bit myself, but mostly in the context of eBook editing. In addition to the problems you mention, another one I find vexing is the impact of font sizes on tables. One of the best accessibility features of ebook formats and ebook readers is the user's option to change font size. When you're getting older like me and you typically increase the font sizes, you find that tables rarely survive the change unless you're on a big screen like a tablet. I will try almost any option to avoid making a table in one of my own ebook edits because it's too hard to predict screen size and font preferences. Lists will usually do the trick, just as you proposed in your episode. Now I wanna go take a look at your ebook...

Comment #2 posted on 2021-11-17 15:24:29 by Gumnos

Storing data in recsel format?

I'm not sure if you've encountered GNU recutils before

https://www.gnu.org/software/recutils/

but it's a nice flat-file way of storing & querying data in a format similar to what you described. It's fairly easy to convert to CSV or other tabular format. It plays nicely with version-control, making it easier to tell when a "column" (really a row in a group) has been edited because the diff just shows that one "cell" rather than a whole CSV line being modified.

It's also pretty flexible when it comes to omitted or duplicate fields. I've taken to storing our household address book in this format and then transforming it into other formats as needed.

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?