<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>The Synthesist</title><id>https://cooldev.in/feed.xml</id><subtitle>Recent Posts</subtitle><updated>2026-07-02T14:42:28Z</updated><link href="https://cooldev.in/feed.xml" rel="self" /><link href="https://cooldev.in" /><entry><title>Starting-the-Kernel-Journey—My-LKMP-Experience</title><id>https://cooldev.in/starting-the-kernel-journeymy-lkmp-experience.html</id><author><name>Gopi Krishna Menon</name><email>krishnagopi487@cooldev.in</email></author><updated>2025-12-08T00:00:00Z</updated><link href="https://cooldev.in/starting-the-kernel-journeymy-lkmp-experience.html" rel="alternate" /><content type="html">&lt;blockquote&gt;&lt;p&gt;Bound by the shackles of Knowledge and fear,&lt;br /&gt;Linux Kernel had me rolling my tears.&lt;/p&gt;&lt;p&gt;Liberation I see was nowhere near,&lt;br /&gt;My love for the kernel seemed to disappear.&lt;/p&gt;&lt;p&gt;Then came the LKMP, that ignited the spark,&lt;br /&gt;Melting those shackles to free me at last.&lt;/p&gt;&lt;p&gt;Now I am free and over my fears,&lt;br /&gt;Patching the kernel without any tears.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;GK&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;p&gt;Before I write about my experience, I would like to thank my mentors
Shuah Khan, David Hunter and Khalid Aziz for providing me this
opportunity to become a part of the LKMP - 2025 Fall Program and this
wonderful kernel community.&lt;/p&gt;&lt;h2&gt;What is LKMP?&lt;/h2&gt;&lt;p&gt;LKMP stands for Linux Kernel Mentorship Program. Its actually a remote
mentorship program that is conducted by Linux Foundation along with some
of the best Kernel Engineers and Maintainers from the community to train
the next generation of Linux Kernel developers.&lt;/p&gt;&lt;p&gt;The core objectives of the program are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Provide remote learning oppurtunity to the aspiring Linux Kernel
developers.&lt;/li&gt;&lt;li&gt;Infuse new talent into the Linux Kernel community.&lt;/li&gt;&lt;li&gt;Make the kernel more secure and sustainable.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There are a couple of variants of LKMP program but the one that is
currently running is the Bug Fixing variant (Unpaid). You can find more
information about the program here :
&lt;a href=&quot;https://wiki.linuxfoundation.org/lkmp&quot;&gt;lkmp&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Acceptance Into The Program&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Once you have created an account at
&lt;a href=&quot;https://mentorship.lfx.linuxfoundation.org&quot;&gt;LFX portal&lt;/a&gt; and
enrolled in the program, you will be given a set of tasks, that you
will have to complete within the stipulated deadline (around 3 weeks).
These tasks might include writing kernel modules, analyzing syzbot
bugs and sending kernel patches.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Along with that you will be also required to complete
&lt;a href=&quot;https://training.linuxfoundation.org/training/a-beginners-guide-to-linux-kernel-development-lfd103/&quot;&gt;LFD103
Course&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Once you have submitted all the tasks and completed the course, wait
until the deadline :)&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;p&gt;Please take the tasks pretty seriously. This time only 74
out 486 applicants were selected i.e around 15%. So make sure to give it
your best.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Mentorship Info&lt;/h2&gt;&lt;h3&gt;Communication&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;For communicating with mentors and peers, we use discord&lt;/li&gt;&lt;li&gt;Patches and their reviews happen over the email.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Before getting selected, I began using &lt;a href=&quot;https://neomutt.org/&quot;&gt;neomutt&lt;/a&gt;
for working with emails. I didnt like the existing themes in neomutt, so
decided to submit a theme based on the ayu-dark color palette. That got
merged. Therefore if you like ayu-dark theme, make sure to try it using
the steps mentioned &lt;a href=&quot;https://neomutt.org/contrib/colorschemes&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Its just amazing that for a project Like linux kernel, email acts as the
primary way of communication. Initially i was skeptical about how all of
this works, but once you start using it, you see the real power of
emails. Everything from sending patches, reviewing patches, applying
patches becomes so much easier using email. Emails are just extremely
flexible.&lt;/p&gt;&lt;h3&gt;Meetings&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;There is a 1hr meeting scheduled everyweek (office hours), where you
can clarify your doubts, get your patches reviewed. In the first few
office hours, Shuah will also take some tutorial sessions on tools
like csope/ctags, cregit, kselftests, syzbot, backporting etc.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Please make sure to attend those tutorial sessions. They will make
your life easier and help you understand different aspects of kernel
development including setting up a workflow, debugging, testing,
finding bugs, backporting etc.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;These office hours also allow you to understand how your peers are
tackling problems. I was highly inspired by some of my peers during
this process and this helped me fix my own problems as well.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;David Hunter also conducted an additional session on Bug hunting in
the kernel, which I found really effective. This was a hands on
session where we discovered new bugs together. Thanks a lot David for
this session.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;p&gt;Note Its just amazing, how much patience our mentors had when we
got stuck on issues. Shuah and David both went above and beyond trying
to help us fix our problems. They did not solve our issues directly, but
they made sure to understand the problem and guide us in the right path.
Again I cannot emphasize enough, how much that is helpful for mentees.
Thanks a lot for helping us, inspiring us and giving us the confidence
to submit our patches.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Community&lt;/h2&gt;&lt;p&gt;The linux kernel community is beginner friendly in nature. Since we
communicate through emails, there are mailing lists for each subsystem
in the kernel. You can find a list of these mailing lists at
&lt;a href=&quot;https://lore.kernel.org&quot;&gt;lore.kernel.org&lt;/a&gt;&lt;/p&gt;&lt;p&gt;lore is an extremely useful web archive as you can find every patch in
there. You can also see the threads associated with those patches. Along
with that lore also provides you ways to search for patches that touch
perticular file or are specific to perticular author, which can be
extremely helpful.&lt;/p&gt;&lt;p&gt;Learning to interact with the community is a key part of kernel
development. In order to improve your communication skills, you can go
through the lore threads of the subsystem that you are interested in.&lt;/p&gt;&lt;p&gt;In addition, I also took
&lt;a href=&quot;https://trainingportal.linuxfoundation.org/courses/remote-work-at-scale-lfc114&quot;&gt;LFC114
Course&lt;/a&gt; offered by linux foundation to help me improve in this area.&lt;/p&gt;&lt;h2&gt;My Patches&lt;/h2&gt;&lt;p&gt;Although I do have some experience working with the kernel as a part of
a research project, I still consider myself as a novice in actual kernel
development.&lt;/p&gt;&lt;p&gt;Therefore I decided to start slow and focus on submitting three kinds of
patches in the kernel,&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Fixing documentation build faliures&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Fixing static analysis bugs reported by the compiler and internal
kernel tools&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Fixing syzbot bugs&lt;/p&gt;&lt;p&gt;git log --author=&amp;quot;Gopi Krishna Menon&amp;quot; --since=“2025-08-01” --pretty --format=oneline
a5160af78be7fcf3ade6caab0a14e349560c96d7 usb: raw-gadget: cap raw_io transfer length to KMALLOC_MAX_SIZE
89194773f5738a0617240ac92b190fbd553e58bc drm/msm: Add NULL check in vm_op_enqueue()
9efb297c520f392ab04bc45544a03770c98c3798 hwmon: (gpd-fan) Fix compilation error in non-ACPI builds
02227b97a8d3ae01bcf12e5e1b5cb6cca9439875 selftests: tty: add tty_tiocsti_test to .gitignore
77cd9210271556aff955551b3e2ef0ae8a2691bd docs: trusted-encrypted: fix htmldocs build error
96b546c241b11a97ba1247580208c554458e7866 Documentation/rtla: rename common_xxx.rst files to common_xxx.txt
7e8f305a081e22ce81aab7f7b9ce01437cbd38b3 docs/zh_CN: Fix malformed table
989ed3cad2fdb7921bf0f9f0f730e1bb065946c2 docs/zh_TW: Fix malformed table
03faea8466713f04a522c52c386124755be960bc selftests/net: add tcp_port_share to .gitignore
d496b6f42eb0455caf5d8cb30cf1f01b7fc2a747 mtd: cfi: use struct_size() helper for cfiq allocation
cb0c5a60a6f7dd7f35fa5b46fd04dfb66b37fc1e docs: perf: Fujitsu: Fix htmldocs build warnings and errors
5fdb877b4916a1eb2b2c85018c2311855893405b selftests/futex: Fix typos and grammar in futex_priv_hash
05f297c3e39f62f579458a59ab1b1c8bf3fc1c51 KVM: selftests: fix minor typo in cpumodel_subfuncs
70d476b63a1494337f2b9fec1e9b1cab2e6116d3 Documentation/rv: Fix minor typo in monitor_synthesis page
0e6bb6888791656c3973f26da3288323524573c0 docs: folio_queue: Fix minor typo in folio_queue page&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There were a number of other dynamic analysis bugs that I attempted as
well.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/images/lkmp/additional_syzbot.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;&lt;p&gt;Some of them I almost solved, but the kernel developers sent patches
before me 🙂&lt;/p&gt;&lt;h2&gt;Things to remember as a kernel developer&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Test all your patches. Shuah mentioned this in almost every meeting
multiple times. Test your changes extensively and use tools like
kselftest to ensure that nothing breaks. On top of this, mention your
testing methodology in the email itself when you send the patch.
Untested code can result in regressions which can be a headache for
everyone including maintainers, authors and the user themselves.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you dont have the hardware to test the patch, avoid making that
patch. Patches can be marked as RFT (Request for Testing), but still
its advised not to work on those kinds of patches.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Avoid top posting in emails and instead use interleaved posting or
bottom posting when replying.
(&lt;a href=&quot;https://en.wikipedia.org/wiki/Posting_style&quot;&gt;Posting Style&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Initially, we can work on different subsystems for understanding the
workflow but after sometime, you should choose a subsystem of your
interest and try to gravitate towards that. This will help you make
bigger contributions to the kernel.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Write the commit messages in
&lt;a href=&quot;https://www.kernel.org/doc/html/v4.10/process/submitting-patches.html#describe-your-changes&quot;&gt;Imperative
Tone&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If your patch is not accepted yet, wait for a few weeks. Maintainers
are also humans and therefore sometimes things might take time to get
reviewed. Look out for the merge window as well. If you dont get a
reply for say 2-3 weeks, gently ping the reviewers asking if they
could look at the patch. (Just saying ping is a bad idea).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Read the documentation. Usually every subsystem has a slightly
different way of accepting patches (they might require specific tags,
specific tests to run etc). In that case check the mailing list for
that perticular subsystem and see how others have done that.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;How to find Bugs in the kernel?&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Looking for Documentation Bugs? Run &lt;code&gt;make html-docs&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Looking for Static Analysis Bugs?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Use Sparse, Smatch, Coccinelle&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Looking for Dynamic Analysis Bugs?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;&lt;a href=&quot;https://syzkaller.appspot.com/upstream&quot;&gt;syzbot&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Additional tools can be found
&lt;a href=&quot;https://www.kernel.org/doc/html/v6.1/dev-tools/testing-overview.html#dynamic-analysis-tools&quot;&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;There is one more way. randconfig (For static analysis and build related
bugs)&lt;/p&gt;&lt;p&gt;Here is a small script that will run randconfig n number of times and
capture the problematic kernel builds.&lt;/p&gt;&lt;p&gt;In simple terms&lt;/p&gt;&lt;ul&gt;&lt;li&gt;First it generates a random config for the architecture&lt;/li&gt;&lt;li&gt;Then it builds the kernel using this config&lt;/li&gt;&lt;li&gt;If the build breaks or config has some issues, it logs down the config
and the build output so that a human like me can review them and use
them for fixing those bugs.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Note : Sometimes this does result in false positives. So be careful
about the errors that you are investigating.&lt;/p&gt;&lt;p&gt;randconfig builds should atleast compile. If they fail to do so, that
means there is some undeclared dependency and could be a problem in some
configuration for some users.&lt;/p&gt;&lt;p&gt;Infact kernel's CI service also does something similar I believe.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#!/bin/bash
# ================================================
# Sequential randconfig builds for linux-next(x86-64)
# ================================================

