Paracelsus

  • Posts: 4
Re: Unknown's thoughts on Wedge
« Reply #45, on June 30th, 2011, 10:30 AM »
Quote from Bloc on June 29th, 2011, 10:28 AM
But maybe you should back up abit...what exactly IS the purpose of Wedge? A forum alternative to SMF with extras? or a "soon-to-be-core" script that can accept plugins, and just happens to be a forum in nature..? Not saying one or the other is better in any way(done my share of making SMF into something more for example lol) but whatever direction you are headed will also influence the question of using file-edits versus hooks/plugins.
Wise words.

As an end-user I guess I prefer Arantor's way of doing things, having to deal less with issues related to the technical implementation (lack of system awareness for outdated/updated versions, file-edits from a mod that conflict with another mod, having to change file and folder permissions back and forth, etc), and being much more interested in having defined groups of modifications that are a world "per se" and where the discussion focus is on the features built into each mod.

Although I value a lot SMF's flexibility of being able to change almost every imaginable thing in the system I just love mods like SimpleDesk (which is a very nice piece of software, congrats Arantor!) or AEVA, the way they install, uninstall and upgrade without issues with the core and then the amazing gui and amount of freedom and features they provide inside the mod itself (which to me cover 99% of the aspects I would like to be able to customize in such a mod).

If this is the way for Wedge, I say go for it... maybe you won't get the same level of contributions from external coders (since it's a more "controlled" product), but you'll make your end-users and those who administrate the forums very happy. ^_^

[Unknown]

  • Posts: 77
Re: Unknown's thoughts on Wedge
« Reply #46, on June 30th, 2011, 10:54 AM »Last edited on June 30th, 2011, 11:01 AM by [Unknown]
Quote from Dragooon on June 28th, 2011, 11:38 AM
So you didn't go to a professional university?
Oops, sorry, almost missed this post.

Well, no, I didn't.  Some life happened and other complications got thrown into the mix.  There are a few things I didn't get to do during that period that I had originally intended to.

Don't get me wrong, I didn't work on SMF instead of going to a university/etc.  Rather, life happened, and those weren't immediate options, so I worked on SMF instead.  Ultimately, it was a great experience, and no matter what mistakes I made or didn't make, I grew a lot from it.

Although I think college/university is a fairly important thing, I did luckily study a lot of subjects in high school, and since then I have spent a lot of time keeping up on RFCs, recommendations, other project's management and code review practices, etc. in order to keep myself versed.

If it weren't for those things and SMF, I definitely wouldn't be where I am now (professionally.)  It's really impossible to guess whether having gone to college/university would have changed that, considering how much I learned from working on SMF... IMHO.
Quote from Paracelsus on June 30th, 2011, 10:30 AM
Quote from Bloc on June 29th, 2011, 10:28 AM
But maybe you should back up abit...what exactly IS the purpose of Wedge? A forum alternative to SMF with extras? or a "soon-to-be-core" script that can accept plugins, and just happens to be a forum in nature..? Not saying one or the other is better in any way(done my share of making SMF into something more for example lol) but whatever direction you are headed will also influence the question of using file-edits versus hooks/plugins.
Wise words.
Yes, ultimately, if they just want a forum that supports "apps" like a gallery, a portal page, etc. then it's all a moot point.  I personally wouldn't be satisfied with apps, but it's a question of audience, I suppose.
Quote from Paracelsus on June 30th, 2011, 10:30 AM
If this is the way for Wedge, I say go for it... maybe you won't get the same level of contributions from external coders (since it's a more "controlled" product), but you'll make your end-users and those who administrate the forums very happy. ^_^
I think that administrators can be made happy without having a rigid product.  Ultimately I see both extremes as "unhappy administrators" just for different reasons.

-[Unknown]

Paracelsus

  • Posts: 4
Re: Unknown's thoughts on Wedge
« Reply #47, on June 30th, 2011, 11:21 AM »
Quote from Unknown on June 30th, 2011, 10:54 AM
Quote from Paracelsus on June 30th, 2011, 10:30 AM
If this is the way for Wedge, I say go for it... maybe you won't get the same level of contributions from external coders (since it's a more "controlled" product), but you'll make your end-users and those who administrate the forums very happy. ^_^
I think that administrators can be made happy without having a rigid product.  Ultimately I see both extremes as "unhappy administrators" just for different reasons.

-[Unknown]
You're entirely right, like you said it's a question of audience.

I think SMF is very very "balanced" when it comes to integrate stuff and still allowing for expert and advanced programmers to make their own unique product.

SMF is probably the forum software that achieves the best of both worlds, but for Wedge to be something different it needs to define itself. Actually the word Wedge suggests something less "rigid", more [Unknown]-style. ;)


PS: Damn, your name with brackets in the quote - removed them right now - just breaks the whole layout... a bug I would say.

verm

  • Posts: 19
Re: Unknown's thoughts on Wedge
« Reply #48, on June 30th, 2011, 02:36 PM »Last edited on June 30th, 2011, 03:13 PM by TechTitan
Quote from [Unknown
link=msg=263307 date=1309420832]

Presumably, not a ton of code has changed between SMF 2.0 RC5 and SMF 2.0, right?  So in theory, this sounds right.  I'm not sure what it means to check the compatibility; from context, I assume this is some manual process?

