xmllint

This Linux tool is my new best friend. We get thousands of XML files from our clients for loading user, class, and enrollment information. Some of these clients customize our software or write their own software for generating the XML.

This means we frequently get oddities in the files which cause problems. Thankfully I am not the person who has to verify these files are good. I just get to answer the questions that person has about why a particular file failed to load.

The CE/Vista import process will stop if its validator finds invalid XML. Unfortunately, the error “An exception occurred while obtaining error messages.  See webct.log” doesn’t sound like invalid XML.

Usage is pretty simple:

xmllint –valid /path/to/file.xml | head

  1. If the file is valid, then the whole file is in the output.
  2. If there are warnings, then they precede the whole file.
  3. If there are errors, then only the errors are displayed.

I use head here because our files can be up to 15MB, so this prevents the whole file from going on the screen for the first two situations.

I discovered this in researching how to handle the first situation below. It came up again today. So this has been useful to catch errors in the client supplied files where the file failed to load.

1: parser error : XML declaration allowed only at the start of the document
 <?xml version=”1.0″ encoding=”UTF-8″?>

162: parser error : EntityRef: expecting ‘;’
<long>College of Engineering &amp&#059; CIS</long>

(Bolded the errors.) The number before the colon is the line number. The carat it uses to indicate where on the line an error occurred isn’t accurate, so I ignore it.

My hope is to get this integrated into our processes to validate these files before they are loaded and save ourselves headaches the next morning.

December Dilemma

From a CNN article, For Many, December’s a Dilemma by Joe Sterling (mentioned by Phillipe Copeland):

Navigating the Christmas season can be a challenge for the millions of people who don’t celebrate the holiday. Many acknowledge and sometime embrace the season’s customs, such as gift-giving and sending out greeting cards, while at the same time they are conscious of maintaining their own religious identities.

I will admit, when I was Catholic, Christmas was significantly easier. There was no conflict as I was wholly within the mainstream of others I knew. Choosing to become a member of the Bahá’í Faith didn’t significantly reduce the importance of Christmas for me. Bahá’í don’t celebrate Christmas with each other. Nor would we alienate those around us who choose to celebrate. Similarly, I would hope people don’t feel alienated when I fast in the

We still eat with family on Christmas Day. True, I no longer to to midnight or Christmas Day mass. My mother, who is also a Bahá’í stopped giving Christmas presents and only gave Ayyám-i-Há presents, a Bahá’í celebration in February just prior to our Fast and New Year. She does give presents to my brother and his wife who give and receive presents with their other family. I no longer expect Christmas presents or put up a tree, but that is okay.

Keep in mind Christmas as we celebrate it now, merges several holidays, making it convoluted. The primary one, the birth of Jesus, resonates with the Baha’i Faith. We recognize the station of Jesus and all his accomplishments. The Wiccan / Druidic winter solstice, Germanic Yuletide, the Roman Saturnia all are comingled into Christmas. As other faiths like Hinduism, Buddhism, Shinto, Islam, Judaism, and even Kwanzaa deal with the surrounding peoples celebrating Christmas, their traditions could trade in and out with Christmas. In the end, the sentiment of giving gifts is a good one, assuming one doesn’t go to excess.

The real dilemma ought to be what is the impact of gift giving. Joel Waldfogel, an economist, thinks receivers value gifts less than the giver, causing a loss in value to the economy, so he recommends gift cards. Several Bahá’ís and Christians I know donate to charities instead of gifts.

Computer Metaphors

An effective way to explain something is to use a metaphor. This can be especially effective by picking an metaphorical object or behavior with which the audience is already familiar.

The one I see most often is comparing computers to a car. This morning I saw this on an email list describing a person’s experience  migrating to Vista 8 from Vista 3.

It is like I have traded in a familiar (though frustrating) car for one that has the lights, wipers, and radio in new locations.

Also this morning, Vista 8 was compared to a malfunctioning pen forced on faculty who would rather use a better pen. Nevermind all pens are not used exactly the same. (Fountain vs rollerball) Some require more maintenance and care than others.

A coworker always says Free Open Source Software like Sakai or Moodle are free as in free puppies not free beer. Nevermind proprietary bought systems like Blackboard are bought as in bought puppies.
🙂

Superhero Economy

Watched a number of episodes of Justice League Unlimited today. Buildings, roads, and machines get pulverized by the violent actions. Someone rebuilds all the destroyed stuff because in the next episode, everything is pristine to get pulverized again. So much rebuilding must suck for insurance premiums. However, it does ensure lots of construction employment, material sales, structural engineering services, and designers.

