emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Plug for Org-mode on Coursera
Date: Tue, 4 Sep 2012 16:02:16 -0500	[thread overview]
Message-ID: <CA+M2ft8y7GQkiuKPXnApKoMW+QfR1dKYZ4Ae+UGReGVJf6M1ew@mail.gmail.com> (raw)

I'm taking a Machine Learning course via Coursera, taught by Andrew Ng
of Stanford University. I ran into a discussion thread where someone
asked for a notetaking application, so I plugged why I think Org-mode
is great for a class like this (in particular, the class is taught
using Octave as the programming language... which Org supports!). This
was written in StackOverflow formatting since that's what the forums
are using, so forgive the jumbling. I just wanted to send it out as I
don't think you'll be able to see it unless you're registered for the
class.


Best regards,
John

----------

Emacs [Orgmode](http://orgmode.org/) for the world!

- Embeddable/executable source code blocks in line with notes ([Octave
is a supported language](http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave-matlab.html))
  - I can't tell you how huge this is. I compose work reports with
narrative interspersed with R code. It's fantastic to have everything
in one place: the code, your explanation, interpretation of results,
and plots generated by the code in the document... without having to
leave the document at all.
  - You can set the export settings, so I can export the code block
verbatim for co-workers interested in it, or just export the resultant
numbers/plots for those who just want visuals
  - You can "tangle" the various blocks to create a single source code
file. In other words your document might look something like this
(Org-mode uses `#+begin_src` and `#+end_src` to separate code blocks
from the rest of the document:

`To run my algorithm, first I need to create my data matrix.`
`    - I'll read in my data file.`
`    - Then I'll extract the last column in a separate vector, as this
contains my y's.`
`    - Finally, I'll add a vector of 1's to create my design matrix, X `

    `#+begin_src octave`
     `data = load 'data.dat'`
     `X = data(:, 1:size(X,2)-1)`
     `Y = data(:, size(X,2))`
     `X = [ones(size(X,1),1), X]`
     `#+end_src`

`From here, I'll find my solution for my vector, $\theta$, using a
normal equation since $n$ is small.`

    `#+begin_src`

    `[more code here]`

    `#+end_src`

Once you tangle the org-mode document, you'll end up with one single
file stringing all of your code blocks together. This allows one to
type notes to yourself as you do the homework. You can execute them
right in the org-mode buffer and it will print the results right there
for you. You can check your work, perhaps add a comment about a common
error you're making, and only when you're ready, tangle the whole
thing and submit it.

- Viewable pictures inline (take your notes in whatever, save the pic
and insert them with a simple syntax (`[[../path/to/image.png]]`). [1]
They will be viewable in yorur emacs buffer and exported documents
- Export to html or LaTeX with full math typsetting ability (enter
something like `$h(x) = \theta_0 + \theta_1 x$` and it gets converted
in both LaTeX or html (via MathJax) automatically
- [Editable tables](http://orgmode.org/manual/Built_002din-table-editor.html#Built_002din-table-editor)
with built in calculation ability. This is quite nice for quickly
getting through some calculations. In addition, you can feed org-mode
tables to source code blocks as well.
- Stefan mentioned versioning and sharing. Org-mode enjoyed some
benefits of having a few Google Summer of Code projects, one of which
was called [Org-Merge](http://orgmode.org/worg/org-contrib/gsoc2012/student-projects/git-merge-tool/proposal.html).
It eases the use of Org with git and other versioning tools quite
fantastically; see the short video showing Org and git
[here](http://www.youtube.com/watch?v=GbaaFmoEfGw).
- Org also allows for tagging of headlines. These could be content
based (e.g. `lin-reg` for linear regression) or based on something
else (`imp` for important, or `rev` to mark sections that were
unusually difficult and deserve more attention during reviewing of
concepts
- It has great built in searches for keywords, before/after date
timestamps, tag matching, or todo keywords.
- Todo, scheduling, and deadline management. Create a .org file on the
first day of class with an outline structure of the entire class
(imagine a machine-learning.org file). At its heart, Org-mode is
simply an outlining program.

`    * Week 1`
`    ** Introduction`
`    ** Linear regression with one variable`
`    ** Linear algebra review`
`...`
`    * Week 2`

You can mark headlines as a `todo`, which treats them a bit
separately. You can call up all `todo` headlines in a separate view
called `agenda`. [2] This is nice because you don't need a secondary
document to track your todos and your notes. You can also add
`<scheduled>` and `<deadline>` properties to a todo based on when you
plan to do something and when it's due. You could mark your lesson
plans as todos, add a scheduled date to watch the lectures and perhaps
separate headline for the homework along with a deadline for yourself.
Todos can even have recurring deadlines/scheduled dates, so you might
have a headline at the very bottom like so:

`* TODO Skim all lecture notes`
`   DEADLINE: <2012-09-07 Fri +1w>`

That `+1w` at the end means that I plan to skim all of the lecture
notes to date every Friday at one week intervals. You can mark the
headline as "done" and it will simply log that you did it while
keeping it marked as a `todo` and moving the deadline one week out.

I suppose I'll end it there. I've been using Org-mode at work for all
of my notes and nearly all of my technical reports, test data
plotting/analysis, and, more recently, neural network/RBF modelling in
R for about 2-3 years. The biggest plug I can give Org-mode is that I
learned emacs purely to use it. That's saying something.

It does have a steep learning curve. If you don't learn it for this
course, I'd still highly recommend it for future endeavors. I started
just a little bit at a time with a cheat sheet of commands taped to my
cubicle wall. A little at a time I got to where I am and still have a
ton to learn!

---
For runners up:
- [TiddlyWiki](http://tiddlywiki.com/) is what I used before Org-mode.
It's pretty neat and I'm sure could be used to work with MathJax, and
you can embed pictures since it's just an html file.
- [Evernote](http://evernote.com/), which you're probably familiar
with is interesting. Combine notes with attached documents. What I
*don't* like is that you still have to open some other program to view
those documents.

Good luck in your hunting!

---

*Footnotes*

[1] If on Windows, see this [SO
thread](http://stackoverflow.com/questions/2650041/emacs-under-windows-and-png-files)
on copying .dlls for this ability
[2] It's easier shown. Scroll down to the picture in section 7.1
[here](http://doc.norang.ca/org-mode.html#CustomAgendaViewSetup).
Those todos are extracted from a much larger body of notes.

                 reply	other threads:[~2012-09-04 21:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+M2ft8y7GQkiuKPXnApKoMW+QfR1dKYZ4Ae+UGReGVJf6M1ew@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).