writings Archive

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

Litany of an Atrocity Posted….again

A few of you have read my short story ” Litany of an Atrocity “, and the response has been pretty positive. Although I had removed it from the website for a couple of years, I have again decided to post it on here for anyone to read it that would like to do so. It is dark, written in the second person, and can be disturbing. I was in a dark place when I wrote this, but still enjoy reading it nevertheless. I hope you enjoy…or not.

Share
Tags:
0

Wonderful

When I was working retail long ago we had a tv in my department that played music videos. Fortunately for me I controlled what videos were playing, because trust me, there were some bad ones. There was one section on one of the tapes that had 4 songs back to back that I loved… something by Adam Ant, The Cure, Annie Lennox, and OMD. I would run across my department and rewind the tape again and again. Somehow it made the day more bareable.

*6th time to listen to this song and counting*

Did I tell you how much I miss
Your sweet kiss?
Did I tell you I didnt cry?
Well I lied
I lie lie lied
Over real over
When I nearly hit the face I loved
So tired of packaging the anger
Always pushing you away

Did I tell you youre wonderful?
I miss you yes I do
Did I tell you that I was wrong?
I was wrong
Cos youre wonderful yeah

Did I tell you how much I miss
Your smile?
Did I tell you I was okay?
Well no way
No way way way

Youre wonderful yeah yeah

Now now now each and every day
I realize the price I have to pay
You youre wonderful
And now for your information
Im walking around like an arm decoration

You youre wonderful
So high I cant get over it
So deep I cant get under it
You
Youre wonderful yeah
Youre wonderful yeah yeah
Youre wonderful yeah yeah
Youre wonderful yeah yeah
Wonderful

Did I tell you youre wonderful?
I miss you yes I do
Did I tell you that I was wrong?
I was wrong
For so long long long

Share
Tags: ,
0

If I Had My Life to Live Over – by Erma Bombeck

I would have gone to bed when I was sick instead of pretending the earth would go into a holding pattern if I weren’t there for the day.
I would have burned the pink candle sculpted like a rose before it melted in storage.
I would have talked less and listened more.
I would have invited friends over to dinner even if the carpet was stained, or the sofa faded.
I would have eaten the popcorn in the ‘good’ living room and worried much less about the dirt when someone wanted to light a fire in the fireplace.
I would have taken the time to listen to my grandfather ramble about his youth.
I would have shared more of the responsibility carried by my husband.
I would never have insisted the car windows be rolled up on a summer day because my hair had just been teased and sprayed.
I would have sat on the lawn with my grass stains.
I would have cried and laughed less while watching television and more while watching life.
I would never have bought anything just because it was practical, wouldn’t show soil, or was guaranteed to last a lifetime.
Instead of wishing away nine months of pregnancy, I’d have cherished every moment and realized that the wonderment growing inside me was the only chance in life to assist God in a miracle.
When my kids kissed me impetuously, I would never have said, “Later. Now go get washed up for dinner.”
There would have been more “I love you’s”; more “I’m sorry’s.”

But mostly, given another shot at life, I would seize every minute… look at it and really see it … live it and never give it back. STOP SWEATING THE SMALL STUFF!!!

Share
0

The Whiter Side of Racism

A short story I have written, examining one of the major social problems in the US:

Looking back on that rather tumultuous time, what I remember the most is not the classes, but the lessons taught to me outside of the classroom. Never found on any syllabus, never discussed in polite company, but a very real conflict raging all around me.

As a young freshman, barely a week past my eighteenth birthday, I was so excited to start classes at the large university nestled firmly in the “Bible belt” of the United States. I was still a bit jet-lagged after my long flight; still more than a little intimidated by this new country to which I have journeyed, but eager and excited…more

Share
Tags:
0

Doctors

from Anne Rice\’s Servant of the Bones: I understood something further about them. They regarded their science as omnipotent. Science was the explanation not only for me but for anything and everything. In other words, they were materialists who beheld their science as magic.

Share