Obvious Programming Tip: Check Those Bit Patterns

July 25th, 2010 (trackback)
RedonkulouslyLargeNumber.png

Sometimes, when tracking down a bug, you’ll get a bit of console spew, an exception log, or a crash log that contains a ridiculously large number. Sometimes, that is the result of a memory smasher.

Sometimes, though, it is because of a type conversion problem.

For example, if you see a log message indicating that the value 4294967295 is causing a problem, it is probably because something archived -1 on a 32 bit system and then unarchived it on 64 bit improperly.

This has come up often enough that I like to leave the Calculator app open in Programmer Mode. Then, I can copy/paste the value into Calculator and see both the bit pattern or the hex value (which will often show patterns that base-10 does not).

An aside, I have generally tried to break myself of the habit of relying upon knowledge of magic values (like 4294967295). Sure, I’ll use ‘em as clues, but I focus much more on refining my tools to make recognition of said values unnecessary as there are a slew of different values that look non-obvious in decimal form that become darned obvious in binary or hex.

Dead obvious, I know.


Posted in Objective-C, Software | No Comments »

Outdoor Light…. Wait, What the HELL IS THAT?!

July 23rd, 2010 (trackback)
Light with Bug Infestation

Now, as you look at this particular photo which isn’t that good in the first place, you might ask yourself, “Why the heck has Bill posted a photo of a random outdoor light?!?”.

Well, look closer. See that pile of what looks to be wood shavings or something inside the light?

Yeah. No. Not so much.


Light with Bug Infestation

You see, that is a gigantic pile of dead bug larva.

I have no idea what kind of bugs they were. Look kinda like ants, but I have never seen white ants before.

Termites, maybe? But why would termites take up residence in a seemingly all metal and glass light fixture!?!

In any case. FREAKY!

The light post is in front of Apple’s De Anza 6 building. The photos were actually both taken with the Camera+ app (using the image stabilization feature) on an iPhone 4. I’m very impressed with the camera. Sure, can’t compete with my T1i. Often, though, the best camera is the camera you have. That it also happens to be a really good camera is bonus!


Posted in Nature | 3 Comments »

Air Mover: Why Didn’t I Get This Years Ago??!?!

July 17th, 2010 (trackback)

As we start into the second phase of remodel where we are living in the house, there is the occasion when there are stinky fumes from the work site that I want to keep out of the livable areas.

Enter the Air Mover.

Now that I have one, I’m stunned that I didn’t pick up one before! In particular, our climate is such that it can get really damned hot during the day and still cool off at night. Even with all the windows and doors open, the interior of the house can still take a bit to cool down.

No more.

With the 1600CFM air mover pictured at left, I merely drop it on the picnic table outside our back door and put it on high. Within 20 minutes or so, the temperature inside the house is down to something quite comfortably cool.

Better yet, our garage faces south west and, thus, gets baking hot by the end of the day and doesn’t cool off until after midnight. Again, no more as the air mover does a brilliant job of pushing cool air from in the house, through the garage and out the front.

Brilliant tool. Why the hell didn’t I get one years ago?!

I picked up the one at left from Home Depot for $199 (7/17/2010).


@Ian: We have an attic fan in Missouri, too, but it tends to pull ash out of the fireplace(!!). Of course, an Eichler has neither an attic or a crawl space….

@Philippe: Push air into the house, though I’ll sometimes set it up to pull air through the house, too. As far as pushing dust in the house is concerned, we leave the doors open anyway. There aren’t really very many bugs in California (save for swarms of June Bugs this year) and the dust doesn’t seem any worse with the fan on (i.e. it is still quite dusty around here).



Posted in Tools | 3 Comments »

Miele Incognito Dishwasher; Just A Bit of Design Stupidity (In An Otherwise Awesome Product)

July 17th, 2010 (trackback)

We have had a Miele Incognito dishwasher for quite a few years. Mostly, it is a wonderful machine; does a great job of cleaning the dishes and does so extremely quietly.

It does, however, have a couple of design flaws that I wanted to record here for other Miele owners to potentially stumble across when googling their frustrations.

Recently, or dishwasher would intermittently stop mid-cycle and flash the “Intake/Drain” light, indicating that the dishwasher either had no supply or the drain had failed. When this first happened, cleaning the filter basket was enough to let it complete the cycle (even when the filter basket didn’t have anything in it). Lately, the dishwasher wouldn’t even complete the initial drain cycle (the dishwasher always fires up the pump when first turned on to clear any sitting water).

Apparently, this is not an uncommon problem.

Once the filter basket is removed, there is a bit of wire that holds down the drain pipe on top of the pump impeller. For most with this problem, taking off the drain pipe reveals that the impeller is jammed by a bit of glass, a pit, hair, or other debris.

