User:MikeyD/Astrangeaeon

From Abulafia Random Generator Wiki
Jump to navigation Jump to search

2015-07-03: A few days ago Astrangeaeon and I started “talking shop” and quickly devolved into fiddly details. After several trips back and forth between our respective userpages I no longer could keep our topics straight! The conversation desperately needed its own dedicated page … so here it is!

Note that wherever possible, the following responses have been edited for clarity and brevity, in case another poor lost soul accidentally ever ended up here, and foolishly tried to plow through the following …

[M] 2015-06-28

Hi “Aeon” …

MikeyD here. I’d been admiring your careful work in Rumors – that’s some unusually clean code! – and because you’ve been hitting it so hard lately, but seemed to be taking a break today, it seemed a good time to jump in and add my 2¢ of encouragement to a very ambitious project which already appeared to be fully spellchecked, and needed the least cleanup of any Abulafia project I’ve yet seen of similar size. I just hope I didn’t accidentally make things harder for you. I’ll wait until there has been no activity for some weeks to check it again, and apologize for any inconvenience.

MikeyD (talk) 23:56, 28 June 2015 (PDT)

[A] 6/29/2015

Hey Mikey,

Thanks for the kind words! And you didn’t cause me too much grief—I just usually make my changes in a notepad++ file before replacing the old code, since I’ve had issues where the “show preview” button doesn’t load and I don’t know what content was saved and what was lost. So, when I noticed you’d alphabetized and cleaned up, I just backed out my changes and re-added the new content, following the alphabetical organization.

I think my next step, when I get around to refactoring, will be to make all the subtables have more human-readable names—for whatever reason, I find the all-lowercase convention cryptic and hard to parse, and I could do a better job with naming them so it’s more inviting for people who want to contribute content. Glad to communicate with other people committed to the Abulafia project—it’s a pretty amazing site!

[M] More thoughts on Rumors (& Best Practices)

I make most of my changes offline too (in BBEdit) – much easier to track stuff, especially with more complex generators … I’ve even hacked together a basic BBEdit “Codeless Language Module” for .abu files, and hope that by mentioning it here, someone more technically inclined may be able to help me get “code folding” working for subtables (~90% of my goal with such an exercise).

Abulafia projects fascinate me – not only for their randomness, but due to the odd mix of opposite skills they call for (scientific precision in the code; wild imagination in the content) the brain is stretched in opposite directions and might easily be rent in twain …

I took a closer look at Rumors, and – having earlier been focused solely on its code – realized that if anything, I wasn’t complimentary enough. That content is insane … if you devised it yourself … you have a gift! (Plus, “normal” people tend not to know, much less use, words like “mellification” :)

As for refactoring and naming conventions, what might constitute Abulafia “best practices” is currently anyone’s guess. (I’ve taken – though not posted – quite a few notes, but you already follow most of what I’d have suggested anyway.) Today, I’m finishing an extensive revision to “Quick NPC” (mostly to add sex-specificity). However, to do a proper job, I must then ensure that no other generators which reference “Quick NPC” break – and as far as I can tell, there’s no elegant way to do this (only manually searching/updating each ref). So … the ideal time to optimize your subtable-naming is before others discover your code! The “length vs. readability” tradeoff quickly becomes significant when one considers that Abu code is nontokenized plain text. Here are a few thoughts:

  • textualprophecysource could become txt_proph_src (or even TPS); nontextualprophecysourcenon-TPS
  • urbanverbsingularurb_vb1; urbanverbpluralurb_vb2+
  • wildernesslocationwild_loc; wildernessspecificlocationwild_spec_loc

