The power of keeping a coding journal (2014)
thomasburette.com
thomasburette.com
I did this for years in my earlier career... there's something really nice about using a pen and paper to write down ideas and sketches. I've always felt it was the "linearization" of moving your pen through making a series of marks, one at a time, that helps clarify the thinking process.
Then I actually did get tangled up in a lawsuit, by shareholders against the execs of a startup I worked for, and had all my journals subpoena'ed. It was a harsh reminder that lab notes aren't really your own private sticky notes; if they are ever going to be used as evidence, they are better thought of as a continuous performance of Engineering Best Practices.
I basically stopped writing paper notes then.
I've started journaling my coding again, but electronically (mostly using plain text notes in files, with Johnny Decimal to keep them organized). It's just so helpful during the design and early implementation phase, or when working through a tricky bug hunt. But I usually delete them when I'm done with them.
The one way my personal system diverges from the original is that I have a 3-digit prefix before the 2-digit category ID. 001 is my personal recordkeeping other than creative projects and has its own category tree. Then 002-499 are creative personal projects (non-work software and music). Software and music projects each have their own category tree template. 500-999 are work-related; right now, 500 is non-software-project info related to my current employer (interview notes, admin stuff, blog posts, other writing) and 501-599 are major software projects. I am guessing 600-699 would be my next employer, 700-799 the next, etc.
Btw, I witness, in an almost daily basis, the power of a shared classification system based on numerical IDs/prefixes.
My parents use a web app based on an old-school text user interface (the vendor translated the original Pascal code to a CGI-based web app). The multiple routines are identified by numbers, (kind of) following a certain organization logic. Routines can optionally be called directly by typing its ID instead of navigating menus.
The team's communication and work-flow naturally organize around this classification method. The vendor's support staff also use the same language. "You can find this in 938, that in 835, and then check the overall status in 104". Repetition + predictability provided by the underlying classification logic quickly imprints those IDs in users' memory.
Such a simple, ellegant system.
I’m curious why. Was there something in your notes that implicated you or was it more of a general “working under a microscope in public view feels stifling” or something else?
I imagine I'm just being naive, because I've never worked in a small startup.
If I was working in an environment where (for example) producing patentable inventions was part of the job, I would keep and retain solid lab notebooks in case they are needed to defend my employer's IP, and would write them every day with that purpose in mind. Likewise in a job where we have to follow ISO-style engineering processes in a regulated environment such as medical device software. That's not at all the same as keeping a journal of development for my own improvement... that's consciously creating an artifact so it can be produced on demand.
If I just keep my garbage notes in garbage files that I delete, I can use them while they are relevant and sweep up after, just as if they were post-it notes.
An unrelated lawsuit was filed against the company by the state. A set of speculative statements in an email chain made by one EE about hypothetical measurement issues was taken as proof of company "knowledge" about inaccurate reporting.
- context switching - if you have a backburner or side project, it's easy to get pulled away from it for days or weeks (or more) at a time, and when you do make time for it, it could be just a few minutes here or there. The very last thing I do during each dev session is list the 2-3 things I hope to tackle in the next session. When I eventually make it back to the project, I can just jump right in on one of those items and not waste any time trying to get my bearings again. I slightly disagree with the author that the journal isn't a good place to track your todos - it's a great place if you are a solo dev and/or if the work is in its early stages - you want to capture quickly important ideas of things you might do later, and sometimes just writing them down helps you not work on them right now.
- "impossible" bugs, or ones that are difficult to reproduce consistently - the journal becomes the little notebook just like the detective in a TV show. You pour into it every single clue, every bit of data. That process leads to you asking yourself certain questions or thinking of things to try to flush out the bug. This journaling is especially helpful during a crisis situation where it's easy to spin your wheels, panic, waste time, etc. - that methodical act of writing things down is calming and organizing.
I write a small summary of what I was doing and what were my next steps at the time, and I write this either directly in the code, in paper or sometimes in a text file. I call them ENDSNAPs (end snapshots).
Doing [1] by Brett Terspstra; "A command line tool for keeping track of what you’re doing and tracking what you’ve done."
NA [2] (Next Action) also by Brett Terpstra; "A command line tool for adding and listing per-project todos."
nb [3] is "a command line and local web note‑taking, bookmarking, archiving, and knowledge base application"
nb supports multiple notebooks, Git-based version control and a bunch of other things
[1]: https://brettterpstra.com/projects/doing/
- Keep the format and entry method simple above all else. I use Sublime Text to edit markdown files now, and have only had trouble with various more feature-rich options like Obsidian.
- Write down what comes to you, and spend as little time as possible adhering to some format devised by you or some personality guru (like the ones discussed in this great post). You'd be surprised how easy it is to read back through less-organized notes, and if you don't experiment in the moment, you'll never find the set of rules/sections/formats/guidelines/etc. that work for you!
Ive reached the same conclusion. I use my IDE (vscode) and markdown. Unstructured notes are easy to write, and I value that over discoverability. Its the same principle as nosql vs sql, or the same benefits of a datalake!
I almost never go back and look at my notes, which I write per task. When I do I use the VSCode search. Whats more important for me is zero friction to writing them down. Its more of a “working memory “ dump than a document to share or read again.
I actually noticed the same principle at play with arc browser. I hated thinking about “where does this tab belong” every time I wanted to open a new one or put things side by side.
I found the list years later. Last entry: "Forgot to eat. Got sick."
On quite a few occasions it has saved me several hours (at least) of debugging when revisiting or troubleshooting some obscure code or infrastructure change I had previously made. When not sure of the particular month/year I will just grep for all occurrences of a related term until something jogs my memory.
Highly recommended.
Stolen, doing!
Demonstration of default settings: https://fossil-scm.org/forum/forum ("most recent threads" is equivalent to "most recently updated thread")
CTRL-A + DEL is your friend, post-work.
The biggest value of keeping notes during a project is to prevent you from getting sidetracked by distractions. Write down the thought so it's out of your head, then get back to the task at hand.
DO NOT put them in your project backlog. That's how you get a 800+ list of items that get ignored and only add a huge mental weight to your backlog management. If you're going to ignore them for 3yrs and then finally delete them, why not start by deleting (not writing) them now?
(setq org-capture-templates
(quote (
[...]
("j" "Journal" entry (file+olp+datetree "~/org/work/work.org" "Diary")
"* %?\n\n\n" :clock-in t :clock-resume t :empty-lines-after 1)
[...])))And if anybody wants to try it out you can download it here: https://apps.apple.com/us/app/vournal-ai-video-journal/id644...
Or if you'd like free access ask me for a TestFlight invite :)
I use it as a scratchpad as I do pretty much anything. If it gets too large, I move it into my "log" directory and start anew.
I also keep a more synthesized "notes" folder.
I work on most of my projects in public repositories and often end up posting hundreds of issues with thousands of accumulated comments across them all.
I also have private repos which I use just for issue threads for coding journal mode entries that I'm not ready to share.
Occasionally I'll take one of those private issues and make it public later on, for example this one: https://github.com/simonw/public-notes/issues/1
They usually aren't complex, and and often just a single line about something.
I keep lab notes for whatever personal project I am currently engaged with, lab notes for the household (repairs, updates, documented procedures on how to start the furnace, etc), lab notes for work, lab notes for the RV, lab notes for the workshop, lab notes for the home network.
Keeping informal notes on what has been done, what needs to be done, and thoughts about the doings has helped me immensely. An example of some of my project notes https://github.com/JustinLloyd/retro-chores
I've got lab notes going back to at least the 1970's, https://justinlloyd.li/blog/word-search-game/ (1978) and https://justinlloyd.li/blog/word-search-game-part-two/ and https://justinlloyd.li/blog/better-date-format/ (1979) are some samples, though I didn't call them lab notes back then.
Some screenshots, notes etc of projects I've been part of. Cool to look back and reminisce about what I've done over about 20 years of programming. Most of the early stuff is lost or forgotten.
But the few things I can find from the early days I'm quite happy to rediscover. Even if it's just a page full of construction gifs and marquee tags I made as a teenager.
Note that these all rely on vim bindings, as I use emacs-evil. The concepts are probably not too hard to implement elsewhere, though.
- There is one 'main' journal, in my home directory, and a `devlog.md` journal in the root of every project I'm working on. These journals are linked by a series of paths so it becomes easy to `g-f` (goto-file) to jump to the devlog in question.
- The footer of these journals consists of an immediate TODO, and the links to sub-journals previously mentioned.
- at the end of each journal is a string (,./). This allows me to jump to the place where I'd just start writing (in vim/evil emacs) with a simple `/,./`. This bookmark always sits between the 'journal' component (the top half, where the mind-dumping occurs) and the directory of child projects / TODO at the footer.
- All of these are committed to version control with a nightly cron job.
The trick for me is giving myself permission to be messy and imperfect. The todo list evolves over time and often misses things or ends up containing more than necessary. Sometimes I assert things that dont end up being that relevant. Often the design decisions are a bit handwavey.
This is all ok because 90% of the value is simply writing it down as a means of thinking. The other useful aspect is keeping track of loose ends (“make sure to use test this edge case” for example) and very occasionally a search of my notes directory unearths a useful piece of information Ive saved.
But it is not a clear and concise document that can easily be read start to finish for a complete understanding of the development process and state of my branch. It just cant be (at least for me) because it would just take too much work and its already serving the purpose of being a thought exercise, unstructured memory store, and aid for context switching.
You can see the spreadsheet if you want! (But please don't spend any time chasing down answers for me; this is an old sheet and I don't have too many open questions about emacs right now).
https://docs.google.com/spreadsheets/d/1BcEsENMSLmOfsjTORHLt...
https://github.com/Aperocky/diarycli
`pip install diarycli`
Alternatively there is a shell version if you are averse to python/pip package manager as well:
https://github.com/Aperocky/diaryman/blob/master/diaryman.sh
The only way I can get myself to write things down is to have it one commands away in the terminal.
If your development project is doing something novel, it is almost a necessity to keep records. It's really more of a research project at that point which becomes much more difficult to manage without diligently keeping notes of the process.
Or when I design an algorithm,I use pen and paper and keep it as a trace.
https://github.com/jrnl-org/jrnl
Nice idea. I like org-mode for ...nearly everything.... This looks good for the command line. Thanks
The author mentions that a lot of these will eventually end up in comments or elsewhere, but it’s nice to capture random thoughts without adding the friction of deciding where it should land, what priority the ticket should be, etc, etc is quite nice.
I write notes throughout the day. Hardly ever search back in it. It's just to let me stop thinking about thing X while I'm working on thing Y. If X is important it'll come up again or show up in a ticket somewhere.