Lance Laughlin

I'm a graduating New Media Interactive Development student from the Rochester Institute of Technology. I blog about open source software and web development

Category: AdvancedFoss

It’s the final countdown!

europe_pip05

So, the end of my college career is slowly approaching! WOOOHOO! Anyway, for our last assignment in Advanced FOSS we are to open 10 issues and close at least 5 of them by next week. We can either chose to update the course website or add to our existing projects…I’m doing a hybrid. Here are the 10 issues I plan on working with:

Entropy
https://github.com/ExplosiveHippo/Entropy/issues/7
https://github.com/ExplosiveHippo/Entropy/issues/3

In-glass
https://github.com/chrisknepper/in-glass/issues/8 – CLOSED
https://github.com/chrisknepper/in-glass/issues/3 – CLOSED

Course Website
https://github.com/decause/advfoss/issues/108
https://github.com/decause/advfoss/issues/103
https://github.com/decause/advfoss/issues/102
https://github.com/decause/advfoss/issues/101 – CLOSED
https://github.com/decause/advfoss/issues/100
https://github.com/decause/advfoss/issues/134 – CLOSED

RocWiki/Wikipedia
https://rocwiki.org/Gate_House_Cafe?action=diff&version2=136&version1=135 – CLOSED

 

Now for a recap!

It’s been a fun and enlightening year for me. My experience in free and open source software began last semester and I feel I’ve really come a long way since September. This post is technically supposed to cover the Advanced FOSS class; however, I think it’s important for me to cover the entire year since it was so important to me. At the beginning of the year I knew the basics of open source but had never done any actual open source development or contributed to any open source projects. The desire was always there…I just needed a little push in order to actually accomplish my goals. Luckily, the FOSS courses were there to inspire me to learn as much about the open source movement as possible.

My journey and really the thing that threw me into it all was Github. Initially I saw Github as a way of sharing my code with employers. Github was actually super beneficial for me in my job hunt. I was approached by recruiters who saw my Github account and was impressed by my code. SCORE! Pretty much every interview I got asked me to go through some projects on Github and talk about my reasoning behind my code. This was super helpful for me because it forced me to go back through my projects and make my code more efficient since I knew so many people would be looking at it and potentially forking my code.

Another great step for me was learning IRC. It’s really a great resource, especially when you have a great channel like RIT-FOSS. It was really nice because it allowed me to integrate myself into the open source community in both the digital realm and in real life! I now use a number of IRC channels to ask specific questions…super helpful!

I can safely say that I’ve become a much better programmer and person from learning about open source. I’m now much more eager to share my ideas and code with other. In the past I would be more hesitant doing so because I felt that all the work I had put into something would be wasted if I just gave it away. However, now I open source everything I do. This is mostly due to how much I’ve utilized others hard work. I feel like I owe it to all of those people who have helped me. Who knows, maybe someone will find my code at 4 in the morning after a long night of frustration and it will solve their problem for you.

Open source has changed my philosophical views on many things too (though I think the act of growing up has too). Again, I used to be a big proponent of private property (both physical and intellectual). I felt everyone deserved the right to keep their ideas locked in a tight box, after all, they are the ones who worked so hard to accomplish their goals. I still feel that this is an important right to have; however, I also realize that having the right to share your information freely is just as important, if not more. With Github and the FOSS movement thriving, it allows innovation to happen.

Thanks for everything FOSS!

 

Advertisements

Community Contribution 3

Coming soon…I promise.

RocPy live from PyCon

This month at RocPy was a bit different than usual. Generally, we have lecture like sessions where one of the members will give an overview of some Python goodness. However, this time around we were lucky enough to have our Advanced FOSS professor, Remy, video chat into the meetup live from PyCon. PyCon is basically the Mecca of the Python world. As far as my knowledge goes, it the most highly attended Python even that exists. Many of the FOSS students at RIT also tagged along for the trip.

PyCon consisted of Remy interviewing a number of folks in the Python community and we were able to do some Q+A with them which was pretty rad. It’s difficult to remember the names of everyone (Most I hadn’t known the person but I knew some of the projects they talked about). One that stands out to me is a man who worked at Mozilla, he was part of the Firefox OS team which I thought was pretty awesome (I’d love to check it out). One person worked on creating open data sets (something that I currently have in the works myself) which I found interesting. The rest of the guests were general Python enthusiasts who made a variety of tools and utilities.

