I was faced with a problem the other day in which I needed to select the previous and next row in a MySQL database. This can easily done if you are using an auto-increment field as the condition. Unfortunately, the results need to be sorted with 2 different conditions, making the auto-increment field useless. One thing I didn't want to do was use server-side programming to loop through the full dataset. This will work fine for smaller datasets, but I'm after scalability and performance. I ... Read More
One of my favorite optimization techniques is memoization. Memoization is a technique used to store ... Read More
I was faced with a problem the other day in which I needed to select the previous and next row in a ... Read More