2024-03-29

The first council rant, and my apologies

So, as predicted, I got cross over recycling. Yay, someone predicted this would happen...

We have the recycling bags (and we now have the green glass bin and the blue food waste bin). We are getting ready for the last commercial bin collection this weekend. We have been getting the hang of it. As I say, it is all a bit new to us.

I do have concerns over how much of this actually gets processed as we are led to believe, and why it is all left to amateurs like us, but we are working on getting it right anyway.

These red and purple bags (paper/card, tin/plastic) are weekly. I got the sheet saying what goes where and how often. I got the calendar showing the A/B weeks, and the couple of cases a bank holiday matters (mostly they don't, like Easter is normal collection days).

The road I am on is the main road. We see the road with these bags every Friday. My immediate neighbour, and all the houses opposite, put these out on a Friday. Everyone I share a postcode with puts them out on a Friday. We noticed this. I had planned to double check the day for glass and food waste, these bags are obvious.

Getting it right

I put them out last Friday, and they were emptied, yay, we have the hang of the system!

Like everyone else, I put them out for today (last night). There were not collected. Everyone else's was. I was fuming.

I emailed the council, but the contact email address says "Please note that this mailbox is not monitored", so is not in fact a contact email address. What the hell?

OK I can message them, which turns out to be facebook, and that turns out to be a robot, so again, not a contact!

I have ranted over the contact email address not being a contract email address, and feel justified in doing so.

Anyway, having got cross over the non collection (and more so over the email address), I thought I would just double check. I don't know what led me to check, but I did. And guess what, our house is not on the same collection as the rest of the road! We are Wednesday (for these bags). Even though we are on the main road, a drive and front door on the main road, an address on the main road, the postcode is the same as neighbours on the main road, but no - we are in with the collection for the side road (the one where the residents feel adamant that we are not anything to do with them and their fake resident permit parking scheme). I really did not expect that at all.

So I was wrong!

I am not like Trump, I don't handle being wrong well, and it is bugging me.

Thankfully a slight rant on twitter and facebook was only there a moment and quickly deleted.

But it is still bugging me. I try hard not to be wrong, and this will annoy me at least the rest of the day.

Usually when I get cross like this, I check my facts very carefully before ranting, and I did not follow that rule this time. That was bad of me. It is a good rule to have.

I apologise to the council for the ranty email (sent via their press office email address) about the collections.

Get it right now

Many councils have APIs. I had to screen scrape the Monmouthshire council site, but looks like I have a plan now.

Another use for an e-paper sign.

I can add a few more bits to this I expect.

Update: Maybe I was too quick to apologise?

Monday, black bag and green glass, 6:47, still there, not collected.

Tuesday, blue food waste, still there, not collected.

Wednesday, red (card/paper) and purple (tins/bottles), not collected.

Result: Finally after complaining, they have collected all.

What is extra fun is my ranty (and wrong) email, via the press office, did get to someone, and they asked for more details, and I was able to explain that "all three missed collections" have now been sorted, and they seemed quite happy. Embarrassment cancelled out by council incompetence - unexpected!

Update: New week, this week's first missed collection was food waste, Tuesday.

Update: Now 5th missed collection, red/purple bags, Wednesday.

Update: After missing 7 of 8 collection days, we finally got a visit from a supervisor - he was happy with where we were putting rubbish, gave me his mobile number, co-ordinated with the teams and ensured collections. He then worked with us to co-ordinate a change of collection to a different schedule (matching the rest of our road) which was a lot easier for us (fewer bin days). Well done.

2024-03-24

Hot tubbing...

I have a hot tub, it came with the house over 3 years ago.

Managing a hot tub is complicated, and expensive. The expensive part is the power. But chemicals also cost. For reference, it uses around 17kWh a day on average.

I use it, I spend typically an hour or two reading a (waterproof) e-book in the hot tub most days. It is very relaxing and I feel worth it. And then Alice (granddaughter) might like to join me on occasion too :-)

When we moved in, a hot tub was new to me, and I read up on it. You need to maintain the pH, and chlorine levels, which means chemicals (last people left some for us).

Initially it got cloudy quickly, but after some time I found "clarifier" stuff. Eventually I found some cool "tablets" that have chlorine and clarifier and you put in a "floater" to dissolve slowly over several days. This worked well.

I eventually got to the stage that for at least a month the hot tub was clear and nice. But it would gradually go off. It would change a tad from a slight blue (which is normal, unless you have heavy water which is clear!), and change to a green tinge. The pH test strip would go a colour not even on the bottle. It would become a tad cloudy and more unpleasant and I would empty and refill it. This would typically take a month or so to happen.

More recently (and this is over there years now), it has changed. I got some new "pH increaser" (as what the previous people left had run out) and new "chlorine and clarifier tablets", and a new "floater" that allow slower dissolving. I have no idea which of these has helped.

But for the last, nearly, three months (and I had to check my power logs to confirm last refill), it has been nice. Crystal clear, blue not green, not cloudy. I have not even had to change the filter (which I typically do when empty/refill as compared to power cost of doing so a new filter is cheap). The pH has been stable, and sensible, and not a stupid colour.

