Writing a game-playing AI is a fun process, but checking for wins or valid moves can be one of the boring aspects of the project. More often than not, it ends up being a sizable chunk of your computation time as well. Read more on Speed Up Your Game – Playing AI with Bitboards…
Python has always been an intriguing language to me, but I’ve never been a huge fan of its syntax. I have always liked Lisps, though. Thus, when I discovered Hy a few months ago, I was completely smitten. Then I tried to set up a development environment, and was caught in a morass of old tooling and poorly explained transitions. Python 2? Python 3? Pip? Setuptools? Easy_install? Ugh. Read more on Python Environment Management for Rubyists – a Guide…
Amazon S3 (Simple Storage Service) allows users to store and retrieve content (e.g., files) from storage entities called “S3 Buckets” in the cloud with ease for a relatively small cost. A variety of software applications make use of this service.
I recently found myself in a situation where I wanted to automate pulling and parsing some content that was stored in an S3 bucket. After some looking I found Boto, an Amazon Web Services API for python. Boto offers an API for the entire Amazon Web Services family (in addition to the S3 support I was interested in).
Boto can be installed via the python package manager pip. If you don’t already have pip installed, here are the directions. Read more on Managing Amazon S3 files in Python with Boto…
Often times, when writing Python, I run into a situation that requires me to write a simple validation function.
def check_validity(item): return item.value_to_check > 0
This function is easy to test, and it’s clear what it’s supposed to be doing. But as so often happens, I may need to validate more than the single attribute I originally checked.
It is important for the app to be able to do some analysis of the data, such as minimum and maximum value, or the rate of change of a value. In order to write meaningful system tests over this functionality, I needed to simulate the data that will be generated by the end points.