One of the places where computer programming and Western history can't help but intersect is on the question of the Julian vs. Gregorian calendars. For me, that hit the radar in the Java programming language. But the PHP language two-ups (as opposed to one-ups) the J/C distinction by also including the Jewish calendar, and--I am so not making this up-- the French Revolutionary calendar.
It turns out that, for the programmer (including those who write languages for other programmers), date and time are thornier issues than they, on the surface, appear. At the most basic computing level a date and time is a number. On modern UNIX-based systems, if that number is zero, it's precisely midnight (for Greenwich, UK) on January 1st, 1970. Negative values fall before that date, positive ones after that. Each number is a count of milliseconds (one thousand milliseconds = one second) from the start of The Me Decade.
Arbitrary--and perhaps arcane--as it is, this is what the writers of computer languages have to build on. In other words, that "primitive" number must be translated (transliterated?) into more recognizable notions of year, month, day, hour, minute, second and millisecond. And, as cited above, the question of whose definition of year/month/day/etc. is an added layer of complexity. And that's even without the amenity APIs--provided by many languages--like the ability to extract the day of the week as well as day of the month from a given date. Or providing a menu of options for formatting years, months and days as naked numbers vs. padded ones--e.g. the difference between 1/1/70 and 01/01/1970. (As if merely keeping track of leap years isn't complex enough...)
Of course, with all the handy things modern APIs can do with basic milliseconds, two things they can't do is tell you how many anyone has to work with, nor how they should be put to best use. Which, upon reflection, is a good thing. After all, computers--no matter how powerful--should never be allowed to aspire to fortune-telling or philosophy. That would be a disaster second only to cats spontaneously evolving thumbs.
Thoughts on computers, companies, and the equally puzzling humans who interact with them
Tuesday, November 30, 2010
The "missing" date/time APIs
Monday, November 29, 2010
Clobbered by a recurring truism
My co-worker (and fellow programmer) used to have the following tag-line on his email signature blurb: "A screenshot is worth a thousand words." And is he ever onto something there!
The backstory dates to last week when the alpha-user of "my" application sent me "before" and "after" samples of a spreadsheet that's moshed around by an Excel macro after it's downloaded from the website. Except I'm pretty sure she'd already done some housekeeping of her own, which threw off the row numbers, which really made things ugly.
To sanity-check: I stepped through the process, myself soup-to-nuts, and ended up with something cleaner that her "after" spreadsheet. So I figured her doctoring had something to do with it. So we intermittently traded "clarification" emails through the rest of the day. That actually made the situation worse, because I started to doubt that the export process from web page to spreadsheet was working properly--a.k.a. the kind of thing that you do not want to have to debug from two time zones away. Right before I headed out, however, she sent me screenshots from her stepping--also soup-to-nuts--through the process, and included a copy of the final product.
Then it all pretty much made sense. As dismaying it was to realize how far apart our respective pages were, realizing that I'd missed a few things in my smug assumption that the problem was with Excel or user error. Worst of all, we could have spent another day trading misunderstandings and unfounded assumptions.
Moral of the story: Ask for the screenshots. Have instructions written up for users who aren't used to taking them. Yeah, they're futzy and a pain. But I have yet to find them less time-consuming that guessing or projecting. That's the kind of thing that should be drilled into you in Programmer School, before you're allowed to so much as touch a compiler.
The backstory dates to last week when the alpha-user of "my" application sent me "before" and "after" samples of a spreadsheet that's moshed around by an Excel macro after it's downloaded from the website. Except I'm pretty sure she'd already done some housekeeping of her own, which threw off the row numbers, which really made things ugly.
To sanity-check: I stepped through the process, myself soup-to-nuts, and ended up with something cleaner that her "after" spreadsheet. So I figured her doctoring had something to do with it. So we intermittently traded "clarification" emails through the rest of the day. That actually made the situation worse, because I started to doubt that the export process from web page to spreadsheet was working properly--a.k.a. the kind of thing that you do not want to have to debug from two time zones away. Right before I headed out, however, she sent me screenshots from her stepping--also soup-to-nuts--through the process, and included a copy of the final product.
Then it all pretty much made sense. As dismaying it was to realize how far apart our respective pages were, realizing that I'd missed a few things in my smug assumption that the problem was with Excel or user error. Worst of all, we could have spent another day trading misunderstandings and unfounded assumptions.
Moral of the story: Ask for the screenshots. Have instructions written up for users who aren't used to taking them. Yeah, they're futzy and a pain. But I have yet to find them less time-consuming that guessing or projecting. That's the kind of thing that should be drilled into you in Programmer School, before you're allowed to so much as touch a compiler.
Sunday, November 28, 2010
Whoops--no post tonight
We finished up a family birthday celebration later than anticipated, so I'm afraid that tonight will be slighted, blog-wise. See everyone tomorrow!
Saturday, November 27, 2010
A random thought about knowledge obsolescence
Large chunks of free time have become somewhat scarce for me--for reasons both circumstantial as well as self-inflicted. This evening was not one of those times, which opened up the "To Do" list: Line-items such as set up a test server and hook it into the internet via DynDNS, upgrade the laptop to Maverick Meercat, Set up remote host access for MySQL databases, or even just learn my way around MySQL Workbench.
So, naturally, I've been working out how "Elizabethan" bows are tied (keeping both decorative aiglettes facing front), so I can finally attach the early 16th century "puff and slash" sleeves to the early 16th century Venetian dress that I finished something like mumble-fourteen-mumble years ago. Which means sitting with two strips bias tape pinned to the couch upholstery, following the directions from a printed-out web page, going through the steps multiple times, paying strict attention to how each strip "wants" to face at various steps.
This would have been something that pretty much everybody in Western Europe would have known, for at least a century. Now it's esoterica, albeit the kind that sets the hard-core re-enactor/costumer apart from the RenFest Refugee crowd. No doubt four and five hundred years from now, some form of programming will still be practiced. Were I to be thawed from my cryogenic tube and rebooted into that time, I would be astounded by many things. But one of them would not be finding clubs devoted to the "ancient" rudimentaries of the craft--with all the bickering over interpretations of primary sources, one-upsmanship, snobberies, know-it-all-ers and posers one can expect. Oddly--or maybe not--that's almost a comforting thought.
So, naturally, I've been working out how "Elizabethan" bows are tied (keeping both decorative aiglettes facing front), so I can finally attach the early 16th century "puff and slash" sleeves to the early 16th century Venetian dress that I finished something like mumble-fourteen-mumble years ago. Which means sitting with two strips bias tape pinned to the couch upholstery, following the directions from a printed-out web page, going through the steps multiple times, paying strict attention to how each strip "wants" to face at various steps.
This would have been something that pretty much everybody in Western Europe would have known, for at least a century. Now it's esoterica, albeit the kind that sets the hard-core re-enactor/costumer apart from the RenFest Refugee crowd. No doubt four and five hundred years from now, some form of programming will still be practiced. Were I to be thawed from my cryogenic tube and rebooted into that time, I would be astounded by many things. But one of them would not be finding clubs devoted to the "ancient" rudimentaries of the craft--with all the bickering over interpretations of primary sources, one-upsmanship, snobberies, know-it-all-ers and posers one can expect. Oddly--or maybe not--that's almost a comforting thought.
Friday, November 26, 2010
Frivolous Friday, 11.26.2010: The Steely Dan edition
(Seriously, y'all just had to know this was coming...)
When Black Friday comes
I'll camp out by the door
And be first in line when they
Open the mega-store.
When Black Friday comes
It won't matter if it's snowed,
I'll be banging bumpers out
On skating-rink roads.
When Black Friday falls, the prices they will be
The next best thing to free.
When Black Friday comes
I can't stop to think or look
Gonna scribble numbers and words
In my skinny checkbook.
Gotta keep all those Chinese
Making gadgets, toys, and shoes
With their billion mouths to feed--
And nothing to lose.
When Black Friday comes, we'll forget the bill:
You know I will.
When Black Friday comes
Gonna auction off my soul,
And eBay will help me fill
In this credit sink-hole.
Gonna snatch up all I can buy me,
Deferred payments gonna justify me,
If I default, it's their loss:
I'm gonna let it roll!
When Black Friday comes
I'm gonna know no shame:
It's how we play this game.
When Black Friday comes
I'll camp out by the door
And be first in line when they
Open the mega-store.
When Black Friday comes
It won't matter if it's snowed,
I'll be banging bumpers out
On skating-rink roads.
When Black Friday falls, the prices they will be
The next best thing to free.
When Black Friday comes
I can't stop to think or look
Gonna scribble numbers and words
In my skinny checkbook.
Gotta keep all those Chinese
Making gadgets, toys, and shoes
With their billion mouths to feed--
And nothing to lose.
When Black Friday comes, we'll forget the bill:
You know I will.
When Black Friday comes
Gonna auction off my soul,
And eBay will help me fill
In this credit sink-hole.
Gonna snatch up all I can buy me,
Deferred payments gonna justify me,
If I default, it's their loss:
I'm gonna let it roll!
When Black Friday comes
I'm gonna know no shame:
It's how we play this game.
Wednesday, November 24, 2010
Teaching as the gift of giving
Today, by utter serendipity, I learned that yet a third member of the La Crosse Area Beekeepers is a retired teacher. But what really surprised me was the fact that I was actually surprised to learn that. Particularly after the person in question had just presented a topic to the group last month.
See, when someone gives a presentation to her/his peers without crashing through a prepared script, I take it as a sort of baseline standard. Most likely because being on the high school and college speech & debate teams pretty much warped my standard of "normal" from the get-go. But as much as that seems to be a hallmark of someone who has spent all or part of her/his career at the front of a classroom, it doesn't necessarily tell the full story.
Because along with the presentation skills seems to run a willingness to answer questions in stride, to say "I don't know, but I can probably find out," a talent for organizing material for maximum absorption, and (so often) the passion for the subject at hand. Those, IMLTHO, are the hallmarks of a true teacher. Not all of these spent time in Academe, certainly. But in my experience, it's a rare non-professional teacher who has the complete set.
If Alvin Toffler is correct in saying that, "The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn and re-learn," we--as a society and a world--cannot do without strong teaching skills. (Inside a formal classroom or not--it's all the same.) Understand that I'm not under-rating auto-didacticism; I just think that, in most cases, it's a highly inefficient way of scrambling up the crucial--and often steep--first part of the learning-curve.
See, when someone gives a presentation to her/his peers without crashing through a prepared script, I take it as a sort of baseline standard. Most likely because being on the high school and college speech & debate teams pretty much warped my standard of "normal" from the get-go. But as much as that seems to be a hallmark of someone who has spent all or part of her/his career at the front of a classroom, it doesn't necessarily tell the full story.
Because along with the presentation skills seems to run a willingness to answer questions in stride, to say "I don't know, but I can probably find out," a talent for organizing material for maximum absorption, and (so often) the passion for the subject at hand. Those, IMLTHO, are the hallmarks of a true teacher. Not all of these spent time in Academe, certainly. But in my experience, it's a rare non-professional teacher who has the complete set.
If Alvin Toffler is correct in saying that, "The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn and re-learn," we--as a society and a world--cannot do without strong teaching skills. (Inside a formal classroom or not--it's all the same.) Understand that I'm not under-rating auto-didacticism; I just think that, in most cases, it's a highly inefficient way of scrambling up the crucial--and often steep--first part of the learning-curve.
Tuesday, November 23, 2010
Work as meditation
My day was boring, by most standards, what with the bulk of it spent refactoring and reformatting ancient code. My grumbling over style differences aside, it was pretty straightforward, once I'd had my head in that space long enough mentally snap all the Legos together. At the end, the real performance-boosting tweak--meaning, my ostensible reason for messing with that file--was also straightforward, rather than the rocket surgery it appeared to be at the outset.
Just now, I was disappointed to learn that the creed attributed to St. Benedict, "Work is prayer," is actually a myth--the product of mis-translated Latin. I say "disappointed" because prayer can be an act of meditation as well as communion, and today's exercise had something of that. Tomorrow I return to gnawing on more gristly problems, but in a more composed state than usual for software development. Or so I prefer to believe tonight.
Just now, I was disappointed to learn that the creed attributed to St. Benedict, "Work is prayer," is actually a myth--the product of mis-translated Latin. I say "disappointed" because prayer can be an act of meditation as well as communion, and today's exercise had something of that. Tomorrow I return to gnawing on more gristly problems, but in a more composed state than usual for software development. Or so I prefer to believe tonight.
Subscribe to:
Posts (Atom)