Welcome to ElixirBlocks: Difference between revisions
From ElixirBlocks
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
1. Write small, fully working code examples. Ideally, the reader should be able to copy and paste the code and have it working quickly. For larger code examples, explicitly break them up into smaller examples so that each block can be easily validated. | 1. Write small, fully working code examples. Ideally, the reader should be able to copy and paste the code and have it working quickly. For larger code examples, explicitly break them up into smaller examples so that each block can be easily validated. | ||
2. Set assumptions | 2. Set assumptions before writing your code. If your code requires prerequisite knowledge, be explicit and inform the reader. | ||
3. Contextualize the code so the reader understands why it's useful. | 3. Contextualize the code so the reader understands why it's useful. |
Revision as of 14:45, 8 March 2023
This is my personal web project where I write small working blocks of useful Elixir Code.
To contribute follow these guidelines:
1. Write small, fully working code examples. Ideally, the reader should be able to copy and paste the code and have it working quickly. For larger code examples, explicitly break them up into smaller examples so that each block can be easily validated.
2. Set assumptions before writing your code. If your code requires prerequisite knowledge, be explicit and inform the reader.
3. Contextualize the code so the reader understands why it's useful.
To write code you encapsulate it in the syntaxhighlight element. Click the blue Edit button to see the syntax of the code example below.
def hello_world() do "hello world" end