🙂

… And you thought they were just weekend morning cartoons!

Racial Profiling

Walking home from the bus in high school, I saw police cars and officers in front of my house. Their presence made me extremely apprehensive. The only little assurance was my father talking to the officers. Someone broke into the house and stole some of our stuff.

We felt violated. Our own home was unsafe.

At the time however, the people with guns with a tendency to keep their hands near them were much more threatening than some anonymous teen who wanted some quick cash.

Police officers are the good guys.

Take this scenario:

  1. You’ve spent almost a full day on a plane or in airports flying from Shanghai to Boston so you are extremely jet-lagged.
  2. (SUGGESTED ADDITION) You picked up the flu while in China (remember Avian Bird Flu?).
  3. Your front door won’t open when you get home, so you end up gaining access to the house from the back door. Eventually with help you do get it opened.
  4. While calling someone to come fix the door, a police officer shows up to question you about being the owner of the house. (Let’s ignore that Harvard owns it. You just reside there.)

This is like Alexander and the Terrible, Horrible, No Good, Very Bad Day: “Nothing at all was right.” Except… This state of mind was interpreted by the police officer this way:

“From the time he opened the door it seemed that he was very upset, very put off that I was there in the first place,” Sergeant Crowley told the station, WEEI. “Not just what he said, but the tone in which he said it, just seemed very peculiar — even more so now that I know how educated he is.” NYT

This seems like the perfect opportunity to ask questions about Dr. Gates’ day to establish something of a rapport to ascertain why he might be so upset. It’s not so peculiar when the context is known. I bet if all this had been placed in context at the time, then this would not be front page news.

Microsoft Outlook 2007 Wishlist

From 2001 to 2006, Microsoft Outlook was the email client I used for work (and on my home computer to access work stuff). Back then, Exchange was not available, so a number of the features were more hacks than reality. However, it worked pretty well.

When I changed jobs, Netscape and Thunderbird were the pre-installed clients. I opted for Thunderbird. It worked pretty well for me. Calendaring was in MeetingMaker. Everything worked pretty well.

Recently work shifted to Exchange, so going back to Outlook made sense. Maybe because I have so much experience, the transition was not as bad as it might have been. Still… These are gotchas which have annoyed me lately:

  1. Editable subject usability: The emails from our client issue tracking system put the description where its hidden. I was really pissed that I could not edit the subject until I figured out unlike most software which changes the shading to show it is now editable, Outlook just lets me edit at any time. Also, editing the subject after it is used by something else like a task results in the change in the email but not the task. (The main reason I want to change them is so it appears correctly in the task list. ) Copying to a second email results in the same problem. Apparently I have to either create a new task and copy-n-paste the subject I want or forward the email to myself.
  2. Spacebar moves to next message instead of next new message: I really like the Thunderbird method of skipping to the next unread message when I hit the spacebar at the end of the current message. It even will find the next unread message in another folder. Outlook just advances to the next message.
  3. Boolean is more than OR: I had this fantastic Thunderbird filter which looked for user@ AND domain.tld. Outlook only honors OR. We have 15 admin nodes and databases which send up reports. Alerts and tickets come from a different source and unaffected by this.
  4. Search ignores special characters: I thought in the past I had sent email to abc-defghi@domain.tld. However, the message bounced, so I searched my email for part of the address “abc-defghi” as its not in the address book. I got results which match “abc” not “abc-defghi”. So it ignored the hyphen and everything after. FAIL!
  5. Send email as plain text or paste a plain text: Yes, I know lots of people have HTML capable clients. I hate Outlook puts my replies in a sickly blue font. When I copy and paste from the elsewhere in the message, it changes the font. So then I have to go and do formatting to have a presentable email. I just want to type and send. I don’t care about fonts, colors, etc. If I did, then I would create a web page. … (Added 2009-JUN-03)

That’s it for now.

Feedback Loops

Remakes don’t scare me. Some are good. Some are bad. 

The thing to remember is, “Its just a movie.” The world won’t end over a poor movie. There’s always another one in a few weeks to either like or hate. If it stands up to the test of time, then you’ll buy the Blue-ray and next three formats over the next 30 years. If not, then just ignore it ever existed… Much like I’ve done with Superman III, Superman IV, Star Trek The Final Frontier, and hundreds of other movies.

Getting worked up over change? Not worth it.

Quibblers would have kept “Star Trek” more like its old self. Quibblers inhibit revolution. Quibblers would deny the basic law of forward motion in pop culture:

