How I Learned to Program

TL;DR

I learned to program (and I continue to learn) by writing programs. I started off coping programs from books and magazines and making changes. I set out to solve problems with software, which helped me develop skills over a long time. Also, I didn’t do anything alone. A lot of people gave me their time, gave me access to resources and computers, and gave me a chance. At the end of this story, I will leave you with some takeaways and steps that mattered to me.

A Place to Start

My first experience with a personal computer happened at 5 years old in 1982 with a Timex Sinclair TS1000. I remember watching my dad load software from cassette tapes and then be able to repeat those steps on my own to load up games. My first exposure to programming happened at K-Mart. K-Mart is a store like our modern-day Walmart and Target. Back then, we had a bunch of big-box stores in the Pittsburgh, PA area such as Hills, K-Mart, and Ames. They all sold computers. On one of the shopping trips, my dad stopped in front of a Commodore 64 display. Much like you see at an Apple store today, back then K-Mart had a section of computers hooked up to screens so you could try them out. My dad typed out a basic program.


10 PRINT "HANS"
20 GOTO 10
RUN

I thought my dad was a wizard. He typed a few lines of text and caused the computer to do something. I wanted to learn as much as I could from that point going forward.

My dad’s program turned out to be a BASIC program. BASIC is a programming language and most of the computing devices had some way to write BASIC programs back in the 80s. Line 10 told the computer to print out the word “Hans”. Line 20 told the computer to go back to line 10. This is also why I commonly misspell “go to” as goto. And, RUN told the computer to execute the program.

We had an Atari 2600 and I traded a few cartridges to get the BASIC Programming cartridge: Computer Programing Made Easy! Far from easy, but I started to learn the basics, so to speak.

Atari BASIC Programming Cartridge

From the Atari, I got access to a Commodore 64 at a friend’s house. At school, I got access to Apple II computers. The librarian at the school, Ms. Archer, noticed my interest. She told me about the books and magazines that the school library had about programming. There were only two students interested in programming back then so she allowed us to take home some of the books and magazines. The most impactful book at the time was A Guide to Programming in Applesoft. This book helped me learn everything from making graphics to how to save new programs to a floppy disk.

The way that I learned was by writing out the programs in the books and magazines. Some of them took me hours to type out on the computer. During this copying process (akin to forking a repo on GitHub in the modern era), I learned the commands and syntax of programming. In class, I daydreamed of new programs and wrote them out in my notebook. I recently found some note pages from my 8-year-old self.

Written out BASIC program

I was heavily influenced by the movie Wargames, so I wrote my own start-up program for my Apple II. My favorite line: GET LOST, YOU HAVE ACCESSED THE SELF-DESTRUT (sic) MODE. TURN OFF COMPUTER NOW!

Games

I really wanted to make games. I didn’t play many games, but I made a connection between me buying software and someone making money off the game. I really wanted to want to create something people would want to buy. My brother and I had a recycling business as kids. We collected aluminum cans, recycled, them and reinvested the money into computer parts, software, toys, and games. And, if I am honest with myself, I wanted to see my name in lights. All of my software had load screens with my name as the largest text. HANS SCHARLER software!!!

HANS SCHARLER loading screen

Games are not easy to program. Computer games rely a lot on text and drawing pixels on the screen. You had to know about graphics, logic, state, and peripherals. I didn’t know much about how to create games, but I brute-forced my way through it. With whatever new function that I learned, I would apply it in a non-scalable way. I used to draw out the screens by hand using graph paper. I can’t imagine how much time I spent doing this over my formidable years.

PING PONG loading screen with code

I didn’t make any great games, but I did learn a lot. I loved the process. If I was being measured by how much money, I made off of this work, I would have been a failure by any accounting. It took almost 40 years, in 2020, John Fluet and I released one of my games to Steam.

“Hero” was my most ambitious project. I spent hours, days, weeks drawing the art for the game and encoding them in BASIC. Admittedly, Hero was strongly based on the Hero Quest board game.

Hero computer game graphics

Going Next Level

College introduced me to all kinds of things: coffee, people of varying skill, new computers, the Internet, websites, and new programming languages. I had to learn C as a freshman. I built a matric solver as my final project. I also had to make an application in MATLAB. I remember spending $30 on a MATLAB book. I would say this turned out to be a good investment on my part.

