💾 Archived View for d.moonfire.us › blog › 2015 › 12 › 06 › finished-up-culture captured on 2024-07-09 at 02:16:19. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-04-26)

-=-=-=-=-=-=-

Finishing up this round of MfGames Culture

Up a Level

For November, I decided to focus on MfGames Culture[1]. It was a pretty productive month in many ways, but the development cycle has ended and it is a good time to report where I am and what needs to happen next.

1: https://mfgames.com/mfgames-culture/

Reasons

I've been trying to write this library for a number of years. I've tried it in a few forms, the C# version being the previously most successful one, but it hit some conceptual snags and overwhelming details (the bulk of the reasons why my bigger projects fail).

This time, I tried something entirely different, I wrote it in Javascript (well, Typescript). Typescript is not one of my primary languages, but I think it has a good chance of becoming one. I've played with it in a number of other iterations, mostly related to Author Intrusion[2].

2: /tags/author-intrusion/

The library is a small but rather complex part of my master plan for Author Intrusion. I want to use this library to tag the headers of my various chapters and tell me when and where it happens. The library is also to let me build a timeline of the entire world of Fedran[3].

3: https://fedran.com/

Confusion

The biggest problem with Typescript is that I couldn't figure out the One True Way of getting it to work. Whenever I thought I figure out how to get something working, it broke with the next step. And then I'd puzzle through that and come up with a new way, it ended up breaking up with the next one. It was a rather frustrating experience, to say the least.

My first thought was to write using ES6 modules (`tsc --target es6`). I figured that Author Intrusion is going to take five years, so going with the edge development seemed like the right idea.

Needless to say, I love the ES6 import syntax. It compiled great and everything was perfect.

At least until I needed to get it tested. I really like to use TDD (Test-Driven Development) which means I usually write with tests to help prove out small, discrete concepts. I do not do BDD or top-level testing, but working on internal logic to make sure the foundation was correct.

To get testing working, I ended up having to go to `jasmine-es6` but after trying `mocha`, `jasmine`, and a bunch of other things.

Eventually, I got mfgames-culture-js[4] working (well, it was called something else at the time).

4: https://github.com/dmoonfire/mfgames-culture-js/

Then I encountered the next stumbling block. I tried to put it up as a fiddle[5]. This was a fun experience, mainly because I have not really made a web-based Javascript page before, but also because my nice and stable system crumbled. Absolutely failed because I couldn't figure out how to get the ES6 module to work with the website.

5: https://mfgames.com/mfgames-culture/fiddle

I tried a lot of things, `babel` and `webpack`, but I couldn't figure out them out. There were errors messages that apparently no one else in the universe had ever had. I spent over a week trying to get it working. I also tried creating two versions of the `mfgames-culture-js` (AMD and CommonJS) to use that.

Eventually, I went back to `mfgames-culture-js` and redid it as UMD (universal module definition). That required me to rework the testing framework, but I could go back to the regular `jasmine` which I was happy about. I did have to reduce the entire project to one file (as opposed to breaking it apart) because Typescript and RequireJS don't seem to support multiple files being reexported or combined together. I really hate having a 1,000+ line source file.

Following the refactoring that came with it, I finally got my website working. I figured I was free and clear.

And then I started working on the command-line client (`mfgames-culture-cli`). So, the CLI is based on NodeJS and CommonJS modules while the website used AMD modules. I had to split my JS library in two because it was the only way I could figure things out.

Another week later, I managed to get everything working smoothly in a Frakenstein-like system. I don't think it is the right answer, but it worked for me. At least until I try to do something else, that is.

I also ended up with four packages and one website:

I also spent another week trying to figure out how to get Typescript “typings” working. That still hasn't been resolved yet, but I ran out of time. I'll puzzle that out the next round, mainly to “finish up”.

I also spent a week documenting it and I feel that I'm only 50% done with that task.

Complexity

Calendars are complex. This weekend, I tried to explain to my dad how my system works. Going through the JSON files, I realized that this really isn't a trivial system and I don't think I can make it simple. I can make it easy to isolate and work, but this will never be “easy”.

I did create a forum[6] to talk about it. I'll be glad to help if anyone does decide to join in or try to use it.

6: http://discuss.moonfire.us/c/mfgames/mfgames-culture

Retrospective

I spent a lot of time trying to figure things out. All my web searches didn't really give a good answer, so I fumbled through it. I may have gotten a decent work flow, but it doesn't feel “right” yet.

I also uploaded everything to npmjs.com, so anyone can use them.

Next for the library

There are a few steps still left for the library:

I'm sure as my understanding and the ecosystem both evolve, I'll change how to these systems are arrange. That is why I kept them at the 0.1.0 level. I am nowhere close to being version 1.0.0.

December plans

The main reason I worked on this library for November was to take a break from writing. I posted on Facebook and a few other places, but generally I was frustrated with my weekly serials. I made a decision to start releasing Flight of the Scions[7] for Patreon[8] subscribers only. I'll do another blog post on that, but I'm getting excited about writing again.

7: /tags/flight-of-the-scions/

8: https://www.patreon.com/dmoonfire?ty=h

Metadata

Categories:

Programming

Tags:

Author Intrusion

Flight of the Scions

Javascript

MfGames Culture

NodeJS

Footer

Below are various useful links within this site and to related sites (not all have been converted over to Gemini).

Now

Contact

Biography

Bibliography

Support

Fiction

Fedran

Coding

The Moonfires

Categories

Tags

Privacy

Colophon

License

Mailing List

https://d.moonfire.us/blog/2015/12/06/finished-up-culture/