Author Archives: dillonmurphy10

FileZilla or SSH

After creating the user directories, we had to allow the user a way to put their code in the web directory. There were two main ways to accomplish this that was explained on an as-need basis in class. The two (perhaps three) methods are to modify code locally and use FileZilla to transfer files to the directory, modify code locally and use scp to place the code on the server, or ssh into the server and modify code directly in the test directory.

From working with individuals throughout the course, the majority seems to be using FileZilla, but it’s nice to have the option to work directly in the folder’s code.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

User Directories to Test on a Web Server

When we started working on a web project, we were using git for individual parts of the project but we wanted to see the projects as a web page and updating git to wait for results was a bit more difficult than expected. Because of this, we decided to create user directories on the server hosting the project which would render everything through the web server. This made testing much easier, as any scripts could be tested locally.

The user directories were creating using the following script:

user=
pass=
users=
passwords=
count=0

while [ 1 ]
do
    # Prompt and get the username
    echo -n “Enter username [Blank to Exit]: “
    read user
    if [ -z $user ]; then
        break
    fi

    # Check for errand username formats
    if [[ ! $user =~ ^[a-z] ]]; then
        echo “Invalid username”
        continue
    fi

    # Set up the user and directories
    useradd $user -d $BASE_DIR/$user

    mkdir $WEB_DIR/$user
    chown $user:developer $WEB_DIR/$user
    ln -s $WEB_DIR/$user $BASE_DIR/$user/html
    chown $user:developer $BASE_DIR/$user/html

    users[$count]=$user
    count=$(($count + 1))

    # Check for more users
    echo -n “Another User? (y/N): “
    read another
    if [ -z $another ]; then
        break
    fi

    if [ $another != ‘y’ ] && [ $another != ‘Y’ ] && [ $another != ‘yes’ ] && [ $another != ‘Yes’ ]
    then
        break
    fi
done

for (( i = 0; i < $count; i++ ))
do
    echo “Username:    ${users[$i]}”
    echo “${users[$i]}” >> users.csv
done

The script creates a new user given a user name and creates a home folder for that user. Then a directory is created in the development folder of the web directory with the same name as the user name. The permissions is then corrected so the correct user can edit their code. Once this is done a symlink is placed in the user’s home folder to make it a little easier. To place your code in the web directory you just needed to place your code in your own html folder.

To access an individual’s web work, you could go to cstest.worcester.edu/development/ and get a list of the user directories. You could then view the work by clicking on the correct user.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Working with a Client

Working with the Worcester Art Museum has been a good experience for working with a client and making sure a project will be complete and thorough. Throughout the course there were both some challenges faced and milestone achievements.

Most of the work I did during the semester was done in the server group so there was not as much direct interaction with Tim and WAM as most of the other groups, although there was some. The server group started by ensuring that the final project would be able to be deployed on the Worcester Art Museum’s iPads and that the project was easy to maintain. After deciding to move to a web page as the main project deployment wasn’t an issue. As it turns out, the museum has a web server where we can deploy the finished product and they can maintain it locally. With all these things established, the server group looked for ways to potentially expand, and that’s where working with a climate can be challenging.

Part of the initiative for the server group was to look into a way we could use a database to improve the features of the project. The major ideas that surfaced were to email coloured images to a provided email, save images for other patrons to view, save high scores for the puzzle, and leave comments about the exhibit. When talking to WAM about these features it was determined that databases weren’t going to be used because it added to the complexity of maintenance. This was a bit of a bummer because as a group we were really looking to contribute a front end feature instead of all back end.

In the end, it all worked out, and every thing went well. At this point we are just finishing up some final polishing and getting ready to deploy the finished project. 

 

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

College Class vs. Real World

All computer science courses up to this point have dealt with individual or small group assignments. In these assignments we began with either a complete instruction set or a template, a starting position, and an end goal. Using these assignments we have been able to learn concepts and basics which can be placed together to form larger projects.

During this capstone course we have moved away from this fairly standard model, going over a semester long project, breaking into groups, and determining different paths to take to get from point A to point B. Unlike most classes where deadlines were weekly, and assignments complete, this course featured a more abstract plan. Although updates on progress were given, the deadlines were defined by the groups and almost anything was acceptable providing the project would be completed on time.

This model is close what I’m expecting in the real world. Tasks, mostly small parts of larger projects will be assigned, and a deadline given. Based on this deadline, we will have to develop a plan, determine what course of action needs to be taken, and meet the deadline. I enjoyed that this class was like that and it has really prepared me for my future career opportunities.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Establishing Git throughout a Computer Science Degree Program

