User:PhantomCaleb/Showcase

The following is a list of a few of the contributions that I am most proud to have made in my time here at Zelda Wiki. This page is linked in my resumé and my LinkedIn profile. If you are a ZW editor seeking gainful employment, I encourage you to do the same! Your experiences here may be more career-relevant than you realize.

If you are one of my prospective employers or clients and are not familiar with the MediaWiki platform, you may wish to read the glossary below before diving in.

Main Page
The current main page was a collaborative effort between User:GoldenChaos, User:Yumil1988, User:MannedTooth, and myself. GoldenChaos and Yumil came up with the original design. I gathered the feedback from the rest of the staff team and drove the implementation over the finish line. MannedTooth made some nice post-hoc improvements such as the animations on the game tiles.

Site CSS
At the time of writing, I'm responsible for most of the site's CSS. In the MediaWiki:Gadget-Variables.css file I implemented the concept of design tokens. Most of the ideas were borrowed from Shopify's Polaris design system.

Unfortunately, many of the CSS selectors are messy due to the fact that MediaWiki's CSS and HTML does not adhere to many industry best practices. It's been frustrating at times, but I try to remind myself that they're a massive open source project that predates many of the current best practices in web development.

Module:MM Schedule
This module implements Template:MM Schedule, which generates visualizations of directed acyclic graphs where each node is a list of tuples. The DAG is usually a binary tree, but there are exceptions.

(MM) is a time-based game such that each character has a schedule that they follow: at time A they are at location X, then at time B move to location Y, and so on. This schedule can change based on whether or not a player completes certain actions. It is therefore desirable for this wiki to describe every possible schedule that can occur for a given character. Kafei is an example of one of the more complex schedules in the game.

MediaWiki is limited in terms of the kinds of data that you can provide as input to templates. Basically all you can do is give it a flat list of key-value string pairs. It was quite a challenge to figure out how to represent the DAG of schedules using key-value pairs, and make it simple enough for non-technical editors to author.

Module:Documentation and Module:UtilsArg
These two modules consume Lua data objects serving as "specs" for MediaWiki templates and Lua functions. Unit tests, parameter documentation, and argument parsing/validation logic is derived from these specs. The fact that documentation comes from the same source of truth as tests and parsing logic provides a runtime guarantee that the documentation is up to date, which I find pretty neat.

Some notable examples of such tests/documentation include:
 * Module:File/Documentation
 * Module:UtilsArg/Documentation
 * Module:UtilsTable/Documentation
 * Template:Wares/Documentation

Module:UtilsTable
Basically a Lua clone of Lodash. Lua doesn't come with batteries and the open source libraries that exist don't work well with the subset of Lua that MediaWiki supports. So I built my own.

Template:Wares
This template displays the prices of items offered by in-game shops and merchants.

In the most common (and simplest) use case, shop data is just a list of 3-ary tuples—item name, price, description. However, shop data can get rather complicated when certain items are offered at a discount under certain conditions, or have limited stock with a specific restocking condition, or are offered at some locations but not others, etc.

I'm proud of how I was able to add support for all use cases without complicating the simple use case.

Technical Writing

 * Guidelines:Cargo, a technical document explaining how Zelda Wiki manages its structured data.
 * Guidelines:CSS, a document describing best practices for writing CSS for Zelda Wiki.
 * Guidelines:Modules/Exercises, a training material which teaches beginners how to code in Lua.