Let me ask you this.  The mods you have installed now, did you have to make any manual edits to install them all successfully?  I don't know if you have a bunch or if you use themes, but if the answer to either of those is yes, I presume you had to do manual edits, and you're wanting to avoid making those again, right?

I assume there is an update package for SMF 2.0 RC5.  I'm guessing it does not apply cleanly on top of your existing mods, right?

-[Unknown]
Its sure enlightening reading all your comments (I came to know SMF when you already left)... :thanks:

Yes, some of the mods I installed involved manual edits (made for RC4 and install in RC5) and I think I modified one mod to feature 'Member for xx days'...

It is quite troublesome to remember what and where I made the edits months ago..

Since I myself not a programmer and only doing a little bit of code hack once in a blue moon, I think having mods that use hook will be lot simpler for administrators like me to maintain their forum...but I still like the challenge of making direct edits..

I applied the update but in a test environment (cloned the site) and I think I need a clear mind and lots of coffee before I proceed... :lol:



MultiformeIngegno

  • Posts: 1,337
Re: Unknown's thoughts on Wedge
« Reply #49, on June 30th, 2011, 03:06 PM »
I think that conflicts and manual edits are a pain in the arse.. :P
Long life hooks! Go Arantor!!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Unknown's thoughts on Wedge
« Reply #50, on June 30th, 2011, 04:09 PM »
Before I answer the rest, as I only just got home, I want to answer one point.

I pretty much came into really writing SMF mods around RC1 emerging, and had to contend with changes of code between each of the RCs. Each upgrade of SMF therein was a full upload-of-files-on-top-of-the-old, with the exceptions of 2.0 RC1-1, 2.0 RC1.2 (security patches on top of RC1, mirrored in 1.1.9 and 1.1.10) and a patch for 2.0 RC4.

And this has been the case for 2 years. Yet adoption of 2.0 still occurred, in spite of the fact that users had to reinstall - but upgrading was held back. There are plenty of users still on RC3 because the mods weren't fixed thereafter - a number of mods did play nicely and targeted comments in the source, as opposed to code that might change, and then the dev team tidied up the comments by fixing typos and so on.
Re: Unknown's thoughts on Wedge
« Reply #51, on June 30th, 2011, 06:46 PM »
Quote
So yeah, one can spew all over bad decisions, poor coding, not enough visions
FWIW, I don't care about who did it, or even why. It's simply not relevant any more. What I'm trying to get at is what happened, and what resulted because of it in terms of how it affects what we do going forward.

The point being made, which was clearly missed, is that the full upgrade cycle being pushed every 6 months, give or take, combined with mods having to be reinstalled (assuming mod authors bothered to update) was a major PITA for most admins. It has led to a great number of admins just not updating their installations, even leaving them rather dangerously insecure.

That, combined with the fact that mods could not be reliably guaranteed to work between even RCs (I remember having to give SimpleDesk specific code changes between each and every single RC, and a further change because of a regression bug in 2.0 final, though in each case other than the last, I'm not disputing that the result was for the better) and the fact that modders were sometimes lynched for not getting updates out within *hours* of a new release, it put a lot of them off updating until final. This is a cycle I do not want us to get locked into, and why for the most part I'm pushing people away from manual edits.

It was mostly a statement in response to Unknown's question about upgrading from 2.0 RC5 to final being a full update (which it is, unless you're insane enough to go through and make the changes to each file by hand, as I did in Wedge's case)

Anyway, now to answer the meat of stuff.
Quote
I do agree that most mods should be made with hooks.  I just don't think it's possible for every single mod, and I think it's limiting.  If the average user has more than one mod that does direct edits (excluding updates), that may be a bad thing.
Ah, that means I've been reading between the wrong lines. The apparent level of enthusiasm for raw edits seemed to suggest otherwise ;) It also means we're far closer in thought than I'd actually envisaged. Though, honestly, I was prepared to let mod authors who need manual edits deal with it themselves (much as you'll find in some of the other communities)
Quote
And again, some of the issue is "contention" for certain areas of SMF that are common to modify.  For this reason, conflicts and problems and order-of-installation are much larger problems.  Every area of contention definitely should be a hook, solving that issue.
Yes, that's the plan. I look to SimpleDesk on this one: there are some places I do actually do template edits in SD 2.0, and even though I hate the general concept of having to do that, I'm not entirely uncomfortable about it because of the specificity of the templates and of the changes themselves. It is unlikely that many mods would ever update the track-IP screen or the manage-attachments screen unless they had very, very good reason (and SD does, in both cases) - and since they are uncommon templates, I'd never had a conflict.

The main areas for conflict in SMF are the admin panel, the main menu, the permissions code and the actions list, all of which got hooks in RC4/5. One for the credits page would have been good, as would for the 'illegal permissions' setup. But there are plenty of places that hooks would be useful and aren't - such as in the post view to add more things to work with in terms of styling (like the suggestion I made about putting the topic author in to the post as a CSS class, for example). Not all things are expressly hook points as we normally think of them.
Quote
But you note that it won't go away, I'm just giving a real-world use case.
Oh, I have plenty of real-world cases to draw from, and have had to deal with. The reality in the end is that you can't fix everything, but that you can design other things to minimise the problem. SimpleDesk does some seriously hokey things in the board index, for example, and it has caused problems with custom themes and some mods - but because I can see the cause and effect (i.e. that SD does some hokey stuff, and the other mods and themes rely on assuming that the board index is untampered-with), I can mitigate it in SD itself by catering to those assumptions.

