C++ for Shepherds

C++ for Shepherds

Javad Rahimipetroudi (Mind embedded software consultant)
Javad Rahamipetroudi
17/04/2024

Everyone has their own story, and my story as a software engineer began when I stumbled upon an old, dusty BASIC programming book in my dad’s bookcase back in 2003. At that time, I was working as a private shepherd for my grandfather’s sheep during the summer as a part-time job. Every day, I woke up at 5 AM to tend to his silly flock until it was time for lunch.

During a time when digital distractions like YouTube, Facebook, and other such platforms were non-existent, my only pastime was reading books. However, as a private shepherd who earned only 10 cents per day, I did not have many options to choose from. My father was a theoretical physicist and a school teacher, so his bookcase was filled with physics and mathematics books, except for one BASIC programming book that was written in 1978. Despite having enough experience with mathematics books in school, I decided to read the ancient BASIC programming book since it was the only one available to me. At that time, my only experience with computers was from watching them in sci-fi movies.

At the time, a Pentium 3 PC with 32MB of RAM cost around $300. Given my salary, it would take me over 100 months to save up for one. Instead, I asked my dad to create a paper copy of a physical PC keyboard from his office, which I used as my PC. With the power of imagination, I created my first computer lab using this paper keyboard. To motivate me further, my dad promised to give me a tour of his office to see a real PC for the first time, but only if I became a proficient programmer.
I believe that having access to a PC can be a great source of motivation for children. So, I decided to spend my time with sheep while also studying the BASIC programming language. Eventually, I learned QBASIC using my paper computer.
As I cleared my dad’s programming exam with flying colors, I became the first shepherd-developer in our village. It was a thrilling moment for me as I had worked hard to achieve this feat. I couldn’t wait to explore the world of programming and see where it would take me.

The day that was promised has finally arrived. I visited my dad’s office and was amazed to see an ancient 486 PC with a running FoxPro on a faded 14-inch yellow CRT monitor. The room was filled with the sound of the PC’s noisy fan, and I could feel the heat emanating from the machine. As I stood there, I felt a sense of awe and inspiration.
That moment was etched in my memory forever, and it became a defining moment in my journey as a shepherd-developer.So, without a second thought, I reached for the red pill and swallowed it whole, without even a sip of water. And just like that, I was transported to a wondrous digital realm that I had only ever dreamed of.

Over the years, I worked as a private shepherd and gardener during summers to save money. In 2005, I was finally able to purchase my first computer – a Pentium 4 with 128 MB of RAM – for $700. I was overjoyed to finally have a computer of my own. After saying a tearful goodbye to my grandfather’s sheep, I quit my job and became a full-time developer.

My cousin, who was a computer software engineering student at the time, suggested that I learn C after mastering the BASIC programming language. (It makes sense that C would come after B, doesn’t it?) So, I went on a search and finally found the perfect book: Deitel & Deitel C++ How to Program 2nd edition (I totally get it! it’s not C, please know that I had no other choice!). And the journey begins with C++.

As time passed, I found myself occupied with writing simple programs on my supercomputer. While attending school, I noticed that everything was still being done using paper-based methods. It got me thinking; how could I utilize my knowledge to make some money? The answer came to me when I developed a program that calculated students’ GPA. After negotiating with the school manager, I was granted access to the school’s supercomputer – a Pentium 3 with the DOS operating system and old Turbo C. Eventually, I created my first commercial application.

However, when the final semester arrived, I realized how much my friends cared about their GPA results. I didn’t want to take advantage of their emotions, so I allowed them to use my application for free. Even though it wasn’t a commercial success, I was content. I had created something meaningful that made people’s lives easier (within the context of my school). Looking back, I can consider it my first open-source effort.

Although software development was my greatest hobby, it wasn’t enough for me. I’ve always been curious about how computers work and what’s going on inside that black box. However, I wasn’t brave enough to open my $700 computer and see what was going on under the hood. Fortunately, there were some recycling centers around our village. Most of them contained hospital and factory chemical waste that were too dangerous to touch. But my curiosity was much higher than the risks. If I was trying to ask my parents for help, the only result was a big NO!

