As soon as you have an unsure thing, the sure thing becomes unsure.
Examples:
I can do technique A in one and only one way, A1. But, after a while I find another way to implement technique A, using method A2. How are you going to automate this?
I can do technique B in one and only one way, B1. But, after a while I find a little flaw in the logic and B1 doesn't seem to cover all the details needed to implement technique B. How does the automation cope with that?
I guess you can build some huge neural network with some kind of artificial intelligence.
I have some experience in automating machines (production machines in factories) using Programmable Logic Controllers (PLC's).
The degree of complexity to automate machines is huge. It is practically impossible to get everything right. Edit: I must say that it is impossible to create standard code for each and every machine. You can have standard building blocks, but when you're busy automating a machine, you'll always have to adjust some parameters in those building blocks, or even add additional ones.
I agree that automation is helpful, needed and makes our lives easier. The problem is implementing that automation that is extremely difficult.
You might only see it as just automatically including a header or creating a stub in your source code. However, as demonstrated above, that is just one way you could automate a process like this.
Edit: by the way, this is just my personal opinion of course, don't take it as anything else.
Bookmarks