In Software Is Hard, Kyle Wilson proposes a law of software development:
It is impossible, by examining any significant piece of completed code, to determine within a factor of two how many man-hours it took to produce that code.
(Oh! I think that he is being generous. I doubt you can estimate reliably within a factor of 10 how long it took to complete a non trivial piece of software. Even if you know who did it and in what conditions.)
And a corollary:
If you can’t tell how long a piece of code would take when you have the finished product available, what chance do you think you have before the first line of code is written?
This is a very convincing case for why writing and maintaining software are not engineering activities.