Tuesday, November 29, 2011

Teamwork time!

Up until now we've been able to do all of our projects in this class individually, not needing to compromise or change our style so that it fits with others, being able to do things at our own pace.  However, with this new project we were given, we no longer had those luxuries of independence.  Although eager and excited to get the project done at first, this would turn out to be one of the most stressful projects of the semester, at least for myself.

Energy. Whether we're using our computers, watching tv, or even studying in our room with the lights on, we use a lot of it everyday.  Multiply that amount by the number of people living in a dormitory, and the number jumps up higher. Multiply that number by the amount of dormitories in a university, and it becomes enormous. Getting a glimpse of energy-usage within UH was the objective of this project, more specifically the power-usage of the freshman towers.

Specifics involve writing a command-prompt that would take user input querying one of four commands and returning pertinent information upon submission. The four commands we were to implement were:

  • current-power: Returns the current power of the associated tower/lounge
  • daily-energy: returns the amount of power used by a tower/lounge on a certain day
  • energy-since: returns the total amount of power used by a tower/lounge since a certain day
  • rank-towers: ranks towers by energy usage over a certain period of time
Having done the wattdepot katas before this project, these all seemed rather simple to implement. On our own these would probably take no more than a week to figure out. But that wasn't the case this time around, as we had to coordinate with each other and split up the work accordingly.

I was paired up with Micah and Jesse, two people who I previously worked with in earlier classes but had not really interacted with beyond that.  Though thinking back now, even throughout this whole project we didn't really communicate outside of a colleage/group-member capacity, although it was refreshing to bounce ideas off one another and come up with different ways to approach this project, as opposed to going at it alone.

A major resource in group projects that we had sort-of dabbled in earlier but not fully utilized is google project hosting, a sort of hub for contributors to download and update their project. A new approach that we took to getting the work done was something called issue driven project management, where the project is split into issues, which are then divided up among the group members to address. Upon gradual completion of issues, the group member would commit their build to the website, and update the page where the issues were so as to let the whole group know their progress.

Our code website can be found here: http://code.google.com/p/hale-aloha-cli-kmj/

So after getting all the groundwork done, creating stub classes and setting up our project on google project hosting and connecting it to jenkins which would check our builds, we set off eager to do our parts. Unfortunately, nothing really materialized in the first six days of the project due to various circumstances (homework,  exams, procrastination, etc.) Our first in-progress review came one unsuspecting Tuesday, and when we got our evaluations back, they were simply-put, abysmal.  Six days and hardly anything to show for it.  Though judging by the professor's decision to later on nix the scores, there must have been a lot of other groups who hadn't made much progress.  Though after that scare we resolved to work much harder than earlier.

Coming up to the deadline we came across some unforseen roadblocks, the most important one being that the wattdepot-server was down. Without that, we were pretty much dead in the water, as we couldn't test any of our code and had no way of knowing if anything we were writing would work. Fortunately, our deadline was pushed back one week and we had some breathing room to further work on the code.

Up until the submission there were a couple of issues, two of which come to mind. The first one being that me, usually going through projects at my own pace, sort of threw off the timing of the group, meaning that it was hard to move on without my pieces of the project. This resulted in a loss of productivity and me staying up the entire night before the deadline in order to get anything done. The second issue, which is probably a by-product of the first, is that we had some compatibility issues with our code when we combined them. I was responsible for the commandParser, the thing that checks user-input and then invokes the commands, but since we all had different requirements for our commands, it took some working-around in order to resolve. But after a long-night of coding and looking things up online, it all was finally resolved.

So we come to the end of our first group project, and I must say that I'm exhausted. Though as much as I'd like to think that it's done and finished, we've only reached version 1.0 (or maybe not even that far, depending on how the reviews turn out :/), and it looks like there's still a ways to go.  Though coming this far having worked in a team, I think resulted in a lot more valuable experience gained than if I had gone at it alone.

edit: forgot to add link to hosting website, added link

Tuesday, November 1, 2011

Energy!

A bit of a drastic change from the last couple of topics we've been covering, today we will be going over energy and energy consumption in Hawaii. Now what exactly does this have to do with software engineering, you might ask? I know I did. We'll attempt to get down to that question in a bit, but first, a little background about energy consumption in Hawaii.

Because of Hawaii's unique location and environment, in terms of energy consumption it is different from the rest of the US in many ways, some of them good, and a lot of them not so good.  Because Hawaii consists of a cluster of small islands located in the middle of the pacific ocean, it means that local resources are scarce, so we must import all, if not most of our energy from overseas.  As a result, gas prices are the highest in the nation, thanks in part to import costs.  Other areas in the US have the luxury of being able to depend on a wide variety of resources for energy consumption, like coal, natural gas, and whatnot, because the resources are readily available. However, here in the Pacific, roughly 75 percent of our energy production depends solely on imported oil, which makes for a pretty expensive process.

Fortunately, while lacking in some areas, there are other environmental factors that Hawaii has going for it in terms of energy. That is, an abundance of natural energy sources throughout the islands.  Since it is pretty much tropical weather all year round, there is a high exposure to sunlight, thus solar power is an especially effective way of gaining energy.  Also, especially-strong trade-winds make Hawaii an ideal place for harvesting wind-energy. Along with other resources including hydro-electric energy and geo-thermal energy, Hawaii has the potential to become 100% self-sufficient in it's energy production and consumption.

Unfortunately, despite this potential and the opportunity to become energy self-sufficient, there are many drawbacks and obstacles in the way.  For one, the costs of overhauling the current energy infrastructure and installing renewable energy-harvesting devices are uneconomical at this point in time.  A lot of people trying to make ends meet month-to-month aren't too thrilled about having to pay higher energy bills.  However, what most people don't realize is that if the infrastructure, which is decades old, is not updated, and new energy sources aren't utilized, then at the rate we're going, electricity is going to become a lot more expensive in the future. Gas prices have been increasing for a while with no signs of stopping, and as a result our electricity bills, a product of mostly imported oil, will also rise as well.  It's either start paying more now for cheaper and sustainable energy in the future, or let it go and wind up paying gradually higher and higher prices for energy later. But like all things, it's difficult to get a large number of people to start thinking about something in the long term.

In addition to that, the question of where would these installations be built is another big issue.  Hawaii, being a bunch of small islands, doesn't really have a lot of free space, so unlike the mainland, we can't simply go out into the desert and deploy a square-kilometer of solar panels.  Regarding wind power, a lot of people are opposed to having windmills installed on the tops of mountains, as it takes away from the natural beauty of the islands.  Additionally, the areas in Hawaii with the highest potential for wind energy harvest are near the smaller, less populated islands.  However, it's Honolulu, the big city, that has the highest power demands.  The idea of having a bunch of windmills built in one's backyard to help power someone else's home doesn't really sit well with a lot of islanders from the smaller isles.  Thus, until these problems can be reconciled, it's going to be a tough journey to get Hawaii self-sufficient.

So getting back to the question, what does this all have to do with software engineering? With regards to the power grid, the network of energy that distributes power to all homes in the islands, information harvesting regarding usage is becoming an increasingly important factor in the way things work.  With this information, engineers can figure out usage at certain times, what areas need more energy or what areas could do with less, and how to effectively distribute energy in such a way that does not result in wasted power and that conserves an already limited resource. The future of energy distribution and consumption will lie heavily on the quality of the software engineers working to improve the process.