Coding: Always stay in context with a dev journal

shuoli
1 min readOct 2, 2014

--

I’ve been a developer for 7 years. I found that while programming, it is hard to stay in the context.

E.g, When programming a file uploader with html and jQuery, you may encounter a javascript syntax problem and do a quick google. Or need to switch to backend to create the handling view, worse, now you just find out that the file storage component has a bug in handling filename. After 30 minutes by finishing the bug fix and test case, can you switch back to what you were doing?

Recently, I came out a method to mitigate this situation, by writing a structured journal while doing programming. Here is an example:

Finish the profile uploaderFinish frontend with jquery and html    Figure out how to send csrf token with jquery ajax    (todo) Refactory the code, make it a library        Here comes another problem.        (done)    (done) Here is a link    How to bind an event on input[file]?    (done) A link to stackoverflow(done) Finish backend with django...

Its format is straight forward.

  • Using indention to mark context, (done) to finish the context.
  • Quick mark like (todo) to put a note that something should be done but not now.
  • Do a git commit when you met (done) and possibly create a (commit) mark.
  • Or you can use some tool to generate a timestamp.

It worked pretty well for me. If you have the same problem as me, give it a try. ☺

--

--