The Wongery

April 22, 2023: Posts of the Past

So. Last night I finally finished doing something about the blog posts on the Wongery that I'd been meaning to do for a long time.

No, not implement a form so I can easily make a blog post without all the circuitous scoggery of manually updating the MySQL database and all the other rigmarole I mentioned in a previous post. I still haven't gotten that done yet, and this post was still made the hard way. And not making a new blog post, though that's something I should have done a lot earlier; it's been three weeks since the last one.

But there's another issue with the blog posts I've been meaning to fix. Well, two issues, really. One is, well, calling them blog posts. What I now call blog posts I'd originally called news posts, and I'd set the URLs accordingly; the directory that the posts were in was /news/, not /blog/. (Well, the posts themselves weren't actually in the directory; the text of the posts was in the MySQL database and the pages displaying the posts were generated on the fly; but that's beside the point.) That's fixed now; the blog posts are now called blog posts on the site, and are in the directory /blog/. (Although to avoid breaking old links the /news/ directory redirects to /blog/.)

But there's been another issue with the blog posts that I'd been meaning to fix—and now finally have. Until last night, the Wongery home page showed the last three blog posts in full—and only the last three blog posts. There was, however, no simple way to see older blog posts. There was a page listing all the blog posts at https://www.wongery.com/news—the problem is that this page wasn't linked from anywhere on the site; the only way to get there was to type the URL in manually.

(Well, the old news/blog posts weren't necessarily totally inaccessible; some of them were linked from later posts, and they were all duplicated on the forum (although the forum posts don't link to the corresponding blog posts, and, hm, they probably should). Still, there was no easy way to see and access all the past posts other than manually typing in an undocumented URL.)

Anyway, that's changed now. The main page still shows the three most recent posts, but instead of showing them in full it just shows the beginning of each post, with a link to see the rest. (This was easier to implement than it otherwise would have been since I was able to reuse some code I'd already written for the Random Article sidebar.) Furthermore, below these posts there's now a link to see the full list of blog posts; this link also appears at the bottom of the page for each post. (At some point, I may want to split that list of blog posts into multiple pages, but at the moment I don't think there are enough posts for that to be necessary.)

(Whether I want people to read all the past blog posts is a separate question; I've already mentioned my embarrassment about some of my earliest posts, and my having considered deleting them. But at this point I guess I've decided I'm just going to leave them up despite my vergoyne. In any case, I guess it's likely that ten years from now I'll be just as embarrassed by the posts I'm making now as I am now of the posts I made ten years ago, so the issue wouldn't go away; I will forever be trapped in an eternal cycle of shame.)

I feel I should mention, by the way, that I'm now updating the site code by a very different method than I did previously. Until this last revision, every time I wanted to change the site's code I would edit copies of the files on my local computer, upload them to the server, and reload the site. This had at least two obvious drawbacks. First of all, it was inconvenient and time-consuming; I couldn't see the results of my changes immediately, but had to upload the files to the server first before I could see any effects. Second, and perhaps more importantly, it meant that any changes to the files were likely to at least temporarily break the site. Unless I somehow managed to write PHP code that worked perfectly on the first try—and I don't know that that's something I ever did except perhaps for the most trivial of changes—the site would be inaccessible while I was working on the code; anyone trying to visit the site would be met with an error message. Well, at least some of the time; at other times, while I was debugging and commenting out parts of the code and dumping variables to try to figure out what was going wrong, they would instead be met with a partly functional site and a bunch of gobbledygook.

Of course, nobody except the Grandmaster Wongers knew about the site before now (nor will anyone likely know about the site before the hard launch in January), so nobody's been visiting the site anyway, which means that its intermittent nonfunctionality hasn't really mattered. Still, this obviously won't be an acceptable way of doing things after the hard launch when the site will (we hope) be getting other visitors. We really needed to find a different way of doing things.

And we have. The days of our having to upload the files to the server after every change to see if it was working and of the site breaking because of a coding error are behind us. I finally did what I should have done a long time ago: looked into a way to set up a local version of the site. I've now installed WampServer on my desktop computer and have a development environment set up so I can make the changes on the local site and debug the code there, and then I can upload the files to the server only when everything is working and I know the site won't break (unless I do something stupid, which I probably will).

Anyway, the changes to the blog are not the only changes I've made to the site. While I was going ahead and finally making some changes to the site anyway, I also removed a few sidebar items that should have been gone a long time ago. One was the link to the Wongery's Twitter account. Having a Twitter account for the Wongery may have seemed like a good idea when I first created the account back in January 2011 (even if I never did much with it), but given Twitter's current downward trajectory it's not clear how much longer it's going to be around, or whether it's going to be a place worth having a presence at even if it is. In any case, it's certainly not a site I want any association with now, so while I haven't actually deleted the Wongery's twitter account, I have no intention of making any more tweets unless the site turns itself around (which seems very unlikely to happen under its current ownership), and I don't really want a link to Twitter on the Wongery homepage... so now there isn't one. At some point I'll set up a Mastodon account and/or a Discord channel for the Wongery and put links where the Twitter link was, but at the moment I think not having anything there is better than having a Twitter link.

I also finally took out the sidebar for the World of the Week. This was a feature I launched at the beginning of 2013, in which I highlighted worlds that were not created by the Grandmaster Wongers but that we thought were interesting enough to be worth bringing attention to. While I think the idea and intent behind the World of the Week feature were good, I didn't keep it up for long; I only got around to making a total of five entries, and so it's been showing the same entry for the last ten years—and the last entry it's been showing for that time is one that, in retrospect, I don't think should have been a World of the Week in the first place, and probably won't be when and if the feature is relaunched. But even that isn't the biggest reason this sidebar needed to be removed. I said in a post back in 2015 that we were illustrating the World of the Week entries with images found online and used with credit but without permission—and that this was something that we knew we shouldn't be doing, and that we were going to remove those images. And then, eight years later, we still hadn't. So anyway, the World of the Week sidebar is gone now. We may revisit that feature after the hard launch in January, but if so it will be with new, bespoke illustrations.

There are still lots of other changes we need to make to the site, of course. The graphic design of the site is still very rudimentary and ugly and needs a lot of work. The top banner still says "Title graphic coming soon" even though it's said that for more than a decade and has gone far beyond any reasonable definition of "soon". (Wait, actually, that's something it'll only take me a minute to change; why don't I just do that now? Okay, done.) But there are some less obvious, behind-the-scenes issues that ought to be addressed, too.

