zhaopinboai.com

From Hand-Coding to Debugging: My Journey as a Programmer

Written on

Chapter 1: My Unexpected Journey into Programming

I never envisioned myself as a programmer. My initial experiences with coding during school were quite disheartening; I would often find myself dozing off, waiting for the class to end. However, I eventually made my way into the world of programming.

It all began during my third year at university. Unlike many of my peers studying computer science, my first exposure to coding didn’t involve any programming languages or computers at all. Instead, I was introduced to a module focused solely on algorithms.

While I was familiar with using software, I had never considered the idea of creating it myself, even though the potential was always evident. To tackle the numerous assignments in the algorithm module, I found myself writing down algorithms on various sheets of paper, only to eventually realize that my handwritten notes could be interpreted by a computer.

Looking back, even the language I used was unconventional; I was drafting algorithms in French. It wasn’t until I transitioned to the next module, an introduction to C programming, that everything clicked. The lecturer reminded us, “You’ll use the algorithms you wrote previously here; only the syntax has changed. Welcome to C!” At this point, we were encouraged to use integrated development environments (IDEs). However, I had already developed a habit of writing algorithms by hand, and being one of the slowest typists in my class, I opted to continue hand-coding and then transferring my work to a computer when necessary.

This method persisted for over two years. Having experienced this firsthand, I would like to share the pros and cons of writing code on paper.

Video: I learned to code from scratch in 1 year. Here's how.

In this video, I discuss my year-long journey in learning to code and the strategies that helped me succeed.

Section 1.1: The Importance of Pseudo-Coding

A widely accepted piece of advice in programming is to create pseudo-code before diving into actual code. I wholeheartedly agree with this principle, and my experiences have reinforced it.

Yes, I used to write pseudo-code on paper, and I still practice this method. Perhaps it’s because I spent considerable time coding on paper early in my journey, but I have found that without pseudo-coding, my coding time significantly increases. Even when faced with relatively simple tasks, having a pencil and paper is invaluable.

Conversely, I often observe developers glued to multiple monitors with their code editor, StackOverflow, and Git open, but rarely see anyone using a notebook. I’m unsure if this approach is better; perhaps these developers are adept at structuring their thoughts quickly, while I find pseudo-coding and hand-coding essential for my process.

Section 1.2: The Challenges of Hand-Coding

While pseudo-coding on paper is a beneficial practice, the actual coding process is a different challenge entirely. In the early stages, coding simpler tasks was manageable, but as the complexity increased, hand-coding became increasingly difficult.

I discovered that for complex tasks, I invested significant time in researching solutions and adapting them to fit my code. At first, this might seem simple, given the multitude of online resources, but it’s akin to searching for edible fruits in a jungle; without knowledge, one can easily misidentify harmful options.

Testing was another hurdle. Testing code on paper doesn’t qualify as proper testing, so I had to run my code on an actual machine. This was frustrating, as one of my motivations for hand-coding was to minimize reliance on technology. Yet, I found that immersing myself in the coding process, free from distractions, became easier when using just pencil and paper.

Chapter 2: Debugging and Its Lessons

Despite receiving education on various programming concepts like conditional statements and memory allocation, debugging was conspicuously absent from the curriculum. We never learned about debuggers or debugging techniques, leaving us to figure things out on our own.

Most of my classmates resorted to sprinkling print statements throughout their code, while I, an old-school programmer, had a different approach. Using print statements on paper felt pointless, so I simulated the behavior of my code mentally. For example, instead of iterating over 200 elements, I would mentally loop through just three.

This technique allowed me to compile code in my mind, leading to fewer errors in the actual code. In contrast, many of my peers faced frustrating errors that were not clearly defined, leading to time-consuming searches for the root cause.

As Dijkstra famously stated, “If debugging is the process of removing software bugs, then programming must be the process of putting them in.” Although hand-coding proved to be challenging, debugging my code on paper alleviated some of the difficulties.

Video: Why Pen and Paper are my Favourite Programming Tools

In this video, I share why I prefer using traditional tools like pen and paper in my programming journey.

Section 2.1: Valuable Lessons from Hand-Coding

Reflecting on this experience, I can confidently say that it has taught me invaluable lessons and contributed to my growth as a programmer. Over time, my typing skills improved due to the numerous written assignments I completed. Writing and coding have indeed complemented each other.

Today, like many others, I code directly in IDEs, though you’ll often find me with a notebook in hand. I still appreciate the value of using a pencil to:

  • Write pseudo-code
  • Sketch out my thought processes
  • Simulate program execution
  • Disconnect from technology

Ultimately, these preferences are personal. I would love to hear your thoughts on this topic! If you enjoyed this content, consider supporting the author through Medium’s tipping option or by subscribing via the provided link. Your support helps authors continue their work.

For more content and insights, feel free to explore PlainEnglish.io and join the community on social media platforms like Twitter, LinkedIn, YouTube, and Discord.

Share the page:

Twitter Facebook Reddit LinkIn

-----------------------

Recent Post:

How to Effectively Use the TOSCA Framework for Problem-Solving

Learn how to define problems using the TOSCA framework, making the path to solutions clearer and more systematic.

Exploring Men's Emotional Journeys: Insights and Reflections

A deep dive into men's emotional lives, emphasizing the importance of understanding and expressing feelings.

Learning from an Entrepreneur's $1 Million Failure: 5 Lessons

Discover five key takeaways from an entrepreneur's journey after a $1M business failure and his subsequent successes.

The Mindset That Propelled Usain Bolt to Greatness

Explore Usain Bolt's mindset that led him to become the fastest man alive and his personal insights on success and resilience.

T-Rex Sale Sparks Controversy: A Case of Scientific Funding

A man's decision to sell a rare T-Rex fossil has ignited debate about funding for scientific research and ownership rights.

Exploring the Intriguing Call of the Void Phenomenon

Delve into the psychological concept of the high place phenomenon, often referred to as the call of the void, and its implications.

Navigating Through Hardship: 5 Empowering Tips for Resilience

Discover five empowering strategies to help you overcome tough times and emerge stronger.

Break Free from the People-Pleasing Trap: Embrace Your Authenticity

Learn how to escape the cycle of people-pleasing and embrace your true self to enhance your personal and social life.