Ask HN: Coding notes – how do you do them?

68 points by osullivj ↗ HN
For years I kept my coding notes in spiral bound A4 and A5 notebooks. Handwritten notes are quick to create, but hard to search. So these days I make notes in a series of flat files I edit in Notepad++. The files will have design ideas, debugging tips like favourite windbg commands, notes on existing code, scraps of SQL, stack traces for critical pieces of code, test results and timings, HOWTO notes on build and config, URLs, draft blogs and outline plans. Notepad++'s Find in Files is invaluable for navigating them. There was a thread last year on paper notes [1], but I'm wondering how folk keep soft copies of notes. Back in the late 80s I used GrandView [2]. What new solutions are there for capturing and organizing coding notes? How do you do it?

[1] https://news.ycombinator.com/item?id=11890742 [2] https://en.wikipedia.org/wiki/GrandView_(software)

81 comments

[ 3.0 ms ] story [ 172 ms ] thread
It depends on what... my coding universe is largely Clojure based now and I still have plenty of notebooks full of sketches, designs, ideas, short writings, and diagrams. I saw someone designed a whiteboard that sticks onto the back of the laptop (lid) and it looks like an excellent invention.

For all the time I've spent studying computational science, I'm actually very content to be without technology. For instance: I have my most valuable code on github, and as long as I know it's there I know there's no problem if I lose my physical machine. The IP is worth more than the hardware.

However, I can't say the same about notes. I don't keep my notes or writings anywhere on the "cloud." I don't think there's a solution that exists yet that is up-to-snuff for me, but someone did post a site that was made to be notes-for-long-into-the-future recently, perhaps someone with better remembering can find it.

> someone did post a site that was made to be notes-for-long-into-the-future recently, perhaps someone with better remembering can find it.

You might be referring to Standard Notes [0], which advertises itself as having a focus on longevity. The discussion on HN [1] mentions many alternatives that are based on plain text.

[0]: https://standardnotes.org/

[1]: https://news.ycombinator.com/item?id=13421927

Over the last 40 years, I've accumulated a 471 KB ~/notes.txt file.

Currently, it's vaguely structured using the emacs org-mode

And indeed, no database, nothing beats the speed and convenience of search with any random editor search function (let alone emacs occurs command or regexp search).

Now that's something I'd love to see! Care to share?
for a while i was using VIM to edit and git to store my notes. I had a script that create a new file every day and push the old one to my git repo. But now i'm using IA Writer to write and store my daily notes, markdown support is quite handy and it seems more usable instead of vim+git.
I use bitbucket for my private repos, and github for the public ones, and I do a git add *.txt in the notes directory periodically.
How do you deal with diagrams and sketches?

I have a directory called notes that has a bunch of separate text files. Now I've been slowly adding Word files because often I want to include an annotated screenshot.

I've often wished I could paste images into my source code. My editor would generate something like:

  /*IMG: BASE64 (or some other image encoding) of the image */
I do ascii art in some places, but too often I have a comment that just says "see flow.png in the documentation directory".
If using Microsoft tools is an option for you, you might consider OneNote. I almost chose it for my use, but wanted something lighter weight.
How is OneNote's OCR? I also use Evernote and it does a great job of recognizing and indexing text on photos of whiteboards.
I've heard that it's good, but I never tried it myself. I think OneNote is free now, so I'm pretty sure you could try it without having to buy anything.
I just created two image files. One is a handwritten list of provinces in Canada and the other is a screenshot of some text in an editor. I uploaded the files to OneNote and Evernote. Both programs indexed the screenshot perfectly but only Evernote can find text in the handwritten note.

You said you chose something lighter weight. What did you end up going with? I've used Evernote for years but am unhappy with the direction the program has gone. The new CEO seems to be refocusing on the core purpose (capturing and remembering) and so I'm contemplating sticking around for a bit.

Ah, that's an awfully nice search capability. I posted elsewhere in this thread that I use SimpleNote. It's not perfect, but >95% of my note-taking needs were text-only and SimpleNote was less hassle than Evernote.
Microsoft has a mobile app "Office Lens". Useful to take pictures of the papers. It auto-corrects the positioning of the frame.
asciiflow.com is great for rendering simple schematics and diagrams as plain text.
Not related to coding notes, but I type my university lecture notes in LaTeX, and over the years I've picked up enough TikZ to write down graphs and diagrams in near-realtime.
I thought I was pretty decent with TikZ, then I read this. That's extremely impressive - nice job!!
Atom has an extension that allows you to mouseover a base64 string and see the image output
I wanted a tool with some organizational and formatting capabilities and built-in syncing, so I used EverNote up until the point that they limited the number of devices that would work for unpaid plans. I have since switched to SimpleNote. Both have reasonable search capabilities. Neither are perfect for what I want, but both are adequate.
How do you handle screenshots with SimpleNote? Only reason I'm still using Evernote.
I don't have any screenshots or other images in my notes. If I needed one, I'd probably upload to an image hosting site and put the URL in my note. That's obviously not as good as embedding inline, but I haven't found anything that I consider perfect, yet. I probably would have just upgraded to a paid Evernote account if I hadn't found their client apps so buggy.
I use Classeur [1] to store all my notes in a folder. You can use markdown which is really quick & easy which makes formatting much quicker. Can export to PDF etc via PANDOC, control access and you can even link it to a blog service.

[1] https://app.classeur.io

Spiral-bound notebooks with yellow stickies to mark the important bits I need to refer back to.

