AnimeAdventure

Location:HOME > Anime > content

Anime

The Journey of My First Code: From Scratch to Hello World

January 07, 2025Anime3095
The Journey of My First Code: From Scratch to Hello World Did every pr

The Journey of My First Code: From Scratch to 'Hello World'

Did every programmer write PRINT GOTO 1? Far from it. My first piece of code was much simpler and visually appealing – a game created in Scratch. This game, rudimentary in nature, was my introduction to programming back when I was just six years old. Let’s dive into my journey from Scratch to 'Hello World'.

The Birth of My Programming Journey

My first exposure to programming came through Scratch, a visual programming language designed for beginners. The interface is based on dragging and dropping blocks, which made learning to program intuitively easy. The game I created was simple: Space to start, ↑ key to shoot. It wasn't the most entertaining game, but it was a meaningful step in my early programming education. Scratch was visually appealing and fun, making it a great platform for beginners like me. It not only taught me about basic programming concepts like loops and variables but also laid a solid foundation for more complex languages like Python.

From Scratch to Python: A Smooth Transition

My first piece of code in Scratch involved basic logic and simple commands. It was at six years old that I wrote my first piece of code:

Repeat until (Key Space is pressed) 
    turn 180 degrees 
End
Repeat until (Key Up is pressed) 
    move 10 steps 
End

When I started learning Python, I found it relatively easy and straightforward. My first line of code in Python was:

print("Hello World!)

This code was written in Python 2, which was still widely used at the time. However, my dad had the foresight to switch me to Python 3 almost immediately, ensuring I was learning the more modern and widely supported version of the language.

print("Hello World!")

Early Experiments with Calculators

Trying to pinpoint my first program is like trying to remember one's first pair of socks – it's hard to pinpoint but there were many early experiments. I remember using a handheld calculator to create numbers that looked like letters when viewed upside down. Here's an example:

O I B E

As a child with friends, we found joy in creating such number-letter transformations. This playful experimentation with numbers and patterns laid a foundation for understanding computational thinking, even before I started writing structured code.

From Basic to Beyond

When it comes closer to what we typically associate with computer programming, my first complex program was likely written in BASIC. This language, often associated with early home computers, would have been a natural progression from my early experiments with calculators and the playful nature of Scratch.

Conclusion

My journey from Scratch to 'Hello World' exemplifies the importance of early exposure to programming in a way that is both fun and educational. Whether it's through visual programming languages or more traditional coding practices, the first steps in programming are crucial. From creating simple games to experimenting with numbers and calculations, every step contributes to a deeper understanding of computational thinking and problem-solving.