Refactoring jjlab.net

I just spent two whole days refactoring and improving my jjlab.net website.

One thing I had to think very carefully about for my modeling was the class/instance distinction for various things, you can see my notes below.

So channels have shows, and shows have features.

A series has segments, and segments have a video.

A series is an instance of a show, and a segment is an instance of a feature.

Everything is easy when you know how!

John's notes about the design of his model

Passing myself off as respectable

There’s been a little bit of spring cleaning around here today!

I’m trying to get my house in order so I can pass myself off as respectable when I start promoting my new show In The Lab With Jay Jay in earnest.

To that end I have reviewed the look and feel of my wiki. It no longer has that black, green, and orange monospaced font vibe going on, but now uses the relatively unoffensive default theme.

It’s not using the latest Vector theme, but rather the legacy one. This was deliberate because I have a lot of big tables in my wiki (such as on my computers and shopping pages) and the legacy theme plays nicer with those.

I’ve also been tweaking the website for my show, including an updated about page.

The blog, the wiki, and the show also now all use my new favicon which is my take on the Hacker Emblem:

John's new icon, based on the Hacker Emblem

psql show tables

I wanted to know what the analogue for MySQL ‘show tables’ was in PostgreSQL, and I found the answer, use the information_schema, here:

mysql: SHOW TABLES
postgresql: \d
postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';

mysql: SHOW DATABASES
postgresql: \l
postgresql: SELECT datname FROM pg_database;

mysql: SHOW COLUMNS
postgresql: \d table
postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table';

mysql: DESCRIBE TABLE
postgresql: \d+ table
postgresql: SELECT column_name FROM information_schema.columns WHERE table_name ='table';