formats.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. Formats manifesto
  2. ================
  3. Why?
  4. ---
  5. Mainly, because a friend of mine once showed me `Coding2Learn <http://coding2learn.org>`_, a great blog by Marc Scott containing an entry entitled `Please stop sending me your shitty Word documents <http://coding2learn.org/blog/2014/04/14/please-stop-sending-me-your-shitty-word-documents>`_.
  6. But also because I think it’s proper and, what is probably most important, convenient.
  7. Prologus
  8. --------
  9. I love standards. And I love them open, free (as in beer and speech), and simple. Without standards we couldn’t watch funny cats on the Internet.
  10. Meritum
  11. -------
  12. This website
  13. ~~~~~~~~~~~~
  14. This website works as intended with the latest stable version of Firefox®`[1] <#ref1>`_. It means that—for now—it should work on all major browsers.
  15. This may change when Firefox decides to implement WebP support. Then, `some browsers <http://caniuse.com/#search=webp>`_ may not show images.
  16. Text
  17. ~~~~
  18. Text should be plain. I could call “period” here but I’ll explain my point of view.
  19. There are actually two disjunctive cases:
  20. **formatting is not important**
  21. Then don’t include it. You don’t have to wrap a little of text into a huge binary format of any office suite. Open a notepad of choice, type it, and save as text file. Formatting text that doesn’t need it is a waste of time and resources. And it hurts the eyes of the reader.
  22. If You want to emphasize something, put a list, or a header, then use a markup language. Previous versions of this manifesto recommended Markdown. I realised however that Markdown is not a standard and comes in various flavours. Since then I’ve been recommending RestructuredText. Still, it’s just a recommendation, You can send me any reasonable markup language. But I repeat: *resonable*.
  23. **formatting is important**
  24. I get it, there are official documents, CVs, company print-outs with logos, books, articles, etc. Still, it’s even worse idea to use office suite formats in this case, because what You send may not be the same to what I receive—my program may be different, I may have to import Your proprietary format, or my program may just be a different version—the document may fall apart.
  25. Use PDF if You want to give me a finished document, use LaTeX if You work with me on the document.
  26. I hereby promise not to ever send You office suite documents, and to use plain text, RestructuredText, PDF, or LaTeX instead.
  27. Typography
  28. ~~~~~~~~~~
  29. We fortunately live in the times of Unicode, when with single encoding we can produce a text containing characters from enormous number of languages. It’s painful when people use ‘-’ (hyphen-minus, U+002D) when it should be ‘–’ (en dash, U+2013), ‘—’ (em dash, U+2014), or rarely ‘−’ (minus, U+2212). Also " and ' (typewriter quotation marks) are not the same as “,” (double quotes, U+201C and U+201D) and ‘,’ (quotes, U+2018 and U+2019). It’s especially the case in Polish in which the left quotes are respectively „ (U+201E) and ‚ (U+201A). One more notable example is ... (three dots) instead of … (ellipsis, U+2026).
  30. Specific list of proper characters is way beyond the capacity of this entry.
  31. Please, review the use of proper characters You write, which I also hereby promise to do.
  32. Emails
  33. ~~~~~~
  34. As I stated above “Text should be plain.” Not only is HTML in emails a waste of time and resources, but also security threat, as it may contain malicious code. Moreover, people using text-based email clients hardly ever receive HTML emails properly (this apply to me).
  35. I hereby promise not to send HTML emails.
  36. Date & time
  37. ~~~~~~~~~~~
  38. For expressing date and time there is the way standardised by `RFC 3339 <https://tools.ietf.org/html/rfc3339>`_.
  39. If the time-zone is omitted, I understand that either the local time-zone applies—if the place is given—, or the time is in UTC, otherwise.
  40. On a side note neither is the calendar nor the clock we use logical. That’s why I prefer `dozenal clock (with 24 hours) <http://dozenalsociety.org.uk/apps/timeunits.html>`_ and `thirteen month calendar <https://en.wikipedia.org/wiki/International_Fixed_Calendar>`_. However—logical as they are—they are unusual so I won’t use them without Your explicit consent.
  41. Photos & pictures
  42. ~~~~~~~~~~~~~~~~~
  43. For vector graphics there is an open standard – SVG.
  44. For raster graphics there’s not one, perfect standard so I’ll accept all major formats. From me, You can expect exactly 2:
  45. - if I have access to the original, raw data, I’ll use TIFF with LZW compression,
  46. - otherwise, I’ll use WebP.
  47. The reasons for using WebP are:
  48. **versatility**
  49. it can be animated (instead of GIF/APNG) and can hold alpha (instead of GIF/PNG) at the same time,
  50. **size**
  51. it’s visibly smaller (in bytes) than other formats with the same quality.
  52. **colour space**
  53. it’s not indexed (unlike GIF), and so it’s more convenient to edit.
  54. Sound
  55. ~~~~~
  56. Like with images, there’s no standard.
  57. From me, You can expect 2 formats:
  58. - if I have access to the original, raw data, I’ll use FLAC,
  59. - otherwise, I’ll use Opus.
  60. Videos
  61. ~~~~~~
  62. Again, no standard.
  63. This time, You can expect: WebM (when it takes reasonable time to encode) or Matroska with H.265 for video and Opus for sound.
  64. (I’m following the development of AV1, and I’ll be more than glad to use it when it’s ripe and encoders are fast.)
  65. Epilogus
  66. --------
  67. As I said, it’s for convenience and to respect the receiver—nobody has to use some esoteric software.
  68. If You feel I offended You, have some remarks, think something is better, then feel free to use any kind of contact to share Your thoughts with me, e.g. the contact form available `there </contact>`_.
  69. .. div:: refs
  70. .. _ref1:
  71. 1. Firefox is a trademark of the Mozilla Foundation in the U.S. and other countries.