...life can be translucent
Menu

Yi debugs a plugin

Yi debugs a plugin

I’m not sure what kind of geek it takes to appreciate this reading – probably something quite extreme – but I think it’s brilliant and wanted to share.

The background: a helpful programmer had fixed up a WordPress plugin for me, for use in the redesigned version of Clarity (still a work in progress). It all worked fine until I tried to add a sidebar to the page displaying the plugin output. Then the sidebar suddenly ceased to work as a sidebar – it was ‘displaced’ to the bottom of the page.

I set out to troubleshoot this through trial and error. Tried removing the plugin display from the page – sidebar displayed correctly. Replaced plugin display on page – sidebar displaced again.

So it had to be something about the code generated by the plugin causing the problem – but what? There’s nothing in the source code to say it has to display at full-width, or indeed to set any width at all. No funny css classes, either; it’s all very simple stuff: a heading, some divs, some paragraphs.

I have the same layout with the same right-hand sidebar on my new free reading results page, and that works… doesn’t it? I cast an online reading just to check the sidebar was where it should be on the results page. What to ask? How about, ‘Why doesn’t that sidebar work?’

Answer (with the sidebar in place next to it): Hexagram 8 with line 6 moving:

‘Seeking union without a head.
Pitfall.’

After a bit more puzzling, I found the problem. The code generated by the plugin ended with ‘</div>’, but there was no corresponding opening ‘<div>’. Seeking union without a head of its own, the stray tag had prematurely closed a wrapper div before the sidebar.

You wouldn’t necessarily think a 3,000 year old book could debug your WordPress plugin for you…

bug

5 responses to Yi debugs a plugin

  1. I’ll have to give that a try next time I get stuck on something! I shouldn’t have long to wait 😉

  2. Oh, I’m exactly the kind of geek it takes to appreciate that reading!!! My app version also contains the following interpretation of 8.5: “A unity is built of beginnings. If the beginning is not right, there is no hope of right ending.” True of Div tags as it is of life! It also reminds me of a when I was building a version of the same app for Apple Watch, a labor of painstaking effort as I’m a hobbyist developer, had to learn an entirely new language, port my interpretations off a 20 year old hard disk, and was doing it all in slivers of my spare time. I told this story about the first successful cast in an article I wrote about it in Wired:

    My new compile stared at me blankly from the WatchKit simulator on my Macbook. I pressed the yin-yang button six times (as recommended by the ancient method). BOOM! The very first hexagram the finished app throws for me is 53: Development. Development. “The tree that stands upon the mountain did not spring up overnight.” That’ll do, app.

  3. Nice one.

    My favourite technological casting moment – many years ago, someone sent me his new I Ching software for review. I was interested to note that while his copyright notice was at the bottom of every page, the translation used, with no acknowledgement, was Bradford Hatcher’s. The only other problem with the program was that its casting process was ‘stuck’: no matter how many times you cast, it only ever gave one reading: 42.6.

    (This was all resolved to everyone’s satisfaction; the software creator just hadn’t realised that ‘found on the internet’ didn’t mean ‘free to use however you like’, and was tremendously apologetic once this was explained to him.)

  4. Thank you !
    Too overwhelmed to say anything now but the blog that follows – about TIMELESS -NESS has helped explain HERE -NOW . Thank you again. Peace and Blessings to you .

Leave a Reply to Justin Farrell Cancel reply

Clarity,
Office 17622,
PO Box 6945,
London.
W1A 6US
United Kingdom

Phone/ Voicemail:
+44 (0)20 3287 3053 (UK)
+1 (561) 459-4758 (US).