BUILD_COUNT=10
ARCH=&amp;quot;x86_64&amp;quot;
BASE_DIR=/linux_work
LINUX_NEXT_DIR=$BASE_DIR/linux
DATE=`date +&amp;quot;%d-%m-%y&amp;quot;`
LOG_DIR=$BASE_DIR/randconfig-logs/$DATE
CONFIG_FILE=.config
REMOTE=origin
BRANCH=master
NPROC=$(( $(nproc) / 2 ))

# Create log dir if not available
mkdir -p $LOG_DIR
echo &amp;quot;Starting $BUILD_COUNT sequential randconfig builds for $ARCH...&amp;quot;
echo &amp;quot;Logs will be stored in $LOG_DIR&amp;quot;

# Get the latest commits
cd $LINUX_NEXT_DIR
git fetch $REMOTE 
git reset --hard $REMOTE/$BRANCH
COMMIT_INFO=$(git log -1 --oneline)

# All sequential builds
for i in $(seq 1 $BUILD_COUNT); do
    LOG_FILE=build_log.log
    CONFIG_GEN_LOG_FILE=config_gen_log.log
    CONFIG_GEN_LOG_DIR=$LOG_DIR/config-gen-log

    echo &amp;quot;=============================&amp;quot;
    echo &amp;quot;Build $i / $BUILD_COUNT&amp;quot;
    echo &amp;quot;=============================&amp;quot;

    # Clean old build artifacts
    make mrproper &amp;gt; /dev/null

    # Remove previous logs.
    rm -rf $LOG_FILE
    rm -rf $CONFIG_GEN_LOG_FILE


    # Add the commit info in config_gen_log
    echo $COMMIT_INFO &amp;gt; $CONFIG_GEN_LOG_FILE
    # Generate random config
    make ARCH=$ARCH randconfig &amp;gt;&amp;gt; $CONFIG_GEN_LOG_FILE 2&amp;gt;&amp;amp;1 


    # For unique config name
    CONFIG_HASH=$(sha1sum .config | cut -c1-8)

    # Do we have warning or error when generating config? Log seperately
    if grep -iq &amp;quot;error:&amp;quot; &amp;quot;$CONFIG_GEN_LOG_FILE&amp;quot; || grep -iq &amp;quot;warning:&amp;quot; &amp;quot;$CONFIG_GEN_LOG_FILE&amp;quot;; then
      mkdir -p $CONFIG_GEN_LOG_DIR
      # Copy over the config into config-gen-log folder as config-hash
      cp $CONFIG_FILE $CONFIG_GEN_LOG_DIR/config-$CONFIG_HASH
    fi

    # Add the commit info in build log
    echo $COMMIT_INFO &amp;gt; $LOG_FILE
    # Build the kernel
    make -j$NPROC &amp;gt;&amp;gt; $LOG_FILE 2&amp;gt;&amp;amp;1

    # Check for errors or warnings
    if grep -iq &amp;quot;error:&amp;quot; &amp;quot;$LOG_FILE&amp;quot; || grep -iq &amp;quot;warning:&amp;quot; &amp;quot;$LOG_FILE&amp;quot;; then
      # We store the config file and build log
      ERROR_CONFIG_FILENAME=error_config
      ERROR_BUILD_LOG_FILENAME=error_build_log.log

      # We store the above files in a seperate dir
      ERROR_LOG_DIR=$LOG_DIR/config-$CONFIG_HASH
      mkdir -p $ERROR_LOG_DIR

      # Store the config and build log in here
      mv $CONFIG_FILE $ERROR_LOG_DIR/$ERROR_CONFIG_FILENAME
      mv $LOG_FILE $ERROR_LOG_DIR/$ERROR_BUILD_LOG_FILENAME
      echo &amp;quot;❌  Build $i failed. See $ERROR_LOG_DIR&amp;quot;
    else
      echo &amp;quot;✅  Build $i completed successfully.&amp;quot;
    fi
done

echo &amp;quot;All $BUILD_COUNT builds finished.&amp;quot;
echo &amp;quot;Logs are in $LOG_DIR&amp;quot;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The output will look something like this where both the config and the
output can be used to reproduce the error.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/images/lkmp/ErrorBuild.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Here &lt;code&gt;error_config&lt;/code&gt; represents the kernel config that generates this
issue&lt;/li&gt;&lt;li&gt;&lt;code&gt;error_build_log&lt;/code&gt; represents the build log which shows the type of
error encountered&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Bonus Tip : If you wish to run this for different architectures, you can
contact the guys over at &lt;a href=&quot;https://gcc.gnu.org/wiki/CompileFarm&quot;&gt;GCC
Compile Farm Project&lt;/a&gt; and request access to their machines for doing
testing.&lt;/p&gt;&lt;h2&gt;Future&lt;/h2&gt;&lt;p&gt;I have found my interest in the USB and MM subsystem and wish to make
substantial contributions in these areas in the Linux Kernel. Also I
would like to become a maintainer at some point in the linux kernel.&lt;/p&gt;&lt;p&gt;If you are interested to get involved with the kernel community and
aspire to be a linux kernel developer, I would highly recommend applying
for the Linux Kernel Mentorship Program.&lt;/p&gt;&lt;p&gt;Happy Coding !!&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;It's not that we don't dare do things because they are difficult;
rather, they are difficult because we don't dare – Seneca. (From
Richard Stallman's personal
&lt;a href=&quot;https://www.stallman.org/quotes.html&quot;&gt;site&lt;/a&gt;)&lt;/p&gt;&lt;/blockquote&gt;</content></entry><entry><title>Dissecting a Simple Linux Kernel Module</title><id>https://cooldev.in/dissecting-a-simple-linux-kernel-module.html</id><author><name>Gopi Krishna Menon</name><email>krishnagopi487@cooldev.in</email></author><updated>2025-07-30T19:00:00Z</updated><link href="https://cooldev.in/dissecting-a-simple-linux-kernel-module.html" rel="alternate" /><content type="html">&lt;p&gt;Dissecting a Simple Linux Kernel Module&lt;/p&gt;&lt;h1&gt;Dissecting a Simple Linux Kernel Module&lt;/h1&gt;&lt;p&gt;Hi, In this short article we will explore the internal structure of a
simple hello world module in the linux kernel, breaking down its anatomy
and understanding how it integrates with the kernel.&lt;/p&gt;&lt;h2&gt;Environment&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Kernel Version&lt;/strong&gt; : 6.16.0&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Build Toolchain&lt;/strong&gt; : clang 18, LLVM 18&lt;/li&gt;&lt;li&gt;&lt;strong&gt;OS&lt;/strong&gt; : Ubuntu 22.04 / Nixos (Any distro will work)&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Basics&lt;/h2&gt;&lt;p&gt;The Linux kernel is monolithic in nature. Monolithic kernels lack the
extensibility and modularity, which can make the kernel bloated and
difficult to manage. Linux kernel solves this problem with kernel
modules.&lt;/p&gt;&lt;p&gt;A kernel module is an object file containing code that can be loaded at
runtime and can be used to extend the functionality of the kernel. When
a module is no longer needed, it can be automatically unloaded, thereby
reducing the memory footprint. Modules give several advantages to the
kernel, such as extensibility, modularity, low memory footprint, faster
compilation, etc. Most of the device drivers in the kernel are
implemented in the form of modules, which contributes significantly to
the modularity and maintainability of the kernel.&lt;/p&gt;&lt;p&gt;Internally, the kernel consists of a loader that, when requested, can
load and map this object file into its own address space. Once mapped,
the module can call kernel symbols just like any other part of the
kernel.&lt;/p&gt;&lt;p&gt;Having a modular kernel also allows companies to provide their drivers
in the form of proprietary binary blobs. This way, the company can apply
its licenses to the source code and is not obligated to release the
source code. Whether it's a good thing or a bad thing is a different
topic (in terms of philosophy, security, etc.), but I guess companies
have their reason for doing this.&lt;/p&gt;&lt;h2&gt;Source Code&lt;/h2&gt;&lt;p&gt;Let us now examine the traditional &lt;code&gt;hello_world&lt;/code&gt; module and understand
what happens internally.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;// SPDX-License-Identifier: GPL-2.0
#include &amp;lt;linux/module.h&amp;gt;