For instance, I've mentioned that the blog posts are written in wikitext, which is parsed into HTML when it's posted. You may wonder how the parsing is done. Or you may not, because there's an obvious way to do it: the MediaWiki API has a parsing module for that very purpose, so wikitext can be parsed by a simple call to the API. Except that's not the way I did it, because at the time I first set up the site I didn't know about APIs or how to use them, so instead I found the parsing function in the MediaWiki code and called it directly. The same goes for the Random Article sidebar; the MediaWiki API has a module for fetching random articles, but since I didn't know about APIs I did it by making a direct call to a function in the MediaWiki code.

This was a terrible way to do things for several reasons, not least because it meant the code could potentially be broken by a MediaWiki update. (In fact, that's almost certainly happened in the past; this has probably been the cause behind some if not all of the times the site has had errors.) So, yes, I need to update the code to use the APIs instead. This will, however, be a nontrivial undertaking, because while I do now know what APIs are and more or less how they work, I still don't really have a firm grasp on how to use them, so this is going to take some figuring out.

If between the way I'd been uploading all the site files to the server to check whether the code is working, the way I've been having the site parse wikitext by calling a function in the MediaWiki code directly rather than using an API, and the way I'd been (and for the moment still am) making new blog entries by manually adding them to the database using phpMyAdmin it seems like I've been going about everything by the most hamhanded, roundabout, and downright duncical way possible... yeah, I probably have been. I am not a computer expert. I have no professional programming or system adminstration experience. I've been doing my best to muddle through and figure out how to do what I need to do for the site, but this is definitely pretty far outside my field of expertise. (Actually, I'm not sure I really have a field of expertise, but if I do, this isn't it.)

So why don't I hire someone else to help with the coding? Well, for at least three main reasons. One, and maybe the most obvious, is, well, money. As in, hiring people costs money and I don't have a lot of money to spare. (Could I find someone willing to help out with the code without pay? Probably not, but even if I could, I'd feel like I was taking advantage of them and wouldn't feel comfortable taking them up on it. I wouldn't want to ask someone to work for free.) Another is, well, I guess you could say privacy. I am attempting to keep my own identity and those of the other Grandmasters (if any) a secret—as I think I've mentioned elsewhere but if I haven't I'm mentioning it now, "Clay Salvage" is not my legal name. (Yes, I've revealed a few bits and pieces of personal information, I guess, but I've tried not to let slip too much. In an earlier draft of this post I'd mentioned something that I removed because I realized it gave away what country I grew up in... granted, that's something that may not be hard to guess anyway, but I don't want to make it too easy.) If I gave someone access to the site to allow them to modify the code and upload files, that would potentially also give them access to our identities, or at least enough information for them to easily figure them out. There might be a way to prevent that, to give them some sort of boxed-in access that would gate them off from any identifying information, but, well, being able to do that would require having a lot of knowledge about computers, which, again, I don't. And third... well, I just like doing things myself, even when I don't know what I'm doing and I'd be better off delegating the task to someone else. Is this a character flaw? Probably, but if so it's just one of many.

So, yes, progress on the site infrastructure has been and will continue to be slow, mostly due to my complete incompetence with anything computer-related, but progress is being made nonetheless. Now, I've also got to resume making progress in actually posting articles...