User Tools

Site Tools


blog:fall2015:pgrant3:journal

This is an old revision of the document!


September 7, 2015 UNIX

From starting this course, and knowing almost nothing about UNIX based Operating Systems, I have learned a lot of the basic commands that enable one to move around in a command line environment. Examples of this include listing files in your current working directory, logging onto lab46 via SSH, especially on a Windows based machine. I have learned how to move files, copy files, create files, as well as delete files from the command line. One of the most interesting things that I had learned was during a class period in which we went over the basic history of the different operating systems, into the current ones that are utilized. I had no idea that UNIX based Operating Systems played such a major roll in shaping the way that users interact with a computer in today's world of touch screen devices. All of this is significant to me due to the fact that I have had almost no previous experience in this environment. At this point, I feel that I can easily navigate and handle different files, as well as examine file permissions, with no help.

September 14, 2015 UNIX

This week I have learned how to create files and directories, how to set permissions, and how to move files in the OS that I have permissions to move, all through the command line interface. I feel comfortable doing all of these things. At least I thought I did until I attempted to do this weeks project. I can't even get it off the ground by locating the source files that we have to modify. I can list (ls) files, copy (cp), move (mv), files, and I understand that a command needs to be followed by parameters to feed the command. I figured out how to look into the commands manual, at least to my knowledge, by typing in the command followed by –h. I'm not sure if this is the most optimal way to review a command and its uses as well as parameter requirements. Further than that, as far as projects go to look up things that are supposed to help me, I am unsure. Something that I know I have a firm grasp on though, is setting file permissions of files that I am able to, as well as viewing the file permissions that are set, all in octal. My first priority at this point, is to become more familiar with the basic commands that UNIX based systems provide for the user. After I am competent enough with those, I would like to learn things that will allow me to personalize my desktop, especially in the OpenBSD operating system we use in class. I would like to add a clock system to the desktop, as well as other basic applications.

September 17, 2015 UNIX

I can now look up manual pages for commands rather than just using the limited help feature. I am comfortable looking through files with the 'cat' command, and modifying their contents, while storing the modification in a new file, using the > or » to overwrite or append. We touched on variables as well as alias(ing)?, so I am excited to toy around with those concepts. Lastly, for today, we went over wildcards. I am going to have to take a closer look at them in order to understand them better, or more appropriately, to apply them in a more efficient manner as I couldn't come up with the proper solutions in class, but I understood what the solution did after it was shown.

September 23, 2015 UNIX

After practicing more with wildcards, I am comfortable utilizing them in order to list files based on certain parameters. Such as if it starts with a vowel, if it is a certain amount of characters, if it contains a vowel, and more. This week I found the cus0 project, that was due today to be extremely difficult. I stared at it all day, finally figuring out what I was doing. The files that I copied from the public directory were configuration files that are already set, at least to my knowledge, through the group. Editing them was much more difficult than I had anticipated, because I was hardly aware of how config files even worked prior to this project. I may have messed up a little bit, because instead of just renaming the source files, modifying them, and saving them as a new name, I actually just saved them as config files to my home directory, which will overwrite the config files that are set for the group. At least that's what I read should happen. I struggled with the project because I am unsure of what a lot of what was in those config files even did. I definitely need to take a look into user configurations more.

September 24, 2015 UNIX

After saving three of the configuration files to my home directory, and logging into the lab46 pod in class today, I saw how much I altered. It proved to be inconvenient. I ended up deleting two of them, and preserving the modified .bashrc file I overwrote. Through fixing the .bashrc file, which was different than the original one, without any of my modifications, I learned a lot more about config files. That, as well as learning vim, which we also started today, sparked a big interest in UNIX to me. At this point I'm editing my .vimrc file in my home directory in order to add a little more flavor to the text editor. So far I have lines numbered, and a color scheme for C syntax. I plan to go further into the customization, as well as redo my window manager config file.

September 28, 2015 UNIX

