I decided to review the high low card game project because I am very into card games like poker and blackjack and thought it would be interesting. I ran the code in C++ and it worked just fine. I thought it was interesting that you won or lost double what you bet in the first place because that is not what most games do, but that was a design choice. I thought an interesting twist to the normal game was to have seven as being its own option where you could win ten times the amount of money that you bet on it. Overall it was a well formatted project because every function was entitled properly explaining what it did. Additionally, there were comments throughout the code that added insight into what each section was supposed to do if there was any confusion. The only problem I saw was that there were a couple of simple spelling errors, but other than that it was sound.
After a semester in this Unix class, I have learned many things. I think that the most important thing overall that I’ve learned is that it can be much easier to code certain things using Unix than it can be to use C++ or C. The Unix philosophy fits my personality very well because I am usually the one that likes to keep things simple and get to the point. This class taught me about modularity, how to use pipelines and makefiles, and many other things. I think that the way this class was taught was very good because while there was a teacher that was teaching us, there was also room for us to go out and learn some of it by ourselves with the books, slides, and the other resources we were given. Overall this class was a very good experience for me.
I meant to post over break but was consumed with family obligations and forgot. I had been looking up a little bit more about makefiles and such just to be able to understand the little nuances of them. I found out about even more shortcuts when declaring files and outputs that make writing the files much shorter. Things such as abbreviating stuff with cflags and being able to remove multiple files just by putting spaces between them instead of having to separately removing each particular file.
After working on the homework that was due the past week, I learned a lot about what Unix can do. In order to finish the homework, I had to learn about pipelines and being able to fork a command so that it could do multiple things. This was necessary in our homework because there were two child processes that needed to be executed. I needed to read from the pipe and then write to the pipe as well which were new commands. I thought it was really interesting that there were multiple ways to create a pipe as opposed to just one way. It allows for some differences in peoples coding styles depending on what they like to do.
We had to print messages to the standard error showing that each child process had been successfully executed and closed. Then we had to implement a wait function so that there was a pause between the closing of the two child processes.
There was also a makefile that had to be made for this assignment in order to run the program correctly. It took a lot less time to make then it did when I first tried writing one, and I’m getting much better at it. I have learned the format and structure so I no longer need a guide to help me. I still need to work on the finer details of makefiles though.
After finally finishing the makefile homework, I breathed a sigh of relief. I probably made it much more complicated than it actually was, but I seemed to have a lot of trouble with it. I went online to try and figure out what I was doing wrong, but I couldn’t quite grasp the concept. When I was looking at targets and dependencies, it all kind of got jumbled together. So when I was trying to figure out which .cpp and .o files were supposed to go where, it took me a while to understand the pattern. I kept putting the wrong files with the outputs or outputs in files they weren’t supposed to be with.
After a while of working on this, I finally had a breakthrough with it. The way the homework was worded had really thrown me off, but once I understood it and got one of the lines correct, the others fell into place. I’m still not quite sure I have the whole concept mastered, but I think that I’m getting a better understanding of what a makefile’s purpose is and how it is used for output and .cpp files. I definitely either need to do some more research or get some more practice with creating makefiles.
I haven’t posted in a while because yet again, I have been slammed with projects and tests. But after our meeting last week to discuss our ideas for a group project, I have been thinking about how to best update it. Our original design is pretty good, but there are several features that we have the choice to add or not. However, just adding one part and not another in some cases doesn’t make logical sense. Therefore, I have been trying to figure out which functions would best be implemented so as to minimize the amount of coding clutter and maximize the abilities of our program. It seems to be an extremely interesting balancing act so far.
After taking the midterm, I realized that I had actually learned quite a lot about Unix and programming in Ubuntu. I was able to sort through lists of words and numbers using short simple commands that normally would take much more code in C or C++. I am growing to appreciate the simplicity of Unix and how easy it is to combine multiple commands such as grep and sed into one to accomplish the task more easily.
I also learned a couple things while taking the midterm because I was not aware that it was possible to find hidden files and exclude nonhidden files in a search. I found that extremely interesting and I look forward to learning more about specific file searching and modifying certain commands to be able to do several jobs in one line of code.
I haven’t posted in a while because I have been completely bombed with 4 tests, homework, and a project in the past week. So here’s my post about my dealings with Ubuntu. I have still been trying to get used to the syntax differences from Unix and C++ and C. It has been rather troubling, but I’m still working on it. The basic commands have become rather simple for me, but as we progress through programming, the harder concepts take a little bit more time to comprehend. I admit that what we are learning now is very interesting and I’m looking forward to gaining a better understanding of how to program with these concepts and using them in a wider variety of functions as opposed to just these few assignments.
After working on homework 3, I am finding it much easier to code in python. I really thought the parser.add_argument function was an interesting way to add your own CLA’s to a program. It was also a lot easier than I expected it would be once I understood the general concepts.
However, learning python is still a little be tough for some parts. It is similar to other coding that I have done, but it is still taking a little bit of time to get used to. Hopefully, rather soon I will get used to the syntax and codes. One big thing for me is that I always end my lines with semi-colons and then have to go back and remove them.
In class today, we broke up into groups and each member of the group explained a set of Unix commands to the rest of the group. In theory, I thought this was a very good idea. However, because everyone in the group had different ideas about what aspects of a command were important for programming I think that several pieces were left out of descriptions. I also think that because we were not given much time to elaborate on the commands, people only gave brief explanations about them. Each command has an extensive list of properties that were not able to be covered.
On the other hand, it was a very good way of getting everyone in class at least associated with the general commands that we will be using throughout the semester. This way, we will all at least know what each command’s general purpose is so that we may use it when we are programming.