Throughout this capstone course, small groups worked together to create an overall project. Because of the format of the class, a method of collaboration was needed and the one that made the most since was git through github. Git allowed the teams to work individually on their parts and then merge changes to the larger effort. This way of collaboration and version control worked well to assure the fluidity of the project. The only setback associated with using git was the fact that it was a new concept to many in the class and the features were being learned throughout the course.

There is currently the initiative to introduce git in the first programming course offered as a way of working with lab partners and submitting assignments. After students learn to use git in one of the introductory courses the idea can be used throughout the college career as a means of collaboration, version control, and centralized organization. Dr. Wurst is in the process of drafting a lab to introduce git and will use it as the way submit assignments.

Version control such as git is valuable for individual development as well as large group projects and learning it early on will be very valuable throughout college and career. Personally, I’m very excited to see how the idea of introducing git early on will change the dynamic of the Computer Science major at Worcester State.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Logging into server with SSH and Changing Password

Hello everyone,

Now that we have an open ssh port on our server, individuals can log on and look at the code structure or play around with their own development folder. Once you have a username, you should log onto the server and change your password for security reasons.

Using SSH to Gain Access to the Server

The easiest way to gain access to the server and change your password is to use SSH. If you are using a windows machine you should install putty. Once you have putty installed you can place the url in the server field and leave the port on 22. When the prompt shows up enter your username and then type your password. If you are using windows or mac, you can SSH from a terminal by typing ssh username@server and then type your password when prompted. Be aware that you won’t be able to see any characters when typing your password but it’s being entered.

Changing your Password

Once you’re logged onto the server which is running CentOS you can easily change your password by typing passwd and hitting enter. This will prompt you for the current password and then you can type your new password. Again no characters will show up but this is normal.

In Your Home Folder

You should see one directory in your home folder, which is where you can place all the files that you want to test through the web server. This is a folder that is sim linked to a folder in the webroot. In order to test any code that you place in here you can go to cstest.worcester.edu/development/your_username or simply go to cstest.worcester.edu and navigate to your folder from there.

If you have any questions, please blog about them or send out a message on the ListServ.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Using GitHub with SSH

If you’ve noticed, GitHub offers three ways to access a repository, two with read-write access and one with read-only access. For this project, each user is granted push-pull access (read-write) so eac of us can contribute code. The two methods which provide both read and write access are HTTP and SSH.

Using HTTP you can download an application and gain access using your GitHub credentials. As a member of the project you’ll be granted write privilege with these credentials (the project is open source and therefore, anyone already has read privileges). 

The other option is to use SSH, which allows you push and pull directly from the command line. In order to do this, however, you need to copy your public ssh-key into the ssh section on your GitHub account. Once the key to your computer is in the settings on your GitHub account you’ll be able to push to the database.

Once I have some more time to sit and work on it, I am planning to provide some steps to accomplish this. I thought having the information now would be helpful for those who would like to look into it more individually.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Prospective Database Ideas

After class on Monday our group has decided to look into some of the potential ways databases could be used in this application to set up a framework and allow the client to switch projects simply. In order to do this we thought about looking into SQLite to keep a local database on the ipad, in which case internet access wouldn’t be needed. Before proceeding however, we need to look further into whether or not PhoneGap will allow us to use SQLite in the app.

If we decide as a class to proceed with the idea of having databases initialized to build a template it is crucial to work with some of the other groups in the early development phases as to plan for dynamic content.

There is still a lot more investigating to be done, but our initial thoughts are promising. For more information and documentation take a look at our wiki on github:

https://github.com/CS-Worcester/CS401Spring2013/wiki/Database

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Introductory Post to CS 401

Hello all, I’m Dillon Murphy, a junior/senior in this semester’s capstone course. As a computer science major, I find the subject very interesting, providing promising career paths. This field both unique and challenging, with it’s accomplishments  being most rewarding. Personally, I am leaning towards the software development/engineering path of the major, but looking to increase my skill set in system administration and networking as I see the value in becoming a well rounded computer science professional.

I am looking forward to a class where we as computer scientists work as a group of individuals to accomplish a common goal in programming, while working with a client. After taking many CS courses, this is where our skills will be applied in a career-resembling manner, learning more about the ins and outs of the field. Learning about the project’s description has increased my interest in the course greatly, and programming an app using web development tools seems to be a valuable skill to place on the resume. Overall, I am looking forward to this semester in our capstone class, increasing knowledge and work experience greatly.

As my first blog, the setup wasn’t bad at all and the application seems to be useful for sharing ideas. I look forward to making more posts about this course throughout the year.

From the blog CS 401 - Object Oriented Design » cs-wsu by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.