So. Going to make an effort to actually post to this thing. If anyone stumbles accross this anytime soon, I would like to warn you/defend myself.
I am a programmer web developer coder MAGICAL COMPUTER SHAMAN. Not a writer. I can’t write. This will be painful. Bear with me please.
This will be in part an experiment in SEO, as well as an attempt to contribute back to the internets from whom I have learned so much. I’ll post a lot of links (that whole sentence was supposed to be links but I can’t think of any). Maybe somebody links to me? That would be nice, but until I can think of something interesting to write about, I wont count on it.
Today’s Code:
http://betterexplained.com/articles/swap-two-variables-using-xor/
apparently:
a = a xor b
b = a xor b
a = a xor b
Will switch a and b without needing a temporary variable. this is all well and dandy, but until proven otherwise, doesn’t work in php. Which means that either php suffers a fundamental problem with some pretty basic elements of programming (= and xor) or I’m doing it wrong. Normally I’d go with option B, but lately I’ve found php to more and more wonky, doing things I wouldn’t really expect. So I’ll play around with it a bit more, see if I can’t get the darn thing to work, but I wont get my hopes up.