My career got kicked off with an internship at S.P. McCarl and Company. I wrote software for their machining systems and designed their first website back in 1996. This summer internship gave me my early ideas about software for machines and the web. I was really lucky to get a job like this. I was selected because I didn’t have any absentee days at school. Back then, local companies used to work closely with someone at the college to place students into internships. I didn’t have a resume or any marketable skill at this point. McCarl’s only requirement was dependability. The school’s career counselor thought of me. Everyone needs a break.

The Web and Perl

In 1996, I discovered Perl. Perl is a programming language created by Larry Wall. This plucky language took off in popularity when the book, CGI Programming on the World Wide Web, was released in 1996. I loved what I learned by creating web pages during my internship and I was convinced that software was going to be delivered through the Netscape web browser. To make a web application, you had to know two domains: the front-end (web browser – HTML, CSS, and JavaScript), the back-end (server with your logic). Perl and CGI were the first languages that connected the worlds together and made web applications possible. Now, there are hundreds of web application frameworks. I owe a lot of my career to Perl and Larry Wall’s influence on server software. I became a donor to The Perl Foundation as soon I started making any money. I got to meet Larry Wall at Perl events and also get to have dinner with him. During that dinner, I asked him to sign my Perl book, the pink Perl book with the camel on the cover. I handed him the book and a pen. He took the book and flipped through the pages. He reached under the table and produced a briefcase. In this case, he had the original stamp pad from his O’Reilly book tour featuring the camel clipart used on the book’s cover. He signed and stamped my book and told me, “there’s more than one way to do it.”

Iron Sharpens Iron

My childhood friend and future business partner, Jason Winters, and I became fast friends. He was the other student who the teachers told me about. Jason had the same passion for programming and I learned a lot from him. I remember looking forward to every Monday to see what he made over the weekend. We used to push each other. I wanted to do cool things as he did, so I tried harder and worked longer. We graduated together, went to Penn State together, had a co-op together, and started an Internet of Things company together. After working together for 30 years building hardware and software, we joined MathWorks together in 2014. I have been there ever since. Here are photos of us at MathWorks and with Cleve Moler, the creator of MATLAB.

Takeaways

I got very lucky so far in my career. I had a knack for being in the right place at the right time… as it seems. I make sure to give back as much as possible. I spend time on online communities helping people with programming questions. I donate money to software foundations and encourage corporations to sponsor software foundations.

So, if you are looking for a process, I will try to summarized a few steps:

  1. Start copying. Find a project on GitHub. Find some code. Read through it. Re-create it. Rewrite it. You are going to learn a lot from copying.
  2. Break hard things down. If things get too hard, break down the challenge into something smaller until you can do that thing. Meaning, you are not going to make Call of Duty by yourself, but you could learn to make a mod of the game.
  3. Join online communities. Find the places on the web like MATLAB Central, Discord, GitHub, and others where people doing what you are doing are gathering. Ask questions as you learn. Answers questions while you are there. Find a way to give back.
  4. Connect with others who are on the same journey as you. I was fortunate to have Jason in my life. I also talked about programming and computers a lot. This attracted others that were interested or wanted to help. I used to spend a lot of time in the computer lab. This was noticed by teachers.
  5. Spend the time. It takes time. You may not think you have any time, but you most likely do have the time. One hour a day turns into 7 hours a week and 28 hours a month and 336 hours a year.
  6. Find videos on YouTube and TikTok. You can start learning by watching videos. Once you want to learn a specific language, by a class on Udemy. I still take a Udemy class once or twice a year on new frameworks. The courses cost less than $15 as they always on sale. There are other places for low-cost training, but it is good value for your money.
  7. Be okay with failing. You have to try a lot of different things. You don’t know what part of the project that failed will carry over into future ones. Share your failures with others. Answers what could have gone better.
  8. Give back. Share what you have learned. Donate to code and money to projects that helped you build something.
  9. Acknowledge others. My dad, Ms. Archer, Mr. Gearhart, Shawn McCarl, Larry Wall, Jason Winters, Robert Blackwell, Josh Jo, Jay Huie, and Steve Struebing are all part of my journey. I didn’t do it alone.

Let me know about your experience. Tell me how others have helped you or how you have helped others. Godspeed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.