I do have a wet vacuum cleaner thing that allows me to extract any flotsam that, err, sinks, (leaves and shit), so does not get to filters, rather nicely.

I don't know which of these things helped, but it is way better now.

I can only conclude hot tub chemistry is basically voodoo, much like RF PCB tracking design.

P.S. Environmentalists, we make more solar than the hot tub uses on average.

Learning to count [in recycling] ♳♴♵♶♷♸♹

It was predicted the first rant would be about council not collecting a bin - sorry to disappoint, it is about the Brady label printer and its labels.

You will notice the recycling symbol on the cartridge. I can only assume there are incentives for companies to do this or possible some apparent PR in doing so.

But let's consider this specific case, a plastic cartridge for printed labels. I wonder what bin that goes in, especially as my council seem to have quite a complicated mix of bins to choose from.

Well, helpfully, Brady include a little (paper) leaflet in with the cartridge to help you know.

This is it.

There you go, recycling instructions, in lots and lots of languages. The fact that the only text is actually the bit saying "recycling instructions" makes that a tad crazy to me.

But what are the instructions... Surely it is just which bin to put it in? Well, let's look... WOW!

Only 6 steps...

  • Use a screwdriver to remove the chip.
  • Use a screwdriver to break apart.
  • Break apart.
  • Remove remnants of label (this goes in general waste bin 🗑), and the bottom of the case which goes in ♸.
  • Separate the spindle in to 3 parts, one goes in general waste ðŸ—‘, and two in ♹.
  • Finally dispose of the rest, a washer in ♳PETE (is that the same as just ♳?), and a washer in ♴HDPE (is that the same as just ♴), The chip in electrical waste (WEEE) which is not something the council collect and I don't even have a unicode symbol for. Some in a 40 FE waste (again, not finding a symbol for that), and another washer thing, and the top of case in ♹ (unlike the bottom of the case which is in ♸).

The leaflet ignores (and I have emailed Brady to ask why):-

  • The leaflet itself, presumably paper waste?
  • The cardboard box it comes in, presumably card waste?
  • The plastic bag it comes in - maybe non-recyclable, or perhaps another plastic waste number?
  • The backing paper that you remove when printing a label?
  • The label itself if later removed and disposed of? This is presumably a per product matter as they do different materials for labels.

This is at least EIGHT different types of waste you are expected to separate somehow (maybe 9 if the wrapper is another plastic type), on a small label cartridge. And I have no clue how those different types of waste map to the council bins, seriously. And I am not paid for this!

To clarify:-

  1. ♳PETE for a washer
  2. ♴HDPE for a washer
  3. WEEE for the chip
  4. 40FE for some metal bits
  5. ♸ for case bottom
  6. ♹ for case top
  7. General (non recyclable) 🗑 for tail of label
  8. Paper waste for instruction leaflet, and assuming the same, card waste for the box
  9. The plastic bag, not mentioned, may be 🗑 or maybe not
  10. The backing paper (is it paper) for the label
  11. The printed label itself - per label type, I assume

The fact that even Unicode cannot keep up with the number of waste types is clue here.

Please tell me this makes sense

Updates:

  • I have emailed the council with a link to this asking which bag each of the 8/9 types of waste apply, I'll post their reply.
  • Surely people making "clone" label packs will want the chip, rather than going to WEEE?
  • I am told these symbols ♳ to ♹ don't mean "recycling" but are just types of plastic, so as "recycling instructions" these are bullshit, and actually most of it is simply not recyclable. Will be interesting to see what council say.
  • Would it not be better to make these things so they can open, and load a new reel of paper and close - reusing instead of recycling?

2024-03-23

Brady M211

I got a new toy. A Brady M211.

I used to have the hand held thing, the BPM21-PLUS (so not even the M210), with A-Z keyboard.

Label printers are handy, honest, but the labels are stupidly expensive for what they are.

So what is different about this?

The good things are, it is a robust unit, with rechargeable batteries (USB-C socket), operated by bluetooth from a phone app. Works well. Built in cutter. The app has a lot of options, including many barcodes, more fonts, images, lots more symbols, and so on. The fact you can save labels and formats is great. So yay, nice. love it.

Also seems designed for workmen, and can come with a belt clip and the like. Sold as "robust", toolkit type device, and looks the part.

The down side?

One of the main issues I found was this new "authentic™" thing. I wondered why a new logo. Turns out the old label stock had simple electrical contacts to tell the labeller which it is, but now they have something "smart", compatible with the old labeller still.

So I gave the old labeller to my son, and found that I ended up with 9 label cartridges that actually don't even work with the new labeller - so he is doing well out of this. A couple are clones, but the rest are genuine BRADY®, just older stock. At something like £30 each, that is annoying.

I don't expect it will stop clones, but is rather annoying.

