PAS #2 – Web Scraping

I’ve spent a lot of time over the last few weeks learning how to code using Python.  I learned about lists, dictionaries, functions, libraries, and modules.  A couple of days ago I decided I knew enough to try and start writing my stock trading program.  The first part I decided to implement is a way to pull stock quotes off of the internet.

Pulling stock quotes off the internet turned out to be more of a pain that I had prepared for. When I was learning Python I studied this thing called an API, which stands for application programming interface.  APIs are used by websites to allow programmers to use their services in the applications they develop.  I planned to use Google to search all the stock prices, pulling the information from pages like this: http://www.google.com/finance?q=NASDAQ:GOOG.

So far my program is able to pull the HTML code from that website and save it to a document on my computer.  That was the easy part.  Now I must figure out a way to parse through the html code and pull out all of the numbers I am interested in.  I think this is going to be pretty difficult and Google’s source code is pretty difficult. You can see for yourself by going to the link I posted above, right clicking on the background of the site, and selective ‘view source code’ or your browser’s equivalent.  If you were able to get that to work you should understand why this next part is going to be difficult.  Read my blog next week to see what solution I came up with (hopefully I find one!).

WIP#2 – Online Deliberations

Obama takes key battlegrounds to win re-election (CNN) : http://www.cnn.com/2012/11/06/politics/election-2012/index.html

The comments section in the article I’ve linked is full of people discussing which candidate in the 2012 election would have made the better president after finding out Obama had won.  The discussions are moderately deliberative.  Arguments begin logically and the first few responses are generally reasonable.  Inevitably, someone decides to post an aggressive comment and the entire argument derails.  The people who commented recognize each other’s viewpoints, but often do not respect them.  Instead they attack other people’s beliefs.  This discussion won’t do much for furthering understanding.  Though some people to post thoughtful comments and consider other point of view, the two sides seem to polarized to hold a meaningful deliberation.  Neither side will hear criticism of their opinion or is willing to compromise of important topics.

 

CIV 1 – Which Countries Use The Most Alternative Energy

Countries all over the world are investing in their renewable energy infrastructures, but which countries are setting the best examples for clean energy use of the future?

In 2002 the nations of the G20 summit decided to start an initiative to increase renewable energy production in each of their countries. In June of 2012 the nations reconvened and produced a report detailing which nations derive most of their power from renewable sources and which nations have improved the most since the 2002 resolution.

According to the G20 nations, Germany produces the highest percent of renewable energy, an impressive 10.7%.  In second is Italy which get 6.2% of its energy from renewable resources.  Third is Indonesia where renewable energy makes up 5.7% of their energy consumption. The United States came in seventh on that list as we get only 2.7% of our power from renewable resources.

However, what percent renewable energy is of overall energy production is not the only factor that defines how renewable energy friendly a country is.  For example, South Korea has increased their production of renewable energy by 19584% since 2002, making them the country that has improved the most in this time period. China has increased their renewable energy production by 7605%, meaning they improved the second most.  The United States has only increased its renewable energy production by 341% since 2002.

Hopefully other countries can use South Korea as a model and make similar improvements to their renewable energy production, but investment into renewable energy is highly dependent on specific governments and economic conditions in a country.

The Obama-Biden administration plans to put $150 billion over the next ten years into renewable energy, put 1 million plug-in cars on the rode, and significantly increase the amount of renewable energy the US produces.  I plan to write another blog post going into more detail on how countries plan to increase their use of renewable energy.

This I belive

My This I Believe Podcast

    In elementary and middle school I worried about my grades way too much.  I remember studying hours upon hours for each of my tests.  I would memorize word for word study guides my teachers used to hand out the week before. Looking back on it, I easily could have passed without looking over any of my worksheets or study guides. I had this idea that each test was extremely important and if I didn’t get an A something terrible would happen.  I spent so much time making sure I that I would score extremely well on every test that I never did get to find out what horrors would await me if I was to get a B.

    One time, in what I remember to be seventh grade, I was being too distracting during class which caused my teacher to give me a lunch detention.  My mind instantly turned to the myth of the ‘permanent record’, which teachers in my district used to scare children into behaving.  I imagined going to a job interview after graduating college and having the interviewer ask me to explain why I misbehaved in Ms. Knox’s seventh grade class.  I was extremely nervous that future colleges or employers were going to see this blemish on my ‘permanent record’ and never accept me.

