Code documentation written as code! How novel and totally my idea!
Go to file
Quint Guvernator ded11e254f added defer example
decided not to use file i/o as an example because external file access
is rare in other tutorials.
2014-02-02 15:11:15 -05:00
de-de Updated a lot of filenames 2014-01-29 23:30:28 -08:00
es-es Fix GO yaml to not break in es 2014-02-01 17:00:04 -08:00
fa-ir Updated a lot of filenames 2014-01-29 23:30:28 -08:00
fr-fr Updated a lot of filenames 2014-01-29 23:30:28 -08:00
hu-hu Fixed typo 2013-08-30 07:38:22 +02:00
ko-kr Updated a lot of filenames 2014-01-29 23:30:28 -08:00
pt-br Updated a lot of filenames 2014-01-29 23:30:28 -08:00
pt-pt Fixed typo 2013-12-04 11:34:42 +00:00
ro-ro Fixed up so it builds 2013-09-08 22:52:09 -07:00
ru-ru Updated a lot of filenames 2014-01-29 23:30:28 -08:00
tr-tr some updates on brainfuck/tr . i missed out "not capitalized except at the start of a sentence" about brainfuck 2013-09-20 14:19:16 +03:00
vi-vn Updates 2013-10-27 22:17:56 -07:00
zh-cn Updated a lot of filenames 2014-01-29 23:30:28 -08:00
bash.html.markdown spelling fixes in bash (en) 2013-12-27 16:21:24 +01:00
brainfuck.html.markdown make explanation richer 2013-09-21 05:01:47 +09:00
c.html.markdown Added missing comma in printf 2014-01-10 18:28:34 +01:00
clojure-macros.html.markdown Added Clojure macros 2014-01-19 20:33:06 -08:00
clojure.html.markdown pointless change to test auto-deploy 2013-10-27 22:42:13 -07:00
coffeescript.html.markdown Link to CoffeeScript official website 2014-01-29 21:34:56 -05:00
common-lisp.html.markdown [CommonLisp] fix typo error in comment 2013-10-07 17:48:30 +03:00
csharp.html.markdown Fix while loop iterator incorrect count 2013-11-18 22:58:27 +00:00
css.html.markdown Updated a lot of filenames 2014-01-29 23:30:28 -08:00
dart.html.markdown Authors -> Contributors 2013-07-03 22:59:13 -07:00
elisp.html.markdown Merged Bastien's changes 2013-07-29 10:33:45 -07:00
elixir.html.markdown Fixed typos 2013-07-08 23:37:41 -07:00
erlang.html.markdown Spelling error one of the comments in erlang.html.markdown 2013-07-28 10:17:54 -04:00
file.erb Added filename parameter 2013-06-29 20:19:14 -07:00
fsharp.html.markdown Authors -> Contributors 2013-07-03 22:59:13 -07:00
git.html.markdown [git] Fix typo error in guide 2013-10-08 18:48:46 +03:00
go.html.markdown added defer example 2014-02-02 15:11:15 -05:00
groovy.html.markdown Another way of checking List.contains and some headers 2013-09-02 13:02:53 +01:00
haskell.html.markdown [haskell/en-en] Fixed 80-character margin 2013-12-02 13:09:58 +01:00
haxe.html.markdown Edits 2013-08-27 21:23:09 -07:00
hy.html.markdown [hy/en] Introductory tutorial to hy language 2014-01-11 12:48:56 +05:30
java.html.markdown Issue#163 2014-01-30 12:36:19 -06:00
javascript.html.markdown Fix capitalization in the word JavaScript 2014-01-22 11:22:07 +05:30
julia.html.markdown style fixes 2014-01-24 11:06:41 +02:00
livescript.html.markdown Fixed comparisons section 2013-10-01 09:10:27 -03:00
lua.html.markdown Fixed spelling of trig function "sin" 2013-10-07 12:33:10 -06:00
matlab.html.markdown Fix typo - misspelt 'receive' 2013-09-18 18:08:31 +01:00
neat.html.markdown Fixed up so it builds 2013-09-08 22:52:09 -07:00
objective-c.html.markdown Merge pull request #486 from levibostian/objective-c-protocols 2014-01-29 22:05:55 -08:00
perl.html.markdown [perl] Fix list with links at "Further Reading" 2013-10-04 12:47:21 +03:00
pets.csv Create pets.csv 2013-06-29 03:38:34 -04:00
php.html.markdown php: typo 2014-01-17 14:38:24 +08:00
pogo.html.markdown added javascript highlighting 2013-09-20 12:43:05 +02:00
python.html.markdown [python] == doesn't coerce types; use bool() to demonstrate truthiness instead. Closes #418. 2013-11-26 18:12:53 +10:30
r.html.markdown Update r.html.markdown 2013-09-04 19:56:17 +01:00
racket.html.markdown Improve language usage in Racket guide 2014-01-05 21:37:35 +07:00
README.markdown Update README.markdown 2013-09-05 10:52:17 -07:00
red.html.markdown Remove red syntax highlighting 2014-02-01 16:56:37 -08:00
ruby-ecosystem.html.markdown Fix grammar in ruby-ecosystem.html.markdown 2013-09-08 04:24:37 -04:00
ruby.html.markdown Ruby: Adds attr_accessor, attr_reader, and attr_writer to class docs 2013-12-01 21:43:48 -05:00
scala.html.markdown Source.fromPath no longer exists (https://github.com/scala/scala/blob/master/src/library/scala/io/Source.scala) Changed example to use Source.fromFile 2013-12-30 09:45:15 +02:00
standard-ml.html.markdown [standard-ml/en-en] Some format fixing, variable renaming, some more about exceptions 2013-12-16 21:42:15 +01:00
visualbasic.html.markdown An assortment 2013-08-01 11:24:23 -07:00
whip.html.markdown Updated documentation for new language behaivour 2013-08-18 10:10:40 -05:00

Learn X in Y minutes

Whirlwind tours of (several, hopefully many someday) popular and ought-to-be-more-popular programming languages, presented as valid, commented code and explained as they go.

We need YOU!...

... to write more inline code tutorials. Just grab an existing file from this repo and copy the formatting (don't worry, it's all very simple). Make a new file, send a pull request, and if it passes muster I'll get it up pronto. Remember to fill in the "contributors" fields so you get credited properly!

Contributing

All contributions welcome, from the tiniest typo to a brand new article. Translations in all languages are welcome (or, for that matter, original articles in any language). Send a pull request or open an issue any time of day or night.

Please tag your issues pull requests with [language/lang-code] at the beginning (e.g. [python/en] for english python). This will help everyone pick out things they care about.

Style Guidelines

  • Keep lines under 80 chars
  • Prefer example to exposition
  • Eschew surplusage
  • Use utf-8

Long version:

  • Try to keep line length in code blocks to 80 characters or fewer, or they'll overflow and look odd.

  • Try to use as few words as possible. Code examples are preferred over exposition in all cases.

  • We welcome newcomers, but the target audience for this site is programmers with some experience. So, try to avoid explaining basic concepts except for those specific to the language in question, to keep articles succinct and scannable. We all know how to use google here.

  • For translations (or english articles with non-ASCII characters), please make sure your file is utf-8 encoded, and try to leave out the byte-order-mark at the start of the file. (:set nobomb in vim)

Header configuration

The actual site uses Middleman to generate HTML files from these markdown ones. Middleman, or at least the custom scripts underpinning the site, required that some key information be defined in the header.

The following fields are necessary for english articles about programming languages:

  • language The programming language in question
  • contributors A list of [author, url] lists to credit

Other fields:

  • filename: The filename for this article's code. It will be fetched, mashed together, and made downloadable. For non-english articles, filename should have a language-specific suffix.
  • lang: For translations, the human language this article is in. For categorization, mostly.

Here's an example header for an esperanto translation of Ruby:

---
language: ruby
filename: learnruby-epo.ruby
contributors:
    - ["Doktor Esperanto", "http://example.com/"]
    - ["Someone else", "http://someoneelseswebsite.com/"]
lang: ep-ep
---

License

Contributors retain copyright to their work, and can request removal at any time. By uploading a doc here, you agree to publish your work under the default Creative Commons Attribution-ShareAlike 3.0 Unported licensing included on each doc page.

Anything not covered by the above -- basically, this README -- you can use as you wish, I guess.