There are also a list of issues I have emailed them about. I think they can fix all, and will be interesting to see if they do. No reply yet!

  1. It has date/time options, which is great, and has a load of formats. But lacks the one and only format I would ever use, the standard, ISO8601. How did they forget that?!
  2. It does barcodes, loads of formats, and can even scan an existing barcode and make one, but the default font uses crossed zeros, even for EAN which is meant to be OCR-B and very much not crossed zeros.
  3. They have a lot of symbols, including a load of COVID19 warnings, but don't have antistatic sensitive device symbol?!
  4. They do QR codes, but they are not well coded and so way more dense than they need to be. I suggested my QR library.
  5. I installed some extra fonts on my iPhone (that is a faff), notably OCR-B. They show in other apps, but for some reason the Brady app does not see them - arg! I found a font menu, which allows me to install more fonts - why not use the iPhone fonts system, but OK! I now have OCR-B as default, which is cool.

Overall?

It's a label printer, and prints labels, it works. I really like (as before) the self-laminating cable labels (one of my main uses). It does "just work", and is very nice. Just expensive to use, and those niggles. But, overall, very cool. And yes, I got fonts working. Just don't ask about recycling!

No, not this, SMBC...

Bugfix of Damocles

There are a few things that crop up in software development, and I am sure in other engineering.

I am sure some people have heard of is the Heisenbug. Which is a play on words related to Heisenberg uncertainty principle, which, in simplest terms, means that when you try to measure/observe something, you change it. In software a Heisenbug is a bug which goes away (or moves) when you add code to try and debug or measure it. They are not that common, but when they happen they are really a pain in the neck.

So today I want to coin a new phrase (and I bet I am not the first), the Bugfix of Damocles. Like the Sword of Damocles, with the risk of something happening any moment.

This particular bug fix is a hopeful fix to a bug, one you really think will fix the problem but cannot, for various reasons, be sure. This happens notably when you have an intermittent problem, perhaps one that takes days or weeks to manifest, and even worse when it is a problem that only happens on a live system. So you have no choice but to try the bug fix on real customers.

  • It will take days, weeks, or months to know if the bug fix works and fixes the bug.
  • However, you may find that it does not fix it at any moment (i.e. when the bug happens, the system crashes, or whatever).

It is a stressful time.

I won't go in to details on the latest Bugfix of Damocles that is stressing me, and my team, as they will be doing an awesome blog post on this, and the previous issue, both of which are really obscure hardware issues that we are working around (we hope).

But, suffice to say, I have made a new mode for my e-paper signs (thanks for suggestion Daniel).

P.S. The sign now uses SNMP to update automatically :-)

2024-03-16

Missing unix/linux/posix file open option

What I would like is a file open option for "create replacement file".

The idea is that this makes a new inode in the same mount point as the target filename, which has no actual directory entry, but on close it replaces the directory entry of the specified path with the new file.

Why?

There are many situations where you want to make a new file to replace an existing file, but want the change from old to new file to be atomic at the file system level.

Something reading the half written new file is bad.

So you make a new temporary file, and then finally use rename() to replace the original, but that is only atomic if you are on the same mount point. You cannot simply use a mktemp() in /tmp for that as the target file may not be on the same mount point as /tmp. So you make a file with a dot prefix and some suffix or something. Messy. And needs cleaning up if you crash.

Easy?

It really would not be hard, I am sure, for the underlying filing system to support this as a file open mode. The atomic replacement of the directory entry is already a thing in rename(), and the idea of a file not in a directory but using space while open is easy - make a file and unlink it before closing. So the underlying mechanisms for this exist.

The only caveat, as a really useful extra feature, would be if not a "clean" close() call, i.e. a close because code aborted or exited without calling close(), it would *not* replace the original, just lose the new file as not in a directory. This helps cover the crash case, and always cleans up inherently.

This would be so useful.

And, of course, make gcc use this for making binaries!!!

Just to be clear, I am not suggesting "buffering" the whole file. The system to have an open file not in a directory already exists. One can create a file and open it and unlink it and still write to it, on to "disk". That is the "buffering" here. Just atomically either lose the new file (if crash, as would happen if you did that) or replace the directory entry with it and lose the old file, on clean close() call.

You can nearly do it!

Thanks for all the feedback, it is close... open() explains a _GNU_SOURCE specific option O_TMPFILE. This allows you to create an unnamed file which will vanish when you close, even if you crash. It then explains you can use a slightly convoluted call to linkat() to name the file before you close it. This nearly does the job, but not quite.

  1. The open() call needs a directory so it knows file system. Annoyingly you cannot pass the filename you want and have it work out the directory. It has to be the directory, meaning you have to faff about getting the directory from the file name. Not a big faff, obviously.
  2. The linkat() call needs CAP_DAC_READ_SEARCH set. There is a convoluted way to using /proc/ otherwise. More faff. Also, given that there is a documented way around the limitation, why is it dependant on a capability in the first place?!
  3. The linkat() call expects the new filename not to exist.

This does allow a file to be atomically created as a complete file, with no temp files if you crash. But this last point is the show stopper as it means you have to unlink() first, leaving a small window where the file does not exist. That or you link to a temporary file name and use rename() which puts us almost back where we started, albeit with a smaller window for leaving a temp file behind.

