The first of June is the Global Day of Parents along with other holidays related to parenting, such as Internation Children’s Day and other regional holidays. Those of you struggling to keep up your lives while suddenly becoming unpaid school principals and support technicians haven’t been forgotten, just because the school year is in the home stretch.
Anyway, this week turned out to provide more procedural work than I might have wanted, but it was about time for it.
CPREP Background Generator
I needed to sneak a small patch into CPREP, because I got the color-proximity code wrong. Now, you’ll notice that the second listed color much more closely resembles the first and that the second tends to be a bolder color more representative of healthy flesh tones.
Like I mentioned last week, my integration of the worker threads has caused me some grief in making syntax errors simultaneously harder to spot (because the main thread isn’t directly reading the file) and more important (Node.js seems more permissive on the main thread), which isn’t a great situation.
Adding Static Analyzers
So, I added ESLint to the Uxuyu project, which now notifies me when I write suspicious code. After fixing those issues, I decided to also add the Prettier code formatter. In all honesty, I don’t actually agree with a lot of Prettier’s determinations on what code should look like, but the two of them should be able to keep me honest by enforcing consistent styles, so a style I disagree with is better than no style at all.
I’m currently set up using Visual Studio Code as an editor, but the current lack of warnings means that that it’s much easier to run
npx eslint *.js to make sure it stays that way.
For those who want to do something similar, the process is to…
- Install the relevant packages (
yarn add --dev eslint eslint-plugin-react prettier eslint-plugin-prettier),
- Set up ESLint like the instructions say to,
prettierto the plugins section of your
.eslintrc.json, in my case), and
- Create an
.eslintignorefile to exclude anything you don’t want ESLint to check.
In my case,
.eslintignore looks like this.
dist/* node_module/* webpack.config.js
So here, running ESLint (as mentioned above) automatically runs Prettier, but skips the files I don’t control, the libraries and the processed source code that actually runs. Eventually, I might need to take the Webpack configuration off the list. But for now, it’s just the pre-generated default file and so not worth cleaning up.
I decided that the quotes need slightly more attention drawn to them, so I put a light background gradient on them. The CSS looks like the following.
background: linear-gradient( to bottom right, rgba($background-color, 0.0), rgba($light-brand-color, 0.075) );
The first (
to) parameter gives the direction to interpret the colors, in this case diagonally from the top left to the bottom right. The parameters after that are different colors to transition to, here using the
rgba() SASS function to take my existing branding colors to make them mostly transparent.
I may tweak it a few more times for aesthetics, but this minor tweak strikes me as a significant improvement.
Now that Uxuyu is more stable and the static checkers provide a safety net, my big goals for this week are to:
- Move all management of account information into the account thread, rather than maintaining a full dictionary of accounts in the main thread as well, and
- Combine the followed and other accounts into a single group to start searching all feeds.
Once I do that, I can start adding alerts for being mentioned and interrogating the registries.
The “secret” project is also brewing, of course, and I still have thoughts around next steps for CPREP.
Credits: The header image is Children Play in Ayo Tournament by Adedotun Oluwatosin Ajibade and made available under the terms of the Creative Commons Attribution-Share Alike 4.0 International license. Because I would be screaming if someone dropped that statement in my lap without explanation, Wikipedia has an excellent article on Ayo or Oware.
Tags: programming project devjournal cprep uxuyu
Sign up for My Newsletter!
Get monthly (or thereabouts) notifications on Entropy Arbitrage
posts, additional reading of interest, random thoughts, and previews
of upcoming projects, delivered right to your inbox. I won’t
share your information or use it for anything else.
You can view previous issues. Unless it's still June 2020, in which case you can only see test messages.
If you disable trackers (like I do), this form won’t work, so you’ll need to sign up on Mailchimp's site. Sorry!