First things that come to mind are questions like:
- How big is the project?
- How long will it take?
- Can one person complete it alone or there is a need for a team?
- What infrastructure is needed?
and many many more.
This person found out I am a programmer and asked if I would be able to develop an automation process he had in mind. I was happy to hear that he had a clear end-product in mind so there will be much less confusion during the development process.
I am not going to go into details about the project because I want your answers to be general and not case specific.
Having never sold my own code / product I have no idea on how cost is estimated. The interwebs, sadly, do not provide a clear formula and everyone gives vague directions.
I know lines of code or time spent working on the project are not valid options but maybe they could be taken into account.
How do you not get underpaid for your working hours?
How do you not get overpaid at the expence of your customer?
How do you personally calculate cost and agree on a price?