emeidell

emeidell

I am preparing a meetup Lightning talk on Documentation and the importance of it. I love that in the Elixir docs is states “Elixir treats documentation as a first-class citizen”. I love this but why do we? Does the importance come from bad experience and this is our revenge? (This is not my view but just sparking discussion)

I would love your insight on the why and how would you explain this to someone first coming into this language.

Showing Posts 1 to 4

yawaramin

yawaramin

In my opinion, documentation is a requirement for a welcoming community. Sure, you don’t really need documentation if you’re motivated to learn the tech. But good documentation lowers the effort barrier and sends a signal that the community cares about newcomers.

emeidell

emeidell OP

That’s a good point! By documenting you are inviting people to learn. I like that! Thanks!

Qqwy

Qqwy

TypeCheck Core Team
  1. The learning point that @yawaramin already mentioned.
  2. Documentation is the only tool we have to convey important information to the user of our interfaces. In many languages, the concepts of ‘Documentation’ and ‘Commenting’ are conflated, but they are different:
  • Comments are something you write in your code to help you and future maintainers understand why you made a certain implementation choice (like picking a less aesthetically pleasing solution because the performance difference mattered here, or make a note that yes, this line is required because otherwise a race-condition would happen in situation X, etc.). Side note: Comments should not tell you what happens (because, hopefully, the code itself already does this).
  • Documentation, on the other hand, is for people using your code, who need to know the rules your code expects of them. This is even more important in a weakly-typed environment than a strongly typed one, because there are less ways to enforce rules on the end user (to ‘make invalid states impossible’) so the only tool we still have is communication between humans.

The nice thing about making documentation first-class (rather than having documentation ‘tacked on’), is that it is a lot easier for people to find and use it! I find myself using iex’s h helper very often, because it is so much quicker than browsing on the internet to look for the documentation of packages/modules that I already have installed on my local system.

dimitarvp

dimitarvp

That was honestly one of the things that made an excellent first impression to me ~2.5 years ago with Elixir.

People on Reddit and HN have called Elixir “a language with good marketing” many times and I find myself in agreement with them… although I think the community should definitely go next-level and prepare several topical Wiki-like posts here in ElixirForum; it’s a natural next step IMO (this post is an excellent example of what I have in mind: HTTP client libraries and wrappers).

Elixir has very no-BS noob experience and this definitely won me over as the jaded C / C++ / Java / PHP / Javascript / Ruby programmer that I was back then.

(Anti-example: deployment. I found Distillery really quick to start with but there’s so many manual steps to do that I have to wonder why are there no wrappers or generators yet. Hell, even if they require 20 CLI parameters I’ll still take it, deployment shouldn’t be such a delicate and brittle job).


So to answer @emeidell – documentation is important because there’s very good tooling that can be built around it (ex_doc; seamlessly building documentation is extremely important for wide adoption, including in corporations) and because it’s a very good marketing tool to show initiating programmers that the language is community-friendly.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
GES233
I’m posting this in response to Jose’s recent tweet (Cr. link) : People are sleeping on Elixir for a coding harness: Hot-code swappi...
New
marciol
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
durvia
Anyone running long-lived stateful processes on BEAM? We’re building an AI agent runtime and would love to compare notes. We’re a small ...
New
AstonJ
This might be a bit disturbing for some but it’s happening - computers running on living human neurons. They’ve made them smart enough t...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews