Dogs and Goddesses: The End!

See, I told you I’d finish it. Booyah! I feel like I finished a marathon or something.

Video below!

Posted in Uncategorized | 1 Comment

On the classification of citrus

Because this is apparently super important! I’d been having difficulty in the produce aisle finding what I want, so I put together this handy dandy guide.

There are only a few kinds of citrus fruit:

Mandarins are a small, sweet, orange fruit.

Pomelos are also a thing. They’re green and large. They come in sweet or tart. One variety, the Grapefruit,  has also historically been called a Pomelo, the way Maize has been called “corn” in the US (“corn” in England means “grain”).

Citrons are a weird little thing that sometimes come in fingered forms, like the Buddha’s hand. They also are the ancestors of lemons.

Then there’s this weird thing called a Papeda which doesn’t matter for the purposes of this article.

But basically there’s four main kinds, and the rest are all hybrids:

Oranges

Oranges are a larger variety of Mandarin, and while they may have included Pomelo in their history, they are sweet like Mandarins.

Tangerines

Tangerines are basically a type of Mandarin, but a bit more reddish. They taste about the same as a mandarin.

Clementine

Clementines are basically seedless mandarins.

Satsuma

Basically, fancy Japanese mandarins.

Tangelos

A tangelo is a tangerine mixed with a grapefruit.

Blood Orange

This is basically just an orange, but creepy looking.

Tangor

This is a tangerine mixed with an orange. I don’t know why you’d mix a tangerine with an orange, but they did, and it’s called a Tangor.

All of the above fruits basically taste the same; individual cultivars range from tart to sweet, and most out-of-season orange-like fruits taste bland anyway because of the way they’re picked unripe and shipped across the country. You do NOT want to substitute between the numerous types of orange-colored citrus and lemons and limes, but any of the orange-colored citrus fruits can be freely substituted in a recipe. I personally prefer the smaller hybrids, as they tend to be sweeter.

A size comparison can be found here.

Bonus fact: Fennel and Anise are also very similar plants, except you only eat the seeds of Anise usually, so if you’re looking for Fennel bulbs, stalks, or fronds and you see Anise bulbs, that’s the right thing to buy.

 

Posted in Musings | Tagged | 1 Comment

On ColdFusion’s ParseDateTime function

I know I rarely talk about programming on this blog, but today’s issue was a doozy and I want to be sure the information is out there someplace that can be found with a Google search, so if coding’s not your cup of tea feel free to skip today’s update.

Today was February 3rd, and one of our services started blowing up with errors involved in date parsing. The obvious answers were immediately discarded: there had been no change over the weekend, no change to this service in weeks in fact, and yes, it HAD been working previously. It wasn’t Jan 1, or Feb 29, or any of the usual suspects for date mixups. Both Feb 3 and March 2 exist, so it’s not parsing the format wrong for some international format. What the heck was going on?

We were able to trace the error back as far as the ColdFusion built-in function ParseDateTime, but no further. It’s part of the language, so it’s not like we could pop it open and see under the hood. The line was simple:

dateEffective = ParseDateTime(replace(xmlArticle.startDate.xmlText,”T”,””));

ParseDateTime is supposed to be a handy utility function to make a ColdFusion date object out of any conceivable formatted date string. Unfortunately, it can’t handle the XML date-time format (2014-02-03T09:00:00) natively, so we helped it out by removing the T to make the format something it could parse.

The more astute among you will have seen our mistake already, but I’ll explain it anyway.

I don’t know what ParseDateTime looks like under the covers, but after today’s debugging session, I feel qualified to give a fairly good rough guess. I’m going to say step one of their algorithm involves a regex. Something simple, similar to (but not exactly like*) the following:

(19|20)?\d\d[- /.]0?([1-9]|1[012])[- /.]0?([1-9]|[12][0-9]|3[01])[- /.]?((0?[0-9]|1[0-2]):?){0,3}

You know, your basic date parsing. This will only rule out absurd dates; not all date-like strings are valid dates, but it will rule out things like 2013-13-40 while still allowing invalid dates like 2013-02-31. That’s where phase two comes in: date validation. A series of if ladders, something like

if month == 2 && day > 29 return invalid date

if month == 2 && day == 29 && !isLeapYear(year) return invalid date

and so on and so forth. Standard stuff, really. All textbook, nothing to worry about here, no rigorous testing needed.

Until  we passed it this date: 2014-02-0308:50:46.

Now the clever among you have definitely figured out what’s wrong, but it took four of us over an hour to figure out what had happened, and I only eventually guessed because I suspected they were using a regex and so went through common regex debugging questions. You see, regexes like to be greedy. They like to gobble up as many characters for a single piece as possible. So instead of breaking that date into February 03, 2014, at 8:50:46 in the morning, it broke it into Feb 030, 014, at 8:50:46 in the morning. That is to say, when it read the string “2014-02-0308:50:46″, instead of treating that bolded 0 as the leading 0 for the hour 8, it read it as the crucial 0 in the date 30, which also had a leading 0 for no good reason. The regex matched on Feb 30, which the resulting if-ladder determined was an invalid date.

I was able to verify that the timestamp “2014-04-0310:50:46″ also came back with “invalid date”, so it’s not just Feb 3, but it is every single hour on Feb 3 as opposed to two narrow windows per month (between 10am and 1pm and between 10pm and midnight on the 3rd of any month with only 30 days in it), so it was noticed today and only today.

The moral of this story is twofold: firstly, never trust your regexes to parse things without rigorous testing of edge cases, and secondly, always put a space between your date and time before passing a string to ColdFusion’s ParseDateTime.

The bolded sentence is being added to our Standards and Guidelines.

*I know for a fact my quick regex is not identical because the real one can handle things like MM-DD-YYYY instead of YYYY-MM-DD, but at this point I’m not certain if it’s one monster regex or a series of “valid” date patterns that it iterates over until it gets a hit, so I threw something together for the sake of example and moved on.

Posted in Computers | Tagged , , | 3 Comments

Be Prepared: The Lion King from the Hyena’s point of view

First off let me start with a disclaimer: I love Lion King. I think it’s a well crafted, solid film. In fact, it’s because so much care and effort went into the creation of The Lion King that I even have anything to write about today.

It’s an open secret that the hyenas are the real losers of the film. Many people are shocked when they first realize that during the classic villain song “Be Prepared”, the hyenas are just thrilled that they’ll get something to eat out of this regicide. They don’t actually care who’s in charge; to them, the lionarchy means they’re starving and poor. Today I want to look at their development as a people during the course of the song, and how they represent an underclass which never really gets any better off during the film series.

The song begins with a slur against hyenas; Scar calls them “crude and unspeakably plain”, caring only for how he can use them to further his own ends. It’s made clear from the get-go that they’re not rallying behind a leader who will deliver on his promises. Furthermore, they’re portrayed as stupid, unable to understand the plot so that Scar can explain it for the benefit of the audience of children:

It’s clear from your vacant expressions
The lights are not all on upstairs
But we’re talking kings and successions
Even you can’t be caught unawares

The thing is, are they really stupid? Well, Ed might be. But Shenzi and Banzai seem reasonably intelligent, at least by the film’s standards. Ultimately, you have to wonder: what do they care which lion is in charge, given that no lion seems at all remotely concerned about their wellbeing? Why shouldn’t they be caught unawares when nothing seems likely to change for them? Scar’s blatant assumption that everyone cares about the monarchy, that he and his family are the central figures in everyone’s lives, smacks of privilege and narcissism — which fits with Scar’s self-centered, entitled characterization.

Several key phrases stand out as marking Scar’s appropriation of the hyena’s struggles. Scar speaks of his ascension to the throne as “injustice deliciously squared”. Scar believes he was meant to be king and that Simba, by existing, has “stolen” his birthright; therefore, the fact that he’s been bumped from the succession order is “injustice” that he intends to “square”. To the hyenas, however, their very lives are full of injustice — they can’t get enough food, and the lions take the better land, better game, and better living quarters. Seeing as how food is at the center of their concerns, “delicious” is nicely ironic here. Finally, Scar praises himself for having “tenacity spanning decades of denial”, another ironic turn of phrase that belongs more honestly to the hyenas, who are starving, than to Scar, who is (by animal standards) rich and famous.  These turns of phrase prove that to Scar, his problem of “not being king” is just as bad, if not worse than, the hyena’s piddling “not having enough food” problem. 

According to Wikipedia, several critics have proclaimed that the hyenas are a clever allegory for Black and Latino communities. I think we’ve seen plenty of examples in recent years of politicians using the problems that these communities face to get themselves elected, only to turn around and ignore them once they’ve outlived their usefulness politically. Remember: the hyenas didn’t have any more food once Scar was in charge. In a way, though, he did bring equality: under his mismanagement, the Pride Lands faced a real food shortage that affected even the affluent lions, giving them a taste of what the hyenas went through. This is achieved in the film through magical “bad king means drought” means, but the analogy is clearly one of a poor politician who mishandles the finances and drives his region into bankruptcy, forcing the people to suffer the burden.

Mufasa forces the hyenas to live in the shadows, outside the bountiful Pride Lands. It’s Nala, however, who gets the haunting, poignant song “Shadowland” in the musical:

Shadowland
The leaves have fallen
This shadowed land
This was our home

The river’s dry
The ground has broken
So I must go
Now I must go

I would have liked to see that particular issue addressed in the sequel, rather than inventing another group of lions to teach a lesson about oppressing people based on their skin color and welcoming outsiders into the fold. I think it would have been much more touching and honest. It feels like the sequel suddenly has to make Simba sound “meaner” so he can learn a lesson about tolerance when all along they could have had him address racial prejudices and confront the idea that his father, whom he idolizes, may not have been perfect.

