This is not so much a technical note as one about the weird way the brain works, though you may need some technical knowledge to understand what happened. It’s not complex, however, and the problem is strictly one of the way the brain functions.
The other day I had what I thought was a bug in some PHP code I had created for a web site. It turned out that the problem was in filtering certain field values in a database, which was easy to fix. Well, easy to fix if my brain hadn’t taken a detour.
In fact, I did fix it quickly. But I couldn’t get the “fixed” code to work. It was supposed to generate an XML file which was then consumed by a VBA macro and used in an Access database.
Once I had found the offending unfiltered character and fixed that, I could type the appropriate URL into my browser and get an XML document. I could validate the XML document and it came without errors. But when I tried to access it from VBA, I came up with no nodes at all.
Now my setup involves an Ubuntu machine on which I have a web server with X-DEBUG and Netbeans. In order to test the VBA code, I use VNC to control a Windows 7 machine remotely, which runs the Access database. So of course my URL to test the code on the local web server is just localhost.
But this Windows machine is displayed to me in the second monitor connected to the Ubuntu machine. It’s actually physically located in another building. That’s not something that I normally even notice. I’m very used to having that particular machine up on one of my two monitors as I use it frequently in testing.
I’m guessing anyone who read this far knows what very stupid thing I was doing. It was, after all, right on the monitor in front of me. I was typing “localhost” as the host on the Windows machine, which did not have a web server with my application, of course. Easy fix.
But it’s an interesting mind game having machines that I access in one location that are physically located elsewhere. I think my age is showing! I’m guessing the next generation of computer users will be so used to having differing virtual machines or additional processing power that is not physically part of the same machine that they won’t have that problem.