In fact, I have long wanted to write this article, and I have always wanted to remember myself. Five years ago, I used the press Key Ranger (A vbs engine) to write scripts. I also need to thank pig for programming, he brought me into the programming field (sadly, no one in the QQ list can be found now, pig hope you can see this article Article Contact me later ). Five years ago, I purchased a book about getting started with vc6 and vs2005 (like this version). I plan to start learning C ++ (these two books are currently in the hands of a girl ). Then I started a long c ++ learning journey. I remember that I was learning the C ++ syntax, while writing a keyboard doll (fortunately, this product can still be searched), let's take a look at the interesting section below. Code .
We can see how immature I was at that time. I packed a function into a class and added a comment (very simple and practical) with joy.-_-|
Next are two strange functions.
Let's look at the two variables m_hdebugwnd and m_hcodewnd. In principle, these two variables should be global variables. Why is m defined? (I also learned that m is the abbreviation of member when I entered the customer.-_-| Do not spray me ), I may have seen this in other people's code, so I just painted it. There are many files with just a few lines of code and two or three functions, which will not be listed here.
Then there is a switch, first look at the code
In my current style, it must be an enum. Otherwise, the caller also needs to change the definition (probably for VB at that time, so I didn't do that anymore :)).
The image search module is written with a description. To effectively implement a searchAlgorithmI bought one.
However, sadly, I am still at the entry stage, and I just read the matching part of the template. It wasn't until a few months ago that the boss asked me to make a rectangle correction for something like a business card. I finally read this book again, although it was finally aborted-_-|
At the same time, I saw that the data structure is very important on the Internet, so I also bought one.
But for a programmer who has never learned programming, I didn't know what language it was talking about when I bought it. After I bought it, I found that it was a Pascal version, it crashed at that time... (Although I have used Delphi before, but I have never used it to write thousands of lines of code, and then I abandoned it ).
At that time, I even wrote a driver by myself to make the keyboard and mouse simulation work Np (nprotect was a great thing at that time, at that time, it was definitely a huge challenge for me. I didn't know where I threw the materials I read at the time. To tell the truth, the driver is actually not complicated. Just write it according to its API and framework, however, at that time, it was quite painful that blue screens were often used during debugging. At last, I even engaged in a virtual machine for special debugging. The strange thing was that the broken machine ran the virtual machine instead of being stuck.
Here there are two functions that are very familiar with. They are switched from ring3 to ring0 and switched back. Similar code is also included in the Code for writing the OS later. Some of the Code does not translate the information, so I can't understand it anymore :)
There are some code for reading and writing memory and hiding processes in the driver. Hiding a process is actually very simple. You only need to remove the process from the linked list, the read/write memory needs to be switched to ring0 (because NP exists ).
Finally, in order to support custom windows, I also made a window editor for him.
Nice, huh: Let's take a look at its help documentation below. It's still very good.
In fact, this is the first version of the keyboard doll.
It already has so many modules
Of course, I also made some websites and other things for the keyboard doll. If I remember correctly, the keyboard doll was supposed to be made in. At that time, during the Olympic Games, I even matched him with a bunch of Fuwa icons. After that, I remember that I had discussed it with the author of the press-and-click Ranger to develop my own engine, but it was hard to figure out that I was alone from the beginning to the end (it is said that he seemed to have taken a child ), people are not professional programmers after all. Now we have the first qlanguage version. At that time, I named it es. (Easy to study)Language. For me who have never learned how to compile, everything is hand-written. At that time, both lexical analysis and syntax analysis were combined, and the code was a mess. I remember correctly, but when I was in the third and freshman year of Nanhu, it was really simple and easy to get into college, at that time, I joined the Science and Technology Institute with 211 yuan (the name is very domineering ~ Also, do not despise me. The full score for the college entrance examination for three school students is 300. I am still the highest in our class !).
After that, I started my college life. Of course, my college life was quite boring. Sadly, I only went to the library once in three years, and I went to coach others that time. Other times are playing games in the form of degradation (of course, sometimes coding is written when you are bored, provided that the dormitory is very quiet, and it is estimated that only when no one is there ), in fact, during this period, I spent most of my time writing qlanguage when I got home on weekends. From freshman to sophomore year, I made two versions of qlanguage. The first version was completely handwritten, handwritten lexer and handwritten parser. I saw it halfway through this version. Vczh's blog learned from his blog that he had the course compilation principles, so I bought the following book.
After reading this book, I had the qlanguage Of the second version. At that time, I instantly felt that the code was written in a more structured way, but such books were more theoretical, there are some algorithms but few implementation code in it, so I will look for the code on the Internet (in fact, this book is the most frequently I have translated so far ). Let's look at the code at the time.
At that time, the encoding style was quite bad. There were random spaces and no spaces. We will not talk about it here. At the time of my completion, I ushered in another turning point in my life. I had an internship when I was a junior. At that time, I was crazy about submitting my resume. I was lucky to see a friend who was interested in submitting his resume to me, that is, my current company (I have been to another company in the past three months, and the boss is the same, but there are not enough people to help me ), this company is also closest to my home. At that time, I carried my resume, so I learned what encoding specifications and what the readable code should be, although some qlanguage code is still not written in accordance with the standards, I think it should not be too bad. In fact, there was still an episode in my junior year. At that time, I had a crush on my sister for a long time and decided not to contact me again. Then I made up my mind to do a good job of qlanguage, this provides a stable second version of qlanguage with rich functions.
I remember I was a hairy boy when I first joined the customer. I didn't know how well I was. I always felt that others' code was not as good as mine. However, as time went by, I finally turned to my final internship. The original arrogance no longer exists. I have worked on PHP, office plugin, IOS, Android, and researcher. The most complex one is Image Correction, it is said that the Quadrilateral enclosed by the business card should be corrected as a normal rectangle, and the difficulty is to find these four sides. Aside from questions, I felt very happy when I was a guest, not only because I met a new girl, but also because I had a bunch of friends who could talk to me, you can drag games, programming, and other things from the east to the west to the universe.-_-| however, I think hackers are more like a school (when I first went in, I did it. educational software, maybe the boss's idea is from this ). But now I am looking at the resignation of one employee and the resignation of the employee will inevitably have a slight sadness in my heart. However, I feel the most sorry for a colleague. I said I would like to come over, the boss gave him away.
Finally, I have finished writing this article. In fact, I have read a lot of books. Here I will simply list them.
you still have time to read
although these books are not the most classic ones, when you finish reading them all, work is not a problem either.
at last, I found that it is not easy to find the previous Code. Therefore, I want to create a file and directory management tool. The specific implementation scheme is being drafted. There may be some omissions in the middle of this article. I will try again later. In fact, there is no end to this path. Humans have invented computers and programming languages to simplify all kinds of work, with this purpose, I will develop more simple and practical tools to simplify my work and life.