The stickies poke out a bit, which is where I put a little label to aid searching.

edit: more info

Obviously, I spent far too much time building my own cli tool to manage them in nice simple text format: https://github.com/pimterry/notes.

Don't ask how I kept notes on the implementation process.

How did you keep notes on the implementation process?
I have a "notes" repo that I'm editing using... well, mostly Atom, sometimes nano.

I use Markdown for pretty much everything I write on my laptop, including notes, so printing them is no issue when I need to so.

I usually go down the "one topic, one file" path, and add a table of content on top (I have a command line tool that does that).

I push a portion of my notes to a public GitHub repo, and all of them in a private Git repo. Random example of me learning Ruby syntax: https://github.com/aleksandar-todorovic/notes/blob/master/21...

I really like the idea of having all my notes in a git repo. I currently have them on Google Drive which is great for searching and accessing anywhere on any device - but I hate the fact that I have no local copy available since they are Google Docs which just store as a link basically. Yeah I know about Google Takeout but if I go with a repo I'll basically always be fully synced up locally while being synced on the server whenever I do a push.
I use emacs with org-mode (embedded syntax highlighted and executable source code blocks FTW) and org-download, the latter for embedding screenshots.

Besides my daily lab journal (one org file per month), I have project-specific org files also. This whole notes directory hierarchy is synced everywhere, also to my Android phone where I sometimes use emacs with termux to access these notes.

Searching is done using helm-projectile-ag, which is bound to `C-c p s s`

I make mind maps of what ever topic I am learning / researching. (https://github.com/nikitavoloboev/my-notes-mindmaps#github-i...)

I then add it to to the main research (https://my.mindnode.com/83qmKgoATj8TyKzprzsPfoirxa2g9WmFGx3x...) mind map.

It's actually really easy to keep it up to date and it is very rewarding knowing that I can share my knowledge with other people.

I also wrote about my approach about mind mapping here (https://medium.com/@NikitaVoloboev/mind-map-everything-d2767...).

Great insight, thanks for posting.
I use Quiver for my coding notes http://happenapps.com/#quiver
Quiver is a life saver for me. Markdown, i can use my vim keybindings, the data format is just json, easily taggable and searchable. I save my snippets, observations, commit history, everything in quiver now. It is synced via dropbox as well
I concur on Quiver. I've been using it for months and it picks up nicely where Evernote lacks. I do wish it was a bit better in the usability department, but it's a fine tool. Also, I don't think it's been updated since I bought it.
I'm another very happy Quiver user.
I used to run notepad, then evernote. Then i started a blog - so now i just post on that. If its of use to others - then great. Otherwise at least i know where my notes are

http://glenware.wordpress.com

One good place for some types of notes is Stack Overflow. There's a certain kind of thrill googling for something and finding your SO answer or question prominently in the results.
I'm actually amazed that you write down so much. When I tried to use physical notebooks, I only ever ended up creating todolists on them, and task tracking tools like Trello or GitHub Projects turn out to be much more effective for that purpose.

EDIT: There's one exception where I write notes from time to time: design notes for hypothetical software. I still have a few text files from a few years back somewhere in a Git repo, where I hypothesized about how my own programming language might look. Rust has stolen most of my ideas, though. :) (There was actually something vaguely similar to the borrow checker in there.)

OneNote works well for this use case. It syncs automatically across machines and devices, easy to search, does well with cut and pasted content, handles links, images, etc.
I liked onenote, and haven't tried the desktop app.

But the web app had an annoying habit of continually hiding the edit ribbon, making it a chore to use for formatting notes.

I've recently become a big fan of disc-bound notebooks. Buy one, get the hole punch for the brand, and a ream of high quality paper, and go to town. You can print various linings on them (e.g. Graph paper) and the best part for me is rearranging the pages in whatever order ends up making sense, or toss things like a todo list that's all done.

I've tried solutions like org-mode but I just find thinking on a keyboard to be entirely inadequate for some reason. I end up doing a lot of free-form notes so that might be one reason why.

I have created my own tool that uses couchDB as a document store back-end, because I like the way it has built-in replication.

I use a command-line tool to fill my local couchDB with notes and then just use the gh-pages hosted site to view them / search them.

https://github.com/DictumMortuum/dictum

I love http://notational.net/ and have been using it for years and written >380,000 words. Make sure you 1) set a bring-to-front hotkey (life-changing) 2) store as rtf files to e.g. dropbox. There's also nvalt but I've never had cause to use it.
I use Markdown to keep random notes in a Dropbox folder. I also keep project related notes with the digital assets for each project. For travel notes, I use Google Keep. I used to use Evernote for random useful links and copies of useful information, but I have been transitioning to Apple Notes (proprietary format, but these are my least important notes).
I use a simple plaintext heirarchical format which is compatible with checkvist.com, and wrote a Notepad++ plugin which syncs local copies with checkvist. Revisions via Git.
https://github.com/divbit/grimoire

Example output pdf for sharing:

http://docdro.id/QPKoLBh

You can also style the notes by simply dropping a <style> some css element { some css thing: some number } <style> at the top of the note, which can make for decent good looking documents (on par with word etc if you are a css wizard). Also it has built in spaced repetition studying thing, which (the code is there, but I'm in the slow process of debugging it since I messed it up when I moved the state to redux, so it will be back in the next few commits).

You can copy/paste images to there, and write with markdown / latex, which is why I wrote it, since I couldn't find anything that did all those things conveniently.