Are you settled in? Perhaps with a cup of tea? A hot coco, catching up on your day's reading? Or perhaps you have, 5 years from now, just stumbled across my little corner of the internet, and are — how strange a thought — now binge reading this blog. Well, in any case you find yourself here, waiting for my thougts off the day; so I'd best get on!
People, when I tell them I work with computers, often tell me of their frustrations with computers — assuming I suppose, that I might at some point be able to do something about them. Clearly they are oblivious to my utter ignorance of technology that falls just outside of my little sphere of interest, outside of library technology, functional programming, Free Software politics and the GNU operating system. Pass me a smart-phone of the famous fruit variety and I'm as lost as an ant blown off its scent trails… But I digress! People tell me about their frustrations, and a recurring theme is that certain things that seem perfectly obvious to us, seem to be entirely unfathomable to computers: "All this effort, and money we put into developing software, and yet my auto-correct get's the most basic words wrong!".
Well, today I think I felt similarly. What stumped me? Dates. And Time. Whodathunk that date and time stuff is so complicated. There's parsing: did I mean iso? Sql? European? Then there are the timezones, daylight saving time… what happens with partial dates? How do you get dates to the right output format, once you have it parsed? I don't know! I just want a date that looks a bit like this: yyyy-mm-dd. Can't you figure it out for me? No? Boo :-(
As was the case yesterday, don't even start on this without libraries. But even with… hmm, simple it's not. And yet we humans, on a day to day basis, in the most varied of circumstances, not really a problem… One of those unfathomable beauties of our universe I suppose.
On the other hand, turns out my issue in the end was not so much to do with date parsing at all — instead, it had more to do with undetected syntax errors… Code parsing — is that really so difficult? Really? But it's just a text file! Clearly, like Jon Snow, I bask in ignorance.