09/30/15

Strings, Times and Databases

I’m not an expert when it comes to database management but it’s been my understanding that the preferred method to reference a point in time is to use a DATETIME or TIMESTAMP object. There are obviously some major differences between these two, but both work well in situations where dates or times need to be stored.

I was familiar with this process. Both DATETIME and TIMESTAMP were known to me and used in the past but starting on the Graduate Application Interface I noticed something a little different. The Graduate Interface used strings to denote the submission date of an application.

I was a little taken aback at first. It seemed like a really inefficient way to store a date. Unfortunately, changing the database was a no-no so we had to soldier on.

There was also no indication anywhere of the desired format for the date string. Because we were in America (and the use of slashes) it could be assumed that the date ’08/03/1992′ was August 3rd, in the year 1992 but there was no way to really be certain. Even worse, I found dates entered into the system quite awhile ago that used dashes instead of slashes.

I had to account for this when it came time to filter the data via a user-inserted date. This wasn’t difficult, but it was frustrating. I then used PHP’s native strtotime() function to convert the date into a unix timestamp, which made direct comparisons possible.

I learned to take caution when dealing with the DATETIME and TIMESTAMP objects and to make sure that formats are specified and adhered to before development.

12/10/13

Fun With Arduino

Arduino_3

This is the famous Arduino. If you haven’t heard of this wonderful machine yet I would highly suggest doing some research on the topic, or at the very least heading over to their site at http://arduino.cc/

Arduino_2

Here I have started to wire the pieces of a simple chord-synthesizer together. This project was coupled with Max/MSP and used several buttons and a slider to play the root, third and fifth of a given note at the users discretion.

Arduino_1

I purchased a starter pack from sparkfun.com which gives you access to a small sample of sensors, wires, resistors and of course the microcontroller. The learning curve isn’t very steep and the possibilities are only limited by your budget and imagination. Pretty neat stuff.