I think I know why... There are two ways of making a singleton. One is static (the ones we usually use), one is dynamic (I think the editor somehow uses instances, would have to dig into it). Here's an example:
A plugin calling for another instance of an object?
I can sense the tongue in cheek, but really it isn't the same thing. getInstance() means to me "get a pointer to that object", while init() means "initialize that object"
because eventually I'll always start nit-picking about this or that, not because it NEEDS to be said, but because I feel I'm wasting my time if I don't have at least a line or two to change.
I don't know how you do it yourself, maybe you don't proof-read much of my code, I don't know, maybe you just don't feel the need to add your touch, in which case you're lucky, but in the end that's what I am: an annoying partner who's full of good intentions, but not exactly good at explaining them or justifying them other than saying it 'makes more sense'.
No, actually I don't give a damn about filesize. ESPECIALLY when it comes to the admin area -- go crazy and waste as many bytes as you like over there, because it's a private area that has absolutely zero impact on overall server performance or bandwidth.
Oh, by the way this reminds me... Why not follow the CDN setting for jQuery UI too? I mean, the same file is available through here as well...
ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js (latest hosted version is 1.9.2)
And other CDNs like code.jquery.com, of course.
Or directly use that one only. I'm not 100% sure about it though, I'm not even 20% sure about it, because if we encourage plugin authors to use the CDN version, there's hardly a way to determine that they're not double-loading it -- IIRC Wedge deletes duplicate URLs, but we can't be sure they're not going to use a different CDN or version.
(Then again, the most likely conflict to happen is that people start making a plugin out of a JS script that also requires jQuery UI, and then they add another JS script that also requires it, and voilà, conflict...)
Nah, really what I thought is that maybe you shouldn't kill yourself over rewriting a class if there's already an acceptable solution out there
But permission error = security error, right...? Doesn't that warrant an immediate hack fix?
But this has been present for months, it's present on this very site right now for all users who are not you. The difference is, it doesn't have any visible sign that it's happening here, there's nothing going to the error log. It's the same class of error that you could stuff a @ in front of, knowing that it's probably going to fail and you don't care if it does. And there are times when that's acceptable; there's plenty of cases in wextr where I've done that, with the expectation that it's going to fail, but I didn't want any kind of error being thrown by PHP when I will be cleaning it up myself.
In this particular case, though, putting a @ in it will stop the error being thrown but it won't actually fix the problem. It's not like the error must always be thrown and there's no way to fix that; I used it with extreme prejudice in wextr because I'm dealing with fopen/fread etc, where they're relying on things outside of Wedge's control to behave, but here, everything is under Wedge's control and there is no reason why we shouldn't fix it once and for all - properly.
The danger of doing a hack is much like putting a band-aid on a problem; it doesn't fix the problem. It just prevents it getting obviously worse. What we should be doing is fixing the root problem instead.
As I said at the beginning of my post, ever since you went back in full gear, I've been having a very hard time catching up with your topics... And I actually stopped trying a couple of weeks after your numerous new topics. I just couldn't keep up, so I just focused on the new ones. It's hard. I guess I'm more of a "code first, ask questions later" type...
Actually, I think you should do that as well. Your code is always of the utmost quality, you have great ideas, you don't have to explain them and ask for opinions because we're always here telling you to do it. And whatever comes later -- well, at least you'll have done it, which is not something many people can brag about.
| 1. | Crazy indentation, and C-style return values, e.g. sending everything into a function by reference and returning zero on success or non-zero for an error. Even when options were set, you'd pass them in as $class->function(PCLZIP_OPT_SOMETHING, its_value, PCLZIP_OPT_SOMETHINGELSE, its_value, PCLZIP_OPT_WITHOUTVALUE, PCLZIP_OPT_SOMETHING, its_value), it was horrendous. I understood the mentality, but I didn't like it. I spent maybe a week on a partial rewrite, cleaning up the code, trimming methods I didn't see a need for like duplicate (what's wrong with copying the damn file?) and restructuring the API but in the end I accepted that a general purpose zip library didn't really need to be written, Wedge already had a crude zip maker library, I just needed a zip extraction library that allowed me to work without unpacking the entire archive at once. |

