Update Update

It was finally time to check my site for updates. I have been allowing WP to apply its own security updates for a while and this time I needed to manually apply a major update.

A pleasant surprise this time was discovering that plug-ins can now be set to auto-update.

I have however removed the Better GitHub Widget that I had been using as whilst it was working it was no longer being actively supported and could potentially be a future security risk.

Update Time

I've not been very good at posting anything so far this year. There are many things that have been occupying my time and working in heathcare I have not been in Covid-19 lock-down like many others.

The main focus of my time has been on attempting to rewrite my iptables firewall rules using nftables. Getting used to using a different syntax is one thing but I've revisited my rule decisions along the way.

One of the positives of nftables is that I am able to have rules that work on both IPV4 & IPV6 traffic without having to duplicate them. What I had not factored in when starting the rewrite was the affect IPv6 would have on the rules.

I'll skim over the details but researching the rules have resulted in experiments with my router and devices on my network. Reading up on how my ISP implements IPv6 and researching which configuration options are presented on various routers. Just when I thought I had the rules translated I discovered that IPv6 relies heavily on ICMPv6 traffic. This was another big chunk of research. I've lost count of the number of IETF RFC's that I've read through.

The good news is I am nearing the end of the work on that project. I hope to be using the ruleset more widely and troubleshooting as I go. It's never going to be completely finished but as long as it's usable it can evolve over time.

Since it has been a while since I last posted I am using this opportunity to see how the WordPress block editor has changed over time. My initial impression whilst sitting down to type this post is that it seems much less intrusive. I'll reserve judgement until I've made the changes I want but its probably much closer to what it should have been when first released a few year ago.

One of my plans for a while has been to make use of the static site for some content. That however has been suffering from a lack of updates in much the same way this site has. I'm still in the habit of making notes on topics as I research and learn things. There are plenty of things I can write up in the future for my own reference and for others. How soon I get around to it is another matter.

This is a test of the block editor's ability to theme based on my style sheet.

Well I have given the block editor a chance and again it has let me down. I can apply styles manually by editing the html. I can partially apply styles with the editor but it is still missing functionality. Trying a workaround with predefined blocks only resulted in duplicating the blocks content in another block.

The result of the current experiment is that it remains easier to format the html directly to achieve the desired outcome rather than using the block editor. This may be in part to the particular styling that I wish to apply. I can see that for some use cases the available functionality is probably sufficient.

Using the block editor itself when trying to make adjustments isn't as easy to use as it could be. Trying to select the elements without triggering the wrong pop-up menu or triggering new block creation just leads to a frustrating experience. I'm still on the side of writing the plain text and adding styling afterwards by hand. This is why the static site generator is preferable. I get to achieve the style I want with less of a burden than the block editor creates.

End of today's experiment.

2019 Review & 2020 Goals

It's that time of year again when I look back over the goals I set myself over the previous year and decide on some new ones for the year ahead.

What I intended to do in 2019:

  • Lose Weight & Eat Healthily – Fail: Whilst I have tried to eat more healthily I need to reduce the quantity and amount of snacking between meals.
  • Continue STM32 Development – Pass: Whilst I dabbled with rotary encoders and non-blocking code I didn’t make anything useful.
  • Buy A 4k TV – Pass: Ticked this one off the list at long last, it looks great.
  • Watch Less TV – Fail: I probably have been watching too much, but then I have watched some really good shows.
  • Read More books – Epic Fail: I’ve hardly picked up a book despite it being within reach.
  • Work Less Overtime – Fail: I’ve worked more than I expected do to some changes at work. On the plus side it has paid for the TV.
  • More Website Updates – Slight Fail: I did some work on setting up a framework for a static site that is more suited for reference style content. I haven’t done anything with it as yet.
  • Increase Savings – Slight Pass: They are on the way back up but I have treated myself to a few things so the increase isn’t as great as it could be.
  • Contribute To An Open Source Project – Fail: I’ve not spent enough time on my own projects let alone contribute to any others.
  • Write Something In Python – Fail: I’ve focused on C++ this year and not looked at Python.

Not the best of years based on what I wanted to achieve. Planning my free time a little more might help achieving my 2020 goals.

