Doing Things Wrong

More Bad Programming

Just when I finished all the work on the slideshows, I found a serious flaw in the Nivo Slider plugin. If you put multiple slideshows on a page, each one clobbers the one before, and you only get the last one. I guess they never tested that.

But why would you put multiple slideshows on a page? Actually with a database-backed CMS like WordPress, it can happen very easily, even if no page in the website actually has more than one slideshow on it. Like this or this.

So I spent some time looking at the code, found the right place, and changed a few lines. Now my sliders happily coexist. I tried to contact the owners of the code to give them the fix. We'll see.

I've always been really good at "maintenance programming": Take someone else's code, that has probably been abandoned for years, find the problem, and fix it, preferably without making new problems! Once, in college, I was given an operating system assignment to add some new functionality to a Linux kernel. It was supposed to take a whole semester. I studied the code, found the hook for the new code to go, and found an existing function that did almost what was asked. Then it was just copy-paste-edit, and it worked perfectly. A few days after I was given the assignment, I went back to the prof and said "Here, I'm done." And it was a really elegant solution too, no one could complain about it. That prof was pissed that I didn't spend three months slaving over his assignment, but I got an A.

In fixing this plugin, I made no attempt to understand how the whole thing works. There is no need, the problem is very specific, and the rest of it works fine. I searched though php files until I found where the slideshow is actually generated, and made minimal changes just there, that have no effect anywhere else. That is what maintenance programming is all about.

So anyway, I salvaged all my work in Nivo Slider. I was not looking forward to re-doing everything in some other slideshow, just to find out that one is broken too !!! Now I want to figure out how to stop the content below the slideshows from wiggling when the slides are not all exactly the same size. I did that by making most of the slideshows manual instead of automatic, so they only wiggle when you poke at them.

Still really glad to be rid of MetaSlider and its mountain of garbage.

Update:

Exactly as I feared, their response was ... complete disinterest in a 'retired' product. They have basically abandoned the project, and do not want to spend even ten minutes fixing a serious flaw. This is why I distrust WordPress plugins. You just don't know what you're getting. I will try to press the issue.

Update:

Confirmed, they have zero interest in fixing this, even if I give the whole thing to them for free. This is another example of why it is so dangerous to use free software. One day it will break, and you'll be out of luck. My guess is the original developer left, and they don't have anyone who can deal with the orphaned code ( although I did easily ! ) I would be very leery of buying anything from ThemeIsle.com.

I should change the title of this post to More Bad Programming and Support.


now

The new paint is dry enough to handle, so I re-assembled the headless bridge. It is sitting on top of the piece of scrap wood that I screwed it to while I was painting it. That gives you a good idea of what the hammered paint looks like if you lay it on thick enough. The bridge is smoother because I sanded between coats. I also rubbed some of the shine off it. By the time I get back around to this, the paint will be rock-hard. I had to do some careful scraping to get the saddles to fit back into the tracks.

Printed from luthierylabs.com