etc.

  • I like underscores_as_separators: readable, + tends to select fully on 2x-click.
  • to me, CamelCase seems like overkill.
  • CamelCase_+_underscore yields ultimate readability (but again: case-specificity seems excessive).
  • Mediawiki supports full UNICODE, so if it helps, symbols/dingbats can be used (in “Quick NPC”, I use ♀, ♂, etc.)
  • Subtables expected to be referenced externally needn’t be named overly specifically since all refs to external gens include the filename; thus, in an “Animal” gen, a subtable for fuzzy animals needn’t be named “fuzzyAnimal”—“fuzzy” alone will do (it’ll be invoked by “Animal.fuzzy”).
  • Code comments are far too rare and underused in Abulafia; a few well-placed ones can go a long way.

… Th-th-that’s all for now! Best regards —MikeyD (talk) 12:52, 29 June 2015 (PDT)

[A] Best Practice Response

I agree about how wonderful Abulafia is—you can always stumble upon something mind-blowing that you hadn’t checked out before. Though now that I constantly check the “Recent Changes”, it might not be as surprising! But still, there’s so many neat ideas and possibilities, just browsing a random generator can be rewarding.

Thanks so much for your kind words—I lean more on the imagination side of the fence than the technical, but luckily the wiki format is something I’ve used at work and I haven’t needed to do anything massively complex yet. I’m mostly a poet, but this Rumors project’s format is so gratifying—if I have a neat idea, or read something interesting (I read a lot of classics and mythology) that could be transformed into an entry, it’s so easy to add to it.

Funny you mention Quick NPC, that’s one of my favorite pages. I use it often, or grab just an adjective or profession from its main subtables. It’s a perfect example of something not at all flashy, but so useful—it does a wonderful job.

Have you found the “What links here” tool to be accurate? My friend and I were experimenting with it awhile ago and it seemed incorrect, though we may have gotten something wrong. But, for instance, the Questions and Consequences page calls the Modern Occupations page; but if I click “What links here” on the Modern Occupation page, it shows only Crunchy Bits. It does feel prohibitive to make larger changes to other pages, for just your concern—that you inadvertently spoil some other page you hadn’t even considered. I’ve made some kludges in some of my subtables to accommodate my own goals which makes them annoying for others to use, if they wanted to—I’d love if everybody used the {ia} template consistently, for instance (including myself!)

I like the underscore—I think I’ll gradually start changing and renaming more confusing subtables to be in that format.

[M] Response

(added subtable lists to the “Rumors” page … 182 (!) internal calls, 35 external)

[A] Rumors subtable list

Jeez, when you lay out all the subtables like that, it’s ridiculous! Thanks for all your interest in improving the generator, it’s very much appreciated. And now I know how to use Notepad++’s Compare feature, so if I have a bunch of content saved locally, it’s pretty painless to see what and where I need to add it to the current version on the site.

[M] Response

(posted a provisional external-subtable list on the Rumors talk page, to see if it’d be of any use for debugging purposes)

[A] Proposed Debug Method

That’s a thing of beauty! It makes me want to do the same thing, but for the internal subtables—so, if someone was looking at a table, they could expand the folded-in subtable lists you added to see examples from each. Or check the discussion page, even, since it’s a more behind-the-scenes thing. Not sure if that’s a lot more work or if it’d be useful—but it’d mean someone could easily tell what thing a subtable contained. Often, the subtable will be named reasonably, but as we both know, beyond a certain level of abstraction, you need to look at the code to understand what’s going on, and that might be farther than some people want to go.

Whereas, with a subtable called “TBS”, containing entries of “five minutes”, “thirty minutes” and “one hour”, someone needn’t know “TBS” stands for “Time Before Show”, since if they want a subtable to call for similar results, they know they can call that one.

This is all supposing there was a way to create the list of internal and external subtables automatically, of course—I honestly doubt there’s a generator that wouldn’t benefit from having them listed out the way you’ve done for Rumors and presumably some of the other generators I’ve seen with similar setups. But it’s an effort-to-reward question then—still, being able to look at all the external calls in one spot is something. It makes it so much easier to recall what’s what, and fix any changes that happen due to external edits—would it be the same code to return 3 results from each internal subtable too?

