November 29, 2007

Today

Category: Various — Josh @ 00:27

“I think Tim Leary was right. Everyone must create his own religion. You must start your own religion. I have my own religion. Every sadhu has his own religion in India. They say every lama has his own religion in Tibet. Find the way you can genuinely be you. What do you like to do? Find God there. Find out what your special gift is and where you find that connection, what really makes you happy, and follow that way.

The peace that comes from letting go and surrendering is incredible. Again and again it keeps coming back to letting go of our own will to have a plan about where we’re going and a goal. It seems that we spontaneously align with the Plan of God for us. I think that’s the whole “follow your bliss” thing. It’s really Thy will be done, not mine. Jesus said it all. Love the Lord with all your heart and soul, and your neighbor as yourself. That’s it. There is no one out there but us. And if we can just put God first, Om first—offer the food up, offer the day up—then there is peace.”

– Bhagavan Das, excerpt from It’s Here Now (Are You?)

November 26, 2007

Teddy and Freddy

Category: photos — Josh @ 23:42

teddychair-vi.jpg

freddychair2-vi.jpg

November 22, 2007

Exploring my Firetowers website

Category: computer guides — Josh @ 18:00

By no means do I consider myself an expert programmer. Hell, I can barely call myself a novice, really. But I do tend to have an understanding of the basic principals of web programming, and when I have something in mind for a project, I’m pretty good at laying out a design and then building a framework.

When it came to my firetower website, I had a few things in mind. I wanted people to be able to see a map with locations of all the firetowers I’ve been to. I wanted links to each location, and descriptions of the towers with photos. So, what I had at first was a single page with an imagemap with little firetower icons that you could click on in order to see descriptions of the towers.

But then I started to realize how it’d be neat to have all the descriptions in one file and dynamically generated HTML, so I could easily add more if I wanted, without having to make another HTML page for each one. If I were to visit a bunch more towers, this would be easier for me in the long run. This approach also has the added benefit of efficiency in that the content that would normally be repeated in every HTML page (such as the header, body tags, and everything else) can instead be written in one place and doled out on the fly.

The reason I decided to use Perl was because, really, it was all I had used before. Now that I’m learning a bit more about both CSS and PHP (thanks to setting up this site), it’d be interesting for me to remake the firetower site and see whether I can do a better job. But back then I was sort of afraid of both those things because they seemed so complicated.

Anyway, I spent several days (or was it weeks?) working on the code, including several major revisions which lead to increasing efficiency. Originally, several routines were all in their own files (completely isolated scripts to handle various input, always passed back and forth between scripts as environmental variables), but I found I could save a bit of trouble by using a BASIC-style top-down approach with subroutines (I know why this can be bad, but in the case of the small firetower script it worked well). What I ended up coming up with seems to work pretty well.

The basic flow of the program is like this:

Someone decides to visit the site. Cookies are checked and at this point one of two things can happen. 1. The user doesn’t have a cookie set that says they’ve read the disclaimer page (or they have a garbled cookie, or a cookie saying they disagreed to the disclaimer), so the disclaimer page is printed. 2. The user’s cookie says that they previously agreed to the disclaimer, which means that they can see the content of the site.

At the disclaimer page, the user can choose to disagree or agree. There’s also an option to use “text mode” which means that upon seeing the content of the site there will be a list of plaintext links to the tower information instead of a graphical map. This is set in a cookie so that the setting is retained throughout the visit, as well as for future visits. The option can also be changed later.

The main content of the site is handled with a few routines. The first thing that happens is a generalized header is printed which contains HTML from content-type through setting the font. So, basically, the first chunk of HTML. Next, depending on what the user’s preferred navigation choice is (text, imagemap, or google map), the main chunk of content is printed out. Since there’s also an option to re-read the disclaimer page, that gets handled here as well. There’s also an error trap in case unexpected input is passed to this part of the script – it would result in the error “Incorrect argument specified”.

