Still progress
This commit is contained in:
parent
8cf013bfb0
commit
2525d63244
|
@ -4,5 +4,5 @@
|
||||||
|
|
||||||
#+begin_archive
|
#+begin_archive
|
||||||
@@html:<li>@@ @@html:<span class="archive-item"><span class="archive-date">@@ 2019-07-12: @@html:</span>@@ [[file:posts/draft-professional-lessons-and-opinions.org][Professional Lessons and Opinions]] @@html:</span>@@ @@html:</li>@@
|
@@html:<li>@@ @@html:<span class="archive-item"><span class="archive-date">@@ 2019-07-12: @@html:</span>@@ [[file:posts/draft-professional-lessons-and-opinions.org][Professional Lessons and Opinions]] @@html:</span>@@ @@html:</li>@@
|
||||||
@@html:<li>@@ @@html:<span class="archive-item"><span class="archive-date">@@ 2019-07-05: @@html:</span>@@ [[file:posts/2019-07-04-org-publish.org][org-publish]] @@html:</span>@@ @@html:</li>@@
|
@@html:<li>@@ @@html:<span class="archive-item"><span class="archive-date">@@ 2019-07-07: @@html:</span>@@ [[file:posts/2019-07-04-static-org-publish.org][Static blog with org-mode]] @@html:</span>@@ @@html:</li>@@
|
||||||
#+end_archive
|
#+end_archive
|
||||||
|
|
|
@ -6,13 +6,25 @@ body {
|
||||||
font-family: menlo, monospace;
|
font-family: menlo, monospace;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
line-height: 20px;
|
line-height: 20px;
|
||||||
max-width: 50em;
|
margin: 0;
|
||||||
margin: 0 auto;
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
hyphens: auto;
|
hyphens: auto;
|
||||||
-webkit-hyphens: auto;
|
-webkit-hyphens: auto;
|
||||||
-moz-hyphens:auto;
|
-moz-hyphens:auto;
|
||||||
-ms-hyphens:auto;
|
-ms-hyphens:auto;
|
||||||
}
|
}
|
||||||
|
#preamble,#postamble {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
#preamble:focus,#postamble:focus,
|
||||||
|
#preamble:hover,#postamble:hover {
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
#content,.content {
|
||||||
|
max-width: 50em;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6,
|
h1, h2, h3, h4, h5, h6,
|
||||||
pre, code, blockquote, ol, ul,
|
pre, code, blockquote, ol, ul,
|
||||||
|
@ -48,7 +60,6 @@ hr {
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 0;
|
border: 0;
|
||||||
margin: 20px 0;
|
|
||||||
}
|
}
|
||||||
hr:after {
|
hr:after {
|
||||||
content: "----------------------------------------------------------------------------------------------------";
|
content: "----------------------------------------------------------------------------------------------------";
|
||||||
|
@ -117,32 +128,49 @@ ol > li:before {
|
||||||
|
|
||||||
/* colors */
|
/* colors */
|
||||||
|
|
||||||
img { max-width: 100%;
|
img {
|
||||||
max-height: 800px;
|
max-width: 100%;
|
||||||
margin: 20px auto; }
|
max-height: 800px;
|
||||||
footer { font-size: 0.8em; opacity: 0.5; }
|
margin: 20px auto;
|
||||||
footer:hover { opacity: 1; }
|
}
|
||||||
navigation { font-weight: bold;
|
footer {
|
||||||
font-family: menlo, monospace;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
navigation a { display: inline-block;
|
.article-date {
|
||||||
padding: .5ex 1ex;
|
opacity: 0.5;
|
||||||
margin-right: 1em;
|
font-size: 0.8;
|
||||||
}
|
}
|
||||||
.article-date { opacity: 0.5; font-size: 0.8; }
|
table {
|
||||||
|
width: 100%;
|
||||||
table { width: 100%;
|
margin: 20px 0;
|
||||||
margin: 20px 0;
|
border-collapse: collapse;
|
||||||
border-collapse: collapse;
|
border: solid 1px;
|
||||||
border: solid 1px; }
|
}
|
||||||
td, th { height: 20px;
|
td, th {
|
||||||
padding: 0 10px;
|
height: 20px;
|
||||||
text-align: left;
|
padding: 0 10px;
|
||||||
vertical-align: middle;
|
text-align: left;
|
||||||
border-right: solid 1px;
|
vertical-align: middle;
|
||||||
border-left: solid 1px;
|
border-right: solid 1px;
|
||||||
}
|
border-left: solid 1px;
|
||||||
|
}
|
||||||
|
navigation {
|
||||||
|
font-weight: bold;
|
||||||
|
font-family: menlo, monospace;
|
||||||
|
display: block;
|
||||||
|
margin: 0 0 20px 0;
|
||||||
|
}
|
||||||
|
navigation > a {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
.footpara { display: inline; }
|
||||||
|
.footdef > sup {
|
||||||
|
font-size: 16px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.footdef > sup::after {
|
||||||
|
content: ": ";
|
||||||
|
}
|
||||||
/* colors
|
/* colors
|
||||||
|
|
||||||
$base03: #002b36;
|
$base03: #002b36;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#+TITLE: Welcome!
|
#+TITLE: Welcome!
|
||||||
#+DATE: 2019-07-04
|
|
||||||
#+KEYWORDS: programming
|
#+KEYWORDS: programming
|
||||||
#+AUTHOR: Yann Esposito
|
#+AUTHOR: Yann Esposito
|
||||||
#+EMAIL: yann.esposito@gmail.com
|
#+EMAIL: yann.esposito@gmail.com
|
||||||
|
@ -7,6 +6,7 @@
|
||||||
#+LANGUAGE: en
|
#+LANGUAGE: en
|
||||||
#+LANG: en
|
#+LANG: en
|
||||||
#+OPTIONS: H:5
|
#+OPTIONS: H:5
|
||||||
|
#+STARTUP: showeverything
|
||||||
|
|
||||||
This is a new take on my personal blog.
|
This is a new take on my personal blog.
|
||||||
I tried to have some minimalism in mind but not too much.
|
I tried to have some minimalism in mind but not too much.
|
||||||
|
@ -27,7 +27,7 @@ With [[http://orgmode.org][org-mode]]
|
||||||
You can have a basic demo about most supported content styles/type (paragraphs,
|
You can have a basic demo about most supported content styles/type (paragraphs,
|
||||||
lists, tables, etc...) [[file:./demo.org][here]].
|
lists, tables, etc...) [[file:./demo.org][here]].
|
||||||
|
|
||||||
* Code magic :noexport:
|
* Code magic :noexport:
|
||||||
#+begin_src elisp :results none
|
#+begin_src elisp :results none
|
||||||
(require 'org)
|
(require 'org)
|
||||||
(require 'ox-publish)
|
(require 'ox-publish)
|
||||||
|
@ -37,8 +37,8 @@ lists, tables, etc...) [[file:./demo.org][here]].
|
||||||
|
|
||||||
(defun org-blog-prepare (project-plist)
|
(defun org-blog-prepare (project-plist)
|
||||||
"With help from `https://github.com/howardabrams/dot-files'.
|
"With help from `https://github.com/howardabrams/dot-files'.
|
||||||
Touch `index.org' to rebuilt it.
|
Touch `index.org' to rebuilt it.
|
||||||
Argument `PROJECT-PLIST' contains information about the current project."
|
Argument `PROJECT-PLIST' contains information about the current project."
|
||||||
(let* ((base-directory (plist-get project-plist :base-directory))
|
(let* ((base-directory (plist-get project-plist :base-directory))
|
||||||
(buffer (find-file-noselect (expand-file-name "index.org" base-directory) t)))
|
(buffer (find-file-noselect (expand-file-name "index.org" base-directory) t)))
|
||||||
(with-current-buffer buffer
|
(with-current-buffer buffer
|
||||||
|
@ -52,22 +52,27 @@ lists, tables, etc...) [[file:./demo.org][here]].
|
||||||
"<link rel=\"alternative\" type=\"application/rss+xml\" title=\"Subscribe to articles\" href=\"/archives.xml\" />"
|
"<link rel=\"alternative\" type=\"application/rss+xml\" title=\"Subscribe to articles\" href=\"/archives.xml\" />"
|
||||||
"<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\">"))
|
"<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicon.ico\">"))
|
||||||
|
|
||||||
(defun org-blog-preamble (info)
|
|
||||||
"Pre-amble for whole blog."
|
|
||||||
(concat
|
|
||||||
"<strong><code>Her.esy.fun"
|
|
||||||
(when-let ((date (get-from-info info :date)))
|
|
||||||
(format " - <span class=\"article-date\">%s</span>" date))
|
|
||||||
"</code></strong>"))
|
|
||||||
|
|
||||||
(defun menu ()
|
(defun menu ()
|
||||||
"Blog menu"
|
"Blog menu"
|
||||||
(concat
|
(concat
|
||||||
"<navigation>"
|
"<navigation id=\"menu\">"
|
||||||
"<a href=\"/\">Home</a>"
|
(mapconcat 'identity
|
||||||
"<a href=\"/archive.html\">Posts</a>"
|
'("<a href=\"/index.html\">Home</a>"
|
||||||
|
"<a href=\"/archive.html\">Posts</a>"
|
||||||
|
"<a href=\"#preamble\">↑ Top ↑</a>")
|
||||||
|
" | ")
|
||||||
"</navigation>"))
|
"</navigation>"))
|
||||||
|
|
||||||
|
(defun org-blog-preamble (info)
|
||||||
|
"Pre-amble for whole blog."
|
||||||
|
(concat
|
||||||
|
"<div class=\"content\">"
|
||||||
|
"<strong><a href=\"/index.html\">Her.esy.fun</a></strong>"
|
||||||
|
(when-let ((date (get-from-info info :date)))
|
||||||
|
(format " - <span class=\"article-date\">%s</span>" date))
|
||||||
|
" - <a href=\"#menu\">↓ menu ↓</a>"
|
||||||
|
"</div>"))
|
||||||
|
|
||||||
(defun get-from-info (info k)
|
(defun get-from-info (info k)
|
||||||
(let ((i (car (plist-get info k))))
|
(let ((i (car (plist-get info k))))
|
||||||
(when (and i (stringp i))
|
(when (and i (stringp i))
|
||||||
|
@ -75,26 +80,30 @@ lists, tables, etc...) [[file:./demo.org][here]].
|
||||||
|
|
||||||
(defun org-blog-postamble (info)
|
(defun org-blog-postamble (info)
|
||||||
"Post-amble for whole blog."
|
"Post-amble for whole blog."
|
||||||
(concat "<footer>"
|
(concat
|
||||||
(when-let ((author (get-from-info info :author)))
|
"<div class=\"content\">"
|
||||||
(if-let ((email (plist-get info :email)))
|
"<footer>"
|
||||||
(format "<div class=\"author\">Author: <a href=\"mailto:%s\">%s</a></div>" email author)
|
"<hr/>"
|
||||||
(format "<div class=\"author\">Author: %s</div>" author)))
|
(when-let ((author (get-from-info info :author)))
|
||||||
(when-let ((date (get-from-info info :date)))
|
(if-let ((email (plist-get info :email)))
|
||||||
(format "<div class=\"date\">Created: %s</div>" date))
|
(format "<div class=\"author\">Author: <a href=\"mailto:%s\">%s</a></div>" email author)
|
||||||
(when-let ((keywords (plist-get info :keywords)))
|
(format "<div class=\"author\">Author: %s</div>" author)))
|
||||||
(format "<div class=\"keywords\">Keywords: <code>%s</code></div>" keywords))
|
(when-let ((date (get-from-info info :date)))
|
||||||
(format "<div class=\"date\">Generated: %s</div>"
|
(format "<div class=\"date\">Created: %s</div>" date))
|
||||||
(format-time-string "%Y-%m-%d %H:%M:%S"))
|
(when-let ((keywords (plist-get info :keywords)))
|
||||||
(format (concat "<div class=\"creator\"> Generated with "
|
(format "<div class=\"keywords\">Keywords: <code>%s</code></div>" keywords))
|
||||||
"<a href=\"https://www.gnu.org/software/emacs/\" target=\"_blank\" rel=\"noopener noreferrer\">Emacs %s</a>, "
|
(format "<div class=\"date\">Generated: %s</div>"
|
||||||
"<a href=\"http://spacemacs.org\" target=\"_blank\" rel=\"noopener noreferrer\">Spacemacs %s</a>, "
|
(format-time-string "%Y-%m-%d %H:%M:%S"))
|
||||||
"<a href=\"http://orgmode.org\" target=\"_blank\" rel=\"noopener noreferrer\">Org Mode %s</a>"
|
(format (concat "<div class=\"creator\"> Generated with "
|
||||||
"</div>")
|
"<a href=\"https://www.gnu.org/software/emacs/\" target=\"_blank\" rel=\"noopener noreferrer\">Emacs %s</a>, "
|
||||||
emacs-version spacemacs-version org-version)
|
"<a href=\"http://spacemacs.org\" target=\"_blank\" rel=\"noopener noreferrer\">Spacemacs %s</a>, "
|
||||||
"</footer>"
|
"<a href=\"http://orgmode.org\" target=\"_blank\" rel=\"noopener noreferrer\">Org Mode %s</a>"
|
||||||
"<hr/>"
|
"</div>")
|
||||||
(menu)))
|
emacs-version spacemacs-version org-version)
|
||||||
|
"<hr/>"
|
||||||
|
"</footer>"
|
||||||
|
(menu)
|
||||||
|
"</div>"))
|
||||||
|
|
||||||
(defun org-blog-sitemap-format-entry (entry _style project)
|
(defun org-blog-sitemap-format-entry (entry _style project)
|
||||||
"Return string for each ENTRY in PROJECT."
|
"Return string for each ENTRY in PROJECT."
|
||||||
|
@ -194,4 +203,3 @@ lists, tables, etc...) [[file:./demo.org][here]].
|
||||||
'my-org-export-add-target-blank-to-http-links)
|
'my-org-export-add-target-blank-to-http-links)
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,13 @@
|
||||||
|
|
||||||
This is the first article using my new blog system.
|
This is the first article using my new blog system.
|
||||||
|
|
||||||
Each time I try different things.
|
Once in a while, I create a new personal website.
|
||||||
|
|
||||||
A long time ago, I used PHP for my first website.
|
A long time ago, I used PHP for my first website.
|
||||||
I used include and took care of XHTML pages validation.
|
I used include and took care of XHTML pages validation.
|
||||||
Then I used [[http://nanoc.ws][nanoc]], a ruby static website.
|
Then I used [[http://nanoc.ws][nanoc]], a ruby static website generator.
|
||||||
Then I switched to [[https://jaspervdj.be/hakyll/][hakyll]] because I wanted to switch to a Haskell's written tool.
|
Then I switched to [[https://jaspervdj.be/hakyll/][hakyll]] because I wanted to switch to a Haskell's written
|
||||||
Now I'll try to use emacs [[http://orgmode.org][org-mode]].
|
tool.
|
||||||
|
Now I'll try to use [[http://orgmode.org][org-mode]].
|
||||||
So the article is a classical, Why?, How?
|
|
||||||
|
|
||||||
* Why?
|
* Why?
|
||||||
|
|
||||||
|
@ -28,8 +26,8 @@ Then I started to work in Clojure and I heard that emacs might certainly be a
|
||||||
better fit for LISP dialiects.
|
better fit for LISP dialiects.
|
||||||
But, I couldn't switch to an editor without vim keybindings support because they
|
But, I couldn't switch to an editor without vim keybindings support because they
|
||||||
are so great once you're used to them.
|
are so great once you're used to them.
|
||||||
But miracle it was about the time [[http://spacemacs.org][spacemacs]] appeared and I switched.
|
By chance it was about the same time that [[http://spacemacs.org][spacemacs]] appeared and I switched.
|
||||||
It was really impressive how well the vim keybindings worked so well.
|
Is is really impressive how well the vim keybindings are supported.
|
||||||
Even most of the advanced vim features I used to use worked like a charm.
|
Even most of the advanced vim features I used to use worked like a charm.
|
||||||
|
|
||||||
The first benefit of emacs is you can configure emacs with elisp.
|
The first benefit of emacs is you can configure emacs with elisp.
|
|
@ -5,15 +5,56 @@
|
||||||
#+KEYWORDS: programming, blog, org-mode
|
#+KEYWORDS: programming, blog, org-mode
|
||||||
#+DESCRIPTION: Different divagations about my experiences in the professional world of Software Developper
|
#+DESCRIPTION: Different divagations about my experiences in the professional world of Software Developper
|
||||||
|
|
||||||
* Technical Choices
|
#+begin_comment
|
||||||
|
|
||||||
How to choose a programming language/paradigm to write with.
|
How to choose a programming language/paradigm to write with.
|
||||||
|
|
||||||
- programming is about making the program do what you want it to do.
|
- programming is about making the program do what you want it to do.
|
||||||
- not much told, lot harder, and not as natural/intuitive; a program should not
|
- not much told, lot harder, and not as natural/intuitive; a program should not
|
||||||
do something you do not want it to do.
|
do something you do not want it to do.
|
||||||
|
|
||||||
|
|
||||||
- programming paradigms, functional is superior because it better fit all
|
- programming paradigms, functional is superior because it better fit all
|
||||||
real-life scenarios.
|
real-life scenarios.
|
||||||
- in Machine Learning, Kolmogorov complexity. Object Oriented is worse than
|
- in Machine Learning, Kolmogorov complexity. Object Oriented is worse than
|
||||||
Functional programming to represent naturally many real life problems.
|
Functional programming to represent naturally many real life problems.
|
||||||
|
|
||||||
|
What did I learned? Is it a set of specific knowledges or can we discover great
|
||||||
|
common principles?
|
||||||
|
|
||||||
|
- restart from zero, tabula rasa, what is programming?
|
||||||
|
#+end_comment
|
||||||
|
|
||||||
|
I could talk to much about that.
|
||||||
|
But a few short written down lessons.
|
||||||
|
|
||||||
|
If you want to reach productivity and not necessarily enlightenment.
|
||||||
|
You have to stop learning and use what you know well.
|
||||||
|
And do not try to use things you don't know.
|
||||||
|
|
||||||
|
In particular, most programming languages/ide/workflow/utils/tools have basic
|
||||||
|
and advanced features.
|
||||||
|
If want want to produce and deliver in time. Your best bet is to limit yourselve to
|
||||||
|
a minimal set of features that give you enough power of combination instead of
|
||||||
|
looking for a super generic strong solution.
|
||||||
|
|
||||||
|
Clojure for example has:
|
||||||
|
|
||||||
|
- functions
|
||||||
|
- higher-level functions
|
||||||
|
- destructuring
|
||||||
|
- defmethods
|
||||||
|
- protocols
|
||||||
|
- macros
|
||||||
|
- atoms, agents, core.async
|
||||||
|
- Java FFI
|
||||||
|
|
||||||
|
In fact, writing a fully working app you only need, basic data structure (edn) and functions.
|
||||||
|
|
||||||
|
That's it.
|
||||||
|
|
||||||
|
I was part of a team that created an advanced full featured app using only those.
|
||||||
|
No magic, just taking care of the state and not writting spaggethi code.
|
||||||
|
|
||||||
|
* How I choose
|
||||||
|
- Functional programming is superior to imperative and object oriented
|
||||||
|
languages
|
||||||
|
|
Loading…
Reference in a new issue