Category Archives: cs-wsu

CS401: (additional post) my summer plan 2013

After counting the blog posts, I have only 12, and the course requires 14, so I will write 2 more random, CS-related, but not course-related, ranting posts.

So as titled, I will now describe what my summer plan for this summer is like!

For this summer, I got accepted for the REU program at Depauw University located in the beautiful town of Greencastle, Indiana. The title of the project I applied for is “Problem Solving using Parallel Programming.” here is the link & description http://my.depauw.edu/univ/reu/projects.html

This is a 10-week program. It starts next Wednesday the 29th, and I have to be there on the 28th. They provide up to $600 for traveling expenses. At first I was going to take a plane there, but then I google the town and found out it’s relatively(?) countryside, and no public transportation. Since I will be there for basically 2 1/2 months, I think I’ll need my car so I decided that I will drive there. Google Map says it would take around 15 hours, minus the traffic, to get there. So I will begin my 1-man solitary road trip this coming Sunday. Please wish me luck!

So far, we have not decided on what kind of problem we will try to solve for the summer. But I know that we will be programming in Erlang language. Erlang is a functional programming language that is mostly used for Parallism…or so Google says. Now I have started reading the book on Erlang, just to get a bit of a head start so I won’t be super lost next week, and it is quite different from (what the book calls) “imperative” language like C++, Java, etc. For example, it is highly similar to real mathematical equation in terms of the use of variables, like lets say, x = 5; you cannot say x = 5+1 now, because 5 != 6.

Anyways, then I was researching whether learning this language would make my resume look better and help me get a job after graduation, and the answer is…”depends.”

So Erlang is mostly used for solving problem through parallelism to speed up the computation time exponentially. But most of the time, this only happens in research institutions, not really business corporations. So if I want a research job, or grad school, knowing functional language will help upping my candidacy a bit. Although I guess more and more companies are starting to utilize parallel programming and more functional programming jobs are becoming more available, and the pay is quite good (w/ experience of course). So if it turns out I am able to pick up the language and I like it, I might as well stick with it, since some article said that non-mainstream language programmers hardly ever get laid off….so we’ll see!!

*EDIT: after some more googling around, I found that there are quite a few of jobs available for Erlang with OTP and databases…so yeaa I will see how far I can understand the language after the summer!

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

CS401: (additional post) my summer plan 2013

After counting the blog posts, I have only 12, and the course requires 14, so I will write 2 more random, CS-related, but not course-related, ranting posts.

So as titled, I will now describe what my summer plan for this summer is like!

For this summer, I got accepted for the REU program at Depauw University located in the beautiful town of Greencastle, Indiana. The title of the project I applied for is “Problem Solving using Parallel Programming.” here is the link & description http://my.depauw.edu/univ/reu/projects.html

This is a 10-week program. It starts next Wednesday the 29th, and I have to be there on the 28th. They provide up to $600 for traveling expenses. At first I was going to take a plane there, but then I google the town and found out it’s relatively(?) countryside, and no public transportation. Since I will be there for basically 2 1/2 months, I think I’ll need my car so I decided that I will drive there. Google Map says it would take around 15 hours, minus the traffic, to get there. So I will begin my 1-man solitary road trip this coming Sunday. Please wish me luck!

So far, we have not decided on what kind of problem we will try to solve for the summer. But I know that we will be programming in Erlang language. Erlang is a functional programming language that is mostly used for Parallism…or so Google says. Now I have started reading the book on Erlang, just to get a bit of a head start so I won’t be super lost next week, and it is quite different from (what the book calls) “imperative” language like C++, Java, etc. For example, it is highly similar to real mathematical equation in terms of the use of variables, like lets say, x = 5; you cannot say x = 5+1 now, because 5 != 6.

Anyways, then I was researching whether learning this language would make my resume look better and help me get a job after graduation, and the answer is…”depends.”

So Erlang is mostly used for solving problem through parallelism to speed up the computation time exponentially. But most of the time, this only happens in research institutions, not really business corporations. So if I want a research job, or grad school, knowing functional language will help upping my candidacy a bit. Although I guess more and more companies are starting to utilize parallel programming and more functional programming jobs are becoming more available, and the pay is quite good (w/ experience of course). So if it turns out I am able to pick up the language and I like it, I might as well stick with it, since some article said that non-mainstream language programmers hardly ever get laid off….so we’ll see!!

*EDIT: after some more googling around, I found that there are quite a few of jobs available for Erlang with OTP and databases…so yeaa I will see how far I can understand the language after the summer!

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

CS401: LAST CHANGE (…hopefully)

I just had to make a couple of changes to the Introduction Page as Tim requested. All I had to do was, moving the navigation (left+right) buttons to the center of the page, and also have it say “next” and “previous.” That is all!

Image

 

This course has been a very valuable for learning what it is like to work in a real development environment, as well as working in a large group. Working in team is not new to me; at my internship we work in a small team of 3. But working with a team THIS large is quite hectic, and requires much more planning, strategizing, and coordination. Overall, we got the work done, and it is a very rewarding feeling to see our “idea” turning into a real product.

Also, since this is most likely the last change i had to make, and is conclusion of this class. I will probably most likely never blog again. Thank you! 🙂

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

CS401: LAST CHANGE (…hopefully)

I just had to make a couple of changes to the Introduction Page as Tim requested. All I had to do was, moving the navigation (left+right) buttons to the center of the page, and also have it say “next” and “previous.” That is all!

Image

 

