PHP

  • First Try I started with a simple while loop: Surely, this is non-optimal: how many times will this loop run? 1000? Surely we can reduce it! Possible optimizations include: Start at 3 instead of 0! Surely we can skip numbers if we do find a multiple of 3 or 5? That is, keep adding 3

    Read more →

  • A curious error bumped into me this week while using Doctrine2 at work, when users try to re-register with a previously used username or email (its always their own username or email). A PDOException is always raised in these cases when we save to the database, as it should. The problem emerges when we have

    Read more →

  • Zend_Auth does not work with secure cookies, nor is it meant to and that’s OK. Its all in how one configures their server and site. I did spend literally all day on it debugging and trying to trace code to determine if my heavy refactoring was responsible. It turned out that I had changed a

    Read more →