When I became a highschooler I began to think less about grades and more about social standing.  It’s the ugly truth that high school culture is dominated by cliques. Most kids in highschool are primarily concerned with who is friends with who, who has a crush on who, who is angry at who, and who is cool and who isn’t.  It’s easy to get caught up in these details when it’s all you’re surrounded by every day and I don’t think anyone has gone through high school unaffected.  High School is a difficult time in many people’s lives, but it really shouldn’t have to be.

    Looking back at my life before college I have come to realize that I shouldn’t have worried myself so much about the things in life that weren’t truly important.  No bad grade grade I’ve ever gotten or opinion one of my peers has had of me will ever impact my life. Also, I am now sure the ‘permanent record’ as my teachers described it is a complete lie.  If there is one thing I’ve learned, it’s that there is truth to the saying, “Don’t sweat the small stuff.”  However, I believe in the revised version of that same saying, which goes, “Don’t sweat the small stuff.  It’s all small stuff.”

PAS #1 – Plans for This Semester

Last semester my passion blog focused entirely on my tests and experiments with the Arduino.  This semester I will continue along that path, but I also plan to add another similar topic to my blog.  Recently I’ve begun to learn a second programming language outside of class called Python.  Python is a much higher-level language than C++, meaning the programmer has to be less concerned with how the computer physically interprets their programs and can focus on using more contemporary logic.  I’ve been discussing a program with my father that would monitor certain stocks on the NYSE and automatically buy and sell them based on certain financial constants.  My father works for DuPont and a finance manager and is an avid trader on the stock market, so his expertise will come in handy when figuring out how I want my program to go about deciding when to buy and sell.

Both these topics are very technology oriented, but this topic is what I am most interested in currently.  I’m excited to learn a lot by working on these projects and hopefully I’ll have something really cool to show for it before the end of the semester.  Who knows, maybe I’ll even strike it rich with my stock market program!

WIP #1 – Civic Issues Blog Topic

I will pursue the energy topic this semester.  Humans are as power hungry as ever and we are consuming more energy per day that we have ever in history. Currents trends lend no hope to the idea that the planet will start to use less energy or even slow down its growth in the rate of energy consumption, especially with the development of economies like Brazil and China. Fossil fuel is a limited, non-renewable resource and there will need to be something in the future to take its place when we run out.

The search for the be-all and end-all source of energy isn’t over, but there have been a variety of successful ideas. Wind power, geo-thermal energy, nuclear, and water power are all popular alternative sources. I believe the US government should be trying to integrate more and more of these energy sources into our nation and begin to ween us off of oil.  It was just recently that Google invested 200 million into a wind farm in Texas (http://money.cnn.com/2013/01/09/technology/google-wind-farm/index.html).  Obviously companies are starting to recognize that our addiction can’t continue and that other plans must be made.  I think it will be interesting to see how different organizations are planning for an oil free future.

When people think sources of energy consumption, they think cars. Cars that run on electricity are becoming increasingly popular, but they’re too inconvenient and shot-ranged to be a permanent solution. Not many communities have charging stations for electric cars, so owners are limited to trips only half the range the car has the capability to travel in order to reserve energy for the return trip.  Furthermore, electric cars take hours and hours to charge which would hinder someone from traveling for hours if their car in low on battery. As it stands, hybrid cars, which have gasoline powered motors along with electric motors, are the only viable choice in alternately powered cars.

Obviously there is a lot of room from improvement in the country’s and the world’s energy situation and I’d like to see where it goes.