My point here, I guess, is that mods can be written with other mods in mind, if the author chooses to be careful about it.
Quote
That doesn't seem crazy.  That said, if you add a hook for every possible file edit, I promise you that you'll regret it later.  More on that later.
I never intended to write hooks for every single possible point. The reality is that you actually don't need to be that thorough. Since there's a separation, by design, between content processing and display, and everything is routed to $context, there's no overarching reason why you couldn't just throw a hook at the end of every action and make sure $context is available, plus anything that might be useful in the context of the action itself, and that would solve a great number of problems before you start. (It would also be quite hacky, I think, but it would certainly solve some of the issues.)
Quote
This is a fairly easy argument to refute.  I'm going to keep it brief because it's getting late, and I need to get some sleep, but:
Not going to go into detail, because I knew it was a fairly weak argument to begin with, but the question does throw up some interesting permutations, as you go on to expand with.

I never wrote a driver or made some of the changes you did, so yes, I hit the apps side rather than the mods side. Yes, I also knew about the A-vs-W stuff as I started out writing on WinNT 4 and made them work on Win98 and WinXP as well. Really, the point being made was that if we can do some of this stuff in other ecosystems, it should be possible to do some of it in the Wedge ecosystem, and it was more a comment to encourage people to stop and think for a moment.

Mods in the current ecosystem very broadly fall into two categories: mods that add new behaviour (which are ultimately more like apps) and mods that modify existing behaviour, and I've written my share of both for SMF.

