|
![](/i/fill.gif) |
On 3/16/2012 23:36, Warp wrote:
> Darren New<dne### [at] san rr com> wrote:
>> because people hard-code the path to
>> Windows binaries into their code and expect it to still work.
>
> Who's more at fault here? Stupid programmers, or Windows? (Did Windows
> always offer an abstract way of getting paths to system directories?)
The stupid programmers. Windows has for many many years offered ways of
getting at the system directories without hard-coding them. (I don't know
about Win3.1, but certainly after that. Certainly since the time of NT3,
since you could install both in the same partition.)
It's still screwy because it adds more and more complexity to a system to
program around the bugs of other people. :-) Having to read blog posts to
find out why the file you're opening with one program isn't the same file
you're opening with the same name in another program is just screwy.
It would be nice if one could check for such bugs and warn or crash or not
compile the program at all, before it got released. Too late for that, tho.
Sadly not the sort of thing people tend to think about in the early versions
of a platform where it's needed the most. Maybe as new platforms come out
(like cell phones, etc) people will learn from history and actually put in
checks that you're not violating the rules. Sadly, having no formal
specification makes this sort of thing very difficult.
We had the same sort of screwiness at Google before they replaced "make".
See, with Make, you don't actually have to declare all the dependencies of
your program. You can include a .h file that you don't list in the makefile,
for example. Which led to problems when someone changed a shared .h file and
your code didn't get tested or recompiled. So now the build system checks
that. I don't remember whether they watch what files the compiler opens, or
whether they only copy into the compile environment the files you
transitively depend on, but if you don't include in your project build
config file some .h or .jar or whatever that you actually depend on, your
code won't even compile. (Which is a bit annoying, because your IDE will
like it, but it won't compile, or vice versa.)
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
![](/i/fill.gif) |