Summary of personal work and life in June 2023

This article is a summary of work and life in June 2023.

R&D coding

Shell

Decompress multiple .zipfiles with one command.

find . -name '*.zip' -exec unzip {} \;

ls *.zip | xargs -n1 unzip -o  # 用ls可指定某些条件

One command to compress a subdirectory:

ls -F | grep '/$' | awk -F '/'  '{print $1".tar.gz"}''{print $1"/"}' | xargs -n2 tar czf

Qt

During compilation, I found that different versions have different tolerances for grammatical errors. There is a function in a certain project whose main function is to save h264 files, but it is only used for testing and has not been called. The return value of this function is QByteArray, but in the internal error handling conditional statement, it returns false. But qtcreatorthere was no error when compiling in the virtual machine. When compiling on a certain arm architecture machine, an error was reported. The behavior of the two is very strange. Since it is only responsible for compilation, the modified places are only saved locally.

In the Qt pro file, you can set VERSIONthe display version number. To reuse this value, you can define a macro for use in the code:

xxx.pro文件
VERSION = 1.0
DEFINES += APP_VERSION=\\\"$$VERSION\\\"

初始代代码:
	QString tittle = "Qt Capture Server SC510 N1 ";
    tittle += APP_VERSION;
    this->setWindowTitle(tittle);

Go

In the json format in golang, you need to pay attention to whether there are spaces. Example:

type DateTimeKeyValue_t struct {
	Year    int    `json: "Year"`
	Name    string `json:"name"`
}

Note that there are spaces in the json string to the right of the first field Year, and the following prompt will appear:

struct field tag `json: "Year"` not compatible with reflect.StructTag.Get: bad syntax for struct tag value

Removing the spaces solves the problem.

Golang reads a certain total quantity, and the corresponding variable is set to var Num sql.NullInt64, but if the quantity is very large and the obtained result uses scientific notation, it will become a float64 type, and the conversion error occurs, so it needs to be used var Num sql.NullFloat64. Error log:

scan error:  sql: Scan error on column index 2, name "NUM": converting driver.Value type float64 ("2.55377e+06") to a int64: invalid syntax

think

Involves the development of front-end and back-end multi-system interfaces.

First make the first version of the interface. If there is no data in the early stage, you can make fake data. The purpose is to test the communication and display of the interface and complete the entire path.

Work record

running account

In addition to writing code this month, I also participated in some meetings and wrote some plans. To be honest, I don't like these things very much. On the one hand, I am not good at it. On the other hand, I am not familiar with many related businesses. The plans I write are not professional enough, and the answers to the owners' questions are not clear enough.
Things have been extremely complicated these past few months. In addition to the things mentioned above, there are also routine tasks to complete the assault; help solve several online problems that are not my responsibility; solve an error problem on the ARM64 system (the same code, everything works fine on x64); solve the problem of porting to A certain QT compilation problem on the ARM platform; starting the transplantation of the Loongson system.

Another highlight is the development of the map, from the definition of the interface to the testing of the details of the front-end page, we are involved in the entire process. Because other people have little experience and lack of initiative, it seems that the project has nothing to do with them. Once there is a problem with the project, the leader is self-centered. Due to identity issues, he cannot say much, so he does everything himself. For example, a page is based on curves, with numerical values ​​and percentages. After implementation, the effect is very abstract, with no priority or obvious difference. For example, some text is written in long paragraphs without considering the user's feelings. For example, some interfaces were deployed without testing, and the deployment was not tested again. What's even more troublesome is that one thing was explained twice, but no feedback was received for several days. When asked, it was not done, and it was explained again.

It's really nice to work with people who have strong abilities and good attitudes. I haven't found any good prospects among the newcomers yet. I am willing to teach, but I also need the other person to be willing to learn. After all, people are different. After I wash the dishes at night, I have to stay up late writing code, but there are many people who get off work on time and go hiking on the weekend.

It has been reported from some quarters that the outsourcing staff of another company in the same office already have provident fund and meal subsidies. That person who has two advanced certificates for soft exams, supports his whole family with one salary, and humbly teaches others, just blames injustice in his heart late at night, that's all.

