I’ve been working at Vernier Software & Technology as an intern for about the past seven weeks now. It’s been interesting as this is my first real work experience. The “job description” said that I would be creating an employee map so employees can find where others are situated in the building more quickly. However, I’ve worked on quite bit more than just the employee map.
The Employee Map
The employee map is only for internal use unfortunately and lives on the company intranet so it can only be accessed within the building. What’s more, the coolest part about it, the administration page for it, will only ever be seen by a handful of people in the company. The original idea for the admin page was to have a coordinate grid system much like what you would find on a paper map with numbers and letters going along the axis, but it wasn’t very practical because the grid didn’t fit the way the office space is divided and there were certain cases where people would have to placed in the middle of the hallway on the map.
After brainstorming for a while I decided I would try to just position the employees based on the pixel offset from the top left hand corner of the map to allow for the most flexibility and pixel precision placement of the employees on the map; the challenge was making an intuitive administration page for it. I decided to go all out and do point and click employee plotting. The most difficult part of this was using Javascript to determine the mouse position relative the map. Mouse positioning is handled differently in different browsers and there wasn’t a quick and easy function or property that could tell me what I needed. I ended up combining two prewritten functions. One of them could determine the position of the mouse relative to the top left corner of the page and the other could determine the position of any element relative to the top left corner of the page. Subtracting the values from the functions gave me what I needed.
After that, it was pretty simple. I ripped some existing Javascript from the employee database search written by the previous intern for the live search feature and added a few minor tweaks that made adding employees to the map easier.
I learned a lot of Javascript by doing this project and used these skills in several other projects. It’s proof that writing code is the best way to learn.
Workshop Map
This is arguably the most impressive project I did that is viewable by the general public. The current method for finding Vernier workshops is by selecting your state and browsing through a list of available workshops. It works, but people are generally more visual. The goal of this project was to plot all the workshops on a Google Map so that people can search for workshops close to them visually.
The first part of this project consisted of translating the addresses of all the workshops in the database into longitude and latitude coordinates. Luckily, the Google Maps API makes this relatively simple through geocoding and I wrote a script that is run nightly via CRON that queries Google for coordinates. One nice feature of the script is that if Google Maps returns bad results (i.e. it couldn’t find the location), the script sends out an email detailing which workshop couldn’t be geocoded.
The map itself is fairly straightforward. It places markers on the map of all the workshops from now into the future. Different colored pins represent different types of workshops and you can filter by workshop type by clicking on the icons in the legend. When you click on one of the icons for a workshop, a bubble pops up with some basic details and links to more information and a workshop registration page.
You can also zoom in on a specific location by inputting a zip code or city and state. David, my boss, suggested several weeks later that after someone searches for a location, that a table be shown of all the nearby workshops. To figure out which workshops were close by, I simply looked up which workshops had coordinates within a certain range of the searched location’s coordinates, simple yet effective.
Solar and Weather Data Visualization
There’s a solar panel array on the roof of the Vernier building and a weather station. A PHP script running via CRON takes power readings from the solar panels and inserts the data into a database. My job was to get data from the weather station into the database as well.
There’s a laptop running a program called WeatherLink that retrieves weather readings from the weather station. The trick was getting the data from the laptop to the server. Fortunately WeatherLink can automatically export the data into a text file and FTP it to another computer. However it took a while to get it working because of technical difficulties. Once we got the text file onto the server, parsing it and inserting the data we needed was trivial. There’s a script running via CRON that does it automatically every five minutes.
After I got the data stored away in a database, the interesting part came in. I wrote a graphing class that could generate a CSS graph using the data. However, it doesn’t work quite as well as I’d like it to because of browser inconsistencies.
Arguably the coolest part of this project is the Logger Pro export. You can specify the date range and frequency of the data points and export the data into a Logger Pro file so you can analyze it more closely. We hit a lot of snags along the way getting this to work because of the odd way Logger Pro files are structured (turns out it’s just XML) but with the help of some of the programmers who wrote Logger Pro, we were able to get it working quite well complete with auto-scaling graphs.
Towards the end of this project I discovered MIT’s Timeplot. Although it isn’t quite ready for production since it only works well in Firefox and not at all in Internet Explorer, I just had to try it out with the solar data we had. After a couple hours of tinkering, I had a rather handsome line graph of our solar data complete with date range controls.
In the End
The last seven weeks have been a blast. I’ve learned a lot during my time at Vernier. It’s been an amazing experience working on projects that will actually be used. The other day a coworker came up to me and shook my hand, saying that he had just discovered the employee map and that it was helpful. Gratitude like that is what makes spending hours writing and debugging code all worth it.
Wow impressive, that sounds like a fascinating internship. I’m stuck at the bank doing customer service starting next week. Joy.
Damn, dude, sounds like you’re super busy. I’m really glad you’re enjoying it. I thought about trying to learn some coding, but I couldn’t take it. I opened a book and was IMMEDIATELY bamboozled.