1. You can always assume that all your input is magically converted to
UTF-8 NFC (Not if you're running from a maintenance script)
2. You can do things like call the API (internally) to edit a page
when a method from $wgParser->parse() is on the stack (Well you can,
but the page you're parsing is going to be "uniq" if you get my
meaning)
3. A page's revision is a reliable snapshot of
its content (nope:
transclusions [and images?] can change independent of a page revision)
Since you put a question mark here, to be clear - image versions can
change independent of revision text. So can other things, like parser
functions, magic variables ({{NUMBEROFARTICLES}}) or tag extensions
(e.g. <CategoryTree>). Not to mention site css/js can make things look
totally different. And then its a whole other confusing mess if
FlaggedRevs is installed.
--
bawolff
On 7/30/15, Brian Gerstle <bgerstle(a)wikimedia.org> wrote:
> ...or your users will!
>
> "Doing Terrible Things To Your Code
> <http://blog.codinghorror.com/doing-terrible-things-to-your-code/>" is a
> good read on testing by Jeff Atwood on his blog, Coding Horror
> <http://blog.codinghorror.com/>. I also found the "falsehood"
snippets
> poignant—maybe we should come up with some for Wikipedia ;-). Here are a
> couple off the top of my head, at least for "official" Wikipedia
instances:
>
> 1. Wikipedia sites all have standard ISO/BFC prefixes (see sitematrix
> <https://www.mediawiki.org/wiki/Special:SiteMatrix>)
> 2. A site's main page is always titled "Main Page" (also see
sitematrix)
3. A page's revision is a reliable snapshot of
its content (nope:
transclusions [and images?] can change independent of a page revision)
>
4. API error messages are plain text (nope, can contain HTML
> <https://phabricator.wikimedia.org/T107082>)
>
>
> Interested in hearing "falsehoods" you've encountered.
>
> Cheers,
>
> Brian
>
> --
> EN Wikipedia user page:
https://en.wikipedia.org/wiki/User:Brian.gerstle
> IRC: bgerstle
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l(a)lists.wikimedia.org
>
https://lists.wikimedia.org/mailman/listinfo/wikitech-l