I really enjoyed this RocPy! It was a nice change of pace from the usual meetings and was very informative!

Community Contribution 2

For the second Community Contribution I made some edits on the RocWiki. My current apartment building was recently bought by a new company and the information about the building was out of date on the RocWiki. I added who the who owner of the building was and updated the web address. You can see my edit here: https://rocwiki.org/University_Place_Apartments?action=diff&version2=4&version1=3

This was the first time I had ever updated RocWiki and I think I’ll continue to do so as I have noticed some out of date information on a few entries.

Hack #2

Hack #2 is basically done! We have changed the class syllabus to allow us to continue to polish our projects from this semester so once this phase is done, WE ARE DONE! The project came out really well in my opinion and I think people will dig it. My teammate Chris Knepper did a great job creating the initial UI and base functionality. My role was mostly filled by cleaning up the UI, adding some local storage functionality and making the design more responsive. I think our project really shines due to it’s simplistic functionality. It does exactly what it should and it does it well. It doesn’t bombard you with unnecessary UI elements or settings…it just works. Overall, it was a good learning experience for me. I got to mess around with FLASK which I’ve been meaning to do for a while now. It’s actually really simple and does help streamline your workflow a bit…I’m not sure if I’ll totally switch over to using it; however, I can definitely see it’s merit and will continue to learn more about it.

Hackprop2

Title of Hack

In-Glass

Short Description of Hack

Web-based temperature monitoring using Python, JavaScript, some computer running Linux (i.e. Raspberry Pi) and a USB thermometer.

Software Libraries Needed

Flask, libtemperd

Upstream Distribution Repository

PyPI, GitHub

Open Hardware Needed

Temper USB Thermometer

Team Members

Dustin Raimondi
Lance Laughlin
Chris Knepper

All team members will be contributing to development, design, and documentation.

Project Milestones

Milestone 1: Skeleton Flask app that outputs dummy temperature value

Milestone 2: Reading temperature from device and displaying with basic history on web page

Milestone 3: Store temperature history on back-end and customize display on front-end

Stretch: Handle multiple devices connected to the same computer.

Other Details

GPLv3
Mentor: threebean (What a cool dude!)

Hack #1

So we have finished up hack #1, Entropy. Check out our repo here: https://github.com/ExplosiveHippo/Entropy

Entropy was a lot of fun to work on. It was my first experience creating a command line tool and it was much easier than I had expected it to be. I also feel that the tool we made is pretty nifty and I’d love to see it continue to grow and become more elaborate. Our current system for rating is pretty elementary and could definitely be polished and expanded on. Overall I thought it was a great success!

Community Contriubtion #1

For Advanced FOSS we were tasked with doing a community contribution in some form. I decided that I would update a couple Wikipedia pages since it wasn’t something I’ve done before and I was interested in how everything worked. I’ve come to learn that editing a Wikipedia page is very easy…perhaps too easy. My first Wiki edit was for the upcoming PS4 exclusive: Infamous: Second Son’s. It was officially revealed today that the game would be 24GB for the digital download of the game. There was some discussion about it on the PS4 subreddit and it apparently was some news released a couple weeks ago; however, a large debate that has happened between early PS4 buyers (like myself) is the amount of space these next-gen games are taking up. When early games like Killzone, Battlefield 4 and NBK 2k14 came out and were packing a beefy 40GB data size many people began talking about whether the 500GB HDD was big enough. This isn’t only an issue for those who are digital buys because when you first insert a new game into the system all of the disk contents are automatically downloaded to your HDD. So I thought it could be benefitial to add that to the wiki article for the game. I know that often when I want to know some info about something I’ll google “whatever wiki” in order to get a full overview of the thing. Here is a revision history for the edit: https://en.wikipedia.org/w/index.php?title=Infamous:_Second_Son&diff=598004651&oldid=597968554

The second article I updated was for a widget that is used across all pages related to the Miami Dolphins (my favorite football team). It was big news today that the Dolphins had resigned their star corner back (one of the guys that guards the wide receivers), Brent Grimes. I originally checked Brent Grimes wiki page to see if someone had added it. Things move fast on the internet so I loss my shot; however, I did notice at the bottom of his page there was a Dolphins roster widget which still had him listed as a free agent. Woohoo! So I went ahead and changed that so it listed him under the active roster: https://en.wikipedia.org/w/index.php?title=Template%3AMiami_Dolphins_roster_navbox&diff=598043667&oldid=596655344

