Template talk:BlockadeTOC2

From YPPedia

Updating this template

Recently I added logic to keep this template adding new months/years automatically for the next two years (from jul 2014 til dec 2016). The sane-ness of doing this was called into question here. I wonder.. what about updating the months/years on the blockade history pages, instead of having to repeatedly update the template? Would it make sense to have a core template (a {{BlockadeTOC2/Start}} perhaps) to paste some bits of the table, and then a series of {{BlockadeTOC2/Year|2014}} and {{BlockadeTOC2/Month|Jan}} subtemplates to paste in the years/months. Finally a {{BlockadeTOC2/End}} could round off the table. This would make the table of contentses updateable from the blockade history pages (no more forgetting, yippie!) and all the nasty logic can be done away with and the template can be simplified. The finished template calls on the page might look like this (artist's impression):

{{BlockadeTOC2/Start}}
{{BlockadeTOC2/Year|2012}}
{{BlockadeTOC2/Month|Jan}}
{{BlockadeTOC2/Month|Feb}}
{{BlockadeTOC2/Year|2013}}
{{BlockadeTOC2/Month|Jan}}
{{BlockadeTOC2/Month|Feb}}
{{BlockadeTOC2/End}}

How about it? --Therobotdude 10:55, 14 August 2014 (PDT)

... So instead of having to remember one update a month, you'd rather have to remember three updates a month, and add a potentially infinite series of sub-templates? If it's too hard for you to remember, I'll happily take over that arduous duty. I just set a monthly reminder on my phone - easy as that. Simple is best when it comes to templates - the cleverer you try to be, the harder they become to edit. --Belthazar451 14:40, 14 August 2014 (PDT)

I'm keen to point out that this is a suggestion; it means I've had an idea that might possibly benefit some small area of the wiki and I'd like some constructive feedback before I break anything. I'm not saying "help, I can't do this, please take over", but I do appreciate your offer to help.

  • Yes, I suppose you'd have to update the date three times. But then again there would only be 3 pages instead of 4 to remember to keep updated. It would make more sense to me if editors were to update the histories and add the months when necessary as they update the page.
  • The "simple is best" argument is solid, but I think it helps my case more than yours here. A lot of complexity added to this template (including my keep-updated-for-2-years logic, and your suppress-particular-years/months logic) can be removed. To omit a month, you'd just omit the {{BlockadeTOC2/Month|Somemonth}}. To add a year/month you'd just add a line. This seems much more intuitive to me.
  • The "infinite series of sub-templates" is really no better or worse than the infinite series of dates that have to be added to the template.

--Therobotdude 03:51, 15 August 2014 (PDT)

Sorry, but sub-templates are much more complicated than one template. We've had to use them in some places, but only when it's a neccessary evil. The idea of suppressing months was to stop months with no blockades from appearing on the table, but I've never sat down and done a comprehensive survey, and I don't think there's been a month completely without blockades on every ocean in a number of years, not counting the two-month break we had during the ocean merge, so it's not really worth setting up the template in order to allow for it. When the problem is "forgetting" the solution is not "change the template!" but just "remember". Tell you what, though - if you can look at this template and tell me why it's inserting an extra linebreak into this article (and similar ones), then I'll consider conceding the point. Like I said, simple is best. --Belthazar451 06:14, 15 August 2014 (PDT)
Cerulean actually had no blockades in December 2013.... But there was an island transfer so I created the entry. :P Anywho, I'm not completely understanding the benefit of moving this to the history pages themselves. I feel like the blockade history pages are kind of unwiedly and complicated as is, and moving the TOC stuff to each page individually would just make them even more complicated for the average user trying to be helpful. --Fannon 10:13, 15 August 2014 (PDT)
Well, the blockade history page is the first thing anyone not in-the-know will try to update if they see a month missing. And I feel that even a novice editor could look at the template calls (like the example above) and figure out that it's a list of months. If you need a March, and there's a January and February already on the page, the intuitive thing is to copy/paste the above line and change the value from February to March - no understanding of how it works needed. We could even stick a comment to the tune of "This section makes the table-of-contents appear. Add new months here when necessary". Currently however, an editor needs to understand how template calls work and hunt down this template before they can make the change. So this said, I don't think the sub-templates will overcomplicate the blockade history page - they may well make it more intuitive. They certainly won't require the vast quantities of logic that this template currently uses either (see above). So "sub-templates are much more complicated than one template" is quite untrue here. As for memory.. well, it can be a tricky beast at times. This suggested change won't make people remember - but it leaves one less page for people to forget. --Therobotdude 11:14, 15 August 2014 (PDT)
Ok, here's how what you're proposing for the TOC will appear in the edit box as it stands now - never mind how many more years are going to be added in the future (with any luck, a great many =P):
Click here to see more
{{BlockadeTOC2/Start}}
{{BlockadeTOC2/Year|2012}}
{{BlockadeTOC2/Month|Mar}}
{{BlockadeTOC2/Month|Apr}}
{{BlockadeTOC2/Month|May}}
{{BlockadeTOC2/Month|Jun}}
{{BlockadeTOC2/Month|Jul}}
{{BlockadeTOC2/Month|Aug}}
{{BlockadeTOC2/Month|Sep}}
{{BlockadeTOC2/Month|Oct}}
{{BlockadeTOC2/Month|Nov}}
{{BlockadeTOC2/Month|Dec}}
{{BlockadeTOC2/Year|2013}}
{{BlockadeTOC2/Month|Jan}}
{{BlockadeTOC2/Month|Feb}}
{{BlockadeTOC2/Month|Mar}}
{{BlockadeTOC2/Month|Apr}}
{{BlockadeTOC2/Month|May}}
{{BlockadeTOC2/Month|Jun}}
{{BlockadeTOC2/Month|Jul}}
{{BlockadeTOC2/Month|Aug}}
{{BlockadeTOC2/Month|Sep}}
{{BlockadeTOC2/Month|Oct}}
{{BlockadeTOC2/Month|Nov}}
{{BlockadeTOC2/Month|Dec}}
{{BlockadeTOC2/Year|2014}}
{{BlockadeTOC2/Month|Jan}}
{{BlockadeTOC2/Month|Feb}}
{{BlockadeTOC2/Month|Mar}}
{{BlockadeTOC2/Month|Apr}}
{{BlockadeTOC2/Month|May}}
{{BlockadeTOC2/Month|Jun}}
{{BlockadeTOC2/Month|Jul}}
{{BlockadeTOC2/Month|Aug}}
{{BlockadeTOC2/End}}
Long enough? Aside from which, just a "Jan" sub-template isn't going to be specific enough - you'll need a "Jan2014" sub-template. At my count, we're up to thirty-four sub-templates already, just to replicate the function of one single template, whose only issue is that people can't remember to update it, an issue which I've already remedied by setting a monthly reminder on my phone (so we can do away with all the over-complex automation logic). You're also wanting to spread the template description over three articles, which just defeats the purpose of having a template. Also, considering we're talking about the blockade histories, I don't really think we need to cater to the needs of novice editors. Sorry, but you're just not convincing me, here. --Belthazar451 16:46, 15 August 2014 (PDT)
Ah, well spotted, the template does need some specific information for the year sections. But why not {{BlockadeTOC2/Month|May|2014}}? No need for 34 templates, just pass the year in as a second parameter. The number of template calls is really negligible compared to the number of lines in the blockade history articles too. ((39 / 7551) * 100 = 0.5%). We could compress it even further perhaps - {{BlockadeTOC2|2012|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug}}. That cuts the number of TOC lines down to 7. --Therobotdude 16:17, 16 August 2014 (PDT)
Hold on, now you're back to just calling this template again anyway, only you're changing the parameters from "visible unless invoked" to "invisible unless invoked", but in the end someone's still going to have to keep this template updated. Your main argument here seems to be that it's better to move the actual functionality of the template to the blockade histories because those articles are being regularly edited anyway, but you haven't addressed the point that someone still needs to create the sub-templates to make it work, or keep the main template updated. Even if you make, say, ten years' worth of TOC code, you're still going to need to remember it in ten years. You've not solved the problem of forgetting, you've just added an extra thing to remember. --Belthazar451 17:18, 16 August 2014 (PDT)
Not quite. I meant we could combine the year and month template calls like this:
Click here to see more
{{BlockadeTOC2/Start}}
{{BlockadeTOC2|2012|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec}}
{{BlockadeTOC2|2013|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec}}
{{BlockadeTOC2|2014|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug}}
{{BlockadeTOC2/End}}
Where "BlockadeTOC2/Start" adds the static stuff, "BlockadeTOC2/End" adds more static stuff, and BlockadeTOC adds a row for each year plus a row for the months of that year. --Therobotdude 04:58, 17 August 2014 (PDT)
That's suddenly coming across a bit more sensible, but you've still got the inherent problem that you need to remember three times instead of just once, and make three edits instead of one. --Belthazar451 15:27, 17 August 2014 (PDT)
Okay, so, I don't actually have a problem with the edits to THIS template that allows it to auto-update. I'm also not seeing any reason why we can't just extend it out a few more additional years either. I do think trying to add the ability into each page additionally doesn't work. Your point is that, what if someone forgets to update this template? Well, someone else will eventually notice, fix this template, and it's done for all three pages. We don't have to worry then about someone noticing for all three. Regardless, I think the changes to this template are kind of neat, and, again, have no issues with them. --Fannon 20:06, 15 August 2014 (PDT)
I think that the auto-updating logic is a half-way fix: it works, but feels like a duct tape and string approach. Editors must still suppress a month if there are no blockades occurring during that time. With the sub-template approach it's very clear what is going on to any editor - even if it means they need to update three pages - because they can add new TOC entries as they add new headings (and what appears in the template calls is what will appear on the actual TOC). This might prove advantageous, because both I and Belthazar (as well as at least one other) have produced some kind of script in the past to assist us in updating blockade histories. If the TOC were to be constructed from template calls at the top of the article, it would be trivial to have a script add a date to the TOC whenever a new date section is created. In that scenario, a user doesn't need to bother actively updating the dates at all, the script does it for them. Why not cater to the needs of both novice and seasoned editors? :P --Therobotdude 16:17, 16 August 2014 (PDT)