Category Archives: WSU CS

First Week install/configure

It’s been a slow start to the project, nice weather tends to do that to me.  I manged to find a great video series about Android development that really starts from the ground up.  Actually, it’s kind of boring at times when he begins to talk about what’s going on in the Java code he’s typing, the XML I am lost but the Java is pretty straight forward (for now).

I have mixed feelings about using Eclipse for this project, I think it will come in handy most of the time but, it’s really bloated.  I like Gedit, or I guess notepad++ for windows.

I watched the first videos, downloaded Eclipse, downloaded everything I needed, John wants to work on Android 4.03 since his phone will be able to use it.  It’s going to work fine but, just won’t be available to as many people considering it’s a much newer version than the API level 8 that was suggested in the video series.   The videos came in handy since I thought it was always kind of a pain in the neck to set up Eclipse in Java.

It’s pretty convenient that I am learning XML because I had to use it recently at my job, and knew where I was because of watching a few videos.

From the blog jamescelona » WSU CS by jamescelona and used with permission of the author. All other rights reserved by the author.

Onto Android

John, Joe, and myself have begun a new project and have said goodbye to Eucalyptus.  We will be designing our own app for the android market.  John had been talking for a while about how he needed a task manager that actually did what he wanted and needed it to do.  No, not a task manager to kill processes etc but one designed to integrate with a calendar, or any other event based program we can use.  We will be designing a ‘normal’ task manager app at first but will be making it very modular because we’re really not sure how difficult the development process will be.  We will add as we need, or if we can, many key features that will actually make the app useful.  By the end we will submit it to Google Play and hope for the best.

The journey begins.

From the blog jamescelona » WSU CS by jamescelona and used with permission of the author. All other rights reserved by the author.

Have been reading design paradigms for Android Apps

Since I really have never owned an Android phone I don’t know much about their apps.  I spent a while today looking at the difference menu styles and how to design to optimize for certain button layouts.  Some phones have more buttons..stuff like that.  As I was browsing this my reddit feed led me to this link: http://www.androiduipatterns.com/2012/06/emerging-ui-pattern-side-navigation.html which talks about the side style menu, such as Facebook. I can only hope our app isn’t as slow as the Facebook one, though.  The article talks about how, “The side navigation replaces the much criticized dashboard pattern in the apps.”  I think it would be a cool implemented on our app.

On a side note, I think I need to find supplemental methods of learning Java/XML the Android way.  I don’t mind the new Boston but sometimes when he talks about stuff in Java that has been burned in my brain for life gets me distracted.

From the blog jamescelona » WSU CS by jamescelona and used with permission of the author. All other rights reserved by the author.

Using Git in Windows

With our GitHub repository ready, and now that my Android development environment has been setup, it was time to install Git so I can actually start working. Git is a Linux tool and all my previous Git experience has only been inside that environment. But luckily Git has been ported to Windows, so I can use Git on my Windows machine without having to run it inside a VM. There are several options for running Git in Windows, and first I chose msysgit, the official Git for Windows project. I then abandoned that in favor of the GitHub application, which promised seamless connection to the GitHub website, including automatic maintenance of SSH keys.

The GitHub app has a nice GUI interface, and seems to be very easy to use. But I honestly haven’t used it much–the app also installs a Git shell, which I vastly prefer to the GUI. The Git shell emulates a Linux terminal, inside a Windows command prompt. Several of Linux commands are emulated inside the shell, such as cp, mv, rm, ls, cd, and others. Tab completion is also implemented which is wonderful. The emulated commands are not as powerful as their real versions (for example, typing “ls” works, but my preferred “ls -lh” doesn’t), but it’s still great to have this option. You can even open text files for editing from within the command prompt– just type notepad instead of nano or gedit. Lastly, a hugely useful addition to this Windows implementation that isn’t even in the Linux original:  the prompt in the shell uses symbols to help you keep track of your added, modified, and removed files, and changes color depending on your commit status!

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

Organizing our GitHub repository

Our Android project will have an online repository hosted at GitHub. I’ve never used GitHub, though at work I use a local install of the similar Gitorious service. So far, we don’t have anything in the repo besides a GPL notice. The repository does have an integrated wiki that I have put some work into already. James and I discussed how to organize the repo and we decided we wanted to follow a professional approach that an actual project team working on commercial software might follow. Here is an excellent description of the model we will be using.

Basically, there will be four permanent branches. The first two branches, jon-dev and james-dev, are personal development branches that will hold snapshots of the project as we are working on it. We will keep our individual work separate in these branches so nothing one person does can affect the other. Here we also have the freedom to absolutely break the app while not affecting the snapshots in the next two branches. The code in these branches cannot be guaranteed to  build into a perfect working app, but that is to be expected because this is the entry point for brand new contributions.

The third branch, develop, is where James and I will merge our work from our individual branches after we have gotten our code working the way we want. Snapshots in the develop branch should build into a relatively stable app, similar to nightly builds in a major open source project, though bugs may still be present.

