On Documenting the actual limitations of Mint and improving developer experience #492
frnco
started this conversation in
Language Development
Replies: 1 comment 1 reply
-
Thanks for writing this 👍 🙏 I'm on holiday at the moment, when I get back I'll address the points you raised in more detail, but for now I just point here the places where the documentation can be contributed to:
So if you would like to contribute, you can do that in any of those, if you need specific guidance we can chat on Discord, Gitter or Telegram. To clarify why the documentation is so poor: my issue is that I don't see where the documentation can be improved because I know everything, and it's not evident for me 😞 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been using Mint for a while now, have used Elm for a few small projects before, and I have even used Crystal in a substantial number of small personal projects. I've learned that Mint unfortunately shares some of Elm's problems, most notably the shallowness of the documentation and scarcity of examples, but also some seemingly arbitrary limitations of the APIs, such as having to keep converting to and from strings when binding data to an
input
even though it'stype="number"
, and updating a value that is nested in a state variable, as an example, I can't find a reasonably concise and straightforward way of updating the names on something likestate people : Array(Person) = [{firstName="John",lastName="Doe",age=38},{firstName="Jane",lastName="Doe",age=36}]
, much less the ages since those would add a lot of boilerplate just for converting between Number and String, and simply using Arrays/Sets/Maps already means I have to check forMaybe"s everywhere (Even if I get the Index of something in the Array/Set and later use it to update the array, which I'd expect to be fail-safe, requires such
Maybe` checks).Now, from my experience Elm is a lot more verbose and requires an unreasonable amount of boilerplate, so I feel Mint is already quite better, but a lot of blind experimentation is still necessary to build pretty much anything, the documentation is just way too basic, at least in my opinion, and here it's worth to point out that I've been using Arch Linux for almost a decade and have some experience with Gentoo, and I believe the Arch and Gentoo Wikis are widely known for how detailed, complete and well-written they are, couple that with how Arch tends to push users towards learning and deciding by themselves how to do things and it's pretty much a given that I have quite a bit of experience going through documentation to figure stuff out.
Now, Mint's documentation is not wrong, but it's definitely lacking. The API Section lacks not only examples but also depth/detail, to mention a few:
Storage.Local
andStorage.Session
? How should I expect stored data to behave? or;Json.stringify
how should I proceed when I want to either indent or minify or do whatever with the resulting string...?And this API section doesn't touch on Syntax and language stuff, which takes us to my second point: The Learn section.
The Learn section is actually quite good, it gives a reasonably good overview of the language itself, but one of the reasons for that is its simplicity, and that means quite a bit of stuff is actually left out. I think that should be adressed by adding a new section with advance stuff so as to avoid over-complicating the Learn section, but even then there are some points that could and should be made clearer in the Learn section itself, to mention just a few that have bothered me in the past:
onChange
handler which is very basic;Referencer -> Records
andControl Expressions -> Next
sections, leaving out things like uploading arrays or nested fields and only giving one example on the shorthand to update a single field on a record, the example being{ user | name = "Stuart" }
(Which obviously doesn't give any information on dealing with either arrays or nested fields).Which takes me to my last point, the Try/Sandbox area of the site. As it stands, it's a very short list containing only the 20 most recent sandboxes created (Maybe updated?) by anyone, which causes it to mostly be a collection of useless examples that do not work. It should either present a selected list of knowingly useful sandboxes, which should be easy to do since it'd require picking just 20 sandboxes, or it should have some way to browser/search/whatever. As it stands it's pretty much impossible to find anything useful over there.
Now since my intention is to help improving this and not only complaining, I do have some ideas and I hope we can collectively find solutions to those problems. First of all, I believe something like a wiki, which allows people to contribute with more details, examples etc., could be a nice way to fix most of those issues. On the Sandbox bit, I'd suggest either a search box or a simple pagination, whichever is easier to implement. And last but not least, the addition of a page on the "Learn" section about ways to contribute to the documentation specifically. As familiar as I am with Crystal I'm no language designer, so it's a really big hurdle to get involved with the Github issues, which I did check out to see if there was anything I could help with.
I believe Mint is clearly superior to every single one of its alternatives when talking about Front-end design, probably even when considering UI design as a whole, and I think in the near future the adoption of Mint, Elm or something similar will rise dramatically, but the current state of documentation for Mint is definitely one of the biggest obstacles for new developers, and not everyone is as eager as I am to try out shiny new things, or as experienced as I am so as to have enough experience/knowledge to fill in the gaps of the documentation.
Beta Was this translation helpful? Give feedback.
All reactions