From escaping to becoming a game developer, I didn’t learn programming until I was 40


Although I played computer games as early as elementary school and seemed destined to enter the IT industry, I experienced repeated failures later. This year, when I was in my forties, I finally learned to program. Maybe my experience will make you understand: as long as you want to start, it is never too late. Sometimes, you just need to find the language that suits you.

1. “I don’t want to be a Logo star programmer before being sent to the competition”

My programming career started with the first computer I owned in the 1980s. It is a monster called an ADAM computer, which looks like this:

This is a mixture of a personal computer, a ColecoVision game system, and a typewriter: two tape drives instead of disk drives/cassettes, a TV instead of a monitor, and an interesting printer with a switch on it. Become a complete typewriter. Many other ADAM computer users have actual disk drives, but this one does not. The tape takes a long time to load.

When we first got it, my father recorded a lot of tapes in the basement, but I don’t know why there are so many games. One of my favorite games is called “Gateway to Apshai” (a combat video game), which is a Rogue-like game (a maze-exploring video game). Later he explained that he did it with Forth. Here are his original words:

When we had the Coleco Adam computer, it had a Zilog Z80 CPU, so I used a bit of Forth. I don’t know if you remember, I ordered a tape (for tape drives) from the United States, which contains several hacking programs and a book called “The Hackers Guide to the Adam”. It allows us to download ColecoVision games onto blank tapes, so we get a lot of games. I haven’t written any programs myself, but the programs on the tape are all attached with source code, so you can write them logically. In some cases, I need to adjust the parameters and save again in order to optimize any programs that need to be cracked. This is fun and fun.

The key is that he showed me a language called BASIC. At that time, I thought BASIC was the only programming language in the world. I started to learn this programming language and followed books like “Mystery of Silver Mountain” and “Hunt the Wumpus”, and quickly learned how to program. I started to follow Steve Jackson’s “Witchcraft! “(Sorcery!) This book makes my own small RPG game.

They end up like a larger version of the following code copied from Wikipedia, which contains a lot of RAND dice and GOTO calls. Over time, I had to add finer and finer line numbers (for example, I added a 65 line between 60 and 70 lines, then 64 lines, and finally when I ran out of space, I had to give the whole paragraph Code renumbering).

  1. 10 INPUT “What is your name: “; U$
  2. 30 INPUT “How many stars do you want: “; N
  3. 40 S$ = “”
  4. 50 FOR I = 1 TO N
  5. 60 S$ = S$ + “*”
  6. 70 NEXT I
  7. 80 PRINT S$
  8. 90 INPUT “Do you want more stars? “; A$
  9. 100 IF LEN(A$) = 0 THEN GOTO 90
  10. 110 A$ = LEFT$(A$, 1)
  11. 120 IF A$ = “Y” OR A$ = “y” THEN GOTO 30
  12. 130 PRINT “Goodbye “; U$
  13. 140 END

Copy code

All these codes are done by myself. At that time, people could not search the sample code on the Internet, so everyone thought I was destined to be in the IT industry.

At the same time, we learned something called Logo in school. This is not so interesting, all you need to do is make a turtle draw a shape on the screen. You can give it a function, such as FD 90, RT 90, and use REPEAT 4, and it will repeat four times to draw a square. It takes a long time to draw a circle because you have to give REPEAT 360 and watch the turtle repeat 360 times to draw a circle. So sometimes you can cheat, execute REPEAR 180, make the turtle 2 degrees to the right at a time, so that the computer will eventually draw almost the same thing, but only need to perform 180 calculations.

To add fun, you can do a shape like the following, tell it to make a circle, then tell it to turn a little to the right, and then start the next circle.

Before seeing this video by Bryan Cantrill, I almost completely forgot that I used the Logo. Cantrill is about the same age as me, and I learned Logo when I was young. Our experience is also very similar: completely absent from the matter of making the turtles circle, but he was lucky enough to encounter the C language and really invested in programming, but I did not. This is my own reason.

In a computer class in the 1980s, we all sat in a windowless room in the Calgary Ranchlands Community School, facing the computer to make the turtles circle. Because Logo is so easy to use, I and a few others feel that it is not like a programming language at all. The teachers noticed this and said that the Logo competition was about to be held and we should participate in it. It should be a city-wide game, or it may be a provincial-level game.

The competition lasted for two or three days, and we finally worked out a product on the last day, which was recognized by the judges and is expected to win. My teammates were more engaged than me, but I began to show a lack of interest in the game. I think we can get fourth or fifth place, but the teammates are not satisfied. So when the game ended, I was relieved. I know that I don’t want to program, and I don’t want to be sent to participate in other competitions as a star programmer after winning the competition.

My goal in life was to make the girl I had a crush on in elementary school like me. Also at the time, people thought that people who knew computers were nerds. So at that time, I would keep a certain distance from the computer in public to maintain this image: Yes, I am very good at computers, but I am not a computer enthusiast or anything else.

