Coding

Today was the first day that I seriously worked on coding in a long, long time. It felt so good. The coding wasn’t difficult in any sense of the word but it was cool. The project that I worked on today started several weeks ago with a group of friends. The system accesses our academic building’s lighting system and queries it for the current status of each light in the building (this was originally started to conserve energy).

Before this last sprint of hacking we had the system to the point that it ran a cron script every minute and extracted the current status of the building into a mysql database. While my friends were fine tuning the system, I read the twisted xmlrpc tutorial and created an xmlrpc interface to the database in about ten minutes. At that point we had run out of time to continue to work on it but I felt good that all of our data was very accessible.

Fast forward to today. Our faculty member was able to get us access to the building’s layout in a digital form. I then preceded to trace all of it in SVG. After the tracing was done I used Python, a DOM XML parser, XPath and XMLRPC to create a program that would edit the SVG based on the current status of the building. This allowed for a map to be generated indicating which lights were on currently. It is so cool.