The fourth and final permanent branch, master, is reserved for major releases of the app. Once the code in the develop branch has enough features implemented, and has been tested thoroughly, it can be merged into the master branch and tagged as a milestone build. Apps build from code in the master branch should be considered stable and without major bugs.

We can also create temporary hotfix branches as we need to. For example, if a bug is discovered in the master branch, we can create a branch to fix the bug, merge it back into master after the fix has been tested, and then delete the temporary branch.

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

Setting up the Android SDK & Eclipse

This summer I will be developing an Android app with James, who is also a senior CS major at Worcester State. Neither of us have ever done anything like this, so needless to say it will be an adventure. The first thing I had to do was to properly set up my development environment. Google has a guide here, but it wasn’t the smoothest process. There was a bit of trial and error along the way. I have a fairly modern computer running Windows 7 64-bit. Here’s my rundown of setting everything up:

Step one was to install the JDK, Java Development Kit. That was easy enough. Oracle’s website has lots of options, so it was important to choose the standard 32-bit JDK installer. Even though I have a 64-bit system, I chose 32-bit in order to maximize compatibility.

Step two was to install the Android SDK. Once that has been installed, running the SDK Manager lets you choose what Android platforms to download. For now, I only downloaded the latest version, 4.0.3/API15.

Next was to install Eclipse. Eclipse.org has a lot of options. I opted for Eclipse for Java Developers 32-bit (matching my 32-bit JDK), though I hear Eclipse Classic works too. There is no installer exe for Eclipse, only a zip file, which might confuse Windows users. You just need to extract the zip file into your JDK directory, and that’s it. In my case, Eclipse ended up in “C:\Program Files (x86)\Java\jdk1.7.0_04\eclipse”. Then you run eclipse.exe from that folder and off you go.

Inside Eclipse, the next step is to install the ADT plugin, which will integrate several Android tools into Eclipse. This is where things started getting a little hairy. According to the Google guide, Eclipse should be able to grab the tools from a repository located here: “https://dl-ssl.google.com/android/eclipse/”. Eclipse did that, then proceeded to tell me that the tools couldn’t be installed. After a lot of searching, I didn’t find a fix, but I learned the problem possibly has to do with the fact that I am using a newer version of Eclipse (Indigo) than when the guide was written (Helios). Thankfully, Google offers a manual download of the tools here, so I was finally able to get the ADT plugin up and running.

Now that the Android SDK and Eclipse were both configured, it was time to write a program! The Google guide has a very nice-looking series of tutorials, starting with a Hello World app. The first thing to do was to make an AVD (Android Virtual Device), an Android phone emulator. This went smoothly. So did creating the new project, and writing up the simple code. Now to run my very first Android program…

FAIL. In the console, in bright red, I see the message “PANIC: Could not open: C:\Users\Jon\.android/avd/my_avd.ini”. What is this?? Why can’t it find my emulator??? I check, and sure enough, there is no .android folder in my Jon directory. The .android folder is on the root of my D:\ drive, and the AVD is in there. So why is Eclipse looking in my user folder, and how can I fix it? After a lot of searching, I found my answers here. It turns out that this is an ADT bug, and to fix it, I had to make a symbolic link between the two locations. So, in a Windows command prompt, I ran:

mklink /J “C:\Users\Jon\.android” “D:\.android”

An .android folder showed up inside my user directory, identical to the one in D:\. It’s important to note that if I ever want to delete this link, I need to run rmdir rather than just delete the folder. Otherwise, Windows will delete both locations instead of just the symbolic link. I went back to Eclipse and tried running my program again, and it worked! I’ve never been so happy to see “Hello World” appear on my screen.

From the blog Code Your Enthusiasm » WSU CS by Jon and used with permission of the author. All other rights reserved by the author.

Life Updates

I haven’t posted here in awhile and I would like to attempt to blog every now and then. I don’t know if anyone in the CS department besides the fabulous Karl Wurst reads the WSU CS planet feed, but if any of you undergrads are reading this: good for you. I like you.

Now that I have graduated (yay!): What’s next? I’m still working as an intern at Cyberonic but I think it is time to move on. I have gotten a resume together finally and posted it on Monster and Indeed yesterday and on my way into work today I got a call from a man who had 4 job offers for me. Not bad for one day, eh? A lot of the job opportunities that I have been seeing are for web developers, particularly Ruby on Rails developers. Now, I have dabbled with Ruby on Rails in the past but I don’t know much about Rails or Ruby. I’ve always been a Python guy. So, if you’re an undergrad reading this: LEARN RUBY. DO IT NOW. A lot of programming jobs in Massachusetts are in Boston so I need to try to move east a bit and close to the highway to ease my potential commute to work.