After watching the Logo-Proficient competition for two or three days and what they did, we got a T-shirt and a bottle as rewards for participating. This was the last time I used the Logo. At the same time, I continued to use BASIC for a period of time. Until the early 90s, when we replaced the ADAM computer with a 386, BASIC was completely forgotten by me, and I did not plan to spend money to buy a book on programming. book of.

Bryan Cantrill’s first experience with Logo is this:

I think the first language I used was Logo. I recall that this is a child abuse behavior. Logo is terrible! If you look at the Logo entry on Wikipedia now, you will say: “Well, this is good, like an affected Lisp dialect…” But these are all wrong. “Logo is a turtle that can’t do anything. The turtle I’m talking about refers to a triangle on the display of the big head. It can’t do anything. Its magic is like you tell it to “box” (draw a square). It will tell you “I don’t know how to box”.

I remember when I was in the third grade, computer was a compulsory course. I still remember the mechanical and indifferent feeling at the time, because this thing didn’t know how to draw a square, and I didn’t care if you knew how to draw a square. The first time I came into contact with computers was “I don’t care about this at all.”

2. Python, Ruby or Lua?

From the 90s to the 2000s, I didn’t do any programming. However, two important things happened during this time: I became a big fan of “Star Trek: The Next Generation” and “Ultima VII” (Ultima 7).

Data is my favorite character, so I often think about how Dr. Soong made Data and how long it would take us to reach this stage. When I played Genesis VII, I had and still have the same feeling: the world is full of details, and I will continue to play this game even just to chat with people, go to bars, and watch people read.

Therefore, this period is an important period for me to be interested in programming again. Programming is no longer about turtles and frustrating games, but science fiction, movies, fantasy games, music, and everything else that I think is cool and valuable.

At that time, I knew that there was a programming language called C++ that was used to develop games. Maybe one day I could use it to make a game like Data and Genesis VII that looked like an Android robot. This makes me have a certain admiration for C++, but I have no chance with programming.

I moved from Canada to Japan and then to South Korea. One day, I met a Korean-Canadian from Toronto who worked as a programmer in South Korea. As a Korean, he can engage in freelance work without strict employers allowing him to maintain a visa, just sitting at Starbucks all day and programming in two languages: PHP and Python. I know the name PHP, and always thought it was just the name of an electronic bulletin board. He told me that he should give it a try because he could learn new skills quickly and it would also be helpful to my career.

He recommended Python to me and said that we should start with this language first. Very confused when using Python for the first time, with only a few small successes. I remember I read posts about Python 2 and Python 3. These posts are about how Python 2 is better and how Python 3 is forcing everyone to accept it. No matter what this means, I noticed some familiar things, such as print, but the familiar $ is gone, and there is no line number or GOTO. Without the main function, I managed to put some things together, but I really don’t know how to run a program without line numbers and other similar useful things from beginning to end.

At that time, the Internet began to spread, and people would compare and discuss one language with another on the Internet. I noticed that a language called Ruby is more like my style, so I gave it a try. Then I saw a language called Lua, and it felt like it was made for me. I don’t know how to use it, but I believe Lua is what I want. I think Lua is the easiest programming language to learn. If I can learn this language well, I can learn all other programming languages.

A few months later, I met the Korean-Canadian at Starbucks and he asked me how I learned Python. I told him that I think Lua should be a suitable programming language for me, but I can’t give a reason. Obviously I haven’t mastered how to write code. He finally commented: “Well, maybe you don’t have a programming gene.”

For some reason, I stubbornly believe that I have this gene. I taught myself BASIC when I was in elementary school, and I know I have this talent. I just need to really like Lua and learn it well… or should I learn JavaScript? But everyone says that you should learn Python first, although I do prefer Ruby… As a result, I struggled endlessly until I lost interest again.

In the end, I went back to Canada to live for a few years, and programming was not in my consideration at all. From 2011 to 2015, the only thing related to programming was once when I heard that people in the office building next door were all writing C++. They customized SAP for pipelines and other energy projects and made a lot of money.


3. At 40 years old, learning to program for the first time

In 2015, the oil price collapsed, the Calagary economy also collapsed, and our entire team was disbanded. After getting generous compensation for layoffs, I decided to start really learning to write code.

I learned how to write functions, how to create objects, etc., but the self keyword is still confusing, and so is using objects. It’s enough to work harder to solve these problems, but my old problem is committed again:

  • “Python is terrible at making games-it won’t let you make anything like Genesis VII.
  • “Why not try C++? No, that’s too hard! How about C#? Let’s try it.”
  • “Wow, this is so complicated. Still, C# seems like a good choice! Wait, what is this? F#? This language is really cool. Why are all languages ​​not like this?”
  • “F# is great! Why don’t more people use it? Maybe I should finish learning Python…”
  • “Then Python, it’s simple and easy to use! Unless it’s JavaScript. So I can do anything on the browser. Maybe I can start with some browser-based games? It’s time to give it a try…”

