HeiseHeise.com

The Personal Blog of Zach Heise

"Coexistence"
"Coexistence"

A random image. Reload page for more. Want more info?

Month: March 2010

  • Thunderbird Email and the prefs.js file

    I almost had a heart attack today when I opened up my Thunderbird email client after setting up and removing some SMTP accounts. Of my three main email accounts, the primary account that I use here in Jordan had suddenly vanished, taking out about 6,000 emails from the past year. I had been using a plugin called SmtpSelect to help better catalog my numerous email aliases and sub-accounts, and when I disabled it, suddenly all of my Gmail was gone.

    After I recovered from my initial shock, I realized that with almost 500MB of data in that IMAP folder, I would have had some serious hard drive action if it had actually deleted the messages. So I went to c:\users\zth\appdata\roaming\thunderbird\profiles\account.default\ImapMail and sure enough, there was my Gmail folder, still there with no apparent damage done to it.

    But I simply could not figure out how to get Thunderbird to realize that the folder was still there and parse the data out of it. There was no “import” button in the program and desperate Google searches were turning up nothing.

    I sorted the account.default folder window by date modified so I could try to pinpoint what files might have been edited in the past 10 minutes. Cookies, plugins, the Thunderbird 3 index database (at a whopping 168MB), and something called “foldertree” which was a lot less helpful than I hoped it would be.

    The key was in a small file called prefs.js. I had ignored it first, figuring it was a Javascript file but “preferences” was too intriguing to pass by twice. I opened it up in Notepad and examined it. Sure enough, it contained all of the different account records and folder links back out to Windows Explorer. Exactly what I was looking for. All of my other accounts were referenced in there in their specific ImapMail subfolders, but my main Gmail account was conspicuously absent.

    prefs.js recovery

    It would have been difficult but not impossible for me to look at my secondary Gmail account and be able to piece things back together for how the account properties were coded into this prefs file. But backups came to the rescue! That and the automatic Windows Vista/Windows 7 ”previous version’ function, which completely saved me. I merely right clicked on the prefs.js file, selected the “Previous Versions” tab, and selected the most recent automatic backup of the file from last week. I clicked “Restore”, crossed my fingers, and opened up Thunderbird again.

    Done. The prefs.js file had instantaneously restored all of my accounts back to their former selves and everything was being parsed properly. It was then that I realized I had been holding my breath for 20 minutes straight.

    I was pretty proud of myself; it was one of the few times I’ve ever actually lived up to my so-called “technician” reputation and actually figured out something for myself as opposed to turning to the Internet for guidance. Of course, that’s exactly why I wrote this blog entry, in the hopes that perhaps it will help someone else out.

  • Eastern Medical Theories: Plants, Oxygen, and your safety

    I recently had an eye-opening look at the differences between standard biology theory in the west versus the east. One of the teachers I know here recently had some inpatient surgery, and told all of us that she was going to “demand that the nurses don’t take my plants out of my hospital room at night!” Everyone who had lived in Jordan for awhile chuckled at this, but we new teachers were confused. Why would Jordanian nurses take plants out of the rooms of sick people?

    Our elders explained that it was a common theory in the Arab world that at night, plants start taking in and using oxygen and compete with humans for it. Because of this theory, many people here make sure that they remove all the plants from their bedroom at night and put them outside in the hall. I confirmed this with a friend of mine here who has a bachelor’s degree in nursing. “Of course you put the plants outside of the room, especially in a hospital,” he said. “Otherwise, they might suck up all of the oxygen in the room.”

    I was completely dumbfounded by this. Now, I can’t speak for all of the countries in the west, or other states besides Wisconsin, or even other school systems besides the ones I went to. However, I’m pretty sure that it’s a standard part of middle school biology classes that we learn that plants = good for oxygen, regardless of the time of day. On that same topic, I learned that there are old superstitions here that walking through a forest at night can be harmful to your health, for the same reasons.

    I had to find out where this completely contradictory idea came from.

    In my completely scientific research process of “searching The Google” I came across some pretty interesting articles, the most credible of these being from “Yahoo! Health Expert” Doctor Maoshing Ni. I checked his credentials – he’s a specialist in Chinese medicine and anti-aging research.

    To get through the night, most plants reverse the process of photosynthesis and breathe, like you and I, by burning carbohydrates and oxygen while producing carbon dioxide and water. So surround yourself with plants during the day but remove them from your bedroom at night when you sleep.

    On this Yahoo! Answers question thread, I found the back-and-forth between people to be particularly interesting. The reactions of most of the question answers that you can see if you scroll down the page (that the asker did not select to be “best answer”) were the same as mine – incredulous that someone would even ask the question (also note the citation on the “best answer” selection is Dr. Maoshing’s article).

    Finally, the page that I found to be the most helpful was this one from the Aroid Forum. After establishing that yes, plants do shut down photosynthetic reactions at night, I learned that yes, that does mean that they need to carry out simple respiration at night, same as humans. Maybe it was just my school, but strike one against me: I was wrong. I don’t recall ever learning that plants carry out human-like respiration in the absence of light.

    But is the Eastern World right? Let’s look at the math from Aroid Forum. (Bold emphasis added by me)

    I asked a friend who did his doctoral work on plant respiration and got the approximation that the emission of CO2 in the dark is unlikely to exceed 4 micro moles per square meter of leaf surface per second. This is the same as the O2 taken up. Say our plants have a leaf area of one meter. Let’s say for the sake of argument that both upper and lower leaf surfaces emit at that rate, so our plants use up 8 micro moles PER SECOND (please excuse the upper case, but when we think of a whole night the seconds really add up).

    In an 8-hour night, we have the 8 micro moles/s x 3600 s/h x 8 h = 230400 micro moles of oxygen the plants take up. That is only millionths of moles, so it amounts to 0.23 mole. That got the number back down in a hurry.

    How much oxygen was in the room to start with?
    A room 4 m x 4 m x 2.4 m has 38.4 cubic meters of air. That is 38400 liters.
    At room temperature, a mole of gas is about 25 liters, so the room has 1536 moles of air.
    If we say the air in the room is 20 % oxygen, we have 307 moles of oxygen to start with.

    How much of the total oxygen in the room did the plant use? It is 0.23/307 = 0.075 %.

    What about our oxygen-starved sleeper?
    A person breathes out about 900 g CO2 per day or about 300 g in an 8-hour night.
    CO2 has a mole weight of 44.
    300/44 = 6.8 moles CO2 emitted = moles O2 taken up by a person in the night.

    The 6.8 moles of oxygen used by the sleeping person amounts to only about 6.8/307 = 2.2 % of that available.

    How do the plant and the sleeper compare? The plant uses 0.23/6.8 = 3.4 % as much.

    With all the guessing (“approximation” in science-speak), none of the numbers has any meaning unless it’s rounded off to only one digit. You can insist that a sleeping person uses less oxygen than an active one, the room is smaller and the plant larger, but that doesn’t change anything. A good-sized plant surface won’t reduce the oxygen content of the room by much more than a tenth of a percent, and that is only about three percent of what the inhabitant uses up.

    So, that takes care of that. To summarize, no one has been getting the complete picture so everyone’s a little bit wrong. My American school never taught me that plants consume any oxygen at all, and Eastern schools don’t mention exactly how ridiculously small the amount of consumed oxygen is.

    And bottom line: how many of us sleep in completely air-tight sealed rooms, anyway? Eastern science really needs to take that into their considerations, otherwise they’re ignoring the question of how humans don’t just kill themselves off with the amount of CO2 we use up in one night. Or, for that matter, why a husband and wife who sleep in the same bed don’t suffer from oxygen deprivation. Unless you sleep with your head in a plastic bag (in which case you probably have bigger problems, my friend) that plant next to your bed, or even an entire roomful of them, isn’t going harm you a single bit.

    Science!

  • Dead2Red videos – regular and HD!

    Intracom provided my teammate Andrew with the company’s high-definition Panasonic HDC-HS9 camcorder during the race, in order to help record the memories of us being sweaty and exhausted. Now just imagine the wonders of being sweaty and exhausted, captured in high-definition! That’s right, 1440 x 1080 and 1920 x 1080 video clips were being taken of us the entire time.

    We're holding onto his legs as he does this, I promise
    We’re holding onto his legs as he does this, I promise

    Andrew and I shared one of the three hotel rooms that our team utilized, and after the awards ceremony I asked him if he would mind me taking copies of the video. He told me to go ahead, but warned me of the difficulty of doing so. He told me that I needed to have a special program to play the videos back, and that they took a long time to transfer off the camcorder.

    I got out my Windows 7 laptop, took his USB cable, and had the files downloaded and playing on my computer in Windows Media Player 12 (WMP) in less than a minute. He stared at the laptop in amazement. “How did you do that?” I explained that Windows 7 really focused on interoperability and being able to work with as many devices as possible. They probably got tired of Apple people warbling about how it “just works” and devoted some of their billions into tangible R&D…these days, sure enough, everything “just works” with Windows 7, too. Score one for the Redmond team!

    .MTS files are the default file format that most high-def camcorders use, and I don’t know how many other free programs can play them besides WMP. Of course, the king of Open Source Media Players, VLC, plays them without issue, although they need to be de-interlaced and the playback is slower on older computers.

    I’ve put one of the MTS files up on HeiseHeise.com, and you can download it here to check it out. Keep in mind that it’s about 26 megabytes in size, and half a minute in length, at 1440 by 1080 pixels of resolution. Personally, I was quite impressed at the level of quality Panasonic was able to fit into such a comparably small size! Try playing it back with Windows Media Player, but if it gives you an error message, download and install VLC and you can be assured that this file, and anything else you throw at it, will work with it!

    After I assisted Andrew with getting the .MTS files off his camcorder, he took them and made a nice little 4 minute video of highlights from the ride, set to music. Just imagine you’re out there with us on the highways!

  • Dead2Red 2010: Flat-out fun

    Perhaps I should have regarded it as a bad omen that my borrowed hybrid bicycle somehow punctured its tire the day before the largest cycling relay race of the year, but after getting the tire patched up by Sari at midnight in Cycling Jordan, I thought that everything would be taken care of. We had three bikes (Rami brought his mountain bike as a spare), copious supplies sponsored Red Bull, and a sack of Snickers bars. What we didn’t have, though, was extra tubes for the hybrid. We knew we were walking into possible danger with that carefree disregard of proper safety procedure, but there were simply no hybrid tires to be found in the entire country, as we found out…they needed to be specially imported from the America or Europe.

    It was too late to do anything about it now, and we cheerfully piled into our trusty silver Intracom pickup truck. Perhaps it was the copious amounts of sugar in our bloodstream, the onions and garlic from the spaghetti dinner, or merely lack of sleep, but we were in giddy high spirits as we roared down the highway, shouting and waving out the windows at other bike-laden trucks. The twinkling lights of the Palestinian/Israeli towns on the other side of the Jordan River greeted us as we approached the foggy Dead Sea, and after some confusion as to where we were actually supposed to start, we met up with the rest of the starting trucks and exited into the warm night air.

    Last year, I was a stranger to the Dead2Red biking groups, but this year, I felt like I knew at least half of the people involved! I found Aaron and Laura with their own biking group and rented mountain bikes, looking doubly determined and in equally high spirits. Rob from choir was ready to head out a half-hour early with the single riders, and I told him about my friends Luay and Kamal from last year who had preceded him in the lonely solo 250 kilometers, the latter on a mountain bike. I high-fived the gregarious Samir, the organizer of the entire event who had accompanied Cycling Jordan’s trip to Beyda last year and he shouted “Free sandwiches for everybody!” while yanking open the back of his pickup truck to reveal a crate-load of turkey sandwiches. All the guys from Cycling Jordan were there, like Sari, Hussein, Sinnan, and Sa’ad and his son. The atmosphere was festive as we unloaded Omar’s sleek 5-kilo racing bike from our truck and we all agreed that the weather was certainly so much warmer and nicer than last year. And what a pleasant breeze!
    *cue ominous foreshadowing music*

    "This is the bike that's going to win us a trophy!" I roared giddily. "Why does he smell like sugary drinks?" they asked.
    ‘This is the bike that’s going to win us a trophy!’ I roared giddily. ‘Why does he smell like sugary drinks?’ they asked.

    We had already decided on our racing order. Rami would go first, clearing the way to take the lead early. “Don’t be afraid to use your elbows,” we told him. We were joking, mostly. Then, after five kilometers, I’d take over on the hybrid bike, followed by Omar, then Micha, and finally Andrew. After the solo riders left at 3:30 AM, everyone quieted down a little bit, focusing on stretching, testing their bikes, and discussing strategies with friends. As for me, I was trying to help some friends of mine from choir that were on their way down from Amman when their support vehicle got not one but two flat tires, leaving them stranded still 20 kilometers from the start line. They barely made it in time for the start at 4 AM, but they had arrived by the time the pistol cracked, sending the ~20 bikers from the 3 and 5 person flying into the darkness.

    Just like last year, our support truck was close behind them, and our four pairs of eyes strained to find Rami in the mass of juking and jiving reflective jerseys. This year, Samir and his team mandated that all runners and cyclists must wear the provided reflective jerseys during the nighttime hours, on pain of disqualification, and it definitely made it harder to pick Rami out of the crowd. After a few minutes, we found him and shouted encouragement as he climbed up the first couple small hills near the large potash factories of the Dead Sea.

    It seemed like only a few minutes had passed before Rami called out for me to replace him, and before I even knew what was happening, the car was careening to a halt, and I was leaping out the door. Last year, team DRed Shaheen did 10 kilometer sprints, and this year’s 5 KM’s made things seem a lot more frantic. Rami was already right on me as I grabbed the hybrid out of the truck bed, checked the seat height…and the tires…and then I was off!

    Those reflective vests definitely did their job...but made it much harder for cameras with flash!
    Those reflective vests definitely did their job…but made it much harder for cameras with flash!

    (more…)

  • An explosive pre-race dinner

    I really should be in bed right now. Andrew, the Dead 2 Red teammate with the backup truck, is going to be picking me up in 3 hours from now, and I only now just got done cleaning up the kitchen downstairs from the Second Annual Dead 2 Red Spaghetti Dinner (it’s a mouthful, pun intended). Instead, I’m drinking copious amounts of water and taking some aspirin to settle a headache. Probably stress related instead of anything else!

    I was at work late today setting up a new computer, which directly led me to be late getting home to start on the spaghetti. I brought down all the pots, pans, and spices, as well as a few cans of tomato paste I’d purchased last autumn. Daniel was helpful in saving me by chopping onions, as I was trying to keep track of too many things at once and sliced open my index finger pretty badly. We saved the onions, don’t worry.

    The interesting thing happened right after Omar and Rami arrived…I took the can opener to the small, six-ounce can of tomato paste and without any warning whatsoever the thing exploded with a sound like a dozen pop cans opening at once. Rami, a few meters away from me stirring the meat, looked at me in shock as his black jacket is covered with tomato paste, and I wiped chunks of it off of my chin. This has got to be a new record for an exploding-can-of-tomato-paste because it not only reached about 10 meters horizontal distance, but did quite well going straight up, too.

    I can only be glad that Philip wasn't here to see this (if you're reading this, don't worry, I stood on the table with a sponge afterwards!)
    I can only be glad that Philip wasn't here to see this (if you're reading, don't worry, I stood on the table with a sponge afterward!)

    That mishap aside, most of the paste stayed in the can, and the rest of the dinner proceeded deliciously and without issue. Although Andrew wasn’t able to attend, Micha came a little later and we all got to try on our Intracom-sponsored jerseys to make sure that they fit…not that we’d have time to do anything about it if they didn’t, and they were one-size-fits-all anyway!

    The Intracom team chows down on some carbohydrates
    The Intracom team chows down on some carbohydrates

    In other news, Dozan had another choir concert last night, all the way on the other side of Amman in al-Hashmi Shmali. Apparently there’s a weekly concert with classical muwashahaat (folk music) instruments and singing. This time, Dozan was invited as one of the acts. We sang four songs in Arabic, with titles like “White Pigeon” (possibly dove, actually, I don’t know if I translated that right), and “Raise Your Hands” while accompanied by instruments like the six-stringed, guitar-like Oud and what looked like a harpsichord. We also had backup singers too, although they were more like the regular singers, and we were encroaching on their turf! They were docile, friendly looking middle aged and older Arab men, many placidly clutching prayer beads which they twisted absentmindedly as they sang their low, ululating tones. They had a soloist, too, who sang Arabic love songs in a beautiful baritone and really milked the audience.

    For their part, the audience loved it and went wild for all of us. As wild as 70 elderly people can go, clapping gently along with us and nodding and smiling happily, sometimes snapping their fingers and waving their arms shakily in the air. It was all quite adorable, and I wish that Dozan could have sang for them longer.

    The only problem was with the sound system, which appeared to have been set up by monkeys that only knew how to go up to “eleven” – they put our group in the corner of the room to wait, right next to these massive speakers that crackled ominously with way-too-much reverb and barely-contained power. After the concert started, it seriously felt like my ears were going to start bleeding at any moment, and most of us crowded away towards the other side of the room to try to escape, probably a futile effort.

    Only 2 and a half hours until Andrew arrives. Time to put the camera on the charger and get to bed. Personally, I’ll be happy if we can beat 8 hours and 12 minutes, our team’s time from last year. Wish us luck!