MODULE_DESCRIPTION(&amp;quot;A simple hello world module&amp;quot;);
MODULE_AUTHOR(&amp;quot;Gopi Krishna Menon&amp;quot;);
MODULE_LICENSE(&amp;quot;GPL&amp;quot;);

static int __init hello_mod_init(void)
{
        pr_info(&amp;quot;%s: Hello World\n&amp;quot;, KBUILD_MODNAME);
        return 0;
}

static void __exit hello_mod_exit(void)
{
        pr_info(&amp;quot;%s: Unloading hello_mod\n&amp;quot;, KBUILD_MODNAME);
}

module_init(hello_mod_init);
module_exit(hello_mod_exit);&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The code illustrates the fundamental structure of a kernel module. Its
key components are :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;License Identifier (SPDX Identifier)&lt;/li&gt;&lt;li&gt;HeaderFile (module.h)&lt;/li&gt;&lt;li&gt;Module Metadata&lt;/li&gt;&lt;li&gt;Initialization and Cleanup Functions - Entry and Exit Points&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;License Identifier&lt;/h3&gt;&lt;p&gt;The first line &lt;code&gt;// SPDX-License-Identifier: GPL-2.0&lt;/code&gt; indicates the
license associated with the source file. Although linux kernel is
primarily licensed under GPL, there are several drivers that have a
different free license such as &lt;code&gt;MIT&lt;/code&gt;, &lt;code&gt;BSD&lt;/code&gt; etc.
&lt;a href=&quot;https://spdx.dev/&quot;&gt;SPDX&lt;/a&gt; or &lt;code&gt;Software Package Data Exchange&lt;/code&gt; is a
freely available open standard that provides a clean and unambiguous way
(one line) to indicate the license associated with the source file. If
we didnt have the SPDX standard, the license for each of these source
files would look something like this :&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/*
 * Copyright (C) 2025 Meow
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License...
 */&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;which is harder to read and can be ambiguous sometimes.&lt;/p&gt;&lt;h3&gt;Header File&lt;/h3&gt;&lt;p&gt;&lt;code&gt;#include &amp;lt;linux/module.h&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;This header provides the necessary kernel API's and macros to create a
kernel module. &lt;code&gt;MODULE_DESCRIPTION&lt;/code&gt;, &lt;code&gt;MODULE_AUTHOR&lt;/code&gt; and
&lt;code&gt;MODULE_LICENSE&lt;/code&gt; and several other macros are defined within this header
file.&lt;/p&gt;&lt;h3&gt;Module Metadata&lt;/h3&gt;&lt;p&gt;The macros &lt;strong&gt;MODULE_DESCRIPTION&lt;/strong&gt;, &lt;strong&gt;MODULE_AUTHOR&lt;/strong&gt; and &lt;strong&gt;MODULE_LICENSE&lt;/strong&gt;
define metadata about the module. This metadata is then embedded into
the resulting &lt;code&gt;.ko&lt;/code&gt; file that can be read by tools like &lt;code&gt;modinfo&lt;/code&gt; or the
kernel module loader.&lt;/p&gt;&lt;p&gt;So lets have a look at what these macros distill down to ultimately.&lt;/p&gt;&lt;p&gt;Looking at the definition of &lt;code&gt;MODULE_DESCRIPTION&lt;/code&gt;, &lt;code&gt;MODULE_AUTHOR&lt;/code&gt; or
&lt;code&gt;MODULE_LICENSE&lt;/code&gt; we can see that all of these macros boil down to
&lt;code&gt;MODULE_INFO&lt;/code&gt;.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/* Generic info of form tag = &amp;quot;info&amp;quot; */
#define MODULE_INFO(tag, info) __MODULE_INFO(tag, tag, info)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here we can observe from the comment that the module info is represented
in the form of &lt;strong&gt;tag:value&lt;/strong&gt; pairs.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#define __MODULE_INFO(tag, name, info)                    \
    static const char __UNIQUE_ID(name)[]                 \
        __used __section(&amp;quot;.modinfo&amp;quot;) __aligned(1)         \
        = __MODULE_INFO_PREFIX __stringify(tag) &amp;quot;=&amp;quot; info&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Here &lt;strong&gt;UNIQUE_ID&lt;/strong&gt; ensures that the variable names never clash. Basically
it appends &lt;strong&gt;UNIQUE_ID&lt;/strong&gt; prefix to the variable and a unique number as the
suffix to the variable. This is necessary because, if we look at the
previous code snippet we can see that we pass &lt;code&gt;tag&lt;/code&gt; as the &lt;code&gt;name&lt;/code&gt;
parameter to the macro. Therefore if invoke the macro multiple times
(like multiple authors), then it could result in variable name collision
which can be avoided using this.&lt;/p&gt;&lt;p&gt;But the variable name is not important here. Whats important is that the
data of this variable is added into &lt;code&gt;.modinfo&lt;/code&gt; section and the data
itself is &lt;code&gt;tag=info&lt;/code&gt;. Now modinfo section is very important as it
contains the module information.&lt;/p&gt;&lt;p&gt;In case of our hello world module, if we generate the LLVM IR for this
module, we can see that this is generated.&lt;/p&gt;&lt;p&gt;To generate the IR for this kernel module what I did is&lt;/p&gt;&lt;pre&gt;&lt;code&gt;make V=1 LLVM=1 M=custom_modules/hello_world&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;From this I extracted the line containing clang invocation and copied
that to a seperate bash script where i gave &lt;code&gt;emit-llvm -S&lt;/code&gt; option to
clang and specified it to generate &lt;code&gt;hello_world.ll&lt;/code&gt; file.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;@__UNIQUE_ID_description481 = internal constant [40 x i8] c&amp;quot;description=A simple hello world module\00&amp;quot;, section &amp;quot;.modinfo&amp;quot;, align 1, !dbg !0
@__UNIQUE_ID_author482 = internal constant [26 x i8] c&amp;quot;author=Gopi Krishna Menon\00&amp;quot;, section &amp;quot;.modinfo&amp;quot;, align 1, !dbg !7
@__UNIQUE_ID_author483 = internal constant [12 x i8] c&amp;quot;author=Meow\00&amp;quot;, section &amp;quot;.modinfo&amp;quot;, align 1, !dbg !14
@__UNIQUE_ID_license484 = internal constant [12 x i8] c&amp;quot;license=GPL\00&amp;quot;, section &amp;quot;.modinfo&amp;quot;, align 1, !dbg !19&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As we can observe, the data is stored in the form of tag:value pairs.
Also I added additional author to show you how &lt;strong&gt;UNIQUE_ID&lt;/strong&gt; is helping
here. Now if we look at the hexdump of &lt;code&gt;.modinfo&lt;/code&gt; section via readelf,
we can see that the data is stored in the same manner inside the
section:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;readelf -x .modinfo custom_modules/hello_world/hello_world.k

Hex dump of section '.modinfo':
  0x00000000 64657363 72697074 696f6e3d 41207369 description=A si
  0x00000010 6d706c65 2068656c 6c6f2077 6f726c64 mple hello world
  0x00000020 206d6f64 756c6500 61757468 6f723d47  module.author=G
  0x00000030 6f706920 4b726973 686e6120 4d656e6f opi Krishna Meno
  0x00000040 6e006c69 63656e73 653d4750 4c006e61 n.license=GPL.na
  0x00000050 6d653d68 656c6c6f 5f776f72 6c640064 me=hello_world.d
  0x00000060 6570656e 64733d00 73726376 65727369 epends=.srcversi
  0x00000070 6f6e3d32 46374643 31393532 44453044 on=2F7FC1952DE0D
  0x00000080 44453443 30454638 45370076 65726d61 DE4C0EF8E7.verma
  0x00000090 6769633d 362e3136 2e30636c 616e672b gic=6.16.0clang+
  0x000000a0 20534d50 20707265 656d7074 206d6f64  SMP preempt mod
  0x000000b0 5f756e6c 6f616420 6d6f6476 65727369 _unload modversi
  0x000000c0 6f6e7320 00726574 706f6c69 6e653d59 ons .retpoline=Y
  0x000000d0 00&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Running modinfo, we can see the &lt;code&gt;.modinfo&lt;/code&gt; data&lt;/p&gt;&lt;pre&gt;&lt;code&gt;modinfo custom_modules/hello_world/hello_world.ko