With regards to the answers that were asked for on pbx0, after copying file.txt from the public directory, and using the file command on it, file.txt was an ASCII file, which is what I would have guessed from viewing it as well. However, I now understand that unlike in windows systems, he .txt file name extension has no bearing on the filetype of the document. Also, when you compress the file using gzip, and use the file command on it again, it will tell you that the compressed data was the original file name, and the command will output the last modified date and time. If one specifies the compression method, being fast or best, it will display that information as well.

I found pbx0 to be challenging and fun. Now knowing that we will not have procedural instructions to complete a task, solving a problem seems more rewarding. Through this project I have become more familiar with the file command and its different uses, to see what you may have to do in order to appropriately view and modify the file. Also, encoding and decoding was new to me. I learned what the purpose of encoding a file may be, as well as how to decode an encoded file, so long as the encoding method was through uuencode.

September 7, 2015 C Prog

Prior to this course I had no knowledge of memory management when I would write a program. I have learned, in the C programming language, how much memory each variable requires when it is declared. I more so now, than previous to this course, understand the significance of header files and the functions that are potentially utilized from those files. I have learned how to look at the header file and determine which function I am able to call into my program. Everything was going well, and then I was introduced to pointers. At first, I was able to write a basic program to point information to another variable. It wasn't until I actually had to face memory management that I was stumped. I am motivated to continue to learn about pointers and the power behind them now, to really unlock what the C programming language is capable of.

September 14, 2015 C Prog

Throughout this week, I had to take a close look at pointers and really focus on what they are doing to finally understand what they do. I can confidently say that I understand them enough now to actually say I understand them. That a pointer points to a physical memory address in the machine, rather than a set value that we give it, and every time we run that program, the address of the pointer will change. We touched on bitwise operators, logical operators, and if statements. I understand if statements, and the logic needed to allow certain functions to happen in a written program. I also understand that if statements are powered by logical operators to allow the computer to recognize if a condition is true or false. However, bitwise operators are going to be more difficult for me to grasp. Using a bitwise operator in order to prove a condition true or false is not something I am used to. We used a bitwise & in order to determine if a number was positive or negative, by comparing all bits in the number to a zero, beside the least significant bit, which was compared to a one. I am not confident yet that I could use bitwise operators, outside of that instance in order to prove conditions true or false in a conditional statement. I am excited to discover how that can be accomplished. I also found an algorithm that will allow one to square any three digit number ending in five, following our squares project. If you take the first two numbers out of the three, square them, and add the original first two digits to that new number, and then put a 25 at the end of it, you can square any three digit number ending in five, without actually using a calculator and manually squaring the whole number. I haven't sat down and mulled through what you would have to do in order to square a four digit number in that manner though.

September 17, 2015 C Prog

I understand loops more than I had ever thought I would or, ignorantly, thought I would need to. Approaching problems before, when I needed a loop, I would always default to a while loop. I understand when to use for loops, such as when you know how many iterations of the loop you would like to run. Also, I encountered a situation when I was doing the DOW0 project where I was attempting to use a while loop, but the condition I was evaluating had a variable that I had not initialized prior. This variable was going to be initialized during the loop, so instead of setting a value to it, I used a do, while, bottom driven loop to perform the task, and then evaluate. I am a lot more confident in my ability to know when to use what sort of loop.

September 21, 2015 C Prog

We started going over how to find digits in a number, mainly using the % operator to find the remainder, and putting that into a loop with a counter variable. This was different because of the way in which the position was defined within the string of integers that made up the whole integer. After I was comfortable with that, I learned how to print a specific number of elements to memory, using snprintf, as well as sprintf functions. After being comfortable using both of these, and looking at the C standard, an attempt was made to create a function that would allow us to create strings, for the purposes of comparing them within the language. In order to create a function we had to look at arguments in C, and when / how to use them. I definitely need more practice using them in the ways that they are available, but I have a beginning understanding established of them. The declaration syntax, and what is required. The definition, and what is required in that. And lastly, the function call, to actually utilize what you have created. At this point I feel that we will be able to accomplish some pretty cool things with the C language once we learn how to create and utilize functions that we have made. After being comfortable with different iterations of functions, I am excited to create our own libraries, as well as use libraries that are already established.