[M] Response

(posted internal subtable list {adapted from earlier code} to the Rumors talk page, to see if it might help)

[A] Internal Subtable Debug Template

Wow, thanks for going out on a limb on my idea!

I hadn’t thought about it before, but you’re right that Rumors has a ludicrous number (>200) of subtables compared to other generators … an internal subtable template might be less useful for gens with only a half-dozen or so. But from a content-creation (as opposed to debugging) perspective, having those subtables organized like that is very helpful: it means when I want to call for some new piece of content I needn’t scroll around and try to remember where in the file I put the subtable, nor even remember its name. I can have the internal subtables page open in one tab and quickly check … and if I forget a subtable’s name, after checking the debug template I can do a control-F to locate that subtable in the code.

Also, just browsing the results of the internal subtables can help spark more content—not sure how to explain exactly, just that seeing 3 results from a table in isolation can help jar ideas that looking at the entire subtable might not. Of course, for anyone else, that might not be helpful, since they might be unfamiliar with what a given subtable is actually doing.

In addition, I think for debugging, it can be useful too (at least for Rumors, with so many subtables): I can see the ones that return empty quotes—some by design—and others where I typo-ed the subtable call, so it of course returns nothing. The by-design ones, also, are so it only sometimes adds a sign and/or smell to an urban location. Same with the “herdwith” subtable, where the additional detail will pop up only on occasion. I’ll probably experiment with that some more—I think every result having every detail diminishes the excitement of hitting refresh and helps make the content seem less randomly generated. Doing it this way does make those subtables especially useless to call from an external page, unless someone is doing it for the same purpose and has their hardcoded string set up the same way. This is why some entries have a space before and after them—since the call is butted right next to the preceding call, so whether “” or “with human feet” comes up, it doesn’t make the display result have two words touching each other.

This leads me to another question—and I do not mean this as a sly way of asking you to do this!—what’s the best practice for organizing the subtables? Obviously this project has gotten large by now. When I began, I’d just create the newer subtables underneath the main string for whatever section, so I could get a visual on the structure as I added new ones. Now, though, it means that certain subtables are a thousand lines below the main entry, and organized only by the roughly inverse chronological order in which I created them within each section.

So all this leads me to think the best practice would be to reorganize the subtables to put them in alphabetical order below the primary sections—so, Urban, Wilderness, etc. would be the top of the code, then all the subtables would be in alphabetical order beneath. Other than the tediousness of doing this, I don’t see how it’d break anything, and it’d make it much easier to locate a given subtable if someone wanted to add to it. I suppose you can always Control-F if you know the name of the subtable you want to add to, but it seems there should be some kind of organization to them, since all the entries are alphabetized now.

My other thought for reorganization is to devise a better standard for the weighting values. My main goal is to have the greatest variety of results on a given page load. But not every structure is equally variable—nor should it be, since content-wise, having more control over what gets displayed lets a particular voice be maintained. Along these lines, I think I’ll create a new section for the Strange Customs entry (currently part of the Wilderness bloc) because those are a bit different than the other Wilderness rumors, and I foresee adding a lot more to them. I’m considering the same thing for the maritime rumors, because they also seem different than the normal Wilderness ones. But again, it all comes back to how diverse the result sets are—having great content buried in a 30-entry subtable that only shows up once in 20 page loads is self-defeating.

I think my biggest annoyance is when I see the same rumormonger or the same person show up. It sends me into a frenzy of adding more to each subtable, to try to reduce that chance!

This got long, my apologies!

Any thoughts on reorganization and weighting?

Many more notes have been taken, and thoughts will be forthcoming once I get this much at least posted.
OK, I just alphabetized Rumors internally. As far as I know, the kinds of issues we're attempting to forestall via these kinds of (seemingly extreme) measures have never really come up before – nobody else has pushed Abulafia quite this far (yet). So I actually must thank you, Aeon, for being so willing to let me experiment on your baby! I do sense, though, that this move – which otherwise would likely never have occurred to me – was a sensible one: two heads are better than one! -M.