Overall this was a pretty easy task. I was surprised how easy it was to edit a Wiki page. I’d always heard about it being easy but I didn’t expect it to be SO EASY for anyone to edit a wiki article, heck you don’t even need to log in (though your IP is logged). This has definitely made me more weary to trust everything I read on Wikipedia and I’ll probably make it a habit to check the source. I use Wikipedia multiple times a day to look up generally random facts; however, I also consult it for homeworky type things; therefore, it’s really important that I’m not reading something fictional.

I will probably continue to update Wiki articles as I see fit in the future. It’s definitely a cool idea that so many people can contribute to common knowledge; however, I think it would better if there was a better process in place for editing: like forcing a login and perhaps a reputation system.

Entropy Status Update

This blog post is a reference to a team project I’m working on for Advanced FOSS: https://github.com/ExplosiveHippo/Entropy

So the first week of development has officially ended! Over the next week we’ll need to finish up the rest of our functionality and start preparing for testing and packaging.

So far we have a command line tool that is successfully reading in an image and spits out some basic info about it; including, the screen resolution and format. This week I worked on and completed the functionality to allow the user to analyze an image that is hosted on the web and accessible by a URL. I was actually quite surprised by how easy it was to get this functionality working. We are already using Pillow to pull some data about the image; therefore, all I really needed to handle was actually pulling in the image from a URL and the code we have already worked flawlessly on it.

Here is a quick code rundown of what I needed to do:

import urllib
import cStringIO

First off, we need to import urllib and cStringIO. urllib allows us easily open up an url and pull data from whatever it serves us. cStringIO is a helper class that allows us to use strings a bit better…I’m not 100% of all the functionality but it’s definitely helpful in this situation.

In our initializer function is where most of the magic happens.

def __init__(self, source): #Pass in the argument image location
self.source = source
if 'http' in self.source:
print 'reading from url'
file = cStringIO.StringIO(urllib.urlopen(self.source).read())
self.image = Image.open(file)
else:
try:
self.image = Image.open(self.source)
except IOError:
print "Cannot load image. Be sure to include http:// if loading from a website"
sys.exit()

Here we are basically checking if the value the user passed in is a web url. There may be a better way of doing this than checking if the string has http but it works for now. If it is a url we can simply load that image into our program with a single line and then instantiate it as an Image object.

We later go on to print some data about the image using the Image method, which is a part of the Pillow library:

def output(self): #Probably only print this in verbose mode in the future
print "We're processing the image: " + self.source
        print "This " + self.image.mode + " image is in the " + self.image.format + " format"
        print self.image.size

We hopefully will finish off the rest of the required functionality this week. More to come!

Rochester Civic App Challenge

In lieu of our Advanced FOSS class we went to the Rochester Civic App Challenge press conference held at The MAGIC Center. If you’re not sure what the RCAC is check this out: http://foss.rit.edu/rcmac. Essentially, it’s a 60 day challenge in which members of the Rochester community hack on apps that are civic in nature. The challenge requirements in general are pretty vague and for a good reason: rules hinder creativity.

The press conference went pretty well and had a decent showing. A large portion of the audience were students from the Advanced FOSS class which isn’t necessarily a bad thing. Many of these students will be participants in the challenge so their presence helps give the organizers a good idea of the type of people who will be competing. I want to use the word competing lightly here. Yes, this is a competition; however, like most things FOSS I truly believe that most of the participants are very pumped to see what their “competitors” come up with..though the prize money certainly adds a touch of competitiveness to the equation.

Unfortunately, I’m not sure if I’ll be competing in the challenge myself due to the massive amount of work I have going on at the moment. This includes both my school work, my on-campus job for Just Press Play, freelance work and preparing for the career fair and entering the real world in a few short months. I’ll likely take advantage of the 24-hour hackathon kick-off though to work on some of my school work and try to lend a hand to anyone that may need it. I’m really looking forward to seeing the type of project ideas people come up with and the data sets that are used. It will be interesting to see how people tackle problems that we face in both government and as Rochester citizens.

First Roc.py meetup for Advanced FOSS