The obvious fix would be a new flag to linkat() to allow replacing the new file. That or allow AT_EMPTY_PATH in renameat2().

2024-03-12

Separating waste

I was not sure of posting this as it makes us look bad, so sorry about this.

Over the last few, what, decades, domestic waste collection has changed. And mostly without us noticing!

It all started a long time ago, we used to have a "dustbin" and any number of black bags taken away by the council. They had a legal obligation to remove all domestic waste.

Then one day it was "green wheelie bin", and they provided one. There were sizes for different houses. At this time we had five kids, and, I think, a lodger. We made plenty of domestic waste. We got a big bin.

So it was wheelie bin and extra bags.

Then the council said they would not take extra bags - it was because the vehicles were all set up for wheelie bins now. It made it much more efficient. So I asked.. "If it is more efficient, how much can I expect to see a reduction on my council tax bill?", and I did not get a sensible answer. I asked how they know it is more efficient, with no helpful answer!

Anyway, they said they were not restricting the amount of waste we produce, but it was a limitation of the vehicles, so I suggested "fine, empty the wheelie bin, then put the extra bags in the empty bin, and empty that". It was a simple and practical solution, but for some reason they were not happy to do that, suggesting their "reason" for not doing it was not as they said.

The answer was simple.

We purchased another wheelie bin!

For some time, many years, this worked, even when we moved house. And many locals had an extra wheelie bin.

Then, one day, with a note saying the would now only collect one wheelie bin, they stole our extra wheelie bin! I meant to sue them for the cost.

I gave up!

This is very unlike me, but I decided to give up!

Just to be clear, I was not giving up on recycling or trying to avoid it. At the time the council only did the one type of collection - the general waste green wheelie bin. My issue is they stole one of our bins and refused to actually collect all the waste we produced.

So I simply engaged a commercial bin collection at the house.

I kept meaning to bill the council for this on the basis they had a legal obligation to collect all domestic waste, and were failing. I never got around to it.

When we moved, 3 years ago, we kept the commercial collection, simples. Why not?

Left out of the loop here

The problem is we have been left out of the loop here. For decades now we have simply put all rubbish in one bin, with black bags, and that was it, as we have for decades before.

Whilst others have gone through many changes of many coloured bins and bags and so on, we have not.

Turning over a new leaf...

As Wales have now made even commercial properties do waste separation, we have to get in to this, all of a sudden. This is a bit of a shock.

It does not look too hard, honest. Cans, bottles, card and paper, etc.

It seems laws have changed over the many years. We have not had to notice.

So yes, we are finally doing the domestic waste separation - thrown in the deep end. I am almost shocked you cannot just pay someone to do that for you - seems an obvious commercial opportunity.

It means a place in the house for the various bags, and bins, and containers. Finding what day they collect each. But I am sure we will manage.

Thanks to one of my daughter's for help with this.

Doing things right.

As someone says, I like to do things right, and we do have solar power generation we feed in to the grid and a green energy tariff and so on. I don't drive, and have not for decades. We had not actively tried to avoid waste separation, but to be honest I have not looked in to it either. It all kicked off with the council being arseholes and stealing our bin, and then it was a non issue as we got a commercial bin.

I am not entirely convinced the pushing responsibility on to individuals just going about their lives is the answer to climate issues, when so many big industries dwarf anything we can do, to be honest, but I do understand we do all need to take things seriously, and I already do quite a bit - just not this specific bit until now. Sorry. And I chose to post this to say sorry to some extent.

Update:

Wow, it is crazy, there seem to be no standards. I decided it would be a good idea to get some partitioned and/or stacked bins for the house. Make sense.

But the labelling and colours do not match what the council have. And the categories do not match. E.g. we have a green plastic tub for glass, but tins go in with plastic. Yet almost all bins you can by combined glass and tins in one bin, so would have misleading labelling, and nothing matches the colours.

2024-03-11

How not to QR (again)

I have mentioned a bit about QR codes before (here).

But today I saw an example of a QR done badly!

The QR code contains a reference, an alphanumeric code and number, and name of student. But the passcode is just the first part (8 character code).

So what is wrong here?

  1. The machine readable part, the QR code, has the redundant extra information of student name, why? QR has error check and correction code, so no need.
  2. People expect a QR code to be scannable, and for that to be anything useful it is best done as a URL. This is just text.
  3. The instructions ask you to go to a web site, and enter a pass code.

This could be so much better as a URL with a passcode on the end, perhaps as a query.

  1. The user could scan it, and even if it only went to the web site, that saves a lot of typing.
  2. The web site could use the query on the end to actually do the next step and save typing the passcode.
  3. If they need the QR for face to face stuff, collecting photos, whatever (which does not seem top be the case, so why even have the QR code at all on the paperwork), then scanning can easily skip the URL part and read the passcode part. Though the wording sounds like this may be printed first and scanned as part of taking photos - fine, scan with a URL in it, that does no harm.

And example of a case we have is serial numbers on FireBricks.

