Status update, October 2022
Published on November 15, 2022
Table of contents
Another late update — I was busy with stuff during the first half of October. I’m moving places again, so until December I’ll probably be busy packing and moving things around. Oh, and I’m on the fediverse now: @hugopeixoto@ciberlandia.pt.
Porto Codes
During this year’s hacktoberfest we organized contributing session on Significa’s office. We had around a dozen folks show up, with some making their first open source contribution.
ANSOL
I’m working on translating the Fedigov website to Portuguese. Hopefully I’ll publish it this week. Saucy has some issues that need fixing, so I’ll be working on that this week.
D3 - Defesa dos Direitos Digitais
I upgraded our instance of bitwarden and hedgedoc to the latest versions and wrote some documentation on how things are currently deployed.
Cyberscore
I did a big data model change to cyberscore. Each chart can have a bunch of flags and point modifiers. The way these modifiers and flags were stored was weird and hard to query. Here’s the old schema:
1
2
3
4
5
CREATE TABLE chart_modifiers(
chart_id UNSIGNED INT PRIMARY KEY,
csp_modifier UNSIGNED INT DEFAULT 0,
chart_flag UNSIGNED INT DEFAULT 0,
);
If a chart had two chart flags and three csp modifiers, it would have five
entries in this table. With this layout, it wasn’t easy to find charts that had
two chart flags, or charts that had no csp modifiers. It also relied on int
based enums which made our code a bit more unreadable. This is the new schema:
1
2
3
4
5
6
7
8
9
10
11
12
CREATE TABLE chart_modifiers2(
chart_id UNSIGNED INT PRIMARY KEY,
standard BOOLEAN DEFAULT FALSE,
speedrun BOOLEAN DEFAULT FALSE,
solution BOOLEAN DEFAULT FALSE,
-- ...
significant_regional_differences BOOLEAN DEFAULT FALSE,
significant_device_differences BOOLEAN DEFAULT FALSE,
-- ...
);
It has a bunch more columns than the previous schema and their names are
longer, but it’s easier to query and to update. After fixing all the
references, we ended up with fewer lines of code. This is the summary of the
merge request: 122 files, +1522, -1735
.