This course has been a very valuable for learning what it is like to work in a real development environment, as well as working in a large group. Working in team is not new to me; at my internship we work in a small team of 3. But working with a team THIS large is quite hectic, and requires much more planning, strategizing, and coordination. Overall, we got the work done, and it is a very rewarding feeling to see our “idea” turning into a real product.

Also, since this is most likely the last change i had to make, and is conclusion of this class. I will probably most likely never blog again. Thank you! 🙂

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

I’m still here with the slideshow.

Last Wednesday Tim decided that instead of the pinch to zoom feature, it might be easier to change it so that if the image is clicked on, it goes full resolution size and the image can just be dragged around.

This is now working fine in a web browser, but like every issue I’ve had so far…. It does NOT work on the iPad. The drag feature is being called upon in the MooTools- more JavaScript file. I believe Touchstart and touchMove events need to be added and somehow get cords from them to enable drag. The drag function can be easily read if anyone wants to take a gander. I can always end up giving them the old version that worked fine, but it will be missing the “better” zoom (hard to call it better when it doesn’t work).

If it was just being run in a web browser it would be done at this point.

I pushed a version to git finally the other day. I don’t think that one was fully working either. This one is better though. I’m worried I’m going to end up overwriting everyone’s work, so I’m trying to stay away from it as much as possible.

Lastly it is on the test server. If you are using filezilla you should be able to get into my directory and download it (I’ve downloaded other peoples work from there). That should be the most updated version unless I’m working/testing things on it if/when you download it.

Sean

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

I’m still here with the slideshow.

Last Wednesday Tim decided that instead of the pinch to zoom feature, it might be easier to change it so that if the image is clicked on, it goes full resolution size and the image can just be dragged around.

This is now working fine in a web browser, but like every issue I’ve had so far…. It does NOT work on the iPad. The drag feature is being called upon in the MooTools- more JavaScript file. I believe Touchstart and touchMove events need to be added and somehow get cords from them to enable drag. The drag function can be easily read if anyone wants to take a gander. I can always end up giving them the old version that worked fine, but it will be missing the “better” zoom (hard to call it better when it doesn’t work).

If it was just being run in a web browser it would be done at this point.

I pushed a version to git finally the other day. I don’t think that one was fully working either. This one is better though. I’m worried I’m going to end up overwriting everyone’s work, so I’m trying to stay away from it as much as possible.

Lastly it is on the test server. If you are using filezilla you should be able to get into my directory and download it (I’ve downloaded other peoples work from there). That should be the most updated version unless I’m working/testing things on it if/when you download it.

Sean

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

A Brief Word on Directory Structure

I quickly wanted to show the directory structure that we used for this course, and the git branches associated with them. We are using a CentOS 6 machine with apache as the web server. We also installed php for the git scripts which lie in the web root.

> /var/www/html/ – Web Root, No Git Association

> index.html – Show a list for Master / Development / or Users, No Git Association

>> master – The final project ready for deployment, Git Master Branch

>> test – The most complete branch for testing, Git Development Branch

>> development – Used for user directories, No Git Association

As I played a major role naming the directories, I take the full blame for the blunder of naming a directory test and linking it to a development branch, and then proceeding to name a directory development and using it for something else. Sorry about that guys.

 

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.

Class Success!… Maybe some Minor Missed Opportunities?

CS401, the capstone for WSU Computer Science, is a very useful class as it shows some real world applications. As a member of the server group, I was able to help set up the back-end of the project and integrate the code with a working web page. In order to accomplish this, I was able to practice my scripting, working with apache, improving git abilities, and again, finding the headaches associated with permissions. Some of the most satisfying results of the class were working with others on a large project, trouble shooting with peers, and seeing a full scale development task move from infancy to completion throughout a single course. It was a great semester and very valuable to future success.

Although the overall class was a success, there’s always some things that could have been done better. I wish I would have gone back to fix the git script, it was done so it worked and then it was forgotten about. I wish I went back and maximized the efficiency of this script. The other opportunity I wish I grasped a hold of was working with some of the html, css, and javascript of the other groups, possibly helping to debug or lend a hand when needed because I would have liked to learn a bit more of those languages.

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.

Updating the Web Directories on the Server

All our code throughout the semester was placed on git and then brought to the server for testing/deployment. Instead of having to log on to the server and pull code every time a change was made, we wanted to update the server every time a change was made.

In order to accomplish this, we looked into GitHub’s web hooks, which work by calling a script every time a pull request goes through. The idea of this seemed simple, but we ran into some problems with permissions. In order to accommodate this, we decided to delete the whole directory and re-clone it into the same place by the following php script:

<?php
    date_default_timezone_set(‘America/New_York’);
    $gitRoot = “/var/www/html/master”;

    // Use in the “Post-Receive URLs” section of your GitHub repo.
    if ($file = fopen(“log.txt”, “a”)){
        fwrite($file, “Update ” . date(“F j, Y, g:i a”));
    }

    if ( $_POST[‘payload’] ) {
        $delete = shell_exec(“rm -rf $gitRoot”);
        $clone = shell_exec(“git clone -b master https://github.com/CS-Worcester/CS401Spring2013.git $gitRoot”);

        fwrite($file, “\n\tPayload Received\n\tClone: $clone\n\n”);
    } else{
        fwrite($file, “\n\tNo Payload Received\n\n”);
    }
?>

The better way to do this would be to pull changes into the directory, which is much quicker because it updates only the changed files. This wasn’t followed up on after the quick fix because the quick fix was needed early in the semester, and other things arose before re-addressing the issue.

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.

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.