If you love something, they will remake it.

But if you really love it, you will set it free, and let them.

The Trouble With Quibbles

Film makers should keep in mind, the types of people involved in  fads: connectors, mavens, salesperson. Fans are mavens. People are going to trust the opinion of these fans. So if the fans’ concerns are just a few quibbles but still an endorsement, then the general public will flock to the movie. If these quibbles amount to wide rejection of the movie by the existing fans, then the general public will mostly stay away from it.

Quibbles are not really the issue. Endorsements are. 

I think you missed that there is a life-cycle to most such endeavors, and feedback is very useful at specific times, and disruptive (in a bad way) at others.

So, the problem with “fan feedback” non-stop is that they tend to fall into a mob mentality, off being “trolls” about any innovation. But, that said, remember that early forms of the Batman movie with the Heath L Joker was shown to fans (at a Comic Con) to get feedback on the style and whether too over the top. The feedback was used to find the balance and deal with the nature of the ending. Fans were given leaks and teasers (semi-trailers) along the way as well, but the mob rule was not allowed not hound the people making it.

That said, what makes a movie work or not is very different from what made its source material work. The reason the Spiderman movies worked for a large audience who knew nothing about the comics had a lot to do with the simpler nature of the comics. Batman has always been more complex in the psychology of its heroes and villains, as much by what does not happen as what does. Watchman is trickier given its narrative model and how much it connected with its time (Cold War, etc).

— PaulK
The Downside of Feedback

Design by committee sucks. So fans should not take over the process. However, total rejection of fan criticisms probably will result in rejection by the fans and slow sales.

Bottle v Tap

Its funny what people think about something we take for granted. Brown tap municipal tap water was stated as the reason for drinking bottled water. Is it a corporate v goverment thing? Is it because bottled water is so much more expensive than tap water so it must be better?

From Coca-Cola’s letter to the state of California about what is in DASANI water:

Most facilities that purify and bottle DASANI procure water from municipal water systems. At a few plants, however, water is obtained from protected groundwater sources managed by the bottling plant, with approvals from local authorities. DASANI® Bottled Water Report as required by California SB 220 (PDF)

It goes on to describe what they do to purify the water they procure: activated carbon filtration, reverse osmosis, ultraviolet light disinfection, re-mineralized, ozonation. So the municipalities get the water to within EPA standards but not FDA standards. Companies selling bottled water have to adhere to the FDA standard not the EPA. Maybe its a good thing: “Generally, over the years, the FDA has adopted EPA standards for tap water as standards for bottled water.” FDA Consumer magazine: Bottled Water: Better Than the Tap? (Should we be worried the same overworked agency which lets us get hit with all kinds of bacteria is protecting us from bad water?)

Athens-Clarke County Public Utilities Department has a similar report where they list how the water exceeds the EPA standards.

Personally, I would love everyone producing water to publish reports about their water quality with the amounts of detected contaminants listed as is shown in this DASANI analysis example. Too bad its just an example of a typical analysis. Anyone know where the real DASANI quality reports might be found?

TED Talk: Picking apart the puzzle of racism in elections

By Nate Silver

A less than convincing point… The list of states with voters reporting a racial bias only well matches the Obama-Clinton difference map because Nate draws the audience to the states he’s picking on: Arkansas, Louisiana, Tennessee, Kentucky, and West Virginia (5 hits). He totally ignores the strong race bias in South Carolina, Alaska, Missouri, or Indiana didn’t translate into more votes (4 false negatives). Also Wyoming and Oklahoma both had no reported racial bias and voted more against Obama (2 false positives).

Losing My Mind

CPR/AED training requires time on the floor rescuing dummies. Objects in pockets, like my Digital Elph, interfere with rescuing dummies. Digital cameras on desks without supervision have a tendency to disappear. (Not so much from coworkers kleptomania but from my distractions.) So I put it in my work backpack. 

Today is the First Day of Ridvan. So earlyish this morning I went down to the Botanical Garden since I wasn’t going to be at work and didn’t go this past weekend. I spent ten minutes looking for the Elph in the work backpack. So I went and just shot with the Rebel. I chalked it up to having left the camera at work. After all, the last place I recalled seeing the thing was at work.

I decided to look at what I took. So I looked for the card reader in the main part of the camera backpack. To my surprise, the Elph was right there in the wrong backpack. The only thing that makes sense is I moved the camera but forgot I did so. 

Perhaps better brain food could help? Fish providing omega-3 fatty acids is already a healthy part of my diet. Maybe more eggs with choline with the vitamin B precursor could help?