Saturday, February 14, 2015

Hello World!

This week, on February 9th, I've started my Senior Research Project. I began working at LoopLogic on Monday and Tuesday all day, from about 8:00 am to 5:00 pm. Already, I'm absolutely thrilled with what work I have done working with computers.

Mr. Legay has given me access to a program called New Relic, a tool used by companies to maintain and monitor various server and user activities. After exploring around a little bit, I was given my first job: learn a new programming language called Selenium. It's a derivative of Javascript and HTML, so understanding it was thankfully not tricky. I did have to learn few new tricks though, which certainly would help me in the future.

Using this Selenium programming language, I was tasked to write a script for New Relic's monitor function, which allows for homemade scripts to run. Specifically, I was to create a program that would automatically run through all of LoopLogic's basic functions, such as logging in and video uploading, so as to insure that everything was going well on the site.

Despite a few hitches in the plan, I managed to figure out a way to code an automatic login function for the site, which is an important step considering that login portals have to always be available if the site's basic mechanics are to work. While a few login portals such as MSN and Google have unfortunately trumped this bot by installing verification locks that a bot would have trouble figuring out, I have managed to create an automated process of logging in through Yahoo, Facebook, and Twitter.

Next was downloading a watching a Youtube video. I chose a short video and then had the program import its url into the LoopLogic site, allowing for automated downloads. Then, there was a problem when I attempted to get the downloaded Youtube video to play. The program simply didn't want to recognize the video! Even through a search function within the script, it refused to recognize the existence of it.

Thankfully, Mr. Legay helped me and told me that the video was in what we call an "iframe." It was a part of the browser, but at the same time, in a different part of it that had to be manually switched. I did research and eventually managed to play the video successfully, creating a bot that would check the Youtube operations on the LoopLogic site.

As of right now, the bot in question is still a work in development as more ideas about its capability are being developed. Who knows? Perhaps one day, it could fix any errors by itself!

See you all next week!
Alfred Shum

6 comments:

  1. This all sounds really interesting, Alfred! Do you have any examples of the special tricks you had to learn when you picked up Selesnium? I feel like I would be very intimidated by learning a new language, even if it was derivative of others.
    I'm glad you figured out the YouTube video problem! It seems like Mr. Legay is very helpful. Do you like the general atmosphere at LoopLogic? Do you interact with anyone else?
    Can't wait to hear what you do next.

    ReplyDelete
    Replies
    1. Well, there is the $browser.findElement function, which allows me to find any specific thing on a webpage and interact with it. That's the base of Selenium as a whole, interacting with various elements on the Internet.
      LoopLogic is a very nice office, with a very casual and lax feeling atmosphere as people clack away on their keyboards. It's slightly cold though, the air conditioning likes to go a tad overkill. However, it doesn't damper the friendly fire in everyone as we just have casual chats in between work sessions.

      Delete
  2. Sounds awesome Alfred.
    Were you tasked with creating a login portal because the site needed one? Or just to see how the site was made in the first place?

    ReplyDelete
    Replies
    1. I wasn't tasked with creating the login portal, but rather to test it using an automated bot. That way, if there is any problem with the login portals, LoopLogic is immediately alerted and troubleshooting can begin to fix it before any users suffer trouble using the portal.

      Delete
  3. This is great! How does Selesnium compare to other languages? Do you like it?

    ReplyDelete
    Replies
    1. Selenium is a mix of Javascript and HTML in an odd way, and it's pretty complicated. I have to say, I like Java a bit better but I think that it's just the fact that I know a lot of Java that makes me think that. Perhaps some more experience with Selenium will warm me up to it.

      Delete