A lot of the very popular mods do fall into the first category, and ideally I want it to be as painless as possible for them to be developed, because if I can get that to be the case (like supporting something like SimpleDesk), I can then focus on how to improve the end to end experience for the modifying-existing-behaviour case too. It's all parts of the same problem, and there isn't a one size fits all solution for it. I had actually debated leaving just hooks in the core and making file editing be managed through an official add-on, that could essentially be a dependency for mods that actually needed it. (This sort of behaviour is not unheard of even in the forum ecosystem. Whether it's desirable is another matter entirely.)
Quote
A number of reasons (although if there's enough semantic hook detection, this can be mitigated.)

A well developed mod will be shipped as one version, even if there are multiple popular current branches of Wedge currently being used.  In some fashion, different hooks need to be installed potentially for different versions - consider that Wedge 2.0 adds a new hook that this mod wants to use, but in Wedge 1.x, it needs to use other hooks (or file edit the hook in, for BC.)
You can certainly do that. I've done it myself, writing mods for both the 1.x and 2.0 branches of SMF and bundling them in the same package. But it's hard work because of the nature of changes in SMF between the two branches and in all honesty, I'd personally rather have not bothered with the dual packaging. (In fact, I shied away from making mods for both branches at once, simply because invariably I had to write it twice, because everything was different, most importantly $smcFunc vs db_query)

Users, generally, don't seem to have a problem with mods being in separate packages for different versions provided it's made clear to them what package is what, and the concept behind my hook detection methodology would mean that Wedge's main core would know what hooks it had available to use, and thus what hooks a given mod could use, while the main site would know all the hooks in every version.

As I mentioned somewhere, not sure if it was public, there was very much an awareness in the design about freezing the API, so that if a hook changed its structure, it would no longer exist in the previous form. That's no different to saying "versions 1, 2, 3 support this, version 4 does not", just you're not relying on a human doing the legwork in stating it in the package.

It was suggested before that SMF's mod site could attempt to perform installations on different versions and see if the file edits were successful, in a similar manner, but that it would ultimately cause more problems than it solved if other behaviour were broken - the plan, then, would be to make it so hooks generally wouldn't change between versions unless absolutely necessary - then break it in a non BC manner.

I would point out that it is our intention not just to throw out a release and then declare it feature frozen for the life of that branch. We always planned to handle it iteratively, in a kaizen-style of development whereby each version adds something as well as just bug fixes, some method of improving how we do what we do - instead of just giving users a 'this version just fixes some bugs' reason to update (which is a push factor), we want to give them some pull factors too.
Quote
This can be mitigated by some sort of hook detection, but this has its own set of problems.  One option is to run plugin init code on every page view, but this has performance problems with many mods.  Another is to re-run hook init logic for every different version number internally and/or whenever plugins are installed/removed, so the logic can be updated and cached.  This has its own complications, mostly that it isn't simple to write.
I'd already written a prototype of it, run on install/remove, and a much more naive, limited version already exists in SimpleDesk's plugin manager.
Quote
I don't know the specifics, but it looks like it was a file-uploaded-but-shouldn't-have-been-allowed type of issue, or maybe a CSRF.  Assuming this is true, and attachments or cache are writable, you're probably screwed no matter what.
It was a file being uploaded that was able to be executed. Which then tries to infect any PHP file it can modify.
Quote
I don't think users like dealing with order-of-installation issues, or contention issues, or any of those things.  I also don't think they like dealing with manual edits or uploads, incompatibilities, or etc. either.  Users also don't want indirect problems like core development slowdown or not being able to upgrade because a new version has different hooks.

Trying to think only of the user often ends up ignoring a significant part of their concern.  Best to think of everyone and only prioritize the users where possible, IMHO.

That said, I know that you care about the users already from past conversations, and that's a very good thing.  I'm not knocking that at all.
Order of installation is an issue that, really, only comes about because of multiple mods doing file edits in contentious areas - and specifically because one mod makes a broader selection than it needs to. The contentious areas can be removed with hooks, meaning that with very few exceptions, order of installation is a non issue.

(There is one exception I'm aware of, where there's a mod that is explicitly hook only, even in SMF, and it checks periodically to make sure that for one particular hook, it is always called last. But such things do not strike me as common with properly written mods using hooks.)

From a plugin perspective, there are two groups of user I have to consider, and only two. Yes, other users need to be considered for other things, but purely for plugins and their related infrastructure, I need to consider mod developers and mod consumers, aka forum admins.

The main concerns from mod consumers are that mods work with given versions of the software, that if they pull down an update, that their mods will continue to work (or at the very least, safely stop working, pending an update from their authors), and that mods work with as little fuss as possible, which generally means few file edits and working on as many themes as possible without any hassle.

Most mod consumers seem to understand that some mods will require manual work if they are particularly complex, but do not relish the frequency of manual installation that mods seem to need, especially if there are file permissions issues, or custom themes. There is almost a sub-industry lurking in SMF of people who will perform mod installs for people for money, usually only a small amount, but the fact that people are prepared to pay others to install mods does bother me slightly.

On the other hand, mod developers do seem to like the accessibility into SMF's internals, but most of them do not like the level of support requirement, namely having to update the listing for given versions (because even if a mod package explicitly lists 1.1.* as a working version number, the listing on the mod site won't, and users will *definitely* ask if a given mod for 1.1.x will work on 1.1.y)

The biggest problem for a long time was the lack of tools given to mod authors for SMF - there are now tools available for doing mods that work without much/any hassle, and minimising the amount of hassle there is on other mods. SimpleDesk is no different, and about half of the edits it used to make (that were low-maintenance) now become no-maintenance because they're no longer edits.

There are naturally downsides to this: the implementation method of SMF's hooks is a little bit narrow-minded, and there aren't enough hooks in some of the areas that would be useful to have hooks. Almost none of the admin panel has any hooks, only the menu really does, and the 'Modification Settings' entry in the menu, which is fine if you're doing huge mods that add new menu items or new menus entirely, or one-shot settings, but anything in the middle isn't really catered for unless you abuse the tools given to you.

And while I'm bound to draw criticism for the above comment, the simple fact is that: the idea of expanding the hooks is good, I welcomed the change because compared to what there was, it was a massive improvement. But it did lack one really big change that Nao added almost straightaway to Wedge: the ability for a hook to load a file when necessary. You want to use a hook in SMF... fine, just use one of the few points you actually get to load a file, which means you invariably load files on init rather than where it would be useful to load them.

That, and the fact most mod authors simply do not understand how to make the hooks work properly, because the only documentation on the hooks was either written by Orstio way back or by me for 2.0 RC3 - which doesn't include the multi-calling ability, or indeed the method by which you now add callees to hooks.
Quote
This was just one of the historic "bad decisions" we made.  This came up several times while we were working on the feature.  I noticed it and considered it, we talked in the dev team about it, and the team discussed it.  But usually briefly, and the answer was always "ah, it's fine to reinstall every time."
It's not really great for users. Most of them will understand, to a point, once you've beaten them over the head, but half the time they won't understand off the bat, especially if their mods won't reinstall properly (or worse, as happened during more than one SMF RC upgrade, the mods continued to be listed as installed when they weren't).

There is, buried in the depths of the upgrader code, some facilities for this but I don't think they're enabled and even if they are, I don't think they work properly.
Quote
At one point, someone had proposed a more robust system, that tracked exactly what to do, installation order if necessary, and did a dry run unapplying, updating, and reapplying, and told you which mods weren't compatible that way.  I don't remember how it totally went, but we didn't do it because we figured the effort wasn't worth it.
That would be a major step up from where SMF is now, but honestly that's not a road I want to go down if I can help it. I want to make it as painless for admins as possible, even to the point where if something breaks, it can always be unbroken again with as little effort for them as possible: most admins are not that technically inclined (much as I find the idea weird: why run something without learning a bit more about it?), and most will simply ask for help rather than anything else.

Here's where it gets weird, though: it never seems to be a mod author's fault that mods have the hurdles they do. For the very most part, problems with mod installation always seems to be SMF's fault in the user's mind, which leads to SMF getting unfair comments that it doesn't deserve.
Quote
Presumably, not a ton of code has changed between SMF 2.0 RC5 and SMF 2.0, right?  So in theory, this sounds right.  I'm not sure what it means to check the compatibility; from context, I assume this is some manual process?
Users should check that mods have been updated for 2.0 by looking at the mod's page. Especially since each RC has brought some interesting changes with it (as it happens, there are behavioural changes between RC5 and final that some mods will have problems with)

Oh, and before I forget, as it's relevant. You asked what version-emulate was. In 1.1.x, version_emulate was a parameter to add to the URL while in the package manager to override the internal SMF version, thus you could install a package that only listed 1.1.13 in it, while you were running 1.1.14, for example. SMF 2.0 took it further and put a UI in the package manager itself that let you type in this version you wanted to use. (As it happens, I wrote a UI for the 1.1.x version as a drop-down to ease the process).

You can, then, attempt to install any mod on 2.0 without much fuss.
Quote
These are a common concept in integrations now, and something I strongly recommend for Wedge.  I would imagine that file edits might be a permission.
Incidentally that's actually where I was going with my own package stuff. The manifest declares what hooks it uses, plus optionally things like obscure PHP functions from extensions, PHP version, MySQL version, that sort of thing.

I hadn't really thought of making file edits a permission in that respect, because I don't like the idea - I am only too aware how users are becoming 'trained' to accept stuff. That said, I guess it could be done, especially if it makes mod authors less inclined to do so where possible. It would probably be better than my app-wide solution at least.
Quote
I think that administrators can be made happy without having a rigid product.  Ultimately I see both extremes as "unhappy administrators" just for different reasons.
I'd rather not have unhappy users if possible. I don't really see us as being that rigid by doing this, either, but I know full well that I'm biased towards this approach, but I'm also aware that I'm going to end up writing a lot of mods for functionality not in core that other systems have.
Quote
Although I value a lot SMF's flexibility of being able to change almost every imaginable thing in the system I just love mods like SimpleDesk (which is a very nice piece of software, congrats Arantor!) or AEVA, the way they install, uninstall and upgrade without issues with the core and then the amazing gui and amount of freedom and features they provide inside the mod itself (which to me cover 99% of the aspects I would like to be able to customize in such a mod).
Interesting you should mention both of those. In both cases they qualify as 'big mods', but they both have to deal with certain things: most notably, they both find SMF's permissions system framework inadequate and quickly end up replacing it or augmenting it (SD uses absolutely none of SMF's permissions, Aeva only uses a few for very granular control), and they both make fairly minimal (but surgically precise) changes to SMF's own core and move everything into their own files and user areas, and as such are reasonably free of the constraints attached to smaller mods that embed themselves into SMF deeply.

That said, there are some integration-y bits in SD that bend the rules, and expectations.


---I think I got everything.---
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Posts: 1,841
Re: Unknown's thoughts on Wedge
« Reply #52, on June 30th, 2011, 08:38 PM »
As someone who just went through a LOT of hell, I gotta say I am with Arantor now. File edits are a pain to deal with, even if that means removing a lot of control, modders and admins will go through anything to get it to work and it really messes things up. Although it can only with if you have an advanced templating system like TOX-G, because normal PHP template hooks won't cut it. That, and standardizing data loading, SQL querying etc.
The way it's meant to be

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Unknown's thoughts on Wedge
« Reply #53, on June 30th, 2011, 10:20 PM »
Yes, there is a battle of opinions, but the core is relatively consistent: we all agree that there are problems with the current state of play, and that adding hooks will alleviate the very worst of those problems. Then, if we add other methods of extensibility, of which TOX-G really is one of the major investments, but with several other measures as well... things really take shape.

Consider: SMF is very extensible on a small scale but anything that doesn't conform has to really do the spade work itself. Aeva, Project Tools, SimpleDesk... what do all these have in common? (Plus, likely, elements within the portals) Answer: they all had to implement their own permissions systems, because SMF's permissions system allows for 'in a board' and 'not in a board' permissions, but nothing more configurable or flexible.

I can find you plenty more examples of that thinking throughout SMF, but that's not really my point: my point is that while SMF is extensible, it's extensible along certain directions and I'd like it to be more than that.

I don't think anyone here has any disagreements in the issues that there are, in terms of extending what's there. What we're disagreeing with are the different ways that we can extend it and how it can best be achieved.

Hooks aren't the answer to it on its own, and I never said or intimated it was. They're part of a bigger picture. File edits are another part of that picture, but I want to alter the composition to make it a much smaller part of the picture than it currently is, and I want to pick out new details.

I kind of get the impression that, for the most part, we all agree on what the picture should look like (a fine landscape) but some of us want to see a nice cottage, others a forest, some want more sky than land and so on. We all want a nice picture at the end, and while we might not all be perfectly happy with it at the end, hopefully the overall picture will be nice.

Right now we're arguing over how big the forest in the landscape is, or the size of the cottage. We're not arguing that the picture needs sky and land, and that it needs trees and maybe that cottage - only the relative sizes and the fine points.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Unknown's thoughts on Wedge
« Reply #54, on July 1st, 2011, 12:46 AM »
Pete, what are you working on in Wedge these days? Thinking process only?

Cuz we need to review what's coming next... Even I am lost.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Unknown's thoughts on Wedge
« Reply #55, on July 1st, 2011, 01:02 AM »
The last few days I've been dealing with a family funeral, and I actually reverted everything I did because I felt very strongly that it was the wrong route. Right now I'm not 100% sure it is the right route any more.

:edit: Everything that's gone on the last few weeks (not just here but in real life too) has left me somewhat uncomfortable with my thought processes. I think I'm going to need to work on smaller stuff for a bit, until I get more settled :(

Rustybarnacle

  • Posts: 38
Re: Unknown's thoughts on Wedge
« Reply #56, on July 1st, 2011, 04:36 AM »
Take care of yourself.  As much as everyone is excited about the projects that you are working on, like Wedge and SD, your life and mental health are far more important.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Unknown's thoughts on Wedge
« Reply #57, on July 1st, 2011, 12:15 PM »
*nods* It's like I've lost my confidence in myself to a degree :(

So this morning I took some time out to do some work on one of the SimpleDesk team mods that I worked on ages ago and had long since written some bug fixes for. While that sounds like it's counterproductive for Wedge, it really isn't because it's shown me yet more issues for extensibility in the framework of SMF, and ones that hooks won't solve. I'm not just referring to hooks in SMF that are missing, but issues that cannot be solved through hooks in the conventional sense.

They're things I want to be able to solve, and some of the side issues can be solved in other ways - it would help, for example, if the message index and display views weren't monolithic in nature. TOX-G will solve some of that but also so will breaking them up into manageable chunks (that can be manipulated in the subtemplate loader now)


Interestingly I realised today that my enthusiasm for writing plugins could be almost as dangerous as bundling everything in the core if improperly handled - there is a very important warning that I've sort of taken on board but not as thoroughly as perhaps I could.

Having more power in the core, and having stock modifications available does discourage people from creating their own - to a point. Having AeMe in the core does negate the need for other gallery modifications from being created. I don't necessarily see that as a bad thing: it means we can polish up and refine the integration between the two and make real use of AeMe's power outside of the gallery itself, and it's not like there were a lot of galleries for SMF - mostly because between SGL/SGP and AeMe, there really wasn't a need for another.

SimpleDesk is another similar scenario: I don't see anyone else ever writing another helpdesk for SMF - not only is it pretty niche, but I think I did enough of a good job with SD that another isn't needed unless SD is wholly unsuited to a given task.

But I find that's limited mostly to the 'new functionality' add-ons, not the 'modifying existing functionality' ones, I foresee there will always be new ways to do that, and people always wanting to do so. But I figure if I attack the most commonly requested mods, to deal with the general cases, it doesn't negate anyone else doing it, it just means that people can focus their attention on new things instead of finding existing things to rehash over and over, if that makes sense.

[Unknown]

  • Posts: 77
Re: Unknown's thoughts on Wedge
« Reply #58, on July 4th, 2011, 06:32 AM »Last edited on July 4th, 2011, 09:01 AM by [Unknown]
Quote from Arantor on June 30th, 2011, 06:46 PM
It was mostly a statement in response to Unknown's question about upgrading from 2.0 RC5 to final being a full update (which it is, unless you're insane enough to go through and make the changes to each file by hand, as I did in Wedge's case)
Or try a diff between the two release trees, which probably wouldn't apply cleanly in most cases.

To me, that's more caused by the major changes.  In the case of SMF 2, if the API to make database queries, or all that string stuff, etc. changed between releases... you're screwed.  Doesn't matter if you're writing a plugin, widget, modification, or even a poem.  It means your stuff is wrong and has to be rewritten now, no matter what.
Quote from Arantor on June 30th, 2011, 06:46 PM
Ah, that means I've been reading between the wrong lines.
I try to mean what I say and say what I mean.  If I ever do otherwise, please call me on it.  I find reading between lines to be an dangerous pass-time at best, so I try not to make people do it.
Quote from Arantor on June 30th, 2011, 06:46 PM
Yes, that's the plan. I look to SimpleDesk on this one: there are some places I do actually do template edits in SD 2.0
In contrast, because of themes, I think template edits are pretty much "always wrong."  I tried to solve this as categorically as possible in TOX-G, even allowing alters to completely replace an existing template.  I realize file alterations might still be needed in some cases, but I'm hoping that the average user will have zero template file edits, because it pretty much destroys theming.

I also realize a good majority of mods are based on themes, which as I said, can hopefully all be done in a "clean" way.
Quote from Arantor on June 30th, 2011, 06:46 PM
the track-IP screen or the manage-attachments screen unless they had very, very good reason (and SD does, in both cases) - and since they are uncommon templates, I'd never had a conflict.
Hmm.  I retract my statement only a few lines above this.

In this case, file edits don't seem horrible at all.  While I still think themes should be able to modify administrative areas, if a couple of templates can be used to control generate look (without forcing an exact HTML structure, which is what I always didn't want to do), then I don't think there's generally any good reason for a theme ever to change the meat of an administrative section.

That said, if they used templates cleanly, it might possibly be avoidable there too.
Quote from Arantor on June 30th, 2011, 06:46 PM
Not all things are expressly hook points as we normally think of them.
Well, in terms of TOX-G, templates are "hooks" as well.  There are many cases of these.  All have costs, but most are minimal.  A css class is not too expensive, nor is the function call incurred at runtime for (defined only, altered or not) TOX-G templates, especially since this call is static and can be optimized by e.g. an accelerator (unlike dynamic hooks in code, which typically use call_user_func_array or etc.)

Also as I mentioned before, using Exceptions can add more hooks, because it adds the possibility of wrapping the HTML output of SMF/Wedge/etc. in another software (as long as exit is done in cases of file or xml output.)  In a way, this is a hook as well.

Another place for hooks (but this has a high version requirement as a cost) is e.g. database functions and views.  They don't actually allow renaming or hooking easily, but potentially they could be used for hooks (e.g. instead of something liek query_see_board.)
Quote from Arantor on June 30th, 2011, 06:46 PM
My point here, I guess, is that mods can be written with other mods in mind, if the author chooses to be careful about it.
Well, I agree with designing in a way that this is not necessary to think about.  Just like security; anything that can be made automatic is better that way, as long as it doesn't have other downsides.
Quote from Arantor on June 30th, 2011, 06:46 PM
(It would also be quite hacky, I think, but it would certainly solve some of the issues.)
Sure.  Although that can't do everything.  Imagine if the recycle bin functionality were to be made a mod (in fact, I'm fairly sure it was at first.)
Quote from Arantor on June 30th, 2011, 06:46 PM
it should be possible to do some of it in the Wedge ecosystem, and it was more a comment to encourage people to stop and think for a moment.
Well, possible and practical aren't always best buds.  In this case, I suspect Microsoft has a couple more employees to put on the problem than probably Wedge ever will, which was the point I was trying to make.
Quote from Arantor on June 30th, 2011, 06:46 PM
(This sort of behaviour is not unheard of even in the forum ecosystem. Whether it's desirable is another matter entirely.)
Well, I agree the current package manager leaves a lot to be desired.  Separating it isn't necessarily a bad thing, but leaving it alone without improvements might be.
Quote from Arantor on June 30th, 2011, 06:46 PM
But it's hard work because of the nature of changes in SMF between the two branches and in all honesty, I'd personally rather have not bothered with the dual packaging. (In fact, I shied away from making mods for both branches at once, simply because invariably I had to write it twice, because everything was different, most importantly $smcFunc vs db_query)
Well, again, I feel this was a separate problem.
Quote from Arantor on June 30th, 2011, 06:46 PM
Users, generally, don't seem to have a problem with mods being in separate packages for different versions
Hmm, users I've talked to (before and since) generally seem annoyed by it, although perhaps more often than not it's because they can't find one for their version.
Quote from Arantor on June 30th, 2011, 06:46 PM
what hooks it had available to use, and thus what hooks a given mod could use, while the main site would know all the hooks in every version.
Just because a hook exists doesn't necessarily mean everything.  What if you release a version with a broken hook (accidentally)?  Do you consider this a critical update, and release a patch soon after (as with a security hole) or do you let it sit for the next usual release (potentially causing confusion)?
Quote from Arantor on June 30th, 2011, 06:46 PM
It was suggested before that SMF's mod site could attempt to perform installations on different versions and see if the file edits were successful
That sounds possible but like a potentially heavy hammer.  That said, separating the package manager out a bit (not necessarily completely) and making it run via command line would probably improve things there and elsewhere:

  - automation becomes much easier.
  - admins who don't want to type in a sftp password or anything can do it through cli.
  - less concern about "apache died in the middle of the operation" issues.
  - obviously it would still need to be able to run from web.

If that were the case, the mod site upon upload could potentially run:

php /home/smf/tools/packman.php install --dry-run --install=/home/smf/versions/smf_2/2.0/

So while I still think the concept of running against every version is overkill, the concept itself may not be awful, even to at least verify the current version works.  In fact, even with hooks this might be an easier method than keeping a (probably out of date) list of hooks, especially if there are many.

I know near the tail end, I started to make the status tools and upgrader, etc. cli friendly.  Can't recall how many I got to.
Quote from Arantor on June 30th, 2011, 06:46 PM
I would point out that it is our intention not just to throw out a release and then declare it feature frozen for the life of that branch. We always planned to handle it iteratively, in a kaizen-style of development whereby each version adds something as well as just bug fixes, some method of improving how we do what we do - instead of just giving users a 'this version just fixes some bugs' reason to update (which is a push factor), we want to give them some pull factors too.
Then you need to at least do code review.  Something has to happen or eventually, things will be changed wrongly in that model.  AFAIK, Firefox (now) and Chrome have a lot of red tape involved in the process so that it can happen fast.
Quote from Arantor on June 30th, 2011, 06:46 PM
It was a file being uploaded that was able to be executed. Which then tries to infect any PHP file it can modify.
On "secure" suexec installations this would be all files, so you're screwed in this case.  In insecure nobody installations, this could potentially be many files or even other accounts on the server.  So you're screwed that way too, even without the package manager needing things writable.
Quote from Arantor on June 30th, 2011, 06:46 PM
Order of installation is an issue that, really, only comes about because of multiple mods doing file edits in contentious areas
Not true.  Two plugins hooking the same hook can also cause issues, e.g. if one processes out something and the other one needs it for some other reason.  It's rare, but at least with file edits, they fail rather than have weird edge-casey problems.
Quote from Arantor on June 30th, 2011, 06:46 PM
people are prepared to pay others to install mods does bother me slightly.
People also pay for upgrades and installs.  I usually did them (or tried to) for free, but only when I had time.  At work, we are paid to install other software - like vBulletin or osCommerce or even Bugzilla.  Even if they are easy to install, sometimes people want someone else to deal with it and polish it up.

That doesn't seem wrong to me, in any case.  That said, if it's becoming necessary, that seems bad.
Quote from Arantor on June 30th, 2011, 06:46 PM
they're no longer edits.
Well, unless major changes happen again, as did with SMF 2.0.  What if they separate out the core, and now all the syntax for everything has to change again?  Are these "maintenance" areas really big problems between e.g. 1.1.1 and 1.1.2, etc.?
Quote from Arantor on June 30th, 2011, 06:46 PM
the ability for a hook to load a file when necessary.
I've not looked at SMF or Wedge's hooks, but how can this not be possible?  Doesn't a hook run code?  Can't code include files?
Quote from Arantor on June 30th, 2011, 06:46 PM
There is, buried in the depths of the upgrader code, some facilities for this but I don't think they're enabled and even if they are, I don't think they work properly.
Yeah, I know it was there, initially it wiped out installed.list IIRC.  I think we moved to a database to remove the requirement of that file being writable, and may never have fully moved everything over.
Quote from Arantor on June 30th, 2011, 06:46 PM
(much as I find the idea weird: why run something without learning a bit more about it?)
How much do you know about the internals of PHP?  Do you know what the zval cache is?  And even if you probably do, do you think most PHP programmers do?  I don't necessarily think it is weird, it is compartmentalizing.  Definitely it's better to learn about it, but time is required.
Quote from Arantor on June 30th, 2011, 06:46 PM
Users should check that mods have been updated for 2.0 by looking at the mod's page. Especially since each RC has brought some interesting changes with it (as it happens, there are behavioural changes between RC5 and final that some mods will have problems with)
Which means, in other words, that they were betas.  And if the last RC and the final and major behavioral changes (which I gather it did), then basically a release candidate was never made.

I'm sure I made mistakes in this area too, although I think the general rule was that we branched the next release when we RC'd, so theoretically the major changes were happening in the next release at that point.
Quote from Arantor on June 30th, 2011, 06:46 PM
Oh, and before I forget, as it's relevant. You asked what version-emulate was.
This sounds like a bad idea.  I would rather just say "hey, this version says it won't work, want to try it anyway?"  I even thought it did that.... but I guess it probably doesn't.
Quote from Arantor on June 30th, 2011, 06:46 PM
I am only too aware how users are becoming 'trained' to accept stuff.
You can change whether you ask, though, especially depending on settings.  For example, for most permissions Chrome never asks.  They may ask in the future (without requiring extensions to change anything) if they need to.  This gives Chrome all the options without a lot of work from extension authors.
Quote from Dragooon on June 30th, 2011, 08:38 PM
That, and standardizing data loading, SQL querying etc.
Which if done wrong (as many people do) can make optimizations extremely painful to deal with...
Quote from Arantor on June 30th, 2011, 10:20 PM
SMF's permissions system allows for 'in a board' and 'not in a board' permissions, but nothing more configurable or flexible.
This always felt like a hack to me, actually, and I never felt completely comfortable with the way board specific permissions kinda shook out.  They still confuse me, which is a bad sign.
Quote from Arantor on June 30th, 2011, 10:20 PM
Right now we're arguing over how big the forest in the landscape is, or the size of the cottage. We're not arguing that the picture needs sky and land, and that it needs trees and maybe that cottage - only the relative sizes and the fine points.
At least we're not (or at least I hope I'm not) arguing about the color of the bikeshed.
Quote from Arantor on July 1st, 2011, 12:15 PM
but also so will breaking them up into manageable chunks (that can be manipulated in the subtemplate loader now)
Does SMF's system yet allow for multiple subtemplates to be used on the same page?  Example: "poll", "poll", "calendar", "post_list"?  I think I mentioned on SMF I have since moved to this system (and TOX-G uses it too.)
Quote from Arantor on June 30th, 2011, 10:20 PM
SimpleDesk is another similar scenario: I don't see anyone else ever writing another helpdesk for SMF - not only is it pretty niche, but I think I did enough of a good job with SD that another isn't needed unless SD is wholly unsuited to a given task.
Actually, a reason not to have things in the core also is attack surface.  From a security perspective, I want to remove the calendar from (at least my own installs of) SMF because I don't use it, and it doesn't have a small SLOC.  The more code, the more potential bugs, and the more potential security flaws.

That's why I've always wanted the calendar to be a "bundled mod."  It's also part of the reason I like file edits, to a degree, because having code that isn't run when a setting off is nice, but having code that can't even be run unless I twiddle the file permissions is nicer.

But, I know that most people are not so "don't even use their real name online" paranoid as me when it comes to privacy and security.
Quote from Arantor on June 30th, 2011, 10:20 PM
But I find that's limited mostly to the 'new functionality' add-ons, not the 'modifying existing functionality' ones, I foresee there will always be new ways to do that, and people always wanting to do so. But I figure if I attack the most commonly requested mods, to deal with the general cases, it doesn't negate anyone else doing it, it just means that people can focus their attention on new things instead of finding existing things to rehash over and over, if that makes sense.
Sure, except it can narrow the mindset.  For example, consider the general concept of lesscss:

First, the code was written to be "post-processed."  This is nice, and the templates are easy, but it makes development kinda slow, especially if you don't have ruby set up in your webserver.

Then came along node.js, and lesscss was rewritten in js.  The same code now runs in browser (for development) or on dist (for post-processing prior to production.)

Whereas rewrites are often bad things (as noted with YaBB SE -> SMF was a gradual rewrite, not a from scratch one), in this case a context change was pretty much required.  The Ruby one made sense, but is now deprecated and replaced by the js one.

Now consider if Apache had released, as part of the Apache distribution, a "less" module and used the Ruby code (or even ported it to C) to serve the converted CSS through Apache.  Even though the js solution is better (because it works everywhere, and combines well with minification), it probably wouldn't have happened, and people would be complaining right now that there's no nginx version of less.

-[Unknown]

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Unknown's thoughts on Wedge
« Reply #59, on July 4th, 2011, 06:56 AM »
Quote
I've not looked at SMF or Wedge's hooks, but how can this not be possible?  Doesn't a hook run code?  Can't code include files?
Yes they do. But here's the thing. Although hooks do run code as you speculated, they don;t include files. SMF has three hooks designed for this purpose: one in reloadSettings(), one in loadTheme(), and one in the admin loader. All Wedge hooks use an extra parameter to load a file, in add_hook IIRC.

So then what good is a hook if no external files become included?
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.