Category Archives: cs-wsu

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.

Solution for the zoom in lightbox

According to the existing defect in the light box zoom feature that the article page will remain on the same zoom size when user exit from the light box. My original plan is let user to click on the picture and return to the article page with the full size. However, it does not work that way. So I came up with another solution, which unblock the zoom function on the article page. The advantage of doing this is user will being able to zoon back and normally read the article. The disadvantage will be when the user did not close the light box with size, the page will look disorganized until they zoom back in. I have gave a couple people test on the user experience, they feel nature’s zoom in for the picture, and when they close the light box, they will realized the page need to be zoom out, also. I mean, this the not the solution that my original plan was. But this is at least a solution for the problem. 

From the blog zli1 » cs-wsu by zhengjunli and used with permission of the author. All other rights reserved by the author.

A Final Finishing Touch

Image

Well this will be the very last post regarding the coloring app for the Worcester Art Museum.  I have only made one change since the last post and that was to add a back button.  The reason for this was because we have a navigation bar built into our app but on the coloring app page it causes squishing because the positioning is done with percentages.  The outcome is the app looks fine if the window is a enlarged but things overlap and become unusable if you make the window to small.  The solution; remove the navigation bar from the coloring app completely and add an html back button.  I tried a few different codes for this but in the end I settled on onclick = “history.back(-1)”.  This way I do not need to worry about traversing the files I just go to the previous page onclick =””.

Till the next Project.

Jason Hintlian 

From the blog jasonhintlian » cs-wsu by jasonhintlian and used with permission of the author. All other rights reserved by the author.

New Screensaver

Now, our screensaver part seems to be done.  Tim wanted the introPage’s response to the wipe actions to be quicker. We could decrease the time delay for transition effect to have an improvement, but it isn’t a really significant improvement. We believe the reaction speed to the swipe actions depends on the realization of jQuery to the swipe actions/touches.

With the sense of improving, i also made another screensaver as a second choice since i also like a continuous motion pattern (beside fading or popping) for our screensaver. To me, this design makes a sense of showing a collection of all the images related to the Orantes at the first glance with the continuous movement. Here is how it looks like (these images were captured at different moments of the movement).

Screen Shot 2013-05-10 at 11.34.12 PMScreen Shot 2013-05-10 at 11.28.16 PM Screen Shot 2013-05-10 at 11.34.31 PM

The background color can be changed flexibly for an attractive look.

I let Tim know and Im waiting for his response on this new pattern.

From the blog daunguyen10&#039;s Blog » CS-WSU by daunguyen10 and used with permission of the author. All other rights reserved by the author.

Week ending 5/11/13: Fix more things & How-To doc

For this week, there wasn’t much left for me to do.

After I showed Tim the recent version of the Introduction Page, he tested it and told me that the transition between pages is a bit sluggish. So I’ve read up on possible solution to fix this, and it is to change the transition value of the .in, .out in the jquery-mobile css file (default to 350ms). So after I did that, I found that the “transition effect” is faster, but the transition is still “slow.” I think this is due to jquery mobile recognizing the “swipe” motion, so there is really nothing else I can do with my little knowledge of javascript.

And Tim said that if this cannot be fixed then it would be ok if I put the button back and choose the transition effect with the least delay. So I put the left & right navigation button back, with the default transition effect of “fade” for those buttons. However, the “Help” button is still there, and we can still navigate the pages by swiping.

I also wrote up a short document on how to change the contents of the Screensaver and the Introduction Page, and it is very simple so I think Tim should not have a problem understanding it.

From the blog ssuksawat » cs-wsu by ssuksawat and used with permission of the author. All other rights reserved by the author.

Week ending 5/11/13: Fix more things & How-To doc

For this week, there wasn’t much left for me to do.

After I showed Tim the recent version of the Introduction Page, he tested it and told me that the transition between pages is a bit sluggish. So I’ve read up on possible solution to fix this, and it is to change the transition value of the .in, .out in the jquery-mobile css file (default to 350ms). So after I did that, I found that the “transition effect” is faster, but the transition is still “slow.” I think this is due to jquery mobile recognizing the “swipe” motion, so there is really nothing else I can do with my little knowledge of javascript.

And Tim said that if this cannot be fixed then it would be ok if I put the button back and choose the transition effect with the least delay. So I put the left & right navigation button back, with the default transition effect of “fade” for those buttons. However, the “Help” button is still there, and we can still navigate the pages by swiping.

I also wrote up a short document on how to change the contents of the Screensaver and the Introduction Page, and it is very simple so I think Tim should not have a problem understanding it.

From the blog ssuksawat » cs-wsu by ssuksawat and used with permission of the author. All other rights reserved by the author.

Article Viewer 0.3

This version has had the following changes done:
Images now take up the entire image viewing portion of the page.
The image no long scroll they just appear, in addition to now having a position for captions.
The scroll triggers have been removed, the focus change is now all touch.
Added links in the footer to acknowledgements and back to the chapter page viewer.
Font size has also been increase.

The images now have a different function to change:

function swapImage(){
$(‘#image-display’).css(“background-image”, “url(images/”+article+”/p_”+currentRow+”_thumb.jpg)”);
}
This function called on the article variable which is defined in the <body chapter=”X”> declaration in the html folder. This allows for dynamic images based on a common naming convention “/X/p_#_thumb.jpg”.

I removed all scroll functions and just utilize the p.on(‘vclick’) function. The font size was a simple CSS change of p{ font-size: 2em;}

Here is a screenshot of the current version – note the images have no been submitted to fit the div:

Until next time!
-Joe

From the blog itsJoe&#039;s Blog » cs-wsu by itsjoeyoung and used with permission of the author. All other rights reserved by the author.