Now I’m not a nooby when it comes to Roc.py. We went as a class every month for our HFOSS (Humanitarian Free & Open Source Software) class last semester. This semester we are rollin’ deep with both this semester’s HFOSS class as well as our Adv FOSS class, totaling about 20 people. This month was pretty beneficial for the HFOSS class as the first hour was about data structures and basic programming logic in Python. I feel like this would have been super helpful for our HFOSS class last semester because about 85% of the class had zero Python knowledge going in. Our class did manage to pick up Python over the course of the semester; however, I really feel like we could have done so much more with our projects had we had a mini-seminar like this. We did get a pretty awesome guest lecture from Threebean though which personally helped clear up a few things for me.

Aside from the intro to Python we had an hour at the end to give lightening talks to the group. Most of the Advanced FOSS students gave lightening talks about our first project for the class. I’m working on a group project with Chris Knepper and Dustin Raimondi which will help people decide whether a wallpaper is suitable for their machine. You can check out our project proposal here: https://explosivehippo.wordpress.com/2014/02/14/project-1-proposal/. I thought our lightening talk went okay; unfortunately, we only have a proposal at the moment so we couldn’t talk about too much. I felt like the presentation was sort of boring because it was 3 people talking about something very basic and likely would have went better with a bit more content or with less people presenting: live and learn. Check out our presentation here: https://docs.google.com/presentation/d/1mH0QgzZKVazCb-UFEWgMTs_4yy9toaOR9le2bYndP5Q/

Of the other lightening talks for Advanced FOSS projects I must say that I really really like Lindsey Ellis (Fangy) and Joe Prezioso (ArcticSphynx) project. It’s a dog tracker that emails people when their dog(s) are being noisy. I like this idea because it’s very practical and really perfect for the Raspberry Pi. This has inspired me to do something more Pi-centric for the next project rather than something that is simply written in Python and ran on the Pi.

Project 1 Proposal

Title of Hack:
Entropy

Short Description of Hack:
Rates wallpapers based on a variety of criteria

Software Libraries Needed (e.g. python packages, npm, ruby gems, etc…):

  1. PIL – load local images and manipulate pixels
  2. requests – load images from URL
  3. xlib – get screen information via x session

Upstream Distribution Repository (e.g. pypi.python.org):
PyPI, GitHub

Open Hardware Needed:
N/A

Team Members (if Applicable. With Roles):

  1. Dustin Raimondi (Developer)
  2. Lance Laughlin (Developer)
  3. Chris Knepper (Developer)

Project Milestones (REMEMBER You only have 2 weeks of development!):

  1. load an image from a local source

  2. pull metadata from image

    1. resolution

    2. filetype

  3. pull various pixel data from image

    1. fill in gaps in metadata

    2. overall color temperature

  4. algorithmically calculate image score

  5. load an image from the web

  6. verbose mode

  7. process a folder of images

License:
GPL3

Mentor:
threebean (pending approval)

Mmmm. Pi.

We took a mini field trip to the MAGIC Center today to a get a bit of a treat; A Raspberry Pi Ultimate Starter Kit: http://www.amazon.com/Raspberry-Ultimate-Includes-Essential-Accessories/dp/B00CXACPN0

I’ve been eye-balling a Pi for quite some time. I debated buying one while on break but decided to hold off to get one provided by RIT. We all arrived and received our Pis pretty quickly and began digging in. We mostly went over all the components to make sure everything that was supposed to be in the kit actually was in the kit.

Now this is the first time I’ve even seen a Raspberry Pi in person, let alone code on one. Upon doing a bit more research about the Raspberry Pi I’ve began to understand how everything works together. For my New Media Team Project my group is likely going to use an Arduino to do some physical computing which lead me to this pretty good overview article for a beginner: http://www.makeuseof.com/tag/arduino-vs-raspberry-pi-which-is-the-mini-computer-for-you/
Turns out that the Raspberry Pi is a mini-computer whereas the Arduino is a micro-computer. In essence, the Pi is basically a very tiny PC while the Arduino simply aids in electronic projects. Understanding that difference has helped me quite a bit.

I’m exciting to finally get mine booted up; Unfortunately I need to get my hands on an HDMI monitor and a keyboard. This is the first time in my college career that not having a desktop environment has been an inconvenience. Regardless, it will be fun to get started!

First Advanced FOSS post

The spring semester is underway! This blog will become a blog mostly related to that class and the Raspberry Pi’s.