markjgsmith

Notes

2024/06/01 #

Not much good sleep last night. A group of construction workers showed up in the other side of the street and proceeded to drill the ground all through the night. I'm not saying they are totally fake, but this exact thing happened a few months back. They would showup everytime harrassment was peaking and drill the same tiny spot in the ground. It was always the same lot. Eventually they disapeared for good when I pointed this out to them. Seems like they are back using the same old playbook. Likely they aren't all aware of it, but some of them are.

Also the new thing is to throw or leave 1/2 eaten food at or near me. Also half eat a tastey looking sandwich right in front of me, then throw the rest of it in the garbage. It's the worste most cruel food goading you can do. I bet they even think they are somehow doing me a favour. It always seems as though they have justified their poor behavior somehow to themselves.

Just another day. More starvation appears immonent. They gave been doing the whole cigarettes thing the past 24 hours. Empty packets left in places I go, people suddenly offering cigs. Last night someone even wedged a no smoking sign on a bench I sit. I haven't smoked for years. Just the world trying to blame me once again for the things it's doing to me.

Have to write the newsletter now. #

On a more positive note, I think I'm pretty close to getting the links on the everything page into their own little footer section on each article. I spent all day yesterday trying to find a bug in an EJS template. Absolute nightmare to track down because the stack trace gives no details of where the error occurs.

A bit of googling revealed it was likely related to missing EJS closing tags. I spent all day adjusting indentation of the template, splitting the template into multiple templates, bisecting the template, striping it down to a shell, then painstakingly adding blocks back one at a time, in order to find the bug.

Turns out I was looking for slightly the wrong thing. It wasn't a tag closing problem, it was a for loop problem. I had introduced 2 new for loops but somehow mistakenly typed the opening curly as a semi-colon.

for(var i = 0; i < blah; i++);

instead of

for(var i = 0; i < blah; i++) {

Note: in the real code both statements are wrapped in EJS opening and closing tags. I can't add those in this post because then the EJS renderer will mistakenly try to render the EJS in the example snippet, and error. Not sure how to escape that at this point, so just not including it. You'll have to use your imagination.

So anyway, visually very difficult to see the bug, especially because I was looking for problems with closing EJS tags, which is right next to it. The advice from the internet was quite literally hiding the actual problem. Somehow the bug was resulting in the same error as a missing closing tag. So that's fixed.

I've added a bunch of debug logging too, so hopefully at some point today I'll have the links displaying correctly. #

For enquiries about my consulting, development, training and writing services, aswell as sponsorship opportunities contact me directly via email. More details about me here.