Taking advantage of the Amazon price drop policy

If you purchase an item sold by Amazon and the price drops within 7 days, they will refund the difference. It used to be thirty days but too many folks took advantage of that. I quite like this policy, but I have to admit that I rarely ever go and check whether the prices of my purchases have dropped within a week. Since I have been exploring APIs lately, I decided this would be an excellent opportunity to work with Google's Gmail API. Combined with scraping Amazon price data, this makes it possible to automatically determine whether I am eligible for a refund. If this occurs, I will now be notified by email.

Read More

Grid coordinates of cubic shells in n-dimensional space

Recently, I've been thinking about grid coordinates in n-dimensional systems. When I first encountered a problem that required the generation of the lattice coordinates in n-space I was temporarily stumped. I was unsure of how to write an algorithm that can generate all points as a function of the dimension and the length of the cube. Previously, I always knew what dimensions I was working in and creating the coordinates of a cube of length N in for example three dimensions simply came down to nested loops:

Read More