Later, the compensation for the layoffs was almost used up, and it was necessary to find a job again. After I got a job, I went to the city to have dinner with my former colleagues. At that time, I met an old friend of mine who I hadn’t seen since the mid-90s. He worked in the finance department and asked what I was doing. I told him I got a new job and started working next week. “Oh, I bet it is programming right! You have always been good at programming.” He said. I replied: “Oh, it’s not programming…I haven’t really done these things for a long time. It’s for project control.”

My memory of this conversation is still fresh, because it makes me think about why I have never learned programming, and no matter from which point of view, it seems that I was destined to learn programming when I was young. But I was busy with other things at the time and didn’t try programming again.

I returned to Korea in 2018. In August of the following year, I submitted my resignation to the company where I was working at that time. There is still a month before my official resignation. I started to think about learning a technology. Maybe this time I really want to learn Python. I can spend a few hours a day, and I will master it well on the last day, and then spend another month or so to find a job. After doing this for a few days, my old problem came back again. “Well, you can take a look at other languages,” I said to myself, “but you have to focus on Python.”

That was the first time I tried Rust. I heard that it is indeed very precise and efficient, but it is difficult to learn, and people who like it will praise it. I am in “Learn X in Y Minutes” (Translator’s Note: a project on GitHub, including a lot of short introductory tutorials, such as algorithms, programming languages, development tools, etc.) and “Rust language “Playground” (the Rust playground) began to learn Rust.

When I started learning Rust, I checked the purpose of the language, and the answer was that it could do almost anything. So I can make something like Genesis VII, or whatever I want. What’s more interesting is that the details of the language and the underlying things of the language did not bore me: I found myself more attracted to it. With my in-depth understanding of this language, I have a lot of nostalgia.

Everything I write is directly converted into binary files, and I can see the internal structure of the computer again. A lot of Rust discussion is about how to optimize the code, which I find very attractive. But this language is very advanced and very safe. If I put my heart and soul into it, it can make almost anything possible (at least to the extent that one language can do this)-this is why my old problems have completely disappeared Up.

Who knows that this kind of code will succeed!

The book “Programming Rust” was too difficult for me when I first read it (on the one hand too many references to C++ and C), so I came back here after reading other books The book, and finally fell in love with it.

However, the most helpful thing for me is streaming video. The first is more than 70 videos made by Javascript developer Brooks Builds. He recorded every step of his reading the Rust Book. Watching others work hard to learn a language that you are also learning will give you a sense of spiritual participation, which is not possible with other types of streaming media. “It’s mit einer deutschen Familie, not mit einem deutsche Familie!” or “Just use into_iter() to compile!” Wait for these moments, you will feel that you are really learning with others (in fact you are studying).

From then on I started to watch Brian Myers, he basically learned Rust by searching for Bing (bing.com). Jon Gjengset I left it to the last one (this is before “Crust of Rust” teaches simpler things), and I also watched the Rust videos of Hello Rust, Ryan Levick, Doug Milford, Tensor Programming, this Rust crash course, dcode Wait for all the videos (not all in order). Another video stream I like is rhymu8354. He is a 25-year-old C++ enthusiast who made a game similar to “Genesis V” and recently started to learn Rust.

Half a year later, I discovered that I had learned to program correctly for the first time in my life. However, there is no secret: it is really the result of a single focused and diligent Bing search.

Since there is only one Surface Go notebook, I must avoid anything with too many plug-ins. But I made some things, such as the Korean Kanji converter (Kanji is the Chinese characters used in South Korea), and the effect is very good. Finally I also compiled a book called “Learn Rust with easy English” (Learn Rust with easy English) The purpose of this textbook is to make it easier for users with a second level of English to learn the language without having to use Rust-related books translated into their national language.

I think the moral of this story is the classic “find what you like, and then keep doing it”. This is not new to me, but it took me so long to find a language that suits me. It makes other languages ​​so easy to read and understand, including C and C++.

I want to make two points: First, change and lack of focus are not always permanent; second, everyone has different personalities, and the simplest language is not necessarily your favorite language.

On the Reddit website, there are often discussions in sections such as /R/LanguageLearning: “I really want to learn (the famous X language), but should I continue to learn simpler Spanish/French, etc., even though I hate it ?” Of course the answer is no-just learn the language you want to learn. This kind of advice is easier to give because natural languages ​​are not as closely related to career development as programming languages. But since programming languages ​​also have many successors, the same advice may be applicable.

Rust is definitely not the kind of language to learn to become a junior programmer in a large team, let alone at the age of 40. However, if you are the kind of person who picks up and puts down programming over and over again, maybe finding the right programming language will make you stick to it.

about the author:

Dave MacLeod, Canadian, lives in Seoul, South Korea. Professional translator, proficient in Korean, Japanese, German, French, and English. Amateur Rust developer.

Original link: https://github.com/Dhghomon/programming_at_40/blob/master/README.md


Translator/Sambodhi
Source: Rust Language Chinese Community
Original: https://mp.weixin.qq.com/s/sMu0Q0e9VY7-FZ8wMuTc7Q

.

Related Posts