The first job configuration process personal project development environment

First, the use of a programming language, select the language of reason analysis, programming experience (historical amount of code, etc.)

Now I use the programming language is c ++.

C ++ was chosen because freshman needs a programming language elective courses, there is above c program design and c ++ object-oriented programming two classes, then I think the name of the latter relatively tall and c ++ c is certainly worse than before Yes, otherwise how can there ++. Facts have proved that my idea is right, c ++ c is indeed difficult to learn than many, many, especially for the freshmen no programming basis. Completing its first year that, in the subsequent calculations Physics, chosen resolutely on Numerical Analysis Course python. After senior thesis finished, I began to think, after all, is a python scripting language, c ++ in which high-level language, processing speed is the fastest, stable operation; and in the design and performance of the class hierarchy, c ++ language very flexible, very powerful. c ++ syntax is very strict, precise and several physics and chemistry, the standard definition is very detailed, structured thinking grammar, echoes, grammatical structure is explicit and unambiguous.

After completing the complete set up to now, I contacted most of the programming language is c ++, but because of the time more fragmented, so there is little project experience, the main stay on the primary syntax based data structures and algorithms, c ++, and yet in-depth learn how to develop the project. Programming experience is mainly reflected in the work of some programming courses, as well as algorithms questions leetcode, most of basis for comparison, but basically able to master debugging, retrieval errors and warnings, the general design of c ++ program, the history of the code amount forecast in the 4000-5000 line . At present, I would learn C ++ as the main direction, will PYTHON as a supplementary tool.

Second, the use of an integrated development environment, and compare the pros and cons of similar environment

I am using the integrated development environment is CLion, CLion is Jetbrains company's launch of a new development designed for C / C ++ designed for cross-platform IDE, which is based on Java IDE IntelliJ IDEA is based on the design, but also includes many intelligent features to improve developer productivity, such as intelligent code can be reconstructed, such as renaming, extract class, extraction and other functions.

Because before I was only on the windows platform visual studio and wrote c ++ Eclipse-based Eclipse CDT Project program, and now for the macOS system, no way can only select a new IDE, and now the CLion development is also very good, more and more developers choose jetbrains family bucket. As a student, junior year and close to many of my classmates PyCharm as the python IDE, the user experience is very good, so in the end I chose the same company's CLion, it does c ++ development on Mac OS is the most appropriate . And other more development environment, then, Visual Studio is the best choice under Windows, and Eclipse CDT relatively bug more, debugging and more trouble, both in completion, but the reconstruction than functional CLion; on the Edit function in particular code hinting and search JetBrains products and an order of magnitude difference. CLion has a very good IntelliSense function, automatic folding, highlighting, auto-completion, type inference is good; very convenient debugging features, can automatically resolve STL container; and cross-platform support for CMake / gcc / clang / mingw / cygwin / gdb. But CLion and PyCharm are eating the same memory; development and does not support remote debugging, testing framework support; in dealing with large projects, CLion the performance of VS is not so well on Windows.

Third, the use of version control tools and platforms, and integration of integrated development environment analysis, basic operations introduced, given the link code repository and user name to give a sample project has recorded multiple submissions.

(1) the use of version control tools and platforms, and integration of integrated development environment analysis, basic operations introduced, given the link code repository and user name, given several times a project submitted by the example of a recording.

(2) the version control tools currently used to git ( https://git-scm.com ), code version control platform for the cloud ( https://gitee.com ), (integrated development environment analysis and integration)

(3) describes the basic operations:

git init: In the instruction execute a file directory, the directory will quickly disposed of Git code repository.

git clone: ​​clone project from a remote server, will create a code repository.

git add file name or git add:. add files to the repository

git commit -m "Here is a comment": will add files add comments and submit to the code repository

git rm ReadMe.txt (filename): Delete Files

git stash: Scratch

keygen -t rsa -C-SSH  [email protected] : Creating SSH private and public keys, id_rsa private key is used to verify their identity. id_rsa.pub public key is used to identify themselves to the server.

git remote add: the code will be submitted to the local library to the remote repository

git push -u origin master: the local master branch submitted to the remote master branch, and associates.

git clone git Address: clone down from a remote repository, create a local repository.

(4) Repository link :( https://gitee.com/li_shao_nan/projects ) and user name: li_shao_nan, gives an example of a project has multiple submissions of record

Four, unit testing framework used, the frame having the characteristics described in unit testing, unit testing a given sample.

Unit testing framework used for Google Test (referred to gtest), is a testing framework by the Google's technology team developed the test, compatible with Linux, Windows and macOS, gtest c ++ code that supports multiple types of tests, including unit testing.

Test unit (Unit Test) is the basic unit of software (e.g., a function or class method) tests conducted before the entire operation of the project, a small piece of code developers to write and test code means for checking a small , very clear function correctly. In gtest in a test (test case) may comprise one or more tests. A test program can contain multiple test cases.

(1) First, define the test function: Use TEST () macro to declare test function:

TEST(GlobalConfigurationTest, configurationDataTest) 

(2) whether to check by asserting the condition is true, the assertion including basic, binary comparison, string comparison and the like;

ASSERT_ * version assertion failure will produce a fatal failure, and end the current function;

Failure to produce non-lethal version of EXPECT_ * assertion failure, but does not abort the current function.

Fifth, feelings and experiences

Because of the macOS Clion platform build environment and are not familiar with, not well prepared in advance, resulting in failed to achieve the git version control, and Google test unit testing. In the follow-up study will continue to achieve the above functions.

Guess you like

Origin www.cnblogs.com/lsn1024/p/11680792.html