The QR code contains HTTPS://FB0.UK/900000050159 which serves two purposes. When scanned by a user it goes to the product page, but when scanned by my staff for a serial number on a delivery note or invoice, the HTTPS://FB0.UK/ is skipped by the system and the serial number correctly recorded.

2024-03-09

Except for access

Drivers should be aware what road signs mean. And so they need to be clear and unambiguous.

But some are a tad more challenging than others, and this is one example.

The "no motor vehicles" part, is easy. The issue is the "except for access". The signage site from which I nicked this image says "this sign grants permission for vehicles to pass but only for reasons of accessing premises or land adjacent to the road." Our version has Welsh as well :-)

That is not a bad description.

But it seems not quite 100% clear in some cases. It seems (and if someone can confirm this is correct, or not, do comment), that these signs relate to an order that the council may have made. That order may have subtly different wording. The problem is that the motorists seeing the sign is in no position to find the order (which may be on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying "Beware of the Leopard" in the basement of the council offices). So hopefully motorists can rely on something simple like "for reasons of accessing premises or land adjacent to the road."

The only reason this came up is because I live on a corner of two roads, a main road, and a side road. The side road (well, three connected roads/closes from it) are subject to such an order. And it seems, before we purchased the property, this all kicked off with local residents of these side roads, understandably, pissed off over people parking in their (!) road just to visit the station - because the station car park is too small and costs money. I do understand, really. What we need is better station parking at a reasonable price, or free. That would solve it.

But, for some reason that I do not know (I was not here), even though including the next three properties with an address on the main road, like mine, they did not include what is now my property in any of the discussions, or "mailing list". And being not on the mailing list means now I am "talking out of my arse", oddly enough. I have met some of these people, and face to face they seem nice enough, and I have done my bit for the local area and the road (repointing a wall, and refurbishing a sign). I want to be a part of the community. But those that know me know that I try to do thins "right".

So what is the issue?

Well, I investigated this some years ago, largely because the side road has a load of "resident permit parking only" signs (cheap plastic, stuck to lamp posts, in English only, big clue). They seemed suspect at least. I found there is no way to apply for a permit! Indeed, when some of my visitors parked on the side road they got harassed and stickers on their cars, which itself may be an offence.

The person from the council, discussing (what was then a temporary order) was quite confrontational. He was adamant that "access" to my property (on the corner) somehow did not count, as I needed a drive on the side road(s) covered by the order. Well, some of the properties "on the road" don't have driveways, so clearly that makes no sense and even the legislation revers to pedestrian access. The fact we also have access from another road also makes no sense, but he tried that (several other properties have various levels of access from other roads as well). But he was pretty adamant, and I go nowhere (apart from them moving the signs maybe 30cm or so, in order not to actually be on my property).

To be clear, we have a nice drive space (three cars), and rarely will a visitor not be able avail themselves of that, but if not, then parking in the side road makes sense, just like anyone else in the area - these are not people parking to use the station, after all. Parking on the main road, a major A road, is not a good idea.

It came up again recently following a facebook post, which wound me up enough to email the council at 2am, but I got someone way more sane, well, mostly.

The "order" is not too bad now. It has been finally made a permanent order. "No person shall cause any motor vehicle to proceed in any of the lengths of road shown coloured blue on Drawing Number 1823 attached to this order except for access to properties situated along those lengths of road.", which leads to the question of "situated along" - a wording that is not quite the same as "adjacent". Adjacent definitely covers my property, as I have a long wall on a border on the side road, but what is "situated along"?

The council stated it is a contravention if "a motorist accesses these roads with the intention of accessing a property or business without a direct vehicular or pedestrian access point from.." so that sort of means they consider "situated along" as "having a direct vehicular or pedestrian access point from". Is that the actual legal meaning? I have no clue.

Actually, that is really odd, they have to have the intention to access a property or business at all, and one not on the road. Surely they can have intention to access a property on the road and one not on the road? That wording is way more restrictive than the actual wording of the order. I think it is therefore wrong.

Should it be this hard?

My concern here is that it should not be so complicated! How the hell is a driver meant to know the exact wording of the order, know it says "situated along", know that accessing a property not on the road (as well as on the road) is prohibited, and what "situated along" means exactly. No, clearly that is insane!

Do I qualify?

Well, thankfully, even though my property is absolutely "adjacent" to the road, and has a nice long wall on the road in question, it has maybe 1.5m of non-wall which is clearly pedestrian access from the road in question, with a pedestrian dropped kerb even. So I am pretty sure that is the case.

This is a slight problem as I am not "in the club", and have no "permits" (more below). So my visitors may quite legally enter the side road, and park, to visit me, without showing a permit. Why they chose to exclude my property from the discussions is unknown to me.

Crossing the line.

One slight caveat on the email from the council was "The point at which the order begins is where the signs are installed". Well, this is 100% incorrect, but I wonder if he said this to try and exclude me. The signs are the end of my wall, and my "pedestrian access" is before the signs. To park and access my property on foot means walking back passed the signs.

