Categories
Programmer's Mindset

I Need More Cache

I hate knowing the answer to a problem, but taking for ever to implement it.  Cacheing is probably one of the most important things I can do to improve a website, and yet it is one of my worst nightmares.  It shouldn’t be at all.  I have a fear of using outdated data because of my spaghetti code. 🙁

I am working on this and coming to solutions slowly.  It really was apparent on the last update I made.  I had a script that was running probably a thousand plus queries.  During testing by myself, of course I didn’t notice it.  Launch it live to thousands of users running thousands of queries and you quickly learn about the mistake.  To the tune of taking the server to its ‘knees’, which is kinda neat because they don’t have knees.  Throw some quick cacheing into the mix and you have a happy system, and a happy system administrator (ME).

Check out the new feature that caused my little nightmare on bowlingball.com top sellers and bowlingball.com popular searches.

Categories
Programmer's Mindset

Mysql Master / Slave Thoughts

I have been thinking about a way to have isolated machines that I can almost take on and off line very easily.  Here are my thoughts and would love feedback on my “solution”.

I am almost thinking about “spinning” the traditional model.  I will have my Administrative DB(ADB) in a central place.  ADB will be where I pull all reporting, master updates of product and pricing, all orders, etc….

On each individual web server I will have a slave DB (SDB) that will replicate all data from ADB.  The individual web servers will pull information from SDB for pricing, dynamic web pages, etc…  It will also have its own database (ODB) for writes (order information mainly, maybe other statistics as well).  When an order is placed (instead of trying to reach ADB) it will put the information into ODB.

Now I can have a cron job that will pull the data off each ODB to update ADB for reporting purposes.

Why?

  1. Each web server should be able to run without relying on any other machine.
  2. Once the web server’s SDB is up to date, there should be very little delays in price/product changes.
  3. Scalability, simply launch a new server to be up and running.

Does this make sense?
Web servers write to ODB
Administrative server reads from ODB to update itself which replicates to all the SDB (Every slave/web server becomes a realtime backup of ADB)

Here is a diagram of my thoughts.

DB Proof of Concept
DB Proof of Concept
Reblog this post [with Zemanta]
Categories
Programmer's Mindset

Cart Level Promotions with Checkout By Amazon

I was recently trying to offer a cart-level promotion with “Checkout by Amazon”  and while looking through their Developer Guide, I became very confused.  Their promotion section lead me to believe that I could offer such a discount, but it wasn’t clear at all.  I tried googling it, and other research to no avail. 🙁

I finally read through the XSD which is not the most fun things to use to try and solve a particular problem.  But the answer was there.  To offer a cart level promotion, you simple need <CartPromotionId>DiscountName</CartPromotionId> in your <Cart></Cart> section.  And then the same <Promotions> section that they have laid out in the documentation for item-level discounts.

I hope that this helps someone find the information faster than I did.

This answers the question: “How do I offer cart-level promotions in checkout by Amazon?

Categories
Bowling Programmer's Mindset

Added The Ability to Include Discontinued Items

I have heard many complaints from customers that there are too many products on bowlingball.com that are “Not Available”.  When looking at a list of bowling balls or bowling shoes they would see them scattered throughout the list and wouldn’t understand why there were there. 

“If they are not available, why do you keep them on the site?”

Our answer is simple, people like to look up information on older equipment.  They also like to compare old equipment to new equipment.  And the real die hard bowlers like to reminisce over older equipment.

Well now your searches will initially not contain the added bulk of these additional items.  But if you want to find them, all you have to do is check the box that say include discontinued items.

Categories
Programmer's Mindset

How I Got Started Programming

Ok, so I somehow I came across a post by Joe Stump from Digg and I have found this “chain letter” type post. I want to participate, so here goes. 🙂

How I got started programming:

  1. How old were you when you started programming? I had a real interest (unexplainably) in computers when I was around the age of 7 even though I had only used one a couple of times. My mom dated a guy when I was about 9 whom had a computer and he had King’s Quest 3 (I fell in love with computers).
  2. How did you get started in programming? My mother met her current husband and he had a Tandy Cocoa Color III.
    He taught me BASIC and I used a reference book that I still have
    today. It had every command on a separate page with a description of
    what it did. I went through the book trying most of the commands.
  3. What was your first language? My first language was BASIC, however I also did quite a bit on the TI-85. I create a Space Invaders type game on the TI-85.
  4. What was the first real program you wrote? My first program was a simple quiz game for my youngest sister, it taught her our address, phone number, etc… I also did some db work in a program called “Q&A” for the company my mom worked for “Connery Concrete”.
  5. What languages have you used since you started programming? I started in BASIC, in high school I became a Pascal user, after college I moved to Perl as I became a “web guy”, and have since changed to PHP. I have dabbled in others, but very limited.
  6. What was your first professional programming gig? My first paid job was for Connery Concrete doing some DB work. They did not store their information in a convenient way to make use of it. I also did similar work for a travel company. Before I started they entered all of their customer data into “Q&A” and then hand wrote all of the information onto forms. What a complete waste of time that was.
  7. If there is one thing you learned along the way that you would tell new developers, what would it be? Think outside the box. I can’t tell you how many things I have been able to do because I have thought about the problem and solution a little differently than any of my colleagues. “There is more than one way to skin a cat” is something my mom used to say all the time.
  8. What’s the most fun you’ve ever had programming? I have to say what I am doing now is. I am part of a team that cares where our project is going. Ecommerce is such a competitive field, and selling bowling balls is tricky. Trying to be on the cutting edge and know that you are doing it before the competition can blink is a GREAT feeling. Having a boss that doesn’t just settle on a store bought solution because it may be cheaper makes me feel very appreciated. I have really grown to love the sport and the nuances that go into it. And to be able to spend my day working in this industry is just plain awesome.

I had to follow suit when I saw this post from Joe Stump. I can’t imaging working with such cutting edge technology persona’s as Kevin Rose, and the old crew from the Tech TV era.

I wish I had people to tag. The only other programmer that I knew and respected was the best man in my wedding, but he has pretty much cut me out of his life. 🙁 Long story, but I miss his friendship. The long talks we could have. Working together on programming projects. Makes me sad when I think about it.

Oh well. He knows who he is and if he wants to carry on this type of post, I would be honored.

Categories
Programmer's Mindset

Cleaning our offices for a Thu…

Cleaning our offices for a Thur meeting with a major executive in the bowling industry. 🙂 Gotta love putting on a show.

Categories
Programmer's Mindset

Twitter Updates for 2008-07-21

Powered by Twitter Tools.

Categories
Programmer's Mindset

Helping beta test MEEBO, check…

Helping beta test MEEBO, check out our chat room at http://ping.fm/2wHo1

Categories
Programmer's Mindset

@RonnieS thanks for the kudos….

@RonnieS thanks for the kudos. We did the Black Widow Venom quick because of the release date. There will be plenty more to come soon.

Categories
Programmer's Mindset

http://tinyurl.com/5asrft

http://tinyurl.com/5asrft