I have started to contribute to some FOSS projects finally. I am starting to become involved in the GNU MediaGoblin and GNU FM/Libre.fm communities. They are both free as in freedom web applications that I want to see mature in order to bring more free culture to the web. MediaGoblin is a YouTube/Flickr/SoundCloud/etc. replacement for hosting different types of media files and it is AWESOME. GNU FM is a last.fm replacement for streaming music and “scrobbling” your played tracks to your online profile. Currently the main GNU FM instance is Libre.fm, featuring lots of freely licensed music to stream. Both services have a goal of becoming “federated”, meaning to have a distributed network of instances that talk to each other. I have a vision of glueing the two services together somehow to make a free as in freedom service for musicians (such as myself) to share their music, pictures, videos, podcasts while giving regular users a place to follow the musicians and scrobble their listening habits. Maybe someday.

I’m also getting involved with Liberated Pixel Cup. A game development competition with the goal of making more freely licensed games and artwork. Many thanks to Creative Commons, OpenGameArt.org, and the Free Software Foundation for making this all happen. The art competition is taking place this month and the programming competition begins in July. First prize is $1500 and second prize is $500. I’m hoping that I can make a fun game and just maybe win some prize money if I am lucky.

Finally, my punk rock band, Get the Fear, has been doing well. We’re playing some very cool shows and are writing more original material in hopes to record a full length album before the year’s end.

All in all, things are going well. That said, I can’t wait to take a week off from all of this work in July when I go to Maine.

From the blog David Thompson » WSU CS by davexunit and used with permission of the author. All other rights reserved by the author.

Final blog post and all is well it seems

The semester is over and this is basically my last blog post for now, but im actually thinking of keeping this blog and beginning to use it for things that i find interesting.

 

Basically the euca2ools group presentation seemed to have gone pretty well and everything worked while giving it(which is awesome). Considering the amount of problems that we have been running into coming up to this day we were very excited that everything worked.

John in our group was actually able to upload a CentOS image and get it running on our cloud the previous day of the presentations, and then on the day of the presentations we were able to get a third image up and running with no Walrus errors and SSH into that instance. Dhimitri and I were kind of surprised to say the least cause the day before Walrus was giving us the 403 Forbidden error, so it seemed to have fixed itself….

 

Walrus may have just had a hiccup and that restarting it that day may have solved the issue we were having. Dhimitri also managed to get up a new node running which you could see with the euca-describe-availabilityzones command. All in all, it seemed that the Euca2ools wiki worked out for the best and seemed that a lot of people were able to follow a lot of the steps to use for themselves. This was a really fun and interesting project to work on despite a lot of the issues that kept happening on our way but i think it was for the best cause many of us gained a lot of experience and a lot of understanding of the whole Cloud computing and what it is.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.

Couple of weird oddities..

Leading down to the couple of weeks of the semester and beginning to finish up/wrap everything that we have done up to present, we ran into a couple of issues.

Dhimitri and I were in the same Euca2ools group for the presentations so we were working together through the weekend on what we were going to present and go through as a demo during the presentation. As he was working on a script, i was going through and testing our cloud by uploading a different image and kernel and trying to get more instances up and running, and also deleting images from the cloud.

 

The first issue that we ran into was a problem with getting a new instance up and running. At first i thought it was cause i did not bundle the kernel and image together correctly, so i tried it over and over again until i though it was perfect. The image that i used was the same image as the one that was currently running, so when it was not working we knew we had a bit of a problem. From what the NC log told us we were getting some type of 403 forbidden error and seemed to be stopping us from running instances.

A second issue that occurred, was after uploading quite a few images, kernels, and ram-disks the amount of images on the cloud was kind of cluttered so i wanted to delete some of them. When running the command to delete these images however they were not being removed. We would de-register them and delete but they were not being removed. They stayed on the cloud and listed as de-registered so we restarted the services and still nothing the images appeared back on the cloud as normal.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.

Success at running images!

Towards the final weeks of the semester we actually managed to put together a cloud that was basically running. I say basically running because there still seems to be a few bugs here and there that causes some issues every once in a while.

In the week that we managed to finally get an image up and running Dave actually had decided to reinstall eucalyptus on our cloud with the packages that Eucalyptus team had end up putting together halfway through the semester. During class he actually managed to quickly install all of the packages and set everything up, while long and I managed to package and image with a kernel that was working on the ECC cloud, and we actually managed to get it running.

This was a success at running an image and all seemed well but there was still some work to be done, we could run one image but when we tried to run more it was not allowing us to due to not enough resources and seemed not to be assigning IP’s correctly. So there must have been a problem with the network configuration, Mike was tasked with flattening the network and after some tweeks that Dave did to the networking configuration on the cloud all seemed much better.

We were able to get multiple instances up in the long run and the troubleshooting that Dhimitri and I have been doing seemed to help locating where some potential problems were by going through the nclog file.

From the blog armindoa » WSU CS by mindoftw and used with permission of the author. All other rights reserved by the author.