#+TITLE: Thinking Clearly

Writing is the most powerful tool for thinking clearly that I know
of. [fn:1]

Writing things out wonderfully complements my cognitive
shortcomings: 
- It allows me to work around the hard upper limit on the number of
  things I can keep in my head at one time. 
- It enables endless meta-cognition; enabling constant critique and
  refinement.

At the same time, I'm not used to writing: I have countless pages of
notes, plans, half-baked pieces of communication for work; but it's
not a tool I intuitively reach for. 

Words are hard. Editing is harder.

To that end, I'm aiming towards building a habit by 
- writing every day, for the next 100 days[fn:2];
- at least for half an hour, without interruptions;
- mostly about programming, but I'll allow myself detours.

Obviously I won't be able to publish one article every day;
thoughtful writing takes time. Instead, I'll publish drafts
and keep iterating on them (including this article).

[fn:1] My experience with increasingly stronger doses of coffee --
bullet-proof or other variants, tea and matcha only suggests an
increase in speed, and not the quality or clarity of thought.

[fn:2] Yes, this is a #100daysofwriting challenge for
myself. I've never considered attempting 100 days of anything --
except perhaps programming or reading -- but a man can dream.

* Tentative Topics
This is a very optimistic list of what I would like to write about; I
expect to touch very few of these over the next 100 days.

** Deep dives into programming
Motivated by areas I want to learn more about, and tend to be relevant
to me professionally.
- A deep exploration of asyncio in Python, and other event loop
  implementations in general.
- HTTP/3, Quic.
- GDB.
- Jupyter Internals.
- Observable programs
- Concepts in machine learning [fn:3]

[fn:3] I can already hear you groan, but it's something I would like
to build depth in, particularly for work. You should feel grateful
that I don't have yet another tutorial on Monads in this list.

** Tools for Programmers
 I've spent a significant portion of my career building tools for
 engineers; even when that isn't my primary goal I find it extremely
 valuable to spend at least 10% of my time speeding up the work I'll
 do. 
- Emacs, themes, plugins, and extensions
- The Suckless toolkit, particularly dwm and st
- Building customizable tools

** My approach to software engineering
Explicitly writing out how I approach several aspects of Software
Engineering. Mainly to consciously review and refine what I do, to
become a better engineer, but also to share and get feedback.

These are things I do, and not necessarily things I'm good at:
any recommendations and approaches should be evaluated in that
context.

- Reviewing code
- Debugging problems
- Ramping up on a project
- Designing and structuring a program
- Designing and structuring a programming notebook
- Organizing and planning work
- Building feedback loops

** Books
The one aspect of my life I have managed to write about somewhat
consistently is the books I've read. The most valuable notes I've
collected are not notes on a single book, but collections of notes around
a single topic collected from many sources.
- Books on Programming Languages
- Books on Software Engineering
- Books on Visualization
- Books on Photography
- Books on Writing [fn:4]
- Books on Learning
- Books on Thinking
- Books I would like to read

[fn:4] Passing up opportunities to be meta is physically painful for
me.
 
** Retrospectives
- I'm close to completing a decade as a professional Software
  Engineer, I probably know something worth writing about.
- Side projects -- past, current, and ideas for the future; these
  might be closer to developer logs for a given project.
- Various attempts at building productivity systems, and things that
  stuck -- and didn't.
  
* Comments or feedback?
Reach out @kunalbhalla, or drop me an email.


* Updates
- 2020-05-16: Set up this post: brainstorming and listing out ideas to
  write about. 
- 2020-05-17: Started iterating on a post about asyncio, figuring out
  the outline and how to approach it, both to learn and to write.
- 2020-05-18: Updated the post on asyncio. I finally understand how
  asyncio.sleep works! 
- 2020-05-19: Dug deeper into the event loop implementation in asyncio, reaching
  and stracing epoll. Also submitted a typo fix to cpython.
- 2020-05-20: Explained where the ioctl calls were coming from (hint:
  signals). Read about epoll's implementation.
- 2020-05-21: Started a new parallel article about exploring the Linux
  Kernel, to allow me to dig into epoll. Set up bcc. 
- 2020-05-22: Dug into the disassembly of the python program, and
  briefly documented what I found.
- 2020-05-23: Took a break and wrote about my workflow for planning.
- 2020-05-24: Forked a new note about setting up and using python-gdb
  to explore python execution.
- 2020-05-25: Started writing about tracing asyncio tasks, my secret
  motivation to start on this series of notes.
- 2020-05-26: My copy of The Art of Science and Engineering
  arrived. Taking notes chapter by chapter to take a break from
  programming after work.
- 2020-05-27: I started writing about how I approach debugging and
  realized that I have a lot to say. I should be able to publish this soon.
- 2020-05-28: Completed a first draft of the post on debugging; I
  think I have the broader pieces in place but there's still a lot to do.
- 2020-05-29: Revising, editing and tweaking the post on debugging.
- 2020-05-30: Revised and edited the post on debugging, created a
  diagram and added it to the index.
- 2020-05-31: Wrote about David Sedaris's book. Worked on asyncio
  tracing, which I'll write about in the future.