in reply to Best practices - absolute paths?
I'm puzzled, most of my adult life I believed that using absolute paths are one of the tell-tell signs of bad programmers.
It's hardcoded paths that are a sign of shoddy programming. If anything, hardcoded relative paths are probably worse than hardcoded absolute paths, merely because somebody's going to run the thing from a different directory at some point.
With that said, I use hardcoded paths all the time in QAD one-off scripts that I don't intend to redistribute or deploy for production use, and I have occasionally caught myself using one in production. But it's much better to put the path in a configuration file, take it from the command line arguments, or grab the current directory at startup time.
|
|---|