cute Archive

3

HTML Validation is (still) pointless!

Ok, so we all know that we should write “valid”* HTML, and yet, less than 5% of websites validate for one reason or another.  Now this statistic can be a bit misleading as a comment from a user that didn’t use valid markup could invalidate the website, so granted, there is some play with the stats (per the usual), but let’s again assume that number is close.

Why?  Why do we not write perfect HTML?  Surely with the free validator on the authority’s website there is no excuse to write code that wont validate against the standard.

The answer there is simple, if and when all the major browsers (Firefox, Safari, IE, Opera, Chrome) all render a page according to the standard, then I will finally start caring about the validation of my websites.  Until then, I will continue to write code that works across the board, and just not care if it is “valid”.

To be real though, most of the browsers work pretty well, however the 800lb gorilla in the room, IE, does not.  Microsoft continually changes the standards by which they will render a page, like promising CSS 2 support in IE7 then bailing on that promise 6 months before release.  And let us not forget the horribly pathetic Javascript rendering engine, JScript, that the rest of us just ignore because it can’t be trusted to behave reliably.

So, like even on this website, we find ourselves writing “valid” code, and at the same time having to redefine valid to mean “Code that works in all the browsers”, not “Code that the W3C says is valid even though it looks like crap in IE6″.  Just to maintain a semblance of order and sanity, we use the handy IE CSS hacks where IE on Windows will actually arbitrarly execute code depending on the version of the IE browser being used.  Does that sound like an admission of guilt on the part of MS to anyone else?  OK Bill, repeat after me, “I know my browser sucks, so, instead of fixing it which would severely hamper my marketing and legal budgets, I will just allow hacks in order to ensure you nerdy web guys can still make pretty pages”.  There, was that so hard!?

So, someone feel free to run the validate against any of my websites.  Don’t bother sending me the results because I don’t care.  The sites work, the code looks good, documented, and is maintainable, so, what exactly was the complaint?

*valid code is extremely subjective, but let’s assume here I mean W3C “valid” code.
Reblog this post [with Zemanta]
Share
0

How to fix WP ECommerce

On front end pages with no ecommerce functionality, this plugin adds over 220+ database queries.  The more I messed with the code trying to make it behave, the more I understood just how horribly written this plugin is.

Now, as someone that has been doing development long enough to know, there are times that code just gets away from the development team and becomes a mess unto itself.  It happens, especially in the OSS world where code reviews are few if ever.  But, as I read the forums for this thing, the developers are just fooling themselves thinking the code is in good shape.

Here are a few basic suggestions:
1) Check to see if the page needs to execute the plugin.  If it doesnt, dont do it.  There is no reason to increase the number of queries by an order of magantuide when I am on a page that has no WP Ecommerce functionality.
2) Clean up the queries.  For example:
SELECT `id` FROM `wp_product_list` WHERE `active` IN(’1′)
should be
SELECT `id` FROM `wp_product_list` WHERE `active` = 1
It is more effiecent.

3) Index the tables!  The query above doesnt use an index.  That is right folks, the field “active” in product_list is not indexed.  This is easy and simple.

4) Use arrays or some other data structure for complex data.  Dont use the same basic query over and over again.  Example:

Share
0

Cute Baby Girl

Share
Tags:
0

Happy Valentine’s Day

This is a very typical Illianna face.

IMG_2253

Share
Tags: ,
0

Job search still going…

Since the job market is the worst my generation has ever seen, we are having to resort to other methods to pay the bills:

feedthischild

Share
Tags: ,
0

Illi is Shopping….

Share
Tags: , ,
0

Illianna’s new coat

Aunt Natalie gave Illianna a new coat/hat outfit that is just too cute.  Here is a picture, hopefully it warms your holidays like it does ours!

Illianna in a new outfit from Aunt Natalie!

Share
Tags: , ,
0

Kids in Hats

I love kids in hats. From day one I’ve had Illianna in a hat. Unfortunately she’s figured out how to take her hat off, and thinks it’s a trick. Now I’m having to wear hats as well because if she sees me in a hat then she’ll leave hers on.

Yesterday it wasn’t too hot, there was a slight breeze, and a few clouds remained in the sky from a storm that passed through the night before, so we decided to go on a walk. I got us all loaded up, which was a feat of it’s own because once the dogs see their collars come out they start going crazy, and we were just about to head off, when Missy Moo looked up at me with an evil smirk and pulled her hat right off. I only have one hat, which after recently falling into the pool I found out was made of paper (I didn’t know you could make a *real* hat from paper.), so I was in a bit of a predicament. Fortunately I saw one of Ryan’s baseball caps in the entry. It did the trick, and she kept her hat on most of the walk. Of course she wanted to try on Dada’s hat at well.

IMG_1854

Share
Tags: , , ,
0

New Photos

Cute Moments Album

Share
Tags:
0

Mommy Exists

Finally! A photo with me and Illianna together! I’m always taking them so I feel like I don’t exist.

12030345691--vday

We were supposed to go to a Valentine’s party, but Ryan had to leave the house early today so he didn’t get to play with Illianna in the morning. Since their time is so limited in the first place I thought I’d rather spend Valentine’s with my sweetheart so we went to see Dadda at work.

Ryan: This is my favorite photo yet! They both look so happy and beautiful, I can’t wait to take this picture to work to remind me everyday why I work, and why I rush home.’

Share
Tags: ,