Let's use a scripting language for a comfortable C ++ life C ++ implementation after verification with python

I've been prototyping in Python today to see if the algorithm works.

  1. Write your ideas in Python.
  2. Graph the results so that you can see what is going on in one figure. (Spyder integrated environment)
  3. Make sure it works with multiple datasets.
  4. Make sure that another dataset works.
  5. Standardize the writing style with pylint.
  6. Write a documentation comment on the function.
  7. Be aware of the distinction between the basic part of the algorithm and auxiliary functions such as graphing.
  8. Make the basic part of the algorithm a separate module.
  9. Create a class if needed.
  10. Complete design, implementation, documentation comments, and confirmation of execution results in python.
  11. Clarify what needs to be implemented in C ++.
  12. Start development by referring to the python implementation for the part to be implemented in C ++.
  13. If there is C ++ of the module used in python, write it using it (example cv2.imread () → cv :: imread ()).
  14. Make it work even if it is solid.
  15. Implement and modularize (or classify) as it should be.
  16. Implement it as a command line application and test it under multiple conditions.
  17. Add const qualifier to possible arguments. Make data members private, use namespaces, etc.
  18. Write doc comments for use with Doxygen.
  19. Separate into the source code of the library to be incorporated as a module, the header file, and the source code of the main function for the executable file for stand-alone.
  20. Confine functions that do not need to be exposed in an anonymous namespace.
  21. Review the method name, function name, and variable name of the argument so that they are easy to understand as documents, and rename them if necessary.
  22. Write unit tests suitable for your intended use.
  23. For that unit test, improve the module until it passes the test.
  24. Unit tests describe not only normal systems but also abnormal systems.
  25. Incorporate the module after the test is completed into the target program.

In this way, you can verify the effectiveness earlier and then develop than developing in C ++ alone.


Note: If you want to speed up the process

--Manage script version control. --Perform a regression test each time you make a revision to confirm that the calculation results have not deteriorated. --Prepare and test a sufficient number of test samples to confirm that no deterioration has occurred. --Measure the processing time as a Python module. --Do not explicitly write a double loop in the calculation. Use the appropriate function. ――Write a comment that gives a hint as to why the process is being processed, and check the algorithm. --Find and simplify the parts that can be simplified by changing the order of operations. --Reduce the waste of calculation. --Confirm that the processing time is shortened when the waste of calculation is reduced. --Reread the script, keeping in mind the group of meanings that are easy to understand.

I am aware of these.

Recommended Posts

Let's use a scripting language for a comfortable C ++ life C ++ implementation after verification with python
Use a scripting language for a comfortable C ++ life
Let's use a scripting language for a comfortable C ++ life 2 Automatically generate C ++ source
Let's use a scripting language for a comfortable C ++ life 6-How about developing a program as a library for Python?
Use a scripting language for a comfortable C ++ life-OpenCV-Port Python to C ++-
Use a scripting language for a comfortable C ++ life 4-Use your own C ++ library from a scripting language-
Use a scripting language for a comfortable C ++ life 3-Leave graphing to matplotlib-
Use a scripting language for a comfortable C ++ life 5 --Use the Spyder integrated environment to check numerical data-
Wrap C with Cython for use from Python
Wrap C ++ with Cython for use from Python
Solve ABC163 A ~ C with Python
Let's make a GUI with python.
Solve ABC168 A ~ C with Python
Solve ABC162 A ~ C with Python
Solve ABC167 A ~ C with Python
Solve ABC158 A ~ C with Python
Let's make a graph with python! !!
Rock-paper-scissors with Python Let's run on a Windows local server for beginners
Let's make a shiritori game with Python
Use DeepL with python (for dissertation translation)
Let's create a virtual environment for Python
Let's create a free group with Python
[Introduction to Python] Let's use foreach with Python
Let's make a voice slowly with Python
Let's make a simple language with PLY 1
I tried a functional language with Python
Let's make a web framework with Python! (1)
Use C ++ functions from python with pybind11
Let's make a Twitter Bot with Python!
Let's make a web framework with Python! (2)
If you want to make a discord bot with python, let's use a framework
Build a C language development environment with a container
Get a ticket for a theme park with python
Create a LINE BOT with Minette for Python
Try to draw a life curve with python
Use logger with Python for the time being
Procedure for creating a LineBot made with Python
Let's replace UWSC with Python (5) Let's make a Robot
Commands for creating a python3 environment with virtualenv
Let's make a module for Python using SWIG
Challenge AtCoder (ABC) 164 with Python! A ~ C problem
[Python] I want to use only index when looping a list with a for statement
Try to make a Python module in C language
Benchmark for C, Java and Python with prime factorization
Let's call your own C ++ library with Python (Preferences)
[Practice] Make a Watson app with Python! # 1 [Language discrimination]
Build a python environment for each directory with pyenv-virtualenv
Use Python installed with pyenv for PL / Python execution environment
[Let's play with Python] Make a household account book
Try embedding Python in a C ++ program with pybind11
Let's make a simple game with Python 3 and iPhone
Make a breakpoint on the c layer with python
[Introduction to python] A high-speed introduction to Python for busy C ++ programmers
3. Natural language processing with Python 4-1. Analysis for words with KWIC
Building an environment for natural language processing with Python
[For play] Let's make Yubaba a LINE Bot (Python)
Create a Layer for AWS Lambda Python with Docker
Live a Haml life with Django1.8 + Jinja2 + hamlish-jinja (Python3)
[Piyopiyokai # 1] Let's play with Lambda: Creating a Python script
[Super easy] Let's make a LINE BOT with Python.
Programming with your smartphone anywhere! (Recommended for C / Python)