Worked overtime once

Generally speaking, I don’t consider working overtime on my own matters because I basically take my computer home every day.

One Saturday evening while I was cooking, my colleague called me and there was an online problem. It was probably because there was something wrong with nginx and the data couldn't be uploaded. Because I'm responsible for the client side of the transmission, but there's nothing I can do about it because the bottleneck is on the receiving side. At around 9 o'clock in the evening, the leader called the station to help solve the problem, but he had no choice but to go. In fact, I couldn't do much there. My operation and maintenance colleagues found the logs for me and looked at the code. The conclusion is that the current mechanism cannot be solved on the client side. By 1:30 I was so sleepy that I went back. The operation and maintenance colleagues continued to work on it, because the solution was to manually limit the flow and let the data be uploaded slowly.

Enlightenment

It seems that once things fall on you, there is a constant backlog.

The year I joined the company, because the code required a testing environment, by chance, I found a server to deploy it, and by the way, I also deployed other services involved in the code, and then various databases (up to now, as far as databases are concerned, an oracle has been deployed) , several mysql (same version, different versions), TiDB, Redis). Later, due to organizational adjustments, there were fewer people, so we took over several projects and are currently maintaining them. Later, he joined a new project team and developed 2 subsystems. Later it also involved the development of maps. Later, we started to replace it with localization. Originally I was doing development, but it seemed that I was responsible for helping others install various libraries and software, and was also responsible for the configuration and pilot testing of various adapted code projects.

Technical constraints

For some reason, I always feel sleep deprived and fatigued this year, especially after catching a cold last month. In addition, I am older and my thinking is not flexible enough. For some technologies that have not been accumulated, unless necessary, they will generally not be touched automatically. For example, the map project has a Java subsystem that uses an open source mature framework. It looks good, but recent business technical issues are very troublesome and time-consuming to solve. On the one hand, developers are not familiar with mature framework code, and on the other hand, the method of solving problems is wrong. Because I have never been engaged in Java development, I have certain opinions on its coding style. In addition, half of the developers in the department are Java, so I will no longer join in the fun. This project has also deepened some prejudices.

life record

Sledgehammer is a very picky eater. He only eats lettuce and cabbage. He eats little else and eats less meat. He doesn't eat shrimp. In this aspect, he is completely opposite to Daniu. Force him to eat and cry. What's wrong with Sledgehammer? It's always quarreling. I can tolerate some words but pretend I can't hear them. But after too much, it becomes unbearable. If you don't move, you will determine your future life based on your own imaginary consequences. For example, on Saturday, Sledgehammer coughed a few times and kept emphasizing that he would take leave on Monday. If Sledgehammer doesn't eat, he emphasizes not to eat again. If Sledgehammer wakes up a little later in the morning, he emphasizes not to go to school in the future. One day I couldn't help but say those words, and I couldn't help but lament the influence of the environment.

Ideology

I spent most of the day this month watching a few episodes of TVB’s Taiwan Festival in the 1990s on Station B. I feel lucky to have been born and raised in that era. But when I was a kid and a student, I didn’t chase stars. Many years later, I found out who the singer of the song I listened to was. Watching it now, it’s more of a memory. Memories are a strange thing. I always think about the beautiful moments at that time, and want to go back and do it all over again in another way. However, if you really go back to the past, you will feel lost and melancholy, because that time is no longer the time.

I have been talking less and less recently. There is no need to talk about work matters to people who have not interacted with me, and there is no need to talk to people outside the company. In the company, there is no sharing of personal life. When I got home, I didn't want to talk about anything except the children. I swept the floor when it was dirty and wiped it when it was wet.

amateur reading

I plan to spend a long period of time focusing on understanding the literature of the Pre-Qin era. I have listened to some ancient Chinese videos, watched part of "Warring States Policy", and plan to watch "Zuo Zhuan". Studying classics does not mean respecting the past at the expense of the present. We cannot think that everything in ancient times was good—and certainly we cannot think that everything in contemporary times is good. I feel that reading "Historical Records" does not affect my writing code, and vice versa.

Amateur research

おすすめ

転載: blog.csdn.net/subfate/article/details/131484761