Non-friendly documentation

I am not saying that tutorials (which border on being demos) aren’t useful, but I think that the main difficulty for newbies is that Julia requires a different mindset than most languages, and that is learned gradually and is hard to tie to a single package.

Many newcomers find Julia frustrating because they want to solve a particular problem, and zero in on a package, not realizing that they need to invest a bit more into the language and the ecosystem because a particular package just contributes a very specific set of building blocks, useful in a wider context.

For example, a lot of packages just have a few types that implement <: AbstractArray. For Julia users that have some experience with the language, that already clarifies a lot of things, and there is no need to repeat anything that is in the interface docs. A few examples and an explanation of the performance model is frequently sufficient (eg FillArrays.jl). But for newbies, a lot of the context is missing or implicit: someone created this particular type because realized it would be useful for some applications, but at the same time being a drop-in replacement for anything implementing the same interface.

I am particularly skeptical of the applicability of the “cookbook” (howto) documentation model in Julia. This model works very well for a lot of languages (eg R) because generally there are only a few recommended ways to do something, the package APIs are mostly stable, most of them are very high level functions encapsulating very complex functionality, generally hiding the details from the user.

In contrast, what most well-designed Julia packages provide are composable building blocks. There is usually a way of using them that the authors intended, but usually it is perfectly fine to use them in other ways, maybe not even foreseen by the people who wrote the code (a lot of issues are related to this, making the package even more composable as they are resolved).

Anyhow, I don’t have a silver bullet to recommend here. I just believe that best practices for documenting Julia packages will be evolving for some time because it is a novel problem. We can benefit from best practices of other communities, but may not be able to adapt them directly.

4 Likes