4 ms·
> We used to say "write once, debug everywhere." Used to?
by technomancy 16y ago
> We used to say "write once, debug everywhere."
Used to?
- tytso 16y agoMe, I always liked to say, "Write once, run screaming."
- jbooth 16y agoThe "debug everywhere" thing typically refers to GUIs and filesystem conventions. If you don't slavishly use File.separatorChar everywhere and let a "/" slip in there, yeah, you'll have bugs on windows. For most code, and if you're not going to run on windows, it's not an issue. It's nothing like dealing with header files.
- nitrogen 16y agoMaybe it's been long enough since I've written anything in Java for Windows that I've simply forgotten, or maybe I somehow never manipulated paths directly, but I don't recall having to worry about path separators on Windows. I believe I was using \ and / interchangeably, particularly by appending some cross-platform path with /s to the home directory path, which would have \s on Windows (e.g. %AppData%/.company/program/). Could it be something they fixed over time?
- jbooth 16y agoYeah maybe they do an auto replace on windows, I actually haven't been bitten by the bug because I've never written a program intended to run on windows, ever :) Just happened to notice that File.separatorChar is there and that's what it's for. When it first came out, apple was using ":", anyone remember that?