We have decided to make each room a folder. However, instead of having folders in folders for our room layout, we will have all the room folders in one subdirectory. We have also decided to use multiple files in each folder for the different actions to use. We have split the project up amongst ourselves. Two people will be coding in python and two people will write the room descriptions, action files, etc. We already have a basic implementation of the project, all we need to do is add some actions, add the room descriptions, and action files.
I guess I never wrote about my teams final project. Our team is making a battleship game. So far we have the entire game running on the terminal. We have used QT to build our program. We thought of using QT since couple of people in our group are in Soft engineering class. They mainly use QT for all their HWs. So far the only issues we are facing is the size of different ships. Initially we assumed that the ship size would be 1. This helped us make the code modular and simpler. Now we just to need to fix ship sizes etc. Besides this we also have been looking at making the game multiplier over a WiFi network. Some of the classes that we have been looking at is QAbstractSocket. If we figure out how to setup a simple chat server then we could potentially have the game running over a network as well.
I agree with this post completely. First day of class is not as exciting as it used to be; no one tries to meet new people or talk to the person next to them. As difficult as it is maintain a social life as CPE, I feel like there are many opportunities to meet new people with similar interests, such as in school clubs or sporting events. I think effort is simply needed to meet new people.
Speaking up in class is entirely a different issue, I believe the main reason for no one wanting to speak up is because they are intimidated by public speaking. I know its a small class of 30 people, but I would nevertheless consider speaking up in class as public speaking.One way to fix this issue would be to make public speaking class part of our curriculum. Not only will this help in the short term, but it will be very useful on the job.
Well, its either my reason above, or no one knows the answer to the professors question.
My latest project in ECE 3574 is about cooperative process. The purpose of our assignment to communicate between 2 different files which includes 5 processes altogether. Cooperative process is the idea of of passing/retrieving information within the processes. There are two ways that this can be done:
1) Shared Memory
In shared memory, all communicating processes must establish a region of shared memory. Each processes then reads/writes to this shared memory location. It is important to make sure that two processes may read and write at the same time. A classic example of shared memory problem could be encountered during a producer consumer problem. The producer produces while the consumer consumes the information. The best place to put the data would be in the shared memory location which could be accessed by both the producer and consumer.
There is no memory allocated in message passing. A small mail box with a corresponding mail box number is attached to the processes. The processes send and receive data through this mailbox. A communication link must be established for two processes to communicate. My current project focus of Message Passing which utilizes Posix Message Queues.
While doing research for the futures paper, I found some information about FTP. FTP is also called as File Transfer Protocol. We are aware that Unix is a server based operating system. There is one central server and the data of this server can be accessed by several other computers which have access to the parent server. Often times, the access is restricted by enforcing a user name and/or a password. Each computer is like a branch where the server acts as the root of this tree.
FTP is the way to transfer data to and from these server. It can be very beneficial in office where the main data might need to be accessed by all the employees. There is a list of FTP commands that could be found on Google. Some of these commands are:
DELE: Delete File
MKD: Make directory, etc.
All these commands are typed in the Linux terminal. There are several other ways of transferring files and FTP is one of the major and famous one out there.
Look at this link for several other FTP commands:
It’s Easy as pie
Please keep it simple stupid
Lets work on Unix
Hi, my name is Sid.
I liked unix since I was a kid.
Partitioning is what amused me
All I wanted to learn was a binary tree.
Sleep is what I ever did.
Past week we had a unix assignment in which we had to pipe two cpp files. One of the cpp files called “Generator.cpp” counted numbers and printed them to standard out. The other cpp file called “Consumer.cpp” took numbers from standard in took their average and printed it to standard out. Our assignment was to pipe them and also create a make file. Creating a Make file was really easy. The hardest part of this assignment I found was piping the two cpp files. At first I thought if U just use ./generator | ./consumer .. it should work, but I was wrong. The best way to this is to create a seperate cpp file in which you use fork command and also execute ./generator and ./consumer. Everything worked fine then. The key thing was to kill the ./generator using the kill command. One part that I was stuck on was waiting on the ./consumer to end. I used waitpid and wait command; however, it did not work. The generator executable was fine with the waitpid command. But ./consumer was not working. My program would get stuck when I called the wait command twice. If anyone have some thoughts on that then it would be great.
Here’s my Unix Design Philosophy Haiku for an assignment in my Unix class:
Please be transparent
Simple and clean it should be
Less for you and me!
and my limerick:
Too bad I did not know
That partitioning is slow
And shouldn’t be stopped mid-way
It may cause a very, very bad day
’cause warranty laughed and said no
I’ll go ahead and start off this blog by talking about the makefile assignment since I haven’t said anything about that yet. At first, I thought making a makefile would be extremely difficult; I figured that since the process was often automated it must be very hard. I actually found it to be very intuitive for the most part. Each target will be re-created based on any dependencies that it has, so if any of its dependencies change then the target will be recreated based upon the commands listed for that target. I found especially beneficial that you can have multiple targets if they have the same dependencies and are created by the same commands, this came in handy for the parser.tab.hpp, and parser.tab.cpp files which were both dependent on parser.ypp and were created by the same bison command.
The most recent assignment was on forking processes and creating a pipe. The first part of the assignment was to create a makefile which proved to be very easy after the last homework. For the most part the homework was very straightforward and took nothing more than looking at examples and reading the man pages. Of course I had a couple small bugs, but Darren pointed me in the right direction with these issues, and I got the homework finished without too much trouble. I have a lot more experience in C++ so it is a lot easier for me to write C++ code then it was with writing Python which was a struggle especially through poor documentation. I thought this was a cool assignment that showed how the beginnings of a shell may come together.
The most recent assignment in 3574 wasn’t too difficult after some guidance from Sean. This goal of this homework was to use threads to perform matrix multiplication. Reading from the input file actually proved to be more difficult than I had expected since Sean told me he would probably do a of error checking by supplying oddly formatted input files. He showed me how to use QRegExp (regular expressions) to get a good pattern for determining if the input is an int or a float, and then if the input didn’t match either of those then you know that there is something wrong with the input. This eliminates the need to check for a multitude of different things such as if there are letters entered, or special characters, or who know’s what else. The regular expression catches it all with ease. I read the input files into a QList of QStringLists, which gave me access to the matrix elements in a similar way to a 2-D array. After that it was pretty easy just to run a for loop to make the correct number of threads, calculate the correct products then output it to the resultant matrix. I found that there was no need for mutexes since there is no thread was going to access to the same memory location, so this made the assignment even easier.