I say it is 100% wrong, with confidence, as the order states the names of the roads, and even has a plan with "blue" marking the roads. It shows the order starts at the main road. It even shows the signs position. So my property absolutely has pedestrian access from the area covered by the order, if that is what "situated along" actually means, and not just "adjacent" to. Even if the order started at the sign, I would be properly "situated along" the named road by the definition given, but clearly the order "starts" several metres before at the edge of the main road.

Why is this all stupid?

This is all silly, and the reason is that the clear stated intention is to restrict parking. The order says that is why it is made. It is what the locals want. It make sense. But this is not a parking restriction!

One issue is that the legislation allowing the council to even make a "no motor vehicles" order lists why they can do that, and parking restriction is not one. I raised this with the previous (unhelpful) contact and the best he could do was "maintain the character of the area". I pointed out the character of the area was "lots of cars parked with people using the station" and he was "improving" (i.e. not "maintaining") the character. The response seems to be the order saying: "If any person wishes to question the validity of the Order or any of its provisions on the ground that it or they are not within the powers conferred by the Act, or that any requirement of the Act or of any instrument made under the Act has not been complied with, that person may, within six weeks from the effect of the order 2a June 2023, apply for that purpose to the High Court." which seems odd, as I would expect if the order is invalid, it is invalid without time limit, and someone could challenge it as invalid in defence of a penalty charge / conviction for the driving offence. I may be wrong.

Surely the answer would be to actually make a proper parking restriction?!

Even if the order is valid, then what?

If the order is valid, then what? Well, it seems to be a moving traffic offence enforced by the police, so that seems to me to mean the police have to see (or maybe CCTV) a vehicle crossing the signs, and then what? Follow the driver and all passengers to see if any of them access a property? The rules allow for "intend" to access a property so someone could aim to visit someone, park, call, and find the are out, and leave, and be legal. Someone could visit and park on the basis that it is close to a property they will visit when the return from going to Newport on the train - again intention to access a property "situated along" the road even if police officer follows them to the station. And then what is access, well, anyone actually intending to circumvent these rules just needs a few Chinese menus, and record themselves dropping one in a letter box on each visit as they walk to the station. They have "accessed" a property in the area covered by the order in doing so, and having done so there is no parking restriction to stop them parking for as long as they like.

So, in essence, enforcing this is almost impossible. My understanding is that these orders are usually for "rat runs" when someone drives in one end of a road and out of the other end - which is easy to enforce. Trying to enforce this use "as a parking restriction" has to be almost impossible.

So the best they can do is infer someone parked may have not planned to visit someone, because they have no permit. If all of the residents ensure all visitors show a permit, then maybe that can be inferred (apart from the Chinese menu trick). Apparently the whole permit scheme has been agreed with residents (not me) and council and mayor and police, so facebook says. But we have not been included, so our visitors will have no permit, so just as well no permit scheme exists legally.

But it gets worse, there is a small single track road leading in to the same area that has no signs, so even if someone was parked, and did not show a permit, and just parked to go to the station, they just have to say they came in that way, no passing signs and so no moving traffic offence.

The fix?

Scrap this stupidity, which is questionably legal anyway, and leaves so many loopholes, and actually do a proper parking restriction, or better still have free and available parking for the station so nobody needs to park in these side roads!

If it was actually permit parking, we would apply for a couple of permits just in case.

I want to be part of the community here, and any help I can offer in making this right and workable, I am happy to offer. I do have a property "on" the road in question. But telling me I am "talking out of my arse" on facebook is not the way to progress matters, is it?

We'll see how it goes.

Or this :-)

THINK!

This was the scene I saw, walking from my house last night.

The reason is that there are some over night closure of one side of the road (behind me in that view), so one way and traffic lights, for resurfacing (something we all want done).

So what's the problem? Interestingly, posting this on mastodon, there was almost entirely very understanding response (contrary to the arguments that would have instantly ensued on 𝕏, and why I avoid it). Indeed, some pointed out they would ask the council to move the obstruction to the footpath, or take in to their own hands (not ideal). But is there a problem and what is the solution.

My main issue here is that those placing the signs probably did not think for one second about what they were doing. They presume that (a) they cannot possibly inconvenience drivers by putting the signs on the road itself, and (b) that this would be no inconvenience to pedestrians or that pedestrians simply don't matter somehow. It is also very common when there is a cycle lane for signs to appear in the cycle lane, totally blocking its normal use.

What is weird here is that these signs are to announce a serious inconvenience to motorists - a blocked lane and traffic lights, so considering not inconveniencing them with signs in the road seems a tad odd even. It's a 20mph road, with good street lighting, so not like they need lots of advance warning.

For pedestrians, many of us can walk around them, but a lot harder for wheelchair users, or blind, and so on. Not a single thought given to them.

Is there a solution? Well the main thing is consider all road users. It may be that the signs could have been placed in the gutter and partly on the pavement leaving space for both cars, and pedestrians (even in a wheelchair) to pass with minimal inconvenience. It would depend on the road/pavement in question, but this pavement may be wide enough. When not the case, well, these signs are not related to pedestrian use, so simply put them in the road, surely?

But whatever, someone putting up signs needs to actually think - simple as that!

2024-03-05

One can dream