So, I turned to my cousin who was the same age as me. We made a plan to go to the recycling center every day after school instead of going back home. We explored anything that we thought might be related to computer parts. It took us a month, but during that time I secretly opened the school PC to investigate its innards. Then we went to the recycling centers to search for similar parts among a lot of stinking waste. We deposited all the parts we found in one of the rooms of my granddaddy’s house that was abandoned and I used it as my garage. It filled up with a couple of dirty SDIMM RAM, some graphic cards, power supplies, a 14” monitor with a lot of bird droppings on it, and big boards that I finally understood were called motherboards.

Over the summer, I tried to recreate something I remembered from my school computer. I had a bit of a puzzle to solve as I wasn’t entirely sure what each part was doing, but I worked hard to put everything in place inside the motherboard. Finally, my Frankenstein Monster was built and it was time to test it out! I came across a label on the board that read “PWR” near a pin header and I thought to myself, “This must be the power button!” With a screwdriver in hand, I connected the pins and to my amazement, there was a single beep, and the monitor turned on! I got a brand old! computer without spending a single penny.

At the end of the summer, I built six 486 PCs each with 16 MB of memory (of course none of them had a case). A complete computer lab to prepare me to dive into the world of hardware. The whole experience left such a positive impact on me that I decided to pursue a career as a hardware engineer.

Making such a decision was not a walk in the park for me, especially at that time in my country. There was a huge wall blocking my way, which we referred to as Konkour – the Iranian University Entrance Exam. A 4-hour exam that we have to study one year for. I had to compete with 900,000 students from all over the country for only 100,000 vacant seats in universities. It means that my chance of getting accepted was just 1 in 9, which made me quite nervous. To make matters worse, I had to compete with other students who were trained in private schools with good teachers, while most of the teachers in my school were inadequate and lacked a proper understanding of what they were teaching. The positive point was that my dad could help me in mathematics and physics. But for other courses, I had to rely on myself.

Because of the difficulties of the exam, most of my classmates left school to start their blue-collar jobs, but I decided to become an engineer. I locked up the computer lab and packed up my PC. The only thing left for me was the Daitel & Daitel C++ book.

So, for a whole year, I was dedicated to studying for 10 to 12 hours every day to become a hardware engineer. I didn’t use my computer or have any other hobbies; it was all about achieving my dream. But when the exam day finally arrived, I was devastated to find out that I failed despite feeling prepared. It turns out that I had made a simple mistake on the answer sheet. It was a tough pill to swallow after working so hard for an entire year.

But I started studying again the day after my exam. Just like before, I studied for 12 hours a day to reach my goal. I couldn’t accept failing the exam. I had no choice but to either pass the exam or go back to my previous job as a shepherd. Finally, another full year passed with my computer sitting in a corner of my room and my C++ book on my table, as I worked towards becoming a hardware engineer.

This time I passed the exam. I was accepted into Babol University of Technology (BNUT), one of the top 3 industrial universities in IRAN, and I officially became a hardware engineering student. I opened my computer lab doors again and the journey began.

Presentations

Drop the docs and embrace the model with Gaphor Fosdem '24 - Frank Van Bever 20 March, 2024 Read more
How to update your Yocto layer for embedded systems? ER '23 -Charles-Antoine Couret 28 September, 2023 Read more
Tracking vulnerabilities with Buildroot & Yocto EOSS23 conference - Arnout Vandecapelle 12 July, 2023 Read more
Lua for the lazy C developer Fosdem '23 - Frank Van Bever 5 February, 2023 Read more
Exploring a Swedish smart home hub Fosdem '23 - Hannah Kiekens 4 February, 2023 Read more
prplMesh An Open-source Implementation of the Wi-Fi Alliance® Multi-AP (Arnout Vandecappelle) 25 October, 2018 Read more

 

News