Confessions of a Code Addict

Confessions of a Code Addict focuses on computer science topics, including programming language mechanics, optimization techniques, modern applications of data structures and algorithms, insights into AI, and practical guides to optimizing code performance. It targets a broad audience, from beginners to experienced engineers, aiming to enhance their understanding and skills.

Computer Science Fundamentals Programming Language Internals Code Optimization Techniques Data Structures and Algorithms Artificial Intelligence Database Internals Performance Engineering Python Internals Text Classification Techniques

The hottest Substack posts of Confessions of a Code Addict

And their main takeaways
673 implied HN points β€’ 18 Feb 25
  1. Understanding operating systems is really important for software engineers. It helps you know how your code runs and can make fixing problems easier.
  2. There are different types of books to learn about operating systems: theory books, implementation books, and systems programming books. Each type helps you at different stages of your programming journey.
  3. Some popular OS books, like 'Operating Systems: Three Easy Pieces', are easy to understand and cover key concepts without sticking to just one system. These resources are great for anyone wanting to learn about OS.
1467 implied HN points β€’ 28 Jan 25
  1. Research papers are important for software engineers to keep up with new technologies and fill knowledge gaps. It helps to stay current with developments in your field, like time series analysis.
  2. Many people find reading research papers hard because they can be dense and technical. A lack of a research background can make it seem even more intimidating.
  3. With time and practice, anyone can learn to read and understand research papers. Finding a personal approach or framework can make the process easier.
1058 implied HN points β€’ 25 Jan 25
  1. There is a growing gap between complex systems in software and the engineers who understand them. More engineers need to learn how these systems work in detail.
  2. The new live courses will help those interested in systems engineering to gain practical skills. They'll start with basics like programming in X86 assembly and progress to more complex topics.
  3. Hands-on practice is key to learning in these courses. Along with guidance, you'll need to put in effort and time to really understand the concepts.
1683 implied HN points β€’ 12 Jan 25
  1. Unix engineers faced a big challenge in fitting a large dictionary into just 64kB of RAM. They came up with clever ways to compress the data and use efficient structures to make everything fit.
  2. A key part of their solution was the Bloom filter, which helped quickly check if words were in the dictionary without needing to look up every single word, saving time.
  3. They also used innovative coding methods to further reduce the size of the data needed for the dictionary, allowing for fast lookups while staying within the strict memory limits of their hardware.
1106 implied HN points β€’ 29 Dec 24
  1. Context switching allows a computer to run multiple tasks by efficiently switching between different processes. It's important to understand it because it affects a system's performance.
  2. The Linux kernel uses specific structures, like 'task_struct' and 'mm_struct', to manage process states and memory. These structures help keep track of what each process is doing and how it uses memory.
  3. When a process runs out of CPU time or needs to wait, the kernel uses flags to decide when to switch to another process. This ensures that all processes get a chance to run, even if some are waiting for resources.
Get a weekly roundup of the best Substack posts, by hacker news affinity:
721 implied HN points β€’ 12 Dec 24
  1. Context switching happens when a computer's operating system manages multiple tasks. It's necessary for keeping the system responsive, but it can slow things down a lot.
  2. Understanding what happens during context switching helps developers find ways to reduce its impact on performance. This includes knowing about CPU registers and how processes interact with the system.
  3. There are specific vulnerabilities and costs associated with context switching that can affect a system's efficiency. Being aware of these can help in optimizing performance.
529 implied HN points β€’ 18 Dec 24
  1. The community grew a lot in 2024, from 4,212 to about 9,380 readers. This shows that more people are enjoying the content and getting involved.
  2. There will be new perks for paid subscribers in 2025. This includes early access to articles and a new series sharing resources and interesting materials.
  3. Upcoming live sessions will include interactive discussions on research papers. This will help everyone understand complex topics better together.
168 implied HN points β€’ 14 Jan 25
  1. Understanding how modern CPUs work can help you fix performance problems in your code. Learning about how the processor executes code is key to improving your programs.
  2. Important features like cache hierarchies and branch prediction can greatly affect how fast your code runs. Knowing about these can help you write better and more efficient code.
  3. The live session will offer practical tips and real-world examples to apply what you've learned. It's a chance to ask questions and see how to tackle performance issues directly.
