I'm currently in my second year as an engineer, but in my first year I actually made a tool from the request "I wish there was such a tool". The tool I created is here. It's the same as it was at that time, so I think there is room for unknown defects and refactoring. For inexperienced people who are thinking of making deliverables from now on How I made the tool while I was inexperienced at that time I thought I'd leave it in this article to let you know. I hope it will help the inexperienced people on the road to development.
From the next section, we will look at each item.
When actually making a tool (deliverable product), decide "what is the goal". It is a good idea to set a deadline.
I wanted to know what kind of csv will be output when the tool is completed, so First, I created csv manually. By doing this, I understood the following.
I don't think it's necessary unless you have a fixed period for creating the tool. However, when it comes to "at work", there are almost no jobs for which the period (delivery date) is not fixed. You may think that it will become.
Some programming languages are suitable for making something. This time I decided to use Python, which was unlikely to make a difference and had qualifications.
Not all users who actually use the distributed tool have an environment in which this tool can be used. You must specify how to prepare the environment so that it can be used by that user, or make it available without preparing the environment. At the time of development, we aimed at the former. (It was later supported so that it can be used even if the environment is unnecessary.)
What I found when I created csv as a trial is dropped as it is as an algorithm of the tool. For example, try to create a CSV based on the following information.
sample.txt
set address "Trust" "192.168.1.103/32" 192.168.1.103 255.255.255.255
set address "Untrust" "200.200.200.200/32" 200.200.200.200 255.255.255.255
~(Omitted)~
set policy id 3 from "Trust" to "Untrust" "192.168.1.103/32" "200.200.200.200/32" "SNMP" permit log
~(Omitted)~
Here's what I found out:
We will use this as an algorithm.
This time I prepared the following.
Environmental preparation is described in here. Also, it will change depending on the language etc., so I will omit it. Development has started here.
I think there are phases that are more advanced than I expected during development, or phases that are not. You can write test code and refactor in the phase when you can afford it, On the other hand, what to do when a phase that is not so comes out Around this time, I felt that it became important for me to work in the future.
Make sure that what you implement according to the algorithm works as expected. If it works as expected, otherwise ... fix it. Addition of algorithm to deal with exceptions that did not work as expected in the operation check It may be necessary to modify the existing algorithm. If you can't fix it properly here, you may see hell (see below).
By correcting the part that did not work as expected in the operation check, the part that worked until now I think that it may not work properly (degration). I have degrated as it is ... If you have test code, you will notice it immediately when you degrease, At worst, you will notice if you are debugging with print etc. It may not be worth the time to write the test code, so the scale of the product you are trying to make, I think it is better to decide whether to write according to the frequency of maintenance. (Unless you want to write test code for the first time)
Regarding refactoring, I did it based on Read the readable code. It was very helpful for me to name the function and make it a highly versatile function. I also used flake8 and radon.
Q&A
Q. Do you not study programming languages in advance? A. I have not studied anything above the qualification in advance. I learned while using it when I needed it. Example: I want to output csv with python → Guguru → Know that there is a library called pandas → Learn how to use pandas I studied with a qualification ≠ because there is a possibility that I can use it in practice I don't think the starting point is that much different from unlearned people. (Although it's better to study)
At first, you may think about what to do, etc. I think it is important to "try it for the time being". The experience of "creating one product from zero" at that time I feel that it is useful for the current development work. "Let's start here, from scratch ... No, from scratch."
Recommended Posts