CodeNPaste: Tips for taking effective notes as a programmer

  • Public
  • Knowledge management
  • Organization
  • Productivity

  • [CNP] Grégoire LEGEARD

Here are some tips drawn from my habits and experience learning (in that specific order): HTML & CSS; JavaScript; PHP & SQL; Python.

First, I would like to clarify that taking notes can take several forms:

  • Creating documentation
  • Creating cheat sheet around a particular concept
  • Collecting programming examples, methods, and concepts
  • Simply adding comments
  • Log and thought process

And answers diverse goals:

  • Learning a languages
  • Preserving efforts in learning or acquiring certain concepts
  • Creating a set of references
  • Having a starting point and examples
  • Working Companions

Creating Documentations

I recommend avoiding note-taking that falls into the "documentation creation" category. It's taking a lot of time to paraphrase something that already exists. There is probably plenty of documentation about the language you are learning or the library, and often, it is very well written, easily accessible, and complete.

For example, W3Schools offers accessible documentation for an extensive range of programming languages. There are also specifics and comprehensive documentation, as for example: PhP.net; or the various Python libraries, such as NumPy or Matplotlib.

My approach is to browse through the outline and then read the documentation carefully at least once to know the languages' basics and possibilities (properties, attributes, built-in functions, etc). The point is not to remember it all in detail but to have a general and broad understanding of the language logic and existing capabilities.

Then, on a need-to-know basis, I refer to the documentation available. The only important piece of information to note down is the URL, in some cases, to access it directly.

Building up cheat sheet and “how to”

The idea here is to sum up processes or gather information about a specific topic, property, attribute, built-in documentation, etc., intending to summarize it with as few words as possible.

Building an effective cheat sheet requires a good understanding of the materials and is an effective way to commit knowledge to memory.

I found these specific notes very helpful and time-saving in the long run, as I regularly refer to them.

Gathering examples and methods

While coding, I mostly stumble on two cases:

  • New challenge: design, task, function, I have never done before;
  • New version of what I have done before.

In the first case, there is always plenty of answers and support available online on Stackoverflow, Stack Exchange, CSS-Tricks, Geeks for geeks, etc. and the list goes on.

You might think the research part fades away as your programming skills improve. My experience is the opposite, as I tackle new and more challenging tasks, I find myself doing more research. It is a very time-consuming activity involving:

  • Finding examples;
  • Understanding and measuring the difference between various methods and structures.

Usually, later, I need to create new versions or variations (that's the second case) when my active memory is depleted. Saving the examples and methods and eventually adding comments to facilitate reading (not paraphrasing the code) were time savers.

Saving tests, functions & Tools

Once you have completed your "task" and created a new function, you usually store it in your project git, library, or framework.

Before committing my code to a specific project, I test my programming concept using a sandbox environment. It allows me to fine-tune objects, ideas, functions, etc., without interferences (it's the CSS experience speaking) and compare performance (Python experience).

What do you do with the various tests and performance measurements you have crafted?

The output constitutes a reusable item, and experience demonstrated to me that it's precious to keep this test and eventually add a few comments for later reuse. I can adapt them in to a new project or a new environment. It's also beneficial material to review before making changes to the production version.

Writing Down Processes

My coding work (and hobby) usually requires repeating some process occasionally, but not often enough that I can instantly recall the command. Ideally, I would try automatizing, but it's not always possible or worth the effort.

For example, entering several command strings, using complex software, etc.

I am happy to note it down and refer to it. It's the easiest way to remember something I don't practice often and ensure efficiency as well as consistency.

Log and Tough Process

The Internet is full of references on the interest of keeping a diary. My coding journey taught me it's helpful in:

  • Clarifying my objective;
  • Defining the problem and the scope of my (alternative) answers;
  • Writing down the process or steps of my algorithm, etc;
  • Keeping track of my achievements, ideas, and analysis;

It's only for some, but as I grow older, I find it more and more valuable. Although I barely refer to it once the work is done, it's an excellent way to measure the journey and offload some mental tension.

Organizing Notes

After going over various note-taking interest, the question is to consider and organize your notes. Here are some considerations:

Notes versus Comments

Code is language, and it should be self-explanatory. Avoid rephrasing it in plain language. Use comments to add some additional information or help to decipher.

Concept vs Documentations

Organize your notes around a specific concept or idea to facilitate retrievals.

Keep it short. In programming, you would have 1 function = 1 purpose, so organize your notes in the same way.

Tool and Structures

There are several ways and tools to organize your notes; they usually fall under 3 categories:

  • Folder system
  • Tag Base System
  • Search Base System

Folder and tag base are the most common but highly similar as they rely on a tree structure and require exploration.

System Advantage Inconvenient
Folder
  • Available on every machine
  • Can be saved with cloud service
  • As quantity grows, complexity, and retrieval time increase
  • There are no possibilities for cross-category
  • Cross-platform might require installation, access, sync
Tag
  • Great for cross-category if multiple tagging is available
  • System to avoid duplicate
  • Categorization is flexible and can be improved overtime
  • As quantity grows, complexity, and retrieval time increase
Search Base
  • Instant list of results
  • Remove needs for organizational discipline
  • Depends on search engine quality

Programmer concerns

For programming material, it's comfortable to have a system offering:

  • Syntax highlighting
  • Preserving or using proper indentation
  • Minimal usage of the mouse (less click).

Conclusion

There might be more tips on the subjects, but one way to find out if your notes are valuable and help you achieve your objective:

  • Identify why you do or don't reuse them.
  • Share them to clarify or explain a concept to somebody.

Taking proper notes with CodeNPaste: helped me save lots of time in my coding journey. Thanks to them, I didn’t repeat research and could faster access the knowledge and how-to I gathered. It made a difference, resulting in higher productivity, less frustration, and preserving my mental energy and focus.