What I intend to do in 2020:

  • Lose Weight & Eat Healthily – An improvement is needed for 2020.
  • Get More Exercise - I need to add a few sit-ups to my day and a bit more walking.
  • Upgrade Router – Whilst my router still works I need to look at getting one with better future software support.
  • Buy A Laptop – This is the big ticket item for 2020. Almost purchased in 2019 it was put back as I couldn’t get the specification of machine I wanted. Whilst I did obtain a Chromebook which has its uses, a more powerful laptop is needed to replace my ageing machine from 2006.
  • Read More Books – I have books mounting up and I need to get through a few.
  • Work Less Overtime – I’ll give this another go and see if I can manage it.
  • More Website Updates – Might be possible if I achieve my goal of working less overtime.
  • Increase Savings – Needs a good push so I can get closer to paying off my mortgage.
  • Contribute To An Open Source Project – It’s time I did something more to give back to the community.
  • Write Something In Python – If I don’t do it soon I will forget how.
  • Make A Complete STM32 Based Project – It’s time to put together what I have learnt so far. It might also give me something to write about.

For 2020 there is one must achieve goal and that is to lose weight. I failed to make any progress in 2019. At the time of writing I am (still) around 93kg. The first step in the weight loss program is to get under 90kg and stay there. Any improvement on that will be a big success.

I Still Dislike KiCAD

I made another attempt today to use KiCAD 5.0.2. There was a schematic for an 8-bit computer I wanted to investigate. In addition to looking at the actual circuit I wanted to see how KiCAD handled the separate schematic sheets that made up the project.

The KiCAD interface has once again left me frustrated. Zooming in an out with the mouse scroll is a pain as it zooms too much for the slightest movement. I have other issues with the way pan and zoom differs from other CAD packages but I don’t see this ever changing.

I did like the way I could enter the high level overview and then enter the individual hierarchical blocks. However moving between blocks required me to leave and renter the sheets. I went looking for something that would allow me to switch between the sheets that made up the whole schematic. I found box that would open up and allow me to select the sheet I wanted. It would then immediately close again. Not great if you want to switch back and forth between sheets quickly. When using DipTrace I have been able to have tabs for each sheet along the bottom of the screen and can easily switch between them. I cannot see anything in KiCAD that allows the same functionality.

I’m sure there is a lot to like about KiCAD but there is so much I dislike about it I can find a reason to persevere with it. I would submit a bug report or two but I have found existing reports to the issues which the developers don’t intend to fix.

WordPress 5.0

I have been waiting for the release of WP 5.0 as I have been keen to try out the new Twenty Nineteen theme. Having looked at a preview of the theme I have mixed opinions.

The new editor that I can use to create posts is easy to use. At the same time it moves me away from the HTML/CSS editing that I normally tweak. The new theme makes use of more of the new blocks functionality. The downside for me is that I will have to spend some time trying to recreate some of the aspects of the site which I want to move across.

I have used some particular formatting styles for some of the pages of the site.  I'd like to continue to use the same style but I need to understand if the new block editor can help me do that.

I still plan on moving to the new theme eventually. I plan to upload some more of my notes on STM32 development.  This will be after I understand how to get the best out of the new theme.

STM32 Developments

Recently I have been a little quiet on the post front. Work has been busy and I've just not found the time to write anything. Behind the scenes I have been tinkering with an STM32F103 and connecting some WS2812B LEDs. Progress can be followed on GitHub.

Where is winter?

As the year draws to a close I am left wondering when winter is going to begin. A few cold days here and there and the odd light frost is all we have received. Where is the snow lying on the ground? Where are the slippery pavements coated in ice? I am going to need to source Christmas cards for next year without the winter scene, if this is they way things are going.

Termux – Custom Prompt

Termux is a terminal emulator and Linux environment for Android. I wanted to customise my prompt in the same way that I have done on my desktop/laptop machines. Ordinarily I would have a .bashrc in my home directory where I would make the changes to the prompt (PS1). However Termux doesn't recognise this.

I found a reference to configuring this: http://blog.ataboydesign.com/2015/12/01/termux-is-the-one-for-android/

Following this method the changes to PS1 are made in "/data/data/com.termux/files/usr/etc/bash.bashrc". I had been successfully using this method for a while with no ill effects. That was until today when I realised an update to Termux had overwritten the changes. Not what I wanted.

So after some searching I have found a solution that should survive future updates. In your Termux home directory save the following as ".profile". This will be run when Termux is started and make Termux look for a ".bashrc" file in the home directory.

# .profile
if [ -n "BASH_VERSION" ]; then
  # Echo msg to indicate file is run - can be removed later
  echo "Profile load.bashrc"
  # include .bashrc if it exists
  if [ -f "$HOME/.bashrc" ]; then
  . "$HOME/.bashrc"

Create and edit ".bashrc" with any custom options. Exit and restart Termux and your custom configuration should be loaded.