filename:       /linux_work/linux-clang/custom_modules/hello_world/hello_world.ko
description:    A simple hello world module
author:         Gopi Krishna Menon
license:        GPL
name:           hello_world
depends:
srcversion:     2F7FC1952DE0DDE4C0EF8E7
vermagic:       6.16.0clang+ SMP preempt mod_unload modversions
retpoline:      Y&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : In the above code you can observe that there is vermagic, which
is also present in the &lt;code&gt;.modinfo&lt;/code&gt; section. Basically if you load a
module and &lt;strong&gt;vermagic&lt;/strong&gt; of module does not match whats there in the
kernel, it wont load the module. &lt;code&gt;=So modules built for one kernel is not compatible with other kernel.=&lt;/code&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;static int check_modinfo(struct module *mod, struct load_info *info, int flags)
{
    const char *modmagic = get_modinfo(info, &amp;quot;vermagic&amp;quot;);
    int err;

    if (flags &amp;amp; MODULE_INIT_IGNORE_VERMAGIC)
        modmagic = NULL;

    /* This is allowed: modprobe --force will invalidate it. */
    if (!modmagic) {
        err = try_to_force_load(mod, &amp;quot;bad vermagic&amp;quot;);
        if (err)
            return err;
    } else if (!same_magic(modmagic, vermagic, info-&amp;gt;index.vers)) {
        pr_err(&amp;quot;%s: version magic '%s' should be '%s'\n&amp;quot;,
               info-&amp;gt;name, modmagic, vermagic);
        return -ENOEXEC;
    }

    err = check_modinfo_livepatch(mod, info);
    if (err)
        return err;

    return 0;
}&lt;/code&gt;&lt;/pre&gt;&lt;h3&gt;Module License Enforcement&lt;/h3&gt;&lt;p&gt;The &lt;code&gt;MODULE_LICENCE&lt;/code&gt; macro is not just for display, it has runtime
implications. Basically - If you declare &lt;code&gt;MODULE_LICENCE(GPL)&lt;/code&gt;, the
module is treated as GPL compatible - If you declare
&lt;code&gt;MODULE_LICENCE(Proprietary)&lt;/code&gt; or leave blank, it is not GPL compatible
(meaning you cant access kernel symbols which are marked &lt;code&gt;GPL&lt;/code&gt; only
using &lt;code&gt;EXPORT_SYMBOL_GPL&lt;/code&gt;).&lt;/p&gt;&lt;p&gt;Whatever license we have supplied to this macro can impact what symbols
can we access from the kernel. So basically if we have used
&lt;code&gt;PROPRIETARY&lt;/code&gt; licence, then we cannot call or access any symbols from
the kernel which are marked &lt;code&gt;GPL&lt;/code&gt; only (using &lt;code&gt;EXPORT_SYMBOL&lt;/code&gt;).&lt;/p&gt;&lt;h3&gt;Initialization and Cleanup Functions&lt;/h3&gt;&lt;p&gt;The functions &lt;code&gt;hello_mod_init&lt;/code&gt; and &lt;code&gt;hello_mod_exit&lt;/code&gt; are initialization
and cleanup routines for the module.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;static int __init hello_mod_init(void)
{
    pr_info(&amp;quot;%s: Hello World\n&amp;quot;, KBUILD_MODNAME);
    return 0;
}

static void __exit hello_mod_exit(void)
{
    pr_info(&amp;quot;%s: Unloading hello_mod\n&amp;quot;, KBUILD_MODNAME);
}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can think of these as analogous to &lt;code&gt;setup&lt;/code&gt; and &lt;code&gt;teardown&lt;/code&gt;
functions. - &lt;strong&gt;hello_mod_init&lt;/strong&gt; is called when the module is inserted into
the kernel. It can be used for setting up resources required for this
perticular module - &lt;strong&gt;hello_mod_exit&lt;/strong&gt; is called when the module is
removed from the kernel. It can be used for cleaning up any resources
acquired during initialization.&lt;/p&gt;&lt;p&gt;Inside the init and exit function, I am simply printing &lt;em&gt;&amp;quot;Hello World&amp;quot;&lt;/em&gt;
and &lt;em&gt;&amp;quot;Unloading hello_mod&amp;quot;&lt;/em&gt; to the kernel ring buffer. Return value of 0
indicates success as usual. If the initialization fails for some reason,
you can also return the error code such as &lt;code&gt;-ENOMEM&lt;/code&gt;, &lt;code&gt;-EINVAL&lt;/code&gt; which
the kernel will handle accordingly.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;__init&lt;/code&gt; and &lt;code&gt;__exit&lt;/code&gt; are annotations which instruct the compiler to
place these functions in special section &lt;code&gt;.init.text&lt;/code&gt; and &lt;code&gt;.exit.text&lt;/code&gt;.
The kernel can take this as a hint and can remove the code in these
sections when the initialisation or removal is complete. This can help
freeing up memory resources.&lt;/p&gt;&lt;p&gt;Finally the macros &lt;code&gt;module_init&lt;/code&gt; and &lt;code&gt;module_exit&lt;/code&gt; are used to register
these functions. &lt;code&gt;module_init&lt;/code&gt; basically specifies the driver
initialisation entry point. If the module is builtin (compiled into the
kernel), then it will be invoked during &lt;code&gt;do_initcalls()&lt;/code&gt;, otherwise it
will be invoked by &lt;code&gt;do_init_module&lt;/code&gt; during module loading&lt;/p&gt;&lt;pre&gt;&lt;code&gt;...
    freeinit-&amp;gt;init_text = mod-&amp;gt;mem[MOD_INIT_TEXT].base;
    freeinit-&amp;gt;init_data = mod-&amp;gt;mem[MOD_INIT_DATA].base;
    freeinit-&amp;gt;init_rodata = mod-&amp;gt;mem[MOD_INIT_RODATA].base;

    do_mod_ctors(mod);
    /* Start the module */
    if (mod-&amp;gt;init != NULL)
        ret = do_one_initcall(mod-&amp;gt;init); /* Here */
    if (ret &amp;lt; 0) {
        goto fail_free_freeinit;
    }
    if (ret &amp;gt; 0) {
        pr_warn(&amp;quot;%s: '%s'-&amp;gt;init suspiciously returned %d, it should &amp;quot;
            &amp;quot;follow 0/-E convention\n&amp;quot;
            &amp;quot;%s: loading module anyway...\n&amp;quot;,
            __func__, mod-&amp;gt;name, ret, __func__);
        dump_stack();
    }

    /* Now it's a first class citizen! */
    mod-&amp;gt;state = MODULE_STATE_LIVE;
    blocking_notifier_call_chain(&amp;amp;module_notify_list,
                     MODULE_STATE_LIVE, mod);


...&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For exit, if it is not built into the kernel, it will be invoked by
&lt;code&gt;delete_module&lt;/code&gt; syscall which is invoked by &lt;code&gt;rmmod&lt;/code&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;...
    /* If it has an init func, it must have an exit func to unload */
    if (mod-&amp;gt;init &amp;amp;&amp;amp; !mod-&amp;gt;exit) {
        forced = try_force_unload(flags);
        if (!forced) {
            /* This module can't be removed */
            ret = -EBUSY;
            goto out;
        }
    }

    ret = try_stop_module(mod, flags, &amp;amp;forced);
    if (ret != 0)
        goto out;

    mutex_unlock(&amp;amp;module_mutex);
    /* Final destruction now no one is using it. */
    if (mod-&amp;gt;exit != NULL)
        mod-&amp;gt;exit(); /* HERE */
    blocking_notifier_call_chain(&amp;amp;module_notify_list,
                     MODULE_STATE_GOING, mod);
    klp_module_going(mod);
    ftrace_release_mod(mod);