It is nice to dream, and daydream even. Is it a "daydream" when lying in bed, not actually asleep, but just coming up with daft ideas to ponder while you fall asleep? You all do that right? Anyway, I am sure many have done exactly the same in thinking of crazy things for the hell of it, like "what if I could fly?", "what if I could teleport?", and perhaps even "what if I was a god?".

The "what if I was a god?" one is entertaining to ponder, like, I suddenly find I can do anything, (maybe I crack the back door in the simulation) - do I keep quiet and do things in small ways for fun, or what. Of course the obvious thing to do, (well, apart from just fix the climate, just fix poverty, etc), but especially with the state of world, is to smite the hell out of of some of the political figures and world leaders that are being dicks in my humble opinion. Zap them with lightning, Thor style, or make them disappear, or if you want to be subtle, just make them ill. One idea in such a daydream, was send them to hell for 1000 years and then bring them back with no time passed. Proper smiting stuff. One can dream!

But when exploring the idea you quickly realise smiting, and punishment don't make sense. If they are being dicks, just change them, use your omnipotence to just make them "nice". Problem solved.

Indeed, the whole concept of punishment, and hence also reward, and even rules, and tests, all make no sense for an omnipotent god. Would such ideas even occur to a god? They sort of make sense to a parent trying to adjust the behaviour of a child, but only because parent can't simple change the behaviour of the child directly. A god has no reason to consider the concept of punishment or reward.

If a god wants to make its beings, for whatever game it is playing, it can make them "play nice" in the first place. Or the second place, if first time it realises its beings turn out to be dicks, but obviously a god would have known that was going to happen, so let's stick to "in the first place".

This is not really a "free will" thing, either. Maybe a god wants its beings to have free well to see how things go, fair enough, it is adding a roll of the dice to the game. But free will is always limited. I have free will - I can do any spontaneous shit I like, even if silly or stupid, but my free will can never make me poke a red hot poker in my eye. My free will has limits. So if a god wants some simple "play nice" rules, like the whole "not killing other people" one, which seems sane, then just make its beings have a natural aversion to the whole idea of killing people, just like the "poker in the eye" thing. Then they can still have lots of free will but within some sensible constraints. No need to even tell them the rules, or write them down, and certainly no need to punish them or reward them in any way.

It makes you wonder why gods in many religious texts include concepts of punishment, reward, tests, and rules, when an omnipotent deity would not even have to consider such concepts in the first place.

I'm not the first to ponder this by any means, I am sure. This will have some famous person's name on it, from 1000 years ago, won't it?

2024-03-04

2038

This may be slightly topical now as we have seen a seriously surprising number of leap year issues this year, or so it seems. See https://codeofmatt.com/list-of-2024-leap-day-bugs/

It is quite amazing how any programmer gets something as simple as leap years wrong. There was some excuse in 2000 maybe as people had the vague idea that every 100 years there is no leap year, but 2000 was an exception to that (every 400 years), so for the last 123 or so years we have had a leap year every 4 years. It is pretty damn simple. Personally, a much bigger issue is coding for clock changes twice a year, but leap years are simple, and there are a lot of libraries for it, so what the heck?!

Y2K was a joke?!

One of the other things I hear is people saying all the concern over Y2K bugs was just a waste of time as basically nothing happened, which is true for most people for most things. To be honest I think I heard of fewer Y2K issues than I did for this leap year, but memory can be like that.

In fact Y2K was only a non event simply because a lot of people (I was one of them) did a lot of work (OK I did not do a lot) to make sure it was a non event. There were a lot of things that would have gone wrong, honest.

Y2K was a huge success for proactive work to avoid a problem.

Y2K was easy?

One view is Y2K was not that hard to sort, the hard work was the sheer scale of it. It was almost entirely down to the way a year was recording as text or presented or input.

The classic example is your bank card that has the year as two digits. This is basically how many Y2K issues manifested.

Decades ago, checking an expiry year was easy, is current year (two digits) smaller/equal to year on card (two digits) - if so, OK.

The problem is when the current year is 97 and the year on the card is 02 as 02 is less than 97.

  • The real fix is to make years 4 digits (leaving us with a Y10K bug), but even with sticking to 2 digits, which was simpler for many things, there are issues to address...
  • One trick is if current year is >=50 and card expiry is <=50, add 100 to card expiry and compare. Simples! and solves Y2K. This is simple but broken, as what happens when it is 2051 and a card has an expiry of 49? That assumes 2149 expiry and so allowed. There are a few variations on this, and not always 50 as the reference.
  • A better way is if it seems expired by more than 50 years then assume not expired, that is a sliding comparison (several ways to do it), and for cards that only last a few years it is by far the best as you expect a card number to be replaced (or the whole concept of cards to have gone) long before a 50 year old card pops up.

The fact there is more than one way to do this is an issue, and a time bomb waiting to happen. I bet some people did the simple way and will find issues around 2050 ±5 years for all sorts of things, oops.

2038 is hard

This is where I have to explain time_t to you, sorry.