649 implied HN points β€’ 26 Nov 24
  1. The fork system call creates a new process that is a copy of the parent process, but each can follow a different path after the call. This is why a program can behave differently depending on which process it is in.
  2. When the fork call is made, the operating system needs to return distinct values to both the parent and child processes. The kernel sets the return value for the child process to 0, while the parent gets the child’s process ID.
  3. System calls are handled in the kernel, which means understanding their low-level operations helps us see how programming languages like C manage processes, revealing the complexity hidden behind simple function calls.
505 implied HN points β€’ 18 Nov 24
  1. CPython, the Python programming language's code base, has hidden Easter eggs inspired by the xkcd comic series. One well-known example is the 'import antigravity' joke.
  2. There's a specific piece of unreachable code in CPython that uses humor from xkcd. When this code is hit during debugging, it displays a funny error message about being in an unreachable state.
  3. In the release builds of CPython, the unreachable code is optimized to let the compiler know that this part won't be executed, helping improve performance.
529 implied HN points β€’ 09 Nov 24
  1. In Python, you can check if a list is empty by using 'if not mylist' instead of 'if len(mylist) == 0'. This way is faster and is more widely accepted as the Pythonic approach.
  2. Some people find the truthiness method confusing, but it often boils down to bad coding practices, like unclear variable names. Keeping your code clean and well-named can make this style clearer and more readable.
  3. Using 'len()' to check for emptiness isn't wrong, but you should choose based on your situation. The main point is that the Pythonic method isn't ambiguous; it just needs proper context and quality coding.
312 implied HN points β€’ 01 Dec 24
  1. The session will involve live coding a simple compiler and virtual machine for a small part of Python. They will focus on features like variables, function calls, and loops.
  2. Participants should know programming well and have some Python experience, especially since recursion will be used a lot in this session.
  3. The session is happening on December 14th and will not be recorded, so attendees should plan to join live for the best experience.
529 implied HN points β€’ 29 Oct 24
  1. Clustering algorithms can never be perfect and always require trade-offs. You can't have everything, so you have to choose what matters most for your project.
  2. There are three key properties that clustering should ideally have: scale-invariance, richness, and consistency, but no algorithm can achieve all three simultaneously.
  3. Understanding these sacrifices helps in making better decisions when using clustering methods. Knowing what to prioritize can lead to more effective data analysis.
360 implied HN points β€’ 30 Oct 24
  1. The next live coding session will focus on creating a bytecode interpreter for Python. It will help participants understand important concepts like how Python code is structured and executed.
  2. In the session, participants will learn about Python's abstract syntax tree and how to traverse it to interpret code. This is a hands-on opportunity to experience coding in a live setting.
  3. There are limited spots available for the session, so early registration is encouraged. The session is free for paid subscribers, and there will be a recording available for those who sign up.
577 implied HN points β€’ 15 Jan 24
  1. Code efficiency at scale is crucial - data structures and algorithms matter, but execution cost is also important.
  2. Participating in challenges like the 1 Billion Row Challenge can enhance performance engineering skills.
  3. The workshop covers optimization techniques like flamegraphs, I/O strategies, system calls, SIMD instructions, and more.
336 implied HN points β€’ 08 Mar 24
  1. The upcoming live session will focus on CPUs, GPUs, and LPUs, exploring what makes them non-deterministic and discussing Groq's LPU design and architecture.
  2. The live session will include an Ask Me Anything (AMA) segment, where attendees can freely ask questions related to the discussed topics or anything else they're curious about.
  3. The event is scheduled for March 17th from 16:30 UTC to 18:00 UTC and will be limited to 100 participants, offering a mix of informative content and interactive Q&A.
360 implied HN points β€’ 02 Feb 24
  1. The live session focuses on learning to analyze and reason about code performance through iterative optimization using 1BRC as a case study.
  2. Attendees will explore various topics including performance profiling with flamegraphs, I/O strategies, and leveraging SIMD instructions.
  3. Prerequisites include a few years of coding experience in languages like C, C++, Java, or others, with a specific focus on Java during the session.