[A] July 5th, 2015

1. This page is a great idea! I wish it were easier to have conversations through the wiki, but this seems a great way to leave a comprehensible record of what we’ve been talking about. I was getting confused too!

2. Re your question about commas in the “darksoulsetcnames” subtable … basically, it’s a stylistic thing (you could get by without them), but … I think the result looks and sounds better with the commas.

Compare:

A. Aldia, Scholar of the First Sin, hid a one of a kind bracelet …

B. Aldia, Scholar of the First Sin hid a one of a kind bracelet …

In A, you pause after the title, which lends it weight—

Hold it right there! As I suspected, this was no accident. You, Aeon, are an artist (yes, really). So mote it be. I’ll change my question to a note, so no one else accidentally “corrects” it. Please, go on …

… whereas in B, you end up immediately gliding into the sentence’s predicate. The comma in A works as “Aldia, also known as Scholar of the First Sin, hid a …” I think everywhere I’ve called “darksoulsetcnames”, I’ve accounted for that extra comma (that is, I wouldn’t have included a comma in the string itself), so it should blend in. (But it’s a fine line – I mean, I omit the comma after “Piotr the Skeptic” because “Piotr the Skeptic” is the entire subject. Same with “Laurentis of the Great Swamp” – it’s Laurentis of the Great Swamp, not another Laurentis of elsewhere … trust me, the comma is valuable in that subtable : )

3. I love the re-org – I think I’ll add some comments so if someone checks the source, they aren’t potentially turned off by its scale, since it’s not obvious what any given subtable connects to, nor how it’s used in the results of the page itself. I was thinking maybe to point them to the main Dungeon, Local, Wilds, Prophecy, and Urban subtables, since those form the main branch of what ends up getting displayed. At the very least, pointing a potential contributor to look at the talk page and the wonderful work you did in giving examples from each subtable would be of great use, as opposed to scrolling down to view all the subtable entries at once.

Thanks! Watching Rumors grow has been exciting, due to the new challenges created by its limit-pushing. You inspired me to devise that debug tool, not because I’m especially visionary, but because nothing like it was ever really needed before. Similarly, by this stage, alphabetizing the subtables felt more like requirement than choice: beyond a certain size, I suspect it may be about the only workable way to keep a handle on the content! At the same time, Rumors is already tight enough (code-wise) that from here on I’ll probably not touch it, unless requested. (A nutty idea for if the content continues to grow: multiple gens – i.e. Dungeon, Local, Wilds, Prophecy, Urban etc.)

In a perfect world, it’d be obvious from the subtable name how the content is being used, but the way the Rumors page is structured makes it hard to say if that’s obvious. Though I suppose anyone interested could dig in and find whatever they sought in the code, it’d be preferable if it were intuitive. Then again, I feel the Abulafia culture is more about people getting invested into a given page and diving in, as opposed to “drive by” content adding on a wide variety of different tables. That’s just my hunch from looking at a relatively small number of history pages, of course.

Oh, my contributions have been fairly indiscriminate. The only real connection is that I always try to give things a little boost somehow. But then, I'm a pan-Abulafia weirdo who tends to see the whole thing as one big system.

I just wouldn’t want someone to load a Rumors page, think “Man, this is cool, I’ve some awesome ideas to contribute!”, then feel thwarted somehow from doing so. Maybe this is a groundless fear, though.

I think it may be (groundless). Rumors can’t help being big; it has a ton of ideas. It’s programmed about as straightforwardly as could be expected for its size. Naught in there to discourage anyone …

And happy belated fourth of July – looks like you were busy!

Thanks! Yes, oddly enough, I had more free time on the Fourth than I’d had in the previous several days – for a geeky semi-hikikomori, it felt strange to be out and about as much as I was!