Unix, and many other systems from that, use a type for time that is seconds since the start of 1970. It is a simple system. Those seconds were stored in a signed 32 bit number, which allows -2147483648 to +2147483647 and hence dates from Fri 13 Dec 19:45:52 GMT 1901 to Tue 19 Jan 02:14:07 GMT 2038. This seemed a pretty good range. especially for adult engineers living in the early 70s. But 2038 is getting closer and closer. I may (hopefully) live to see it.

One of the Y2K issues is that the conversion of time_t to struct tm creates a tm_year that starts 1900, so would often be printed as 19%02d and so you would see 19100 for 2000. The fix is to change it to print %d and tm_year+1900. The whole struct tm thing is messy as hell and should have set tm_year to be the year, but even tm_mon is one out, so always fun!

So what's the fix?

  • A bodge, used on some systems, is to make time_t an unsigned 32 bit number. This allows time from 1970 to Sun 7 Feb 05:28:15 GMT 2106 but not dates before 1970, which is good enough™.
  • The proper way is to change time_t to a signed 64 bit type. This is what unix/posix has done. This allows times from invalid date to out of range date... OK roughly ±292 billion years from now, which is pretty good given the universe started only around 13.7 billion years ago. But it may well continue more than 292 billion years, so we may have a Y292B bug coming up. Be ready!

So it should be simple, change time_t, right?

What's the problem?

The problem here is not that the fix is harder, it is indeed simple, change time_t to 64 bit, but that it is harder to find the problems. Y2K was a lot about input/output a year as 2 digits. It was way more visible. 2038 is harder as it is hidden. It also happens in a lot of embedded systems - the code that runs your fridge or your toaster, and much more.

For a start, any code properly using time_t will simply work if the underlying build environment and include files and libraries are all up to date to have a 64 bit time_t, and crucially the code uses all the time/date libraries. This is good, but also bad, as the code you are looking at is unchanged, working and not working code looks exactly the same!

The problem is that you need to know that the built binary image in some system was built in an environment that used 64 bit time_t. Do you know that for sure? How do your tell? How do you test?

There are also cases where code may happen to misuse an int or int32_t for something. You may have a proper 64 bit time_t passed to something that does maths using int, and then passes to something using a time_t as an answer. This will work for now, but not after 2038. This is hard to spot, and worse because int is a nightmare type it could be 16, 32, or 64 bits anyway, so may or may not work. It may work in some tests and not others!

And mostly I am talking of C code or things based on it, but many languages have time logic, and many are based on the time_t 32 bit time. Some will be easier and some harder to find the problem.

A fix to make something 64 bit time_t may also break things if that is communicated in binary in a protocol of a file. Is the other side expecting 4 or 8 bytes? So fixing this can break things in itself. This will be bugs long before 2038 in attempts to get ready for 2038.

For these reason 2038 may be way worse and way harder to track down and fix.

2036

There is actually another problem with NTP protocol which used 64 bit time, 32 bits for seconds from 1900, which expires in 2036. NTP changed to 128 bits some time ago, but some may get it wrong. It will be a bit of a dry run for 2038 issues. I hope I live to see this too, at the very least.

Anecdotes

As so many people now have no clue what Y2K was like, and may not have even been born, I say as an old fogy, one of the fun things coming up to Y2K was the bullshit.

We had customers and suppliers wanting us to make formal legal statements on "Y2K compliance".

We never signed any formal statement of "Y2K compliance", ever. We said we expect anything we controlled to work with any date, and if it failed we would work to fix it, like any other fault, and we expect the same of suppliers of things we sell.

One special case was Barclays card services, as they wanted us to confirm we were "Y2K compliant". I replied asking "compliant with what?".

I found that British Standards had created a standard for what Y2K compliance meant, and it covered working correctly with all dates before, on, and after 2000, which is way more than most people were doing. It meant that "Y2K compliance" to the BS meant 2036 and 2038 compliant!

We stated we were not as we were sure we had some systems that would fail in 2036, 2038, or 2106, or 10000. We also did not work with dates before 1582. So we could not say we complied with the British Standard on Y2K, and seriously, no company could! But we asked what standard they wanted us to comply with? Is it the BS standard or something else?

Importantly we asked if THEY were compliant with the same standard! We knew they were not.

They did not reply but later came back with new questions clearly to all customers, referencing the BS standard, and some clues on what they would do and comply with (even if not the BS standard). We did not claim to comply, as we could not, obviously, and there was no come back.

Nobody really pushed back on us saying we could, of course, not comply with Y2K compliance, and neither could anyone else, but we would try our best. Asking what the person asking the question was doing to comply was always telling. It was layers of bullshit on bullshit, and in some ways "fun". I wonder how may companies spent a lot of time on the "paperwork" and not just on actually fixing things.

Thankfully all the bullshit had a deadline.

Deadline

At the end of the day, for a lot of things, and I say this an an old fogy, it is "will I be dead before this is an issue". This is, perhaps, the problem with any such code, ever. I'd love to be around for the Y292B bug.

TOTSCO moving goal posts, again!

One of the big issues I had in initial coding was the use of correlationID on messages. The test cases showed it being used the same on a se...