Archive for March, 2009

say hi to your NaN!

Tuesday, March 17th, 2009

Recently I cleaned up some shopping stuff so that if I got a single slider (that’s what I call the number picker guys) that was kind of empty, I would kill it.  I knew that it wasn’t really in general, and figured that I would someday have to clean it up.  Well, tonight was the night.  Stuff that looked like this

slider_nan

now doesn’t have that last chunk.  Not real sure where it comes from, but at least now I can clean it up 🙂

Also cleaned up something a little more subtle.  My goal is to have a pretty generic shopping engine, which doesn’t know the difference between a hard drive form factor and the clarity of a diamond.  That’s fine, except that also means it doesn’t know that IsLabCreated may not be the most meaningful, or weird contract warranty terms, or whatever.  Tonight I added the ability to ignore a category of stuff.  I even made it smart so that I walk the lineage of a category and look for ignore lists.  The cool part there is that I didn’t need to ignore IsLabCreated for each type of diamond ring.  So now, this

ignore

has the weird stuff stripped out.  Granted I need to do a database insert each time I find something else to ignore, but that’s ok.  I don’t have that many top level categories to manage (for now).

Next up, I would like to specify the order for distinctables to appear.  Like color and clarity before number of stones, or the like.

Tonight it hit me that once I get a little further along, I can go put up some “looking for a friend in the diamond comparing business?” flyers at byu, since I think a few folks down there are looking for rings 🙂

Anyone have any thoughts on mycomparer.com?  I registered it today.  Gotta be better than shopthar, right?  Still liking my diamondcomparer.com.

Enjoy!

Earl

me look pretty one day

Sunday, March 15th, 2009

So, trying to clean some things up a bit on the shopping stuff.  First thing I did was get rid of the check boxes and replaced them with links.  The next was to add a couple currency formatters.  A little subtle, but I think, you know a year or two of such changes could help a lot 🙂

Before:

prices_before_left

After:

prices_after_left

Before:

prices_before_rightAfter:

prices_after_right

Pretty nice, right?  Especially if anyone buys pretty well anything that has a comma in its price 🙂  Sorry, I don’t have the old check box stuff.  I updated too quick.

Enjoy!

Earl

a little documentation

Saturday, March 14th, 2009

Awhile ago, I wrote about LogHelper.  Well, sort of.  Turns out I just mentioned that I hadn’t really mentioned it before then went on my way.  Nothing too remarkable I guess, I would just like to parse folks’ rather arbitrary logs and allow them to do some pretty set analytics.  The theory is that folks would send me their logs, I would ingest them and output some pretty graphs.  As a proof of concept, I tried to create and eat my own dog food with HolaServers and LogHelper.  I scp’d logs from HolaServers to another box, parsed the logs there with good old pig (which I have written about), and display graphs using the Google Visualization API.  The cool graphs look like this

hs_traffic_graph1

A little side note.  Sometime ago, I made it so you could email a photo to your HolaServers site.  I would check once a minute for messages and act accordingly.  Well, the code I was using logged quite a bit and I didn’t realize it was logging anything.  Long story short, I filled up /tmp and my logging stuff started emailing me every few minutes.  So, I commented out a cron or two and quit doing my LogHelper stuff.  A week or two later I discovered that the mail checker was the real culprit but couldn’t figure out how to get the logging to work again.  Even if I had the following few lines, I would have saved several nights / hours.

  • the magic conf file is here conf/loghelper.com/mylogadm.conf, which needs to be copied to /etc/mylogadm.conf
  • on client boxes, this is the magic cron
  • 5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/sbin/logadm -p now /opt/coolstack/apache2/logs/mylog -v -f /etc/mylogadm.conf
  • on the server box, this is the magic cron
  • 2,7,12,17,22,27,32,37,42,47,52,57 * * * * perl -I/export/home/earl/svn/lib /export/home/earl/svn/crons/loghelper/go

If you want to see the stats in action, just sign up for an HolaServers site, get some traffic, and then wait a few minutes to see things show up.

Enjoy!

Earl

now flex!

Sunday, March 8th, 2009

So, I dove in and learned some flex.  I watched many of these videos, referred to this gallery, installed flex builder 3 and cut some code for ShopThar.  I did a few things in not a ton of time, none of which anyone has likely noticed, but here’s a little list.

  1. ShopThar pages, like this one, have a nice image pulled from amazon for ranking stars.  There was a bug where flex would translate the 100 based numbers into a 5.5 rating on a 5 scale.  Got a nice broken image.  So, I finally tracked down the problem (which was hard because what I thought was a built in flex function was actually a shopthar function) and fixed it.  No more broken images on reviews!
  2. Used to have ARRAY or HASH stuff show up on product pages.  Again, it was hard to track down, but once I found a page with the problem, did some firebug magic, worked around memcache hanging onto bad data, and thought I fixed it.  Turns out the jury may be out a bit.  Just ran a couple queries.  
    • delete from sh_product where id in (select product_id from sh_product_distinctable where raw_value like ‘ARRAY%’);
    • Query OK, 1 row affected (7.17 sec)
    • delete from sh_product where id in (select product_id from sh_product_distinctable where raw_value like ‘HASH%’);
    • Query OK, 9665 rows affected (5 min 1.95 sec)
  3. Sometimes I would get NAN (not a number) for slider stuff.  Turns out I was sending out garbage data.  I look specifically for that garbage data and filter it out.  Not the best fix, but at least I fixed that one instance.
  4. Didn’t send out sets of distinctables (the checkboxes) when there was only one choice.  Not much of a choice if there’s only one, huh!

Flex!  I did all of that in flex.  Wow, better go update the resume, huh!  Did I ever mention that I paid someone to make my resume prettier?  Look how pretty!

Coming up next?

  1. Change the checkboxes and filtering to act more like Yahoo! mail filtering.  I would like folks to be able to pick more than one thing from a set, and don’t quite have that worked out in my head.
  2. Put the categories which are currently on the top of the page in html into flex.
  3. See what I think about changing sliders to use the NumericStepper component.
  4. Do some google analytics stuff for tighter tracking.

I am starting to get spider more and more, but real traffic hasn’t started to hit.

Oh, and I bought and put up diamondcomparer.com.  Took an hour or two to get all up and running.  A whole new vertical in an hour or two.  Someday this stuff will just have to start making money.  I want to get the engine working really smooth on diamondcomparer. 

Enjoy!

Earl