The Perils of Foreach, or “I’ve got yer references dangling right here!”
Here’s another one of those pitfalls in PHP that might be classified as a neophyte mistake, but nevertheless it bit me in the ass a while ago. I was perplexed at first why this one test I had written kept failing, and finally it boiled down to the way I was iterating through an array multiple times in the same block of code. As it turned out, I had made the mistake of leaving a reference to a variable hanging around after I was done with it. Later, in …
Read full post: The Perils of Foreach
This post is about float values, some basic computer science, and the PHP-specific handling of floats. It’s geared for the beginner, but please read on even if you feel you’re above it, as I tried to include some interesting bits at the end.
As a programmer, I have read through more fat books than I care to think about. That doesn’t mean I’ve retained it – quite the opposite. I’ve probably forgotten at least ten facts for any one I remember. That said, there are times when I’m working on something that I have that “Oh yeahhhh… a-Dur! *self thwap*” moment …
Read full post: The Trouble With Floats, and not the Root Beer Kind
Welcome to Ruminant Nation, my (mostly) technical blog. Allow me to be your host as I ramble on about all things geeky, covering a range of topics broader than you could shake a stick at. Actually, if my blogging keeps you from randomly shaking sticks at topics, than I will be serving my purpose. As I tend to have diverse interests and a short attention span, you can expect me to discuss a veritable smattering of subjects. While some of them may be interesting to you, some may not, so if the current post isn’t your particular cup of tea, …
Read full post: Greetings and Salivations!