Not in my case. The drain pipe is actually not just a pipe, but a gravity/pressure activated ball valve. It exists to prevent backwash from the disposer or sink from entering the washer. That ball valve was entirely clogged with debris.

In particular, there was an olive pit wedge behind the ball valve such that the ball valve was barely opening. This led to bits of food being wedged between ball and pipe, quite effectively clogging the drain pipe. Once fully cleaned, the dishwasher works just fine again.

The real problem is that once there is any kind of problem in the dishwasher that prevents drainage, removing the filter basket causes whatever food bits that haven’t settled into the filter basket to end up falling into the pump intake area.

To avoid this, use a shop vacuum out any standing water (and food) in the bottom of the dishwasher before removing the filter basket.

On the inexcusably stupid front, the dishwasher — like most dishwashers — has a filter basket at the bottom of the dishwasher that is designed to catch bits of food and stuff before it hits the pump. The sump filter basket has a hinged bottom so you can open it up and clean it out periodically.

Unfortunately, the hinge isn’t actually a hinge. Miele’s designers cut a corner and the “hinge” is really just a thin spot connecting the door to the filter basket. Obviously, it is cheaper to make a single injection modeled piece than to actually have a mechanical hinged connection.

Expect the hinge to fail every 3 to 5 years. Replacement cost? $135 as of the spring of 2010.


Posted in Industrial Design, Irritants | No Comments »

Galapagos April 20, 2010 (2 of 4): Zodiac Tour Of Punta Vicente Roca (Isabela Island)

July 14th, 2010 (trackback)
Isabela Island Cave

Anchoring off Punta Cicente Roca after our long journey around Isabela Island, we were greeted with quite the geological smorgasbord of coastline.

Cliffs of Isabela Island

Beyond this rather stunning point of green with cave below, you can see a much rawer bit of dark lava to the right.

To the north — just beyond that cave — are long stretches of coastline that are largely raw, relatively, fresh lava flows with swaths of green where the lava hadn’t flowed in the last 100,000 or so years. Even in this relatively small bay, there were sandy beaches, weathered cliffs of a sandstone like rock, broken tumbles of lava boulders and dramatic sheer cliffs.

With all of the different kinds of coastline in such a small area, this was clearly a spot worthy of further exploration.

Before diving into one spot (literally), we took a zodiac based tour of the shore to see what critters might be around.




Read the rest of this entry »


Posted in Photography, Travel | 1 Comment »

Galapagos April 20, 2010 (1 of 4): Crossing the Equator

July 14th, 2010 (trackback)
Common Dolphin (Delphinus)

During the night, we crossed the equator while traveling northward on our way to the westernmost islands of the Galapagos archipelago. Specifically, our destination was snorkeling off Punta Vicente Rosa (Isabela Island) followed by a hike over lava flows on Punta Espinosa (Fernandina Island).

First, though, we had to get there.

At about 6:30am, we were woken by an announcement that a couple of large schools off dolphins off both sides of the ship.

And large they were!

Literally hundreds of dolphins cruising through the water on the way to wherever dolphins go at the crack of dawn.


Common Dolphin (Delphinus)

But not just swimming. Quite a few of the dolpins seemed to want to fly, leaping high out of the water, twisting about, and splashing along.

The captain of the ship circled us about for a while amongst the dolphins and we had nearly an hour amongst these magnificent creatures.

Photography aside: This is when the Canon 100-400mm lens really came through. The dolphin were mostly far off from our boat. Having an image stabilized lens with 400mm of reach on a 1.6x crop factor camera body made these images possible.

That and a bit of patience, a touch of luck, and a willingness to burn through a few hundred exposures before 7am.


Read the rest of this entry »


Posted in Photography, Travel | No Comments »

Lighting Upgrade; The State of LEDs

May 25th, 2010 (trackback)
LED Kitchen Illumination

When remodeling our house, one goal was to move to the highest efficacy lighting while remaining cost effective. In terms of pure lumens per watt — pure efficacy — LEDs are, by far, the winner on the commercial market and have been for the last decade.

Up until two years ago (when we remodeled the kitchen), though, the cost per lumen of LED based lighting has been prohibitive outside of things like rope lights or other installations that had tons of low power, cheap, lamps. Unfortunately, rope lights and christmas lights just don’t make for good task lighting in your typical kitchen. CFLs, though, pretty much suck. After 18 months, the lamps are starting to fail, they are sometimes noisy, and their warmup time can be annoying (contrary to reports from the energy & incandescent lamp industries, CFLs are actually not terribly toxic — the amount of mercury is tiny).