After this, a generalized footer is printed containing the navigation choices. These choices POST back to the main script so the main content can be reprinted if the user wants to use google maps instead of the imagemap.

All that’s left at this point is what happens once the user clicks on a link to see more information about a firetower. The information is passed back to the main script as an environmental variable which is then passed to a separate library that contains all the information about the towers. All of the printing of tower information is done here.

A few simple benefits of my design are: 1. since cookies are checked every time the script is called, there’s no risk of the content being displayed if the cookie isn’t properly set, and 2. the firetower data library is easily expandable, and 3. the main script is pretty compact – without comments, it’s less than 10KB, and much of this is just HTML content that’s outputted to the user.

Router Cats

Category: photos — Josh @ 14:34

holden-router.JPG

jinx-router.JPG

I think our cats like to have warm butts.

- Captain Obvious

November 21, 2007

Energizer Batteries

Category: Various — Josh @ 19:31

A while ago I wrote to Energizer about an article I had read on-line. I didn’t put much effort into what I wrote. In fact, this is all I sent:

Please explain:

http://www.newstarget.com/PhotoTour_Energizer_Batteries_3.html

Basically, someone opened up an Energizer D-cell rechargeable battery and found that inside the big battery, there is a much smaller battery. Not only that, but the battery has a lifespan of only 2500mAh, which is comparable to other batteries (such as AA batteries) that are much, much cheaper. Surprisingly, I actually received a reply to my not so well-written inquiry. (I use an alias when doing stuff like this in order to track sources of spam. My name is actually Mr. Ebben.)

Dear Mr. Hajo,

Thank you for contacting Energizer and for your inquiry.

All Energizer NiMH batteries have the mAh capacity on the label. There is no deception concerning the battery capacity and the D size designation only represents the batteries physical dimensions. We have found that most D sized devices will work satisfactorily with the Energizer NiMH batteries and the rechargability of the product is a true advantage of this chemistry.

D size rechargeable batteries have historically used a smaller internal unit cell. The main driving force behind this design is to keep the battery affordable to the average consumer. High capacity rechargeable batteries are more expensive than our standard rechargeable D size battery due to the increased volume of materials needed. In addition, they require a higher capacity charger to deliver acceptable recharging times which are also more expensive. Our research indicates that the high upfront cost for the high capacity rechargeable batteries and special charger would discourage many users from trying these batteries.

Clearly a high capacity D size NiMH battery would be beneficial in certain applications but we have found that the market for this type of battery is minimal due to overall cost. Energizer will continue to evaluate this market and look for a cost effective opportunity for higher capacity NiMH batteries.

Thank you for contacting Energizer. If you need further assistance, please do not hesitate to contact us.

Wow. Well, first of all, this reply was much better than the one I received from Carl’s Jr. asking whether Hardees is superior because their logo advertises Charbroiled Thickburgers rather than Charbroiled Burgers (they said they’d contact me with more information and never did).

The Energizer reply does seem to make sense from an economical standpoint. It’s cheaper for them to sell lower-capacity batteries, regardless of the form factor. However, I really have to question whether these batteries are so expensive to make. I assume that Energizer still makes a hefty profit on their ~$12 rechargeable D batteries and that they’re trying to spin it so that it looks like the consumer is actually saving money.

In reality, many consumers probably don’t even know what ‘mAh’ is. They just think they’re getting a big battery. After all, shouldn’t a physically larger battery have more energy? That seems intuitive. Would it be impossible for them to make a higher-capacity battery and sell it for $12 and still make money? Well, I don’t have their R&D team so I can’t answer that question.

Finally, I also have to question whether a higher-capacity battery would actually require a “special”, “more expensive” charger. I will grant them that recharging a higher-capacity battery might take longer, but with a lower capacity battery, you’d just have to recharge it more often. Where’s the benefit?

Next Page »
Contents of this website are (C) Joshua J. Ebben. Do not repost any content without permission.

Temperance High Contrast Low-Bandwidth