Archive for the 'Uncategorized' Category


Cheap Tools 0

I often joke that since buying a house, my life has become short stints of work and sleep between trips to Home Depot. Between items on my todo list like painting our vaulted living room, building a wall to close in a loft, adding kitchen cabinets, and giving our bathroom a face-lift, I’ve had to buy quite a few different tools. Being pretty frugal (my wife would probably say obsessively so), I hate to spend more money on tools than I have to, especially when those tools probably won’t see a ton of use.

Enter the list of Harbor Freight Gems. If you’re unfamiliar with Harbor Freight, they sell a lot of off-brand tools at pretty good prices. Occasionally you get more than you pay for.

Less is More 1

Canon just announced the G11, the latest in the G lineup of compact cameras that give you SLR-ish control and deliver great image quality. What immediately jumped out at me was that for the first time in the series, Canon actually reduced the resolution (10MP in the G11 compared to 14MP in the G10).

It’s no secret that higher resolution doesn’t necessarily mean a better picture, and I’d say this is undeniable proof that Canon is really shooting for the best image quality possible in the compact G cameras, regardless of how it might read on paper. Just makes me want one all the more.

Cruisecontrol Test Results with Maven 2

Today I finally figured out how to integrate the results of JUnit tests run via the Maven surefire plugin with the Test Results tab in CruiseControl. It was actually blindingly simple, however, I couldn’t seem to find a straight-forward explanation anywhere.

By default, the Surefire plugin dumps the JUnit XML logs into the target/surefire-reports directory. For the results to show on the Test Results tab, these log files simply need to be merged into the Cruisecontrol log. This is accomplished via a merge element in the log section of the Cruisecontrol config.xml file:

<log>
	<merge
		dir="projects/${project.name}/target/surefire-reports"
		pattern="TEST-*.xml"/>
</log>

Wonderfully funnily 2

Can this be real? I have a feeling that something’s being translated or rewritten with liberal use of a thesaurus. But I don’t get the point — there aren’t any ads that I can see, so it’s not just filler to bump up search rankings and get clicks. Weird.

When Objects Aren’t 0

When unserializing an object whose class definition is not present, PHP returns an instance of the special type, __PHP_Incomplete_Class, which issues notices if you attempt to call a method or access a property.

For example, this code produces the following:

andrew@fake:~$ php incomplete.php
object(__PHP_Incomplete_Class)#1 (2) {
  ["__PHP_Incomplete_Class_Name"]=>
  string(4) "test"
  ["name"]=>
  string(2) "hi"
}

Notice: main(): The script tried to execute a method or access a property of an
incomplete object. Please ensure that the class definition "test" of the object you
are trying to operate on was loaded _before_ unserialize() gets called or provide
a __autoload() function to load the class definition  in /home/andrew/test2.php
on line 7
NULL

Interestingly, the is_object method returns false when given an instance of __PHP_Incomplete_Class. This seems to be in contradiction with var_dump (as evidenced above), gettype, and get_class, all of which return values indicating that the incomplete class is a normal object.

This was reported as bug 19842 way back in 2002, but didn’t seem to be considered a problem. (The suggested solution was simply to have all class definitions present before unserializing that object.)

To be fair, this behavior of is_object is documented in the notes section of its manual page. It also appears to be intentional, judging from this section in ext/standard/type.c, determining whether a variable is an object:

   220                          if (!strcmp(ce->name, INCOMPLETE_CLASS)) {
   221                                  RETURN_FALSE;
   222                          }

That said, it’s a little confusing when you first run into it, and means that if you’re examining a session for which you don’t have all the class definitions (writing tools outside of your application, for instance), it’s just a little bit harder to determine which variables within the session are objects.

The workaround, of course, is easy, given that most other methods treat the object as an object: $is_object = (get_class($o) !== FALSE);.

Best PHP Bug Report 1

If this isn’t the best PHP bug report ever, it’s definitely in the running.

Even in Vegas… 2



flower, originally uploaded by imarealgeek.

…we get springtime. I was supposed to be on the lookout for shots for the latest Slacker topic (a weekly photo group started by some friends at work), but had to do some research first on how well the E410 would deal with the reverse-lens macro trick, since my current photo idea requires it.

Unfortunately, this was a bit of a backfire, as I was trying to convince Mindy that we should head out to watch the sunset. Upon seeing this she commented, “See, you don’t even need to leave your own backyard!”

Well, there’s always tomorrow’s sunrise.

Dunes of Death Valley 1



Dunes 4, originally uploaded by imarealgeek.

I said I’d go back to Rhyolite, and go back I did. This time we grabbed a hotel room in Beatty, NV, about 20 miles outside of the park (and just a few from Rhyolite). I hit Rhyolite for the sunrise (disappointing at best, due to the mountains surrounding the ghost town), and then headed out to the dunes. Afterwards, we made our way Southward through the park before heading home. Sometimes I really love living in the Southwest.

Social Engineering 9

So I just recently downloaded something via bittorrent. We won’t go into exactly what, but let’s just say that Firefox’s JavaScript brilliance caused it randomly consume ~100% CPU for long periods of time, which then caused my scheduled recordings to become corrupt (not really sure why, because all they have to do is write a compressed MPEG stream to disk, but it happened). The download consisted of a single .rar file, which I unrared. It expanded into two files: another rar and a “read me first.txt”. Like any good member of the male gender, I opened the documentation before continuing.

Thanks for downloading the torrent file file
To get the pw to extract the file is simple
1)go to www.Xboxfreebie.com 
2)input any email address it doesnt have to be yours and click submit
3) You will see green writing on the next page.
The first word in green with the exclamation point is the password
you have to use it with the exclaimation point
Simple huh
Enjoy the file

My first instinct was to search for a new version that didn’t require me to help someone win a free XBox (or whatever — I didn’t look). But then I began to think… What would a site like XBoxFreebie.com display after you’d given them your email address? Knowing that it was a one word phrase that ended in an exclamation point narrowed my choices immensely. Congratulations! You guessed the password.

The Classics 0

My dad sent me a link today to a new photo gallery he’d posted (he uses phanfare). It had a few videos in it, too, so I put my headphones on. Then I noticed that there was music playing. Vivaldi. Four Seasons. Download, listen. Excellent.

Next Page »