I have been watching the LED market for quite a while. In particular, Best Hong Kong has an interesting selection of relatively current and relatively reasonably priced lamps. I’m using some of their products to illuminate the hand blown glass pendant lamps at the top of this picture. Thank you to EMSL for suggesting Best Hong Kong in the first place!

In monitoring the technology, the one name that came up over and over is CREE, who seems to be one of the leaders in manufacturing LEDs and LED fixtures. At least, CREE is the name that comes up most often for products targeted to residential applications (Phillips and others seem to be big names in the commercial space).

Now, if you search Amazon for CREE lamps, you’ll find a bunch of units, but the state of the art tends to be about six months behind and, frankly, comparatively expensive (of course, if anyone happens to stumble on the above link a year or two after I wrote this, I hope the prices are reasonable and the technology current).

Cree 3x 3w LED GU10 120VAC lamps

Since the technology existed, the issue was then a matter of figuring out where to find lamps with the latest CREE LED technology integrated into a package compatible with standard home lighting fixtures. After having found some CREE 3x 1 watt GU-10 (i.e. track light compatible 120v AC lamps) and found some 3 watt CREE LEDs with the same form factor as the 1 watt LEDS, a bit of searching revealed that, in fact, if you are willing to import lamps in lots of 10 (or more), you can buy the latest lighting technology

Through Alibaba.com, I found Ledsion Lighting Technology Co. Ledsion manufacturers a ton of LED based lamps, both for home use and in various commercial applications.

Not having ordered product from Ali Baba or — frankly — ordered anything direct from the manufacturer in this fashion gave me a bit of trepidation. But, nothing ventured, nothing gained.


Kitchen From Above
CFL based illumination; not as bright, no highlights.

I ordered 10 (minimum lot size) 3x3w (9w) CREE based GU-10 120VAC lamps. It took about 10 days for the company to make and ship the lamps (yes — make — a lot of the manufacturing is pretty much on-demand). It came to about $19.00 per lamp. While just about 2.5x the price of the 7w CFLs they were replacing, the LEDs generate 150% the light output and have a rated life of 50,000 hours vs. the CFL’s 8,000.

I.e. the performance and long-term cost– the efficacy — of the CREE based 3x3w LEDs completely dominates CFLs. Better still, the light quality is just stunning compared to the CFLs. The LEDs are “on” instantly and provide a very even light. Frankly, it looks better than 50 watt halogens original to the track in that the light is, for lack of a better term, more comfortable; less harsh.

The image at left was taken while the counter was illuminated by the old CFLs with considerably more light coming from other sources. No highlights on the counter, to speak of. With CFLs, the track lighting was nothing more than ambient overhead lighting. With the LEDs, it provides more ambient light and enough directed light to provide for highlighted spots.

Long term viability obviously remains to be seen, but I remain optimistic.

I returned to the Lesdion Lighting Technology to order more lamps and see if I could grab some 12vAC or DC MR-16 CREE based LEDs for other applications and, via AliBaba’s built in chat system, ended up chatting with the seller. Extremely professional, patient, and helpful. Answered a handful of technical questions and I was able to customize my order a bit to meet my needs. (And, really, I’m still a bit in shock that, through Alibaba, I can talk directly to a manufacturer to get a relative one off of a product with the custom color, lens, and wattage I desire. I feel like I just experienced a bit of Blade Runner from my living room.)

All in all, I’m extremely happy that LED technology has advanced to the state of being usable in “normal” home applications. While still slightly initially pricy, the long term costs may be significantly less and the reduced energy use is attractive. Because of the increased light output from the track lights, I’m finding that I no longer need to use the 30 to 40 watts of florescent tube under-lighting!


Posted in Remodel, Technology | 2 Comments »

Galapagos April 19, 2010 (2 of 2): Beach Combing & Hiking Punta Cormorant (Floreana Island)

May 15th, 2010 (trackback)
Slate Pencil Urchin And Roger

After the wonderful snorkeling in the AM off Champion Island, the Endeavor lifted anchor at lunch and took a short cruise to anchor just off of Cormorant Point (Punta Cormorant) for an afternoon of beach walking and hiking on Island Floreana.

Floreana is a middle-aged island in the archipelago. Thus, it actually has honest-to-goodness beaches while still having volcanic cones and a handful of fairly raw, mostly lifeless, lava flows.

Access to any part of any of the Galapagos islands outside of the handful of human enclaves is extremely restricted in what is, effectively, a gigantic natural park.

Floreana offers one of the few beaches upon which we could wander freely. And so we did prior to taking a walk across Cormorant Point to a second beach that was also the nesting grounds of green turtles.

Upon landing, Roger immediately found something interesting. In this case, a sun-bleached pencil urchin.

Roger Being Splashed
Sea Lions In Surf

On this particular Lindblad cruise, there were actually quite a number of kids.

