summaryrefslogtreecommitdiff
path: root/content-org/emacs.org
diff options
context:
space:
mode:
Diffstat (limited to 'content-org/emacs.org')
-rw-r--r--content-org/emacs.org31
1 files changed, 16 insertions, 15 deletions
diff --git a/content-org/emacs.org b/content-org/emacs.org
index cc5012e..5434306 100644
--- a/content-org/emacs.org
+++ b/content-org/emacs.org
@@ -148,21 +148,22 @@ The great thing about FIDO is that it, like Icomplete, uses Minibuffer API[fn:mi
#+END_SRC
[fn:minibuffer] [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Minibuffer-Completion.html][Guide on Minibuffer completition]]
-** TODO Introduction to Literate programming
+** DONE Introduction to Literate programming
+CLOSED: [2024-01-30 Tue 19:10]
:PROPERTIES:
:EXPORT_FILE_NAME: literate-programing-in-emacs
-:EXPORT_HUGO_CUSTOM_FRONT_MATTER: abstract A short intro into the idea of literate programing
+:EXPORT_HUGO_CUSTOM_FRONT_MATTER: abstract A short introduction into the idea of literate programming
:EXPORT_HUGO_MENU: :menu emacs-guides :name "Literate programing"
:END:
*** Abstract
-Here I give a short, theoretical introduction to the idea of Literate programing
+In this article I give a short, theoretical introduction to the idea of Literate programming
-*** Preface
+*** Introduction
-Literate programing is not a subject that comes out often, except if you are talking with an Emacs enthusiast.
-There is a signifcant chance, that most programmers don't even know the term.
+Literate programming is not a subject that comes out often, except if you are talking with an Emacs enthusiast.
+There is a significant chance that most programmers don't even know the term.
Let's fix that with a quote:
#+begin_quote
@@ -175,8 +176,8 @@ At the most casual level, a literate program should at least make its own workin
-- Christopher Lee[fn:lee]
#+end_quote
-The idea is therefore an convertion of an entity out of which one can extract code or documentation.
-An semi-abstract in-between called "web[fn:web]".
+The idea is therefore a conversion of an entity out of which one can extract code or documentation.
+A semi-abstract in-between called "web[fn:web]".
The process of creating code is called "tangling", and generation of document is a "weave".
*** An example
@@ -208,24 +209,24 @@ And then we compile it
After the compilation finishes, add executable to your .xinit
-#+begin_src
+#+begin_src shell
echo "exec dwm" >> ~/.xinit
#+end_src
#+end_quote
So yeah, it's a blog post.
-A blog post which one can exeute.
+A blog post which one can execute.
The example assumes shell, but the actual language can be anything.
We can /tangle/ C code without any problems.
-*** Literate programing
+*** Literate programming
-This is *not* the way we do programing.
-We smack spagetti code together, add a random sentence here and there, commit is as "bug fix" and voila!
+This is *not* the way we do programming.
+We smack spaghetti code together, add a random sentence here and there, commit is as "bug fix" and voilĂ !
In a few months no one knows what's going on.
Success, up to the next JIRA task.
-Very often code comments are treated as an harmful or (at best) a neccessar evil.
+Very often code comments are treated as an harmful or (at best) a necessary evil.
We think that code should be self-documenting.
And this is completely valid.
A developer needs to understand what given code does, just by reading it.
@@ -241,7 +242,7 @@ Since the code coexists with documentation, the reader gets the whole picture.
[fn:lee] [[https://web.archive.org/web/20170603045917/http://vasc.ri.cmu.edu:80/old_help/Programming/Literate/literate.html]["Literate Programming -- Propaganda and Tools", Christopher Lee, 1997]]
[fn:babel] [[https://orgmode.org/worg/org-contrib/babel/intro.html][Org Babel]]
[fn:jupyter] I know that Jupyter is not strictly a literate program, but it's close enough.
-[fn:web] the name was choosen, because at the time it was not in use ralated to computing.
+[fn:web] this name was choosen, because at the time it was not in use related to computing.
We're dealing with history here!
*** Conclusion