465 HN points β€’ 18 Oct 23
  1. GPUs are designed for high throughput and massive parallelism, while CPUs focus on executing sequential instructions quickly.
  2. GPU architecture includes streaming multiprocessors with cores, various memory layers, and dynamic resource partitioning for efficient execution.
  3. Executing code on GPUs involves launching grids of thread blocks, with each block consisting of threads that work in parallel to optimize performance.
481 implied HN points β€’ 07 Oct 23
  1. The growth of subscribers for 'Confessions of a Code Addict' has been significant, with spikes after posting articles.
  2. The author's journey started after a job loss, and the community support keeps them dedicated to creating content.
  3. Future plans for the community include introducing paid subscriptions with various perks and additional initiatives.
293 HN points β€’ 06 Dec 23
  1. Each type in Python implements functions for the operators it supports and populates a function pointer table in its header.
  2. The CPython Virtual Machine calls a function in the abstract object interface based on the operator being executed.
  3. The abstract object interface performs function pointer table lookup in the object headers to call the right function for dynamic dispatch.
288 implied HN points β€’ 12 Nov 23
  1. A new method to compute Fibonacci numbers using a closed-form expression without having to resort to floating point arithmetic.
  2. Representation of irrational numbers using two parts can be done in code allowing for precise computation of Fibonacci numbers.
  3. Understanding rings and implementing arithmetic operations within it can help in computing Fibonacci numbers without any loss of precision.
158 HN points β€’ 05 Nov 23
  1. A linear algebra technique can be applied to compute Fibonacci numbers quickly with a logarithmic time complexity.
  2. Efficient algorithms like repeated squaring can compute powers of matrices in logarithmic time, improving performance for Fibonacci number calculations.
  3. A closed form expression using the golden ratio offers a direct method to compute Fibonacci numbers, showing different approaches with varied performance.
46 HN points β€’ 14 Sep 23
  1. Python uses Bloom filters in its string data structure to speed up certain string processing functions like strip and splitlines.
  2. The unique Bloom filter implementation in CPython uses an unsigned long type to represent the bit vector, making storing and querying items more efficient.
  3. CPython determines the position in the bit vector for adding and querying characters by using the lower n-bits of the character, avoiding costly hash computations.
4 HN points β€’ 01 Mar 24
  1. Groq's LPU showcases an innovative design departing from traditional architectures, focusing on deterministic execution for enhanced performance.
  2. The TSP architecture achieves determinism through a simplified hardware design, enabling precise scheduling by compilers for predictable performance.
  3. Groq's approach to creating a distributed multi-TSP system eliminates non-determinism typical in networked systems, with the compiler efficiently managing data movement.
6 HN points β€’ 25 Aug 23
  1. Python 3.12 introduced immortal objects to improve performance by avoiding constant reference count updates for immutable objects like None, True, and False.
  2. Immortalization in Python aimed to address performance issues like CPU cache invalidation, data races, and impact on Copy-on-Write applications.
  3. The implementation of immortalization in Python included marking objects as immortal, incorporating checks in Py_INCREF and Py_DECREF functions, and dealing with some performance overhead.
4 HN points β€’ 23 Nov 23
  1. Programming languages use polymorphism and inheritance to create unified interfaces between modules.
  2. CPython mimics inheritance and polymorphism in C by embedding a parent struct in the child struct definitions, ensuring a unified memory layout.
  3. In CPython, the PyObject struct acts as the parent struct, containing fields for object reference count and type-related data, enabling type-specific method calls via function pointer tables in the object header.
5 HN points β€’ 05 Sep 23
  1. Bloom filters are efficient data structures for quick searches in large datasets and minimize memory usage, with a probabilistic approach to determining membership
  2. Bloom filters use hash functions and bit vectors to store data item membership information while conserving memory by not storing actual items
  3. Counting Bloom Filters are an extension that allow item deletion but come with weaknesses such as handling hash collisions and counter overflow, providing an advanced data handling tool