...&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So yea, this completes the dissection of a simple kernel module, in
future articles, I will talk about other macros such as &lt;code&gt;module_param&lt;/code&gt;,
&lt;code&gt;module_softdep&lt;/code&gt;, &lt;code&gt;module_weakdep&lt;/code&gt; etc.&lt;/p&gt;</content></entry><entry><title>Deep Work (Book Review)</title><id>https://cooldev.in/deep-work-book-review.html</id><author><name>Gopi Krishna Menon</name><email>krishnagopi487@cooldev.in</email></author><updated>2025-07-02T07:00:00Z</updated><link href="https://cooldev.in/deep-work-book-review.html" rel="alternate" /><content type="html">&lt;p&gt;Book Review of Deep Work&lt;/p&gt;&lt;h1&gt;Memorable Quotes&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;Ability to concentrate is a skill that gets valuable things done.&lt;/li&gt;&lt;li&gt;You have a finite amount of willpower that becomes depleted as you use
it.&lt;/li&gt;&lt;li&gt;I'll live the focused life, because it's the best kind there is.&lt;/li&gt;&lt;li&gt;Who you are, what you think, feel, and do, what you love—is the sum
of what you focus on / Your world is the outcome of what you pay
attention to.&lt;/li&gt;&lt;li&gt;Once you're wired for distraction, you crave it.&lt;/li&gt;&lt;li&gt;Men of genius themselves were great only by bringing all their power
to bear on the point on which they had decided to show their full
measure.&lt;/li&gt;&lt;li&gt;To learn hard things quickly, you must focus intensely without
distraction.&lt;/li&gt;&lt;li&gt;Develop the habit of letting small bad things happen. If you don't,
you'll never find time for the life-changing big things.&lt;/li&gt;&lt;li&gt;The best moments usually occur when a person's body or mind is
stretched to its limits in a voluntary effort to accomplish something
difficult and worthwhile.&lt;/li&gt;&lt;li&gt;Wooden wheel is not noble, but its shaping can be.&lt;/li&gt;&lt;li&gt;You don't need a rarified job; you need instead a rarified approach to
your work.&lt;/li&gt;&lt;li&gt;Once the talent market is made universally accessible, those at the
peak of the market thrive while the rest suffer.&lt;/li&gt;&lt;li&gt;Talent is not a commodity you can buy in bulk and combine to reach the
needed levels: There's a premium to being the best.&lt;/li&gt;&lt;li&gt;Let your mind become a lens, thanks to the converging rays of
attention; let your soul be all intent on whatever it is that is
established in your mind as a dominant, wholly absorbing idea.&lt;/li&gt;&lt;li&gt;To master the art of deep work, you must take back control of your
time and attention from the many diversions that attempt to steal
them.&lt;/li&gt;&lt;li&gt;Idleness is not just a vacation, an indulgence or a vice; it is as
indispensable to the brain as vitamin D is to the body, and deprived
of it we suffer a mental affliction as disfiguring as rickets … it
is, paradoxically, necessary to getting any work done.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Why I Picked Up This Book&lt;/h1&gt;&lt;p&gt;If you have read my previous book reviews of &lt;a href=&quot;file:///src/website/content/Book-Reviews/Atomic-Habits/index.md&quot;&gt;Atomic Habits&lt;/a&gt; and
&lt;a href=&quot;file:///src/website/content/Book-Reviews/Building-a-second-brain/index.md&quot;&gt;Building a Second Brain&lt;/a&gt;, you will remember that those books focused
on two key areas : The science of Habit formation and the Art of
organising knowledge effectively. Together, these books gave me a fresh
perspective on how to approach work and helped me break down tasks into
chunks and execute tasks more systematically.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;But was it a silver bullet to all of my productivity problems?? Sadly,
Nope!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Although these two books cleared a lot of problems in my productivity
journey, I found that there were still some tasks, that I missed or left
incomplete. Upon reflecting on my journal entries of the past few days,
It became clear that there were still missing pieces to the puzzle. The
following issues popped up :&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;How long should I execute a task?&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;What exactly must be executed and when?&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;The problem of motivation and willpower especially on cognitively
demanding tasks&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;A number of people have talked to me about motivation and willpower
and how they can act as the fuel for achieving your goals and
completing tasks. But I am very skeptical about impact of these
variables on different types of tasks especially cognitively demanding
tasks. As a computer science student who constantly grinds and works
on solving different kinds of problems, I have dealt with a lot of
cognitively demanding tasks and have observed this is not the
case. Sure, it works for many of the tasks and does give a boost but
relying on these two variables alone is not enough. &lt;strong&gt;Motivation and
Willpower and inherently nondeterministic in nature.&lt;/strong&gt; Motivation tends
to fluctuate and depends on many internal and external factors, while
Willpower is finite and can be easily depleted. Together I think these
both make poor foundations for sustained productivity, especially for
cognitively demanding tasks.&lt;/p&gt;&lt;p&gt;After going through the blurb and skimming through a few pages of Deep
Work, I realized that Newport was trying to address the same kind of
problems I was struggling with.&lt;/p&gt;&lt;p&gt;That's what made me pick up the book.&lt;/p&gt;&lt;h1&gt;Personal Reactions&lt;/h1&gt;&lt;p&gt;Personally, I found Deep Work to be an engaging and worthwhile in
nature. Its still not a silver bullet for all my productivity problems
but it definitely helped. Infact it was kind of an eye opener for me
because after applying some of the ideas presented in this book and
restructuring my schedule, I was able to optimize my time, acomplish
more and significantly reduce distractions in my life. Like most books,
it has its strength's and weaknesses.&lt;/p&gt;&lt;h2&gt;Strength's:&lt;/h2&gt;&lt;p&gt;The book is well structured, which makes it easy to follow and
digest. - It offers practical advice on how to minimize shallow work
and increase the propotion of deep work in your daily life - Many of
the ideas presented in this book are accompanied with case studies,
which serve as useful reference or models for applying the concepts in
real life.&lt;/p&gt;&lt;h2&gt;Weaknesses:&lt;/h2&gt;&lt;p&gt;At times, the book feels repetitive. The same ideas of focus and
concentration are repeated again and again in a way that it did feel
boring to me. - While there is novelty in the framing, many of the
concepts overlap with other popular productivity books. That said,
this is somewhat expected since most productivity frameworks draw from
similar roots: cognitive psychology, behavioural psychology,
neuroscience and behavioural economics.&lt;/p&gt;&lt;p&gt;One aspect that I particularly appreciated is that, the book clearly
defines its target audience. Deep Work is not for everyone, and blindly
following its advice may not be effective for all. The author
acknowledges this which is great.&lt;/p&gt;&lt;p&gt;Another strength is the balanced approach. When I first saw the book, I
genuinely thought it was not practical and would make me adopt a monk
mode approach to my productivity problems but thankfully that was not
the case. Instead this book guides you in recognizing distractions,
reducing them gradually and integrate deep work into your schedule in a
realistic and sustainable way.&lt;/p&gt;&lt;p&gt;I categorize productivity books into two types : &lt;strong&gt;Science based&lt;/strong&gt; and
&lt;strong&gt;Tool based&lt;/strong&gt;. Science based books focus on the underlying research and
emperical evidence, while Tool Based books offer direct strategies and
Techniques. Deep work clearly falls into the latter category. Infact,
most productivity books, that I have encountered are tool based. What
sets this book apart though is its emphasis on practical, easy-to-apply
advice rather than rigid rules or one size fits all templates. That is
what makes it especially useful.&lt;/p&gt;&lt;h1&gt;Quick Summary i.e TLDR&lt;/h1&gt;&lt;p&gt;Deep Work by Cal Newport is a productivity book, that emphasizes the
value of focused, undistracted work in a world full of distractions. The
book centers around two core concepts : Deep Work - Focused, cognitively
demanding tasks that create real value and Shallow Work - Non demanding,
low-value tasks often done while distracted. Newport explains why deep
work is crucial in today's economy, arguing that it enables you to learn
hard things quickly, deliver better results and gain a professional
edge. He also provides practical strategies for scheduling your time,
sharpening your focus, minimizing distractions and building habits that
support deep, meaningful work.&lt;/p&gt;&lt;h1&gt;Things that I find interesting about this book&lt;/h1&gt;&lt;h2&gt;Deep Work / Shallow Work&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Deep Work:&lt;/strong&gt; Professional activities performed in a state of
distraction-free concentration that push your cognitive capabilities
to their limit. These efforts create new value, improve your skill,
and are hard to replicate.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Shallow Work:&lt;/strong&gt; Noncognitively demanding, logistical-style tasks,
often performed while distracted. These efforts tend not to create
much new value in the world and are easy to replicate.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;The Deep Work Hypothesis&lt;/h2&gt;&lt;p&gt;The ability to perform deep work is becoming increasingly rare at
exactly the same time it is becoming increasingly valuable in our
economy.&lt;/p&gt;&lt;h2&gt;Philosophy of Deep Work Scheduling&lt;/h2&gt;&lt;p&gt;There are different philosophies as to how you can implement Deep Work
in your life. Choosing the philosophy depends on your occupation,
control over work schedule etc.&lt;/p&gt;&lt;h3&gt;The Monastic Philosophy of Deep Work Scheduling&lt;/h3&gt;&lt;p&gt;Basically dedicate large blocks of time for performing some deep work
task and eliminate all shallow work (i.e email, meetings, social
media). - Useful for people who have significant control over their
work schedule and can isolate themselves from distractions. -
Effective for writers, researchers, software developers etc.&lt;/p&gt;&lt;h3&gt;The Bimodal Philosophy of Deep Work Scheduling&lt;/h3&gt;&lt;p&gt;Suitable for most of the people. - Basically divide your time into
blocks of deep work and shallow work so that some obligatory shallow
tasks like email are not left unattended. - For each day, you plan in
advance the Deep Work blocks and Shallow work blocks in a flexible
way.&lt;/p&gt;&lt;h3&gt;The Rhythmic Philosophy of Deep Work Scheduling&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;The goal, is to generate a rhythm (habit) for this work that removes
the need for you to invest energy in deciding if and when you're going
to go deep.&lt;/li&gt;&lt;li&gt;The main benefit of this technique, as we learned from Atomic Habits
as well is that, this reduces the mental energy needed to switch into
Deep Work mode.&lt;/li&gt;&lt;li&gt;We can rely on ideas like Temptation Bundling and Habit Stacking
from Atomic Habits to make it easy for us to perform this habit.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;The Journalistic Philosophy of Deep Work Scheduling&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Intended for experts of their field, this approach relies on fitting
deep work wherever you can into your schedule. This name is a nod to
the fact that journalists, like Walter Isaacson, are trained to shift
into a writing mode on a moment's notice, as is required by the
deadline-driven nature of their profession.&lt;/li&gt;&lt;li&gt;It is difficult to pull off but if you are confident in the value of
what you are trying to produce, and practised in the skill of going
deep, it is a robust way to squeeze out large amounts of depth from an
otherwise demanding schedule.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Why being Lazy is Not Bad&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Idleness is not just a vacation, an indulgence or a vice; it is as
indispensable to the brain as vitamin D is to the body, and deprived
of it we suffer a mental affliction as disfiguring as rickets … it
is, paradoxically, necessary to getting any work done.&lt;/li&gt;&lt;li&gt;At the end of the workday, shut down your consideration of work issues
until the next morning—no after-dinner e-mail check, no mental
replays of conversations, and no scheming about how you'll handle an
upcoming challenge; shut down work thinking completely.&lt;/li&gt;&lt;li&gt;&lt;p&gt;Reasons&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Downtime Aids Insights (Basically our unconscious mind solves the
problems)&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Downtime Helps Recharge the Energy Needed to Work Deeply&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The Work That Evening Downtime Replaces Is Usually Not That
Important (Basically for incomplete tasks, you can use the to work
on them the next day without taking much tension).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Law of the Vital Few to Your Internet Habits&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Basically the idea is to apply the 80-20 rule for reducing time on
internet or other network tools to reduce shallow work.&lt;/li&gt;&lt;li&gt;Identify your personal goals, Calculate the impact of each network
tool on your personal goal and then use only those network tools, that
have a positive impact towards that personal goal.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Don't Take Breaks from Distraction. Instead Take Breaks from Focus&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Don't take breaks from distractions, instead take breaks from focus
i.e Keep focus as the main point and the main thing that you do during
the day and allow for small blocks of distractions in it.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;The Principle of Least Resistance&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;If there is no clear feedback on productivity / deep work, we will
tend towards behaviour that are easiest in the moment.&lt;/li&gt;&lt;li&gt;The reason we do this is to feel productive. Adding and completing
more number of shallow tasks makes us feel productive.&lt;/li&gt;&lt;li&gt;To overcome this, one can utilise the strategies present in the book
for Deep Work and add clear feedback.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Parallels to other popular works&lt;/h1&gt;&lt;p&gt;This book overlaps with the ideas present in &lt;a href=&quot;file:///src/website/content/Book-Reviews/Atomic-Habits/index.md&quot;&gt;Atomic Habits&lt;/a&gt; by James
Clear, &lt;a href=&quot;https://gettingthingsdone.com/&quot;&gt;GTD&lt;/a&gt; by David Allen and &lt;a href=&quot;file:///src/website/content/Book-Reviews/Building-a-second-brain/index.md&quot;&gt;Building a Second Brain&lt;/a&gt; by Tiago Forte&lt;/p&gt;&lt;h1&gt;Do I recommend it?&lt;/h1&gt;&lt;p&gt;Absolutely 100%. Deep Work is a pretty good book that teaches you how
to focus better and reduce/eliminate distractions from your life. It
also helps you identify what truly deserves your time and attention,
making it easier to prioritise what matters most.&lt;/p&gt;</content></entry><entry><title>Atomic Habits (Book Review)</title><id>https://cooldev.in/atomic-habits-book-review.html</id><author><name>Gopi Krishna Menon</name><email>krishnagopi487@cooldev.in</email></author><updated>2025-06-08T08:00:00Z</updated><link href="https://cooldev.in/atomic-habits-book-review.html" rel="alternate" /><content type="html">&lt;p&gt;Book Review of Atomic Habits&lt;/p&gt;&lt;h1&gt;Memorable Quotes&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;Habits create the foundation for mastery.&lt;/li&gt;&lt;li&gt;Habits are the compound interest of self improvement.&lt;/li&gt;&lt;li&gt;Success is the product of daily habits—not once-in-a-lifetime
transformations.&lt;/li&gt;&lt;li&gt;Bad habits repeat themselves again and again not because you don't
want to change, but because you have the wrong system for change.&lt;/li&gt;&lt;li&gt;Happiness is the state you enter when you no longer want to change
your state.&lt;/li&gt;&lt;li&gt;The trick to doing anything is first cultivating a desire for it.&lt;/li&gt;&lt;li&gt;Being poor is not having too little, it is wanting more.&lt;/li&gt;&lt;li&gt;Good habits make time your ally. Bad habits make time your enemy.&lt;/li&gt;&lt;li&gt;Habits are, simply, reliable solutions to recurring problems in our
environment.&lt;/li&gt;&lt;li&gt;Sometimes success is less about making good habits easy and more about
making bad habits hard.&lt;/li&gt;&lt;li&gt;The most effective form of motivation is progress.&lt;/li&gt;&lt;li&gt;Never miss twice. If you miss one day, try to get back on track as
quickly as possible.&lt;/li&gt;&lt;li&gt;Humans experience peak motivation when working on tasks that are right
on the edge of their current abilities&lt;/li&gt;&lt;li&gt;The only way to become excellent is to be endlessly fascinated by
doing the same thing over and over. You have to fall in love with
boredom.&lt;/li&gt;&lt;li&gt;Professionals stick to the schedule; amateurs let life get in the way.&lt;/li&gt;&lt;li&gt;Until you make the unconscious conscious, it will direct your life and
you will call it fate.&lt;/li&gt;&lt;li&gt;The best is the enemy of the good.&lt;/li&gt;&lt;li&gt;Missing once is an accident. Missing twice is the start of a new
habit.&lt;/li&gt;&lt;li&gt;Whenever you want to change your behaviour, you can simply ask
yourself: How can I make it obvious? How can I make it attractive? How
can I make it easy? How can I make it satisfying?&lt;/li&gt;&lt;li&gt;Goals are good for setting a direction, but systems are best for
making progress.&lt;/li&gt;&lt;li&gt;You do not rise to the level of your goals. You fall to the level of
your systems.&lt;/li&gt;&lt;li&gt;In order to improve for good, you need to solve problems at the
systems level. Fix the inputs and the outputs will fix themselves.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Why I Picked Up This Book&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;What drew me to this book was a simple question : How do I stick to
the habits I truly want? I have always felt that I am good at managing
good and bad habits but when it comes to the ones that I really aspire
to build - I often fell struggled to hold onto them.&lt;/li&gt;&lt;li&gt;Goals give us direction, but its the system's we follow that really
help us to progress in life. What I was curious about was - How do we
build such systems? What is the science behind making them work.&lt;/li&gt;&lt;li&gt;Bad habits tend to stick around far more stubbornly than good ones.
Why is that? We categorize them as good/bad but if we remove that
label, What makes certain behaviors so effortless to hold on to? And
how does our brain play a role in reinforcing them?”&lt;/li&gt;&lt;li&gt;Habits are automations that are run by the subconscious, requiring
little thought or effort. They free up our mental space and quietly
shape the way we live and grow. Therefore it was my natural curiosity
to understand the science behind them.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Personal Reactions&lt;/h1&gt;&lt;p&gt;Honestly, I found this book incredibly fascinating. It helped me
pinpoint several issues in my daily routine that were holding back my
progress. What stood out to me was the wide range of case studies—from
athletes and business coaches to medical professionals—which gave
different perspectives and made the concepts easier to relate to and
understand.&lt;/p&gt;&lt;p&gt;The idea of identity-based habits really struck a chord with me. When I
read about it, something just clicked. There's a huge difference between
saying /&amp;quot;I'm learning System's Programming&amp;quot; / and _ &amp;quot;I'm a System's
programmer.&amp;quot;_ Adopting the latter as part of my identity has given me
the confidence to explore challenging and uncertain paths.&lt;/p&gt;&lt;p&gt;Techniques like habit stacking and temptation bundling offer practical
formulas I could immediately apply. This is a big relief as instead of
drawing in the air, I can rely on a framework that has helped several
people. The emphasis on collecting evidence to reinforce identity has
also been incredibly valuable. I am using obsidian for tracking my
habits.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;/images/atomic-habits/Pastedimage20250608093225.png&quot; alt=&quot;img&quot; /&gt;&lt;/p&gt;&lt;p&gt;This has been really helpful as via my journal, I identified why I
didn't perform the habit on certain days and then make amendments to my
daily lifestyle to become punctual.&lt;/p&gt;&lt;p&gt;Along with that tools like the two-minute rule and the Goldilocks rule
have helped me focus better and actually complete tasks.&lt;/p&gt;&lt;p&gt;I even experimented with a habit contract with some friends, and
surprisingly, it worked. This not only helped me hold onto my habits but
also helped me gain confidence in myself.&lt;/p&gt;&lt;p&gt;The concept of improving just 1% every day is simple yet powerful. I
also appreciate the strategies for breaking bad habits—especially the
inversion of the laws of behaviour change, which made the process feel
manageable and structured.&lt;/p&gt;&lt;p&gt;This book already overlaps a lot with BASB(Building a Second Brain)
which was nice and helpful.&lt;/p&gt;&lt;p&gt;Overall, I think the one thing I genuinely loved taking away from this
book is &amp;quot;The Idea of Identity Based Habit Building&amp;quot;. It way eye opening
and is helping me restructure my approach towards everyone and
everything in life.&lt;/p&gt;&lt;h1&gt;Quick Summary&lt;/h1&gt;&lt;p&gt;Atomic Habits is a practical guide to understanding, building and
breaking habits. It briefly talks about the science behind habit
formation and offers a number of case studies for understanding and
applying these concepts in real life. It also emphasises on identity
based habits and systems rather than goals setting. Along with that this
book also offers the Four Laws of Behavioural Change that are associated
with the Habit Loop (Cue, Craving, Response, Reward). This book also
offers a number of rules, tools and formula's that you can incorporate
into your daily life to manage your habits efficiently. It also offers a
good framework for habit tracking. Along with that it also gives a
number of strategies to make certain habits exciting which are boring in
nature but are required. This book also goes in great length's about how
small improvements can have a major impact in your life. Overall this
book will help you to reduce procrastination, identify yourself and help
become productive in life.&lt;/p&gt;&lt;h1&gt;Things that I find interesting about this book&lt;/h1&gt;&lt;h2&gt;THE SCIENCE OF HOW HABITS WORK (Habit Loop)&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Cue&lt;/strong&gt; triggers your brain to initiate a behavior.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Cravings&lt;/strong&gt; are the motivational force behind every habit.&lt;/li&gt;&lt;li&gt;The third step is the &lt;strong&gt;response&lt;/strong&gt;. The response is the actual habit you
perform, which can take the form of a thought or an action.&lt;/li&gt;&lt;li&gt;&lt;p&gt;Finally, the response delivers a &lt;strong&gt;reward&lt;/strong&gt;. Rewards are the end goal of
every habit.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Rewards satisfy our craving.&lt;/li&gt;&lt;li&gt;They teach us which actions are worth remembering in future.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;cue-&amp;gt; craving -&amp;gt; response -&amp;gt; reward form a neurological feedback
loopthat ultimately allows you to create automatic habits. This cycle
is known as the habit loop.&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;THE FOUR LAWS OF BEHAVIOR CHANGE&lt;/h2&gt;&lt;h3&gt;Creating a Good Habit&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Make It Obvious (Cue)&lt;/li&gt;&lt;li&gt;Make It Attractive (Craving)&lt;/li&gt;&lt;li&gt;Make It Easy (Response)&lt;/li&gt;&lt;li&gt;Make It Satisfying (Reward)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Breaking a Bad Habit&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Make It Invisible (Cue)&lt;/li&gt;&lt;li&gt;Make It Unattractive (Craving)&lt;/li&gt;&lt;li&gt;Make It Difficult (Response)&lt;/li&gt;&lt;li&gt;Make It Unsatisfying (Reward)&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Identity Based Habit Building&lt;/h2&gt;&lt;p&gt;Your habits shape your identity, and your identity shapes your habits.
Instead of building habits for achieving a goal, we must build habit as
a part of our identity.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : I am trying to quit smoking vs I am a non smoker&lt;/p&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Your behaviors are usually a reflection of your identity. What you do
is an indication of the type of person you believe that you
are—either consciously or nonconsciously.fn1 Research has shown that
once a person believes in a particular aspect of their identity, they
are more likely to act in alignment with that belief.&lt;/li&gt;&lt;li&gt;Instead of focusing on goals, we must focus on the systems that lead
towards this goal.&lt;/li&gt;&lt;li&gt;The more we perform these habits, the more evidence we are giving to
ourselves regarding this identity. This will also help us keep
motivated&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Two Step Process To Change Your Identity&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;It is a simple two-step process:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Decide the type of person you want to be.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Prove it to yourself with small wins.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;The Habit Contract&lt;/h2&gt;&lt;p&gt;It is a verbal or written agreement in which you state your commitment
to a perticular habit and the punishment that will occur if you don't
follow through.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : You can create a habit contract that states that you will pay
your gym instructor ₹500 for everyday that you dont attend the gym 🥲&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;We care about the opinions of those around us because it helps if others
like us. This is precisely why getting an accountability partner or
signing a habit contract can work so well.&lt;/p&gt;&lt;h2&gt;Commitment Device&lt;/h2&gt;&lt;p&gt;A commitment device is a choice you make in the present that controls
your actions in the future. Commitment devices increase the odds that
you'll do the right thing in the future by making bad habits difficult
in the present.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : Paying for a gym membership in advance to force yourself to
attend regularly. Sharing your goals with your friend in order to be
accountable (Maybe a Habit Contract).&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Temptation Bundling&lt;/h2&gt;&lt;p&gt;Templtation Bundling is a way of performing those habits, that we
procastinate on often. Just like Habit stacking stacking, the idea works
by linking an action you want to do with an action you need to .In
simple terms, we link a fun activity against a boring one and only allow
to do the fun activity, if we complete the boring one.&lt;/p&gt;&lt;p&gt;The underlying idea is to make the habit attractive. Habits are a domain
driven feedback loop and not all habits are attractive, therefore
strategies like this can be used to make a habit attractive and get more
dopamine release.&lt;/p&gt;&lt;p&gt;Desire is the engine that drives behavior. Every action is taken
because of the anticipation that precedes it.&lt;/p&gt;&lt;p&gt;We can also combine Habit Stacking with Temptation Bundling and get a
formula&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;After [CURRENT HABIT], I will [HABIT I NEED]. After [HABIT I NEED], I
will [HABIT I WANT]&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;Example : I will only eat from my favourite restaurant, when I implement
a feature for my side project I will only watch youtube when I have
completed my TODO list for the day&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Habit Stacking&lt;/h2&gt;&lt;p&gt;Habit Stacking is a powerful technique to build new habits by stacking
them together. The idea is based on the
&lt;a href=&quot;https://en.wikipedia.org/wiki/Diderot_effect&quot;&gt;Diderot Effect&lt;/a&gt; which
states that /obtaining a new possession often creates a spiral of
consumption that results in acquisition of even more possessions /.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : Buying a new phone may lead lead to buying a case, screen
protector and ear buds&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Basically it leverages the idea that our behaviours often follow a chain
reaction - once we start its easier to keep going. You could, for
example, start with easier habits and stack difficult habits on top of
the easier habit to make it easy to perform that habit.&lt;/p&gt;&lt;p&gt;The habit stacking formula is&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;quot;After [CURRENT HABIT], I will [NEW HABIT].&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;p&gt;Example : After boarding the train for work, I will solve 5 puzzles of
sudoku and then I will read one chapter of Atomic Habits.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Implementation Intention&lt;/h2&gt;&lt;p&gt;It is a plan you make beforehand about when and where to act. That is,
how you intend to implement a particular habit. In layman's terms make
write down your habits in a clear unambiguous way. That will make it
more likely to be followed.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;quot;When situation X arises, I will perform response Y.&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Basically cues like time and location must be clearly defined for an
habit and not be ambiguous.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : After boarding the train for work, I will solve 5 puzzles of
sudoku &lt;strong&gt;instead of&lt;/strong&gt;&lt;br /&gt;I will solve 5 puzzles of sudoku in the morning&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;The Two Minute Rule&lt;/h2&gt;&lt;p&gt;The Two Minute Rule states that &lt;em&gt;Once you start a new Habit, it should
take less than 2 minutes to do so&lt;/em&gt;&lt;/p&gt;&lt;p&gt;It is an excellent way to avoid procastinating a habit and relies on the
fact that &lt;em&gt;habit must be established before it can be improved&lt;/em&gt;. If the
habit is initially easy to perform, then there is a very high chance
that we will perform it. We can utilize this to build up our habit and
then optimize it.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Standardize before you optimize. You can't improve a habit that doesn't
exist.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;When we are performing an habit, even if its just two minutes in the
beginning, we are enforcing that identity onto ourselves. We are
basically creating evidence that yes, this is our identity, this is who
I am. Once that sets in, we can slowly increase the time and it would be
much easier to enforce that habit.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : If you want to become a reader, then create a habit where you
read 1 page of the book you are interested in. After sometime, you will
have enough evidence to say that you are a reader and therefore you will
automatically increase the reading time.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Law of Least Effort&lt;/h2&gt;&lt;p&gt;Habits are easier to build when they fit into the flow of your life. The
idea behind Law of Least Effort is to modify your environment in such a
way that it there is very little to no friction when performing an
habit.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Example : Creating an Archipelago of Ideas (BASB) before writing the
book review to make it easier to work on the book review Writing a TODO
forUsing the Hemingway's bridge to plan for next session of your task,
so that its easy to work on that task.&lt;/p&gt;&lt;/blockquote&gt;&lt;h2&gt;Goldilocks Rule&lt;/h2&gt;&lt;p&gt;Goldilocks Rule tells us, how to stay motivated at life and work. It
states that humans experience peak motivation when working on tasks
that are right on the edge of their current abilities. The greatest
threat to success is not failure but boredom. Its based on
Yerkes–Dodson law, which describes the optimal level of arousal as
the midpoint between boredom and anxiety.&lt;/p&gt;&lt;p&gt;Basically design your habits in such a way that they are a little bit
above your ability but not too much.&lt;/p&gt;&lt;h2&gt;Small Habits Make Big Improvement&lt;/h2&gt;&lt;p&gt;Habits are the compound interest of self improvement. If you introduce
small habits regularly and try to improve by atleast 1% then slowly you
will start seeing the improvements in yourself.&lt;/p&gt;&lt;p&gt;Basically adding and performing these small habits again and again
results in providing more and more evidence towards our identity.&lt;/p&gt;&lt;h1&gt;Parallels to other popular works&lt;/h1&gt;&lt;p&gt;This book overlaps with the ideas present in
&lt;a href=&quot;https://calnewport.com/writing/&quot;&gt;Deep Work&lt;/a&gt; by New Calport,
&lt;a href=&quot;https://gettingthingsdone.com/&quot;&gt;GTD&lt;/a&gt; by David Allen,
&lt;a href=&quot;https://www.buildingasecondbrain.com/&quot;&gt;Building a Second Brain&lt;/a&gt; by
Tiago Forte, &lt;a href=&quot;https://charlesduhigg.com/the-power-of-habit/&quot;&gt;The Power
Of Habit&lt;/a&gt; by Charles Duhigg.&lt;/p&gt;&lt;h1&gt;Do I recommend it?&lt;/h1&gt;&lt;p&gt;Yup 100% I would recommend this to anyone who wishes to be productive in
life and build a framework for managing, creating and destroying habits.&lt;/p&gt;</content></entry><entry><title>Building a Second Brain (Book Review)</title><id>https://cooldev.in/building-a-second-brain-book-review.html</id><author><name>Gopi Krishna Menon</name><email>krishnagopi487@cooldev.in</email></author><updated>2025-05-02T11:00:00Z</updated><link href="https://cooldev.in/building-a-second-brain-book-review.html" rel="alternate" /><content type="html">&lt;p&gt;Book review of Building a Second Brain&lt;/p&gt;&lt;h1&gt;Memorable Quotes&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;You cant wait until everything is perfect.&lt;/li&gt;&lt;li&gt;I think it's important to put your impressions down on the first
reading because those are the initial instincts about what you thought
was good or what you didn't understand or what you thought was bad.&lt;/li&gt;&lt;li&gt;The biggest obstacle I had to overcome was my own fear and
self-doubt—fear that maybe my work really wasn't good enough, maybe
I wasn't smart enough; maybe the people telling me I couldn't make it
were right.&lt;/li&gt;&lt;li&gt;Use what you have; even if it seems meager, it may be magic in your
hands.&lt;/li&gt;&lt;li&gt;Move quickly touch lightly.&lt;/li&gt;&lt;li&gt;It is never a person's toolset that constrains their potential, it's
their mindset.&lt;/li&gt;&lt;li&gt;It's crucial to stay organised, but it needs to be done a little at a
time in the flow of our normal lives.&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Why I Picked Up This Book&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;The main reason why I picked up this book is to figure out how can I
manage all the information that I gather daily and learn to build a
second brain. The idea of PKM (Personal Knowledge Management) has been
fascinating to me. I always try to observe the nature and capture as
much information as possible, but one problem that I always suffered
was losing these ideas and information. Whenever I read a book or
noticed something interesting, I used to remember that for a good
amount of time but overtime, I used to forget the essence of the idea
and information which made me unhappy. Even in research, I see a lot
of interesting ideas that deeply resonate with me but overtime I
forget them and end up back to square one.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Even if I noted down the important stuff, it was not organised in such
a way that it could be useful for me. Also I struggle a lot with
managing my projects and this book gave me an interesting way to
tackle this problem. The idea of PKM came to me through an app called
obsidian, which has become my daily note taking and PKM management
tool.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Personal Reactions&lt;/h1&gt;&lt;p&gt;I find this book really interesting. This book not only teaches us how
to build a second brain but also teaches us why building a second
brain is useful and help us become more creative in our fields. The
moment I started following this book, I tried the ideas present in it
and it has significantly helped me in many areas of my life ranging
from managing my personal health to my side projects and has helped me
identify what I truly love doing. In my research side also this book
is helping me to handle the challenging parts of my research despite
experiencing burnouts. Even though I am not able to follow everything
that i want to follow from this book, I have been able to build up
habits that has helped me slowly follow everything and make it a
second nature for me.  Also most of the productivity books that we
read create stringent requirements or give some stupid templates that
are difficult to follow and not practical for everyone. (Everyone has
their own way of doing stuff and its not necessary that the one way
they suggest will help), but this book helped me organise stuff
without having any stringent requirements on how I should
organise. In-fact the ideas of PARA are so liberating for me as
finally I don't have to remember where exactly to store a piece of
information. Also this book helped me distinguish the phases of
convergence and divergence using CODE, that has significantly helped
me to work on something creative. It also helps me link unrelated
ideas and finally it has given me the confidence that I can learn
anything.&lt;/p&gt;&lt;h1&gt;Quick Summary i.e TLDR&lt;/h1&gt;&lt;p&gt;This book is about building a second brain to organise your lives. Its
also teaches you a system of organisation, why building a second brain
is important as well. It also teaches you how to become more productive
and tackle challenges related to procrastination and lack of ideas. It
also teaches you how to effectively collect and organise information.
Along with that It also gives several case studies that can help us
understand how to tackle the problems. It also gives a good insight into
how we can use the tools effectively to build up our second brain.&lt;/p&gt;&lt;h1&gt;Things that I find interesting about this book&lt;/h1&gt;&lt;h2&gt;12 Favourite Problems&lt;/h2&gt;&lt;blockquote&gt;&lt;p&gt;The worthwhile problems are the ones you can really solve or help solve,
the ones you can really contribute something to - Richard Feynman&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The amount of information that we go through everyday is insane. There
is actual information overload happening right now and these 12 problems
basically act as a filter on what information we must capture and what
information we must not. Here are my 12 favourite problems.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;How can I organise myself to become productive and avoid
procrastination in my life?&lt;/li&gt;&lt;li&gt;How can I become a great programmer and create achievements in the
field of &lt;strong&gt;Systems&lt;/strong&gt; &lt;strong&gt;(OS Development, App Development, Compiler
Development, Design and Development of Programming Languages)&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;How can I learn Languages Faster And Help The Community By Building
Tooling Around These Languages&lt;/li&gt;&lt;li&gt;How Can I Get Back My Body Back In Shape To Live And Stay Healthy?&lt;/li&gt;&lt;li&gt;How Can I Invest Wisely And Help Myself Build A Rapport For My Future
Endeavours?&lt;/li&gt;&lt;li&gt;How Can I Improve My Social Media Presence Via Blogs and YT Videos To
Become A Part Of The OSS Community And Help New Comers And Seasoned
Programmers&lt;/li&gt;&lt;li&gt;How Can I Be Of Value To Mother Nature And Help In The Development Of
Everyone&lt;/li&gt;&lt;li&gt;How Can I Get Back Into Music Again And Have My Own Compositions For
My Own Happiness (Preferably Share With The World At Some Point) ?&lt;/li&gt;&lt;li&gt;How Can I Be Clever And Quick Witted And Form Associations And
Correlate Things With Relative Ease To Form New Ideas?&lt;/li&gt;&lt;li&gt;How Can I Leverage AI And Other Tech As A Part Of My Daily Life Style?&lt;/li&gt;&lt;li&gt;How Can I Spend More Time With My Loved Ones And Keep Everyone Happy?&lt;/li&gt;&lt;li&gt;How Can I Reduce My Anxiety And Improve My Confidence And Have The
Ability To Face Problems In My Life With Relative Ease?&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;PARA&lt;/h2&gt;&lt;p&gt;PARA stands for Projects, Areas, Resources and Archives. It is a method
of organising your knowledge. One of the most important thing about PARA
is the non static nature of notes. Usually when we write some note, we
are stuck in the dilemma of where to place it. We try to place the notes
in an optimal location but enforcing that kind of structure makes it
difficult to link these ideas together and we usually forget about them.
PARA gives you the freedom to organise notes wherever you want and also
allows you to keep unrelated ideas together to form new ideas.&lt;/p&gt;&lt;p&gt;The main idea of taking notes is to make it easy to reference later,
help us join the dots and not make us remember every single thing. And
an organisation method like PARA helps us do it efficiently.&lt;/p&gt;&lt;h2&gt;CODE&lt;/h2&gt;&lt;p&gt;CODE framework provides a structured way to manage information and
create the second brain. It consists of four steps i.e - Capture : Deals
with how and what information to capture in the form of notes. -
Organise : How to organise this information (PARA). - Distill :
Capturing insights, Summarization etc (Discoverability, Progressive
Summarization Technique) - Express : How and why to share this distilled
information with the outside world. The Express step is where we
practice and hone our ability to retrieve what we need, when we need it.&lt;/p&gt;&lt;h2&gt;Divergence and Convergence - A creative balancing act&lt;/h2&gt;&lt;p&gt;This is one of my favourite parts of the book. It teaches us techniques
on how to do something creative by separating the acts of information
collection and working on that information. It plugs into the CODE
framework and tells us which parts of CODE must be done in convergent
mode and which ones in divergent mode.&lt;/p&gt;&lt;h2&gt;Intermediate Packets - The Power of Thinking Small&lt;/h2&gt;&lt;p&gt;Basically how to create standalone units of information that can be used
across different context. This also helps us to link stuff together and
become creative.&lt;/p&gt;&lt;h2&gt;The Mise-en-Place Way to Sustainable Productivity&lt;/h2&gt;&lt;p&gt;This one talks about the importance of habit formation and teaches us
how to automate many of the CODE tasks via habits.&lt;/p&gt;&lt;h2&gt;Hemingway Bridge - Use Yesterday's Momentum Today&lt;/h2&gt;&lt;p&gt;This one serves to reduce the cognitive overload involved when resuming
some paused task. There are times when we cannot complete a task in a
single sitting. Resume the task next day is difficult and we might have
to go through it again to get started. The Hemingway Bridge is a way of
&lt;strong&gt;making each creative leap from one island to the next less dramatic and
risky&lt;/strong&gt;: you keep some energy and imagination in reserve and use it as a
launchpad for the next step in your progress.&lt;/p&gt;&lt;h2&gt;The Archipelago of Ideas&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;This one talks about creating stepping stones from the intermediate
packets to help you become creative.&lt;/li&gt;&lt;li&gt;The Archipelago of Ideas technique is a contemporary reinvention of
&lt;strong&gt;“the age-old practice of outlining&lt;/strong&gt;;—laying out the points you want
to include up front, so that when it comes time to execute all you
have to do is string them together.&lt;/li&gt;&lt;li&gt;An Archipelago of Ideas separates the two activities your brain has
the most difficulty performing at the same time: choosing ideas (known
as selection) and arranging them into a logical flow (known as
sequencing).&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;Parallels to other popular works&lt;/h1&gt;&lt;p&gt;&lt;a href=&quot;https://gettingthingsdone.com/&quot;&gt;GTD&lt;/a&gt; by David Allen,
&lt;a href=&quot;https://calnewport.com/writing/&quot;&gt;Deep Work&lt;/a&gt; By New Calport,
&lt;a href=&quot;https://jamesclear.com/atomic-habits&quot;&gt;Atomic Habits&lt;/a&gt;. This book does
not aim to compete against them but rather act as a extension to their
works so that the ideas presented in all of these books can be utilised
effectively.&lt;/p&gt;&lt;h1&gt;Do I recommend it?&lt;/h1&gt;&lt;p&gt;100% I recommend it to anyone who wishes to learn, how to organise the
information in their life in such a way that it can be useful when you
really want it to. I even gifted this to my cousin as a way to help them
organise the information and help generate new ideas.&lt;/p&gt;</content></entry></feed>