The free beach time was also an opportunity for the kids to swim about and generally get in some quality beach play.

The waters were warm and, on this beach, quite clear.

Not surprisingly, the kids weren’t the only ones to show up on such a beautiful beach. The ever present sea lions were out and about, too. While the kids were in the water, you would often catch a glimpse of a sea lion or two swimming about near or, even, between various swimmers!



Brown Pelican (Pelecanus occidentalis) Study: Head Profile

The beach had its share of creatures beyond sea lions, too.

This brown pelican — rather grand brown pelican — was hanging out on one end of the beach.

Combining the lack of fear of humans with the low afternoon light, it made for a very patient and stunning photography model!

I ended up taking about 100 frames of this one bird, varying parameters, angle and framing.

Between the patience of the bird and me being able to take the time to do a proper photographic study of this magnificent creature, I ended up with enough “keepers” to devote a post to this one subject!

What an absolutely incredible creature!

Read the rest of this entry »


Posted in Photography, Travel | 2 Comments »

The Brown Pelican (Galapagos April 19, 2010: Punta Cormorant on Floreana Island)

May 15th, 2010 (trackback)
Brown Pelican (Pelecanus occidentalis) Study: Portrait

While beachwalking on Island Floreana, we came across a brown pelican hanging out on one end of the beach.

It was late afternoon and the sun was fairly low in the sky, making for some wonderful warm lighting as long as I could maneuver around to the right angle.

Which, of course, proved to be easy given that the pelican really couldn’t care less what about me.

Thus, photo study time….

Pelicans are quite interesting geometrically. They can choose to maintain a relatively horizontal profile or can lift their head up, tuck in their bill, and go for a vertical appearance as in this shot.

With just a bit of a wind, the feathers on the back of the bird’s head were fluttering slightly in the wind.

The color near the end of that viciously hooked bill is exquisite, too.

Brown Pelican (Pelecanus occidentalis) Study: Profile

Like I said, wait for a moment and you can grab a vertical profile or a nice horizontal shot like this one.

Given the texture of the feathers, I’d bet this pelican had been fishing not long before and was so patient because the sun was warm.

Brown Pelican (Pelecanus occidentalis) Study: The Blink

Take enough photos and you’ll eventually get something truly out of the ordinary.

In this case, I caught the pelican mid blink. That would be the pelican’s nictitating membrane, if I’m not mistaken.

I would like to say that it was my awesome skills applied to an epic shutter finger that yielded this photo.

Not so much.

This is the product of taking about 100+ photos of this one bird. Choose an angle, choose a framing, choose some settings (I shot all of these in manual mode to get a feel for it), and fire off three to five frames (my camera is pretty much always in multi-frame mode).

The beauty of digital is that there is no more cost incurred, save for a bit of your time selecting the best shots, for shooting one frame versus 10 of any given subject!


Posted in Photography, Travel | 1 Comment »

Galapagos April 19, 2010 (1 of 2): Snorkeling Champion Islet Off Island Floreana

May 11th, 2010 (trackback)
On Zodiac To Snorkeling

The seas around the Galapagos are every bit as biologically interesting and diverse as the land, but in a different way.

Whereas there are relatively few land dwelling species on the island, all unique and generally completely lacking in fear of humans, the sea life is more in line with what you would expect in relatively tropical waters around the world.

While the fish were fairly typical, the underwater environment was otherwise atypical. Notably, there simply isn’t any significant coral growth. No coral heads of any size. No coral reefs and none of the rough, nook and cranny filled, walls of coral growth normally associated with tons of tropical fish.

Instead, and making the waters of the Galapagos fairly unique in and of themselves, the lava foundation of the islands provides all the hidy holes marine life of all sizes might need.

School of Fish

To provide the biomass to feed the incredible numbers of fish and other marine life, the islands sit at the cross roads of five ocean currents, with major currents dominating from the South, North, or West depending on season and El Nino.

Some of the currents are quite deep and bring up tons and tons of biomass in the form of plankton and other deep sea creatures as the currents hit the archipelago.

As a result, there is plenty of biomass to support a dense and diverse marine population. Yet, those very currents — the one up the west coast of South America from the Antarctic — also means that the water temperatures can be really cold for part of the year.

Hence, no significant coral growth. Coral needs a constant, relatively warm, water temperature.

Travel tip: If you are planning on visiting the Galapagos, go in April/May. The predominant water current is very warm and, thus, we spent the week snorkeling in 79 to 82 degree water. No wetsuit needed. If you were to visit the same locations in August-ish time frame, the water would be a chilly 65 degrees!

In any case, enough words. What about the creatures themselves?

Read the rest of this entry »


Posted in Photography, Travel | 6 Comments »