September 28, 2015 C Prog

In the past week, I haven't really delved into functions as much as I thought I would have. I think that I am going to wait until we cover it in further detail in class. So far, I have made progress on mbe0, and am comfortable with my ability to finish it timely. However, the restriction on using arrays and loops is certainly not convenient. At this point, especially from what we have been doing the past few weeks in class, its hard to fight the urge to declare an array when using multiple variables of the same type, as well as not using loops in order to simplify a problems solution. I feel like I am typing a lot of things, that I otherwise would not be typing.

After reviewing the pattern that is used in order to multiply a one, two, or three digit number by eleven, as mbe0 asks us to do, one can definitely see a pattern develop. This pattern could easily be implemented into four or five digit numbers.

The only part of the project that I seem to be having trouble with is determining if the input is one digit, two digits, or three digits. I can separate every digit of the input, and operate on it, giving a correct output of the operation, but that is only one way of doing it. The project states that the program must determine if the given input is one, two, or three digits. I need to look into that further, in order to have multiple options when approaching similar problems regarding reading input from a source.

At the end of the day, I am getting a lot more comfortable with the mindset of looking at a problem, and breaking it down into smaller pieces, and working through one thing at a time. Before, I would just rush and half way understand something, before trying to implement it further, into something I barely understood. That, as well as finding patterns in order to implement a solution to a problem, make me confident that I am heading in the right direction, mentally, for this course.

October 5 C Prog

This past week we have looked at functions again, and in greater detail. I've been toying with the idea of continuing a previous project that I had worked on. That being a casino sort of program. Since we have learned functions now, I feel that it is a lot more feasible. However, when I plan it out before taking it to my keyboard, I feel like it would be more beneficial, especially for my sanity, to wait until we go over creating our own libraries in order to accomplish this program. There are a lot of moving pieces that need to go into it, and I'm excited to soon reach a point where I can make a dynamic program.

Aside from that, I have been working on completing the current project due, mbe1. This time we could use arrays and loops in order to satisfy the algorithm. Coming into the project I was certain that it would be easier, and much shorter than last weeks. I was wrong however. Introducing loops into the project makes the middle of a repeated operation easier, but you still have to account for the first iteration, that is under different circumstances, as well as the last iteration, which will be under a different set of operations. I was trying to put these in the main while loop that I was using, but that didn't seem to be working logically. I was writing a lot more code to account for those instances rather than if i just took them out of the loop.

After coming in close to finishing the project, I have found that if you want to complete many tasks, of the same nature, using a loop is definitely more viable. Like the case for this week, where we went from having to account for a 1, 2, or 3 digit number, to up to an 8 digit number. If you have a few steps, that could differ from one another in certain cases, as we did last week, it seems to be simpler and more straight forward to just use a procedural style to your code, rather than using so many loops. Again, I am comfortable with my knowledge to complete this task.

Something that I have been thinking about as well, when looking for side projects outside of class to do, is looking online. There is a subreddit, and I say that because I'm sure whoever reads this will know what Reddit is, called dailyprogrammer, where one can go to do different challenges. These challenges are ranged from easy to hard, with medium in the middle. I look at the ones that are graded as easy, and they still seem too complex for me to grasp. I have a hard time knowing what resources I should be using when I'm doing specific tasks. It seems my knowledge outside of just using stdio.h and stdlib.h (for the exit function) is limited. Being able to solve problems, by expanding my knowledge at the same time is something that I need to get better at. So far, I can solve problems that are inside of the scope of what I'm familiar with. That might sound a little weird, but I think it makes a little bit of sense.

I have made it a goal of mine to attempt to solve at least one problem on that website, that is of easy grade, each week along with the current projects that we are doing. I think if I do those two things in conjunction with one another, I will see my skills develop more rapidly.

blog/fall2015/pgrant3/journal.1444100844.txt.gz · Last modified: 2015/10/06 03:07 by pgrant3