Posted in Deconstructions, Music | Tagged , | 1 Comment

On money

Today, for me, is my own personal Christmas.

I have long been in the dark, struggling, scraping by; my advent season truly began with the car accident back in September that threw my finances into disarray. I had barely begun to recover from that event when I was plunged into darkness and uncertainty: three weeks of no paycheck, with only a week’s pay in my pocket. We needed, still need, so many things and here I could do nothing but sit on my hands and make vague promises for the future. It was dark, what with being the middle of winter, and it was cold, colder than it’s been in a long time, and I couldn’t afford little joys to help keep the winter at bay.

But today a savior is come; today the sun shines again, for today I received my first double-size paycheck from the new job. Today I am liberated from the chains of debt that had held me back. Today I am joyous.

I’ve been thinking a lot about power and helpfulness, and how little I have of either. For a while now my main contribution to the family has been financial. When that was taken away from me, I grew irritable and depressed. I found myself having to work twice as hard to keep up a good outlook on life, to have hope for the future. It’s not that we were particularly bad off, since the guys had received their student loan refunds and I used my credit card liberally to take care of expenses like food and gas, but it was more that I knew I was failing as a provider and was unable to make up the deficit in other ways. I couldn’t lift furniture or haul boxes; I could barely even help clean out the old apartment, because I’d run out of stamina long before the place was truly as clean as I’d have liked it. This experience has only redoubled my resolve to get healthier.

But part of it is probably also that I don’t value the nebulous things I do do. As terrible as moving was, as much as we sniped at each other and generally felt awful, it might have been worse if I hadn’t been determined to be upbeat and positive, and sort of “cheerlead” the group even when I felt sore and tired myself. It was draining as hell, and by the end of the week I was glad to get back to work and not avoid my friends for a few days, but maybe it would have been worse if I hadn’t been there.

Bah, nevermind all that. I’m making myself a messenger bag because I’m badass and have a new job and my new laptop is too big for any of my current bags and the ones at the store are ugly. Confidence! I shall have confidence if it kills me!

Posted in Musings | Tagged | 1 Comment

Dogs and Goddesses: Chapter 18 part 1

93% you guys! I can’t tell if this is the last chapter! Whee! (Okay, I checked, it is!)

So no joke, I seriously misread that they walked into the “cavernous temple” as the “carnivorous temple”. I was so excited! Action and adventure at last! I attack the Gazebo! But sadly, it was not meant to be. Instead, the temple is just huge.

Everyone came along, which kind of implies that Daisy and Noah made up, but we didn’t see it so who knows right? I feel like the Daisy author wanted to leave Noah behind but the Abby author would have none of it and overrode that whole fight. Ah, the joys of collaboration.

In traditional Villain style, Kammani is standing with her back to the door as they enter. She turns dramatically slowly, showing off her full goddess regalia (“kind of like Cher dressed as a nun”) and revealing the “wildness in her eyes”. Seriously, could this be any more cliche? I keep waiting for her to say “if you strike me down I will only rise up stronger” or something.

Mina of course is in a business suit, revealing her true Corporate Evil self.

“The Flood will cleanse the earth of non-believers. Only those who respect my power will survive.”

“How?” Abby said. “Do they float longer?”

Epic win Abby.

Kammani stabs Sam! I did not see that one coming! Shar has this moment of utter terror and sadness, but then she steps up to perform her part in the ritual. Good; if this got dragged out for two more chapters I think I’d give up altogether >.>.

I guess the chant last time really was the whole thing; Abby starts it out, finishing at “Of the place without souls”, and then Daisy picks up the next bit. The “chorus” would be the part with “We abjure you by The Great Goddess Who is Three”.

Incidentally, Kammani starts glowing, levitating, and spinning. Which much look friggan hysterical when she’s dressed in Mesopotamian robes.

Christopher gets a chance to valiantly defend “his” lady, and Noah saves Daisy as well. Sam gets stabbed again. Can we talk about this? It seems like despite being a tale about women wielding divine powers, they sure seem to need boyfriends really desperately. Even Noah, who seems pretty useless and has to get rescued himself, gets a chance to play hero. Is this really necessary? It kind of feels like the moral is that even strong women need to be rescued by men. Maybe I’m being oversensitive, but it rubs me a little wrong.

More later~!

Posted in Deconstructions, Dogs and Goddesses | Tagged , | 2 Comments

RSS Quickies: Protect Your Face from the Cold

How To Protect Your Face From Cold, according to Real Simple Magazine

  1. Red face can be caused by cold. It goes away on its own when your face warms up.
  2. If it doesn’t go away, it might be acne.
  3. To stop your face from getting cold in the first place, wear a ski mask.

The end!

Don’t you feel enlightened?

Sometimes I worry that certain magazines publish a whole lot of words and don’t say anything much at all.

Posted in Musings, RSS Quickies | Tagged | 1 Comment