Question: For the 4 jobs that I have worked at, I dressed formal twice, business casual once and more casual once. How important is the dressing code to programming interviews these days? Will the employer or interviewer not take you seriously if you come in casually: plain shirt and khaki pants with casual walking shoes(non-sneakers)?

Answer: 
This is for Silicon Valley:

My rule of thumb is to dress nicely enough to show I made an effort, but not so formally as to make my interviewer uncomfortable or make them think I know nothing of the Valley culture. I'm a woman, so that usually boils down to nice dark-wash trouser-cut jeans, a nice shirt, good (clean) low-heeled or flat shoes, and maybe a jacket (but I always wear jackets :) ). 

One thing to keep in mind is that you may be asked to contort yourself to write on a very small whiteboard, and there may be a bunch of kneeling and reaching. So if you wear a jacket, be prepared to take it off and make sure it wasn't covering up a hole or stains. If you wear heels, make sure you can stand in them for a while comfortably, and that if you need to think on your feet (literally) you won't be distracted by the howling pain in your compressed little toe. This is also why a knee-length or shorter skirt is usually a bad idea, though I've seen it being pulled off successfully.

I've interviewed a lot of people, too. If someone shows up wearing a suit I'm usually pretty amused, but it doesn't really count against them. OTOH if someone comes in wearing a wrinkled t-shirt and dirty jeans, that's not a good first impression because it broadcasts a lack of caring and professionalism.
The company I just crossed the one-year mark is technically business casual, which most days means cargo pants and a polo shirt.

When I came in to interview, the HR guy warned me, "We're business casual. If you wear a suit, we will laugh at you."

Point: do what's going to fit in, and you don't have to be a mind reader about that. You can actually ask the HR person you schedule it with, that's not weird.