User Tools

Site Tools


opus:fall2011:jjohns43:part1

Part 1

Entries

September 13, 2011

Projects.c

int main(argc, %%**%%argv) {

liesure playingWithVi;\\
experiemnt analyzingKillEffects;\\
documentation filesystemExpertise;\\
documentation cProgrammingRevalations;

analyze(cProgrammingRevalations);

Today I obtained a more solid understanding of 'pointers', used in C programming. When creating a variable, applying an * 'operator' between the data type and the variable's 'identifier' will tell our program that this variable identifier refers to a 'dereferenced' holding point for our information. The concept here is that instead of the

void analyze(documentation subject) {

   breakdown(subject);

}

}

September 28, 2011

Pointers in C are still awkward to me, but I recently picked up that you may reference them as arrays. If something is initialized as a pointer of any given variable type, you can refer to the first element with that variable's name at subscript 0. Ex:

int *numTest;

numTest[0] = 2;

October 18, 2011

I decided to work on this Opus thing today, for a change. It's proven to be a less than compelling experience. The benefits of it, however, are that I am retouching some ideas I might let myself feel too comfortable with occasionally. What's going to be a real trip are the experiments I've decided to use. I should be receiving a few O'reilly books on topics which will be vital in my experimentation. Of the 3 books I am expecting, I'm most excited for the one on Python, but I think, perhaps, I should delve into the Vi/Vim one first. I've been meaning to strengthen my Vim skills for a while, and I hope that the book will encourage me to do so.

Month Day, Year

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Topics

ssh

SSH is a secure shell which is used to log on to machines and be able to issue commands to the system. “X11” (later defined) connections and arbitrary TCP ports can also be forwarded over the secure channel.

When we ssh lab46, from inside the LAIR, we are accessing a local address. The absolute address we would be targeting is lab46@corning-cc.edu. Our ssh clients are able to accept an address including a user name, such as:

myUsername@lab46

Or, from a remote location:

myUsername@lab46.corning-cc.edu

An alternative way to do this is by using the parameter -l followed by your desired login name when calling ssh.

from the manual page:

:-f      Requests ssh to go to background just before command
           execution.  This is useful if ssh is going to ask for
           passwords or passphrases, but the user wants it in the
           background.  This implies -n.  The recommended way to
           start X11 programs at a remote site is with something
           like ssh -f host xterm.
           
           If the ExitOnForwardFailure configuration option is set
           to "yes", then a client started with -f will wait for
           all remote port forwards to be successfully established
           before placing itself in the background.

This sounds interesting, but I don't fully understand it right now. After a test I did, I found that it allows something to be forked into the ssh command. This means that you essentially connect to the remote server, but are able to cast another command simultaneously. I'm probably wrong.

You can use -q to shut off most diagnostic messages when using ssh.

-v is for 'verbose' mode, and I've seen this in quite a few other programs. Must be a very commonly implemented debugging feature.

There is also a very long list of alternative options you can submit to ssh using -o, followed by anything on this special list. The list can be found at “man ssh_config” using the UNIX shell.

-x / -X: I've found it very interesting that with parameters uppercase vs. lowercase has a profound effect. I find it even more bizzare that this happens with may programs keystroke recognition as well.

This feature is to enable or disable "X11".
x - disables
X - enables (apparently allows for certain security issues such as monitoring keystrokes.

X11

X11 refers to a window system (specifically the 11th revision of “X”)

A windowing system is something that allows different processes and features of a computer to be managed visually using keyboard, mouse, etc.

The X system is most commonly found on *NIX systems, and also in Mac OS.

X allows for rigorous management of graphics via networking, which enables some great power and versatility in multiuser or remote systems.

Without going into great detail about the specifics of the system, this is what X does.

Local Host

When we say “Local host”, or more literally “localhost”, we mean the computer we're currently using. It's a way to describe the local machine without having to worry about any networking issues, and, in fact, when using the localhost address much of the networking stack is ignored when transmitting data.

Remote Host

Remote host, conversely to the term “localhost”, is terminology used to describe a computer which is NOT the physically local computer. Whether connected wirelessly, or via a distant physical line, a remote host is a machine which holds information expected to be retrived by other machines via networking.

Home Directory

A home directory is a container in a file system. It's, more specifically, the container which houses a user's most commonly accesed files, and/or, other often navigated directories. Common directories found inside one's home directory include: Documents, Downloads, Music, Pictures, Public, Videos… etc.

In our UNIX environment the command cd (Change Directory), issued with no parameters, will place us in our home directory.

Additionally, to deliberately navigate to a branch of the home directory the command: cd ~/[desired directory] may be issued to shorten the work the user must do to access the home directory.

Current Working Directory

The current working directory is the position in the file system a user is currently working in. The command pwd man be issued to display what that directory is. Additionally, the first part of our command line will give us some information as to where we are in the file system as well.

Types of Files

In a UNIX file system, nearly every functional aspect of the computing experience is represented in some way to a file. There are, in that case, many different types of files in the system. The type of a file is used to give us a bit of intuition or additional information on what the file may do or how it may behave.

Examples of some file types in UNIX are as follows:

Regular Directory Special

Information on what type of a file you're dealing with can be found by issuing the “file [file name]” command.

Additionally, issuing an “ls -l” command will give a longer listing of the files in the current working directory, including data as to what type of file each listing is.

These types will be expanded on later.

Regular Files

A “regular” file is one which can posses many, varried, attributes. Things such as text documents, images, executables, and source code files are all regular files. A regular file is a file which you will most commonly be doing operations on, or using interactively.

Directory Files

A “directory file” is one which contains information about other files. It's an orginizational file. For example, our home directory is, somehow, represented somewhere in the file system as a file. It is a file which posseses information about the relations between other files on the system. When navigating to your home directory, this “directory file” is accessed, and returns information about where the system should go.

Special Files

Any special file on the system is one which does not fall into the previous two catagories of “regular” or “directory”. These files are ones which may possess information about devices on the system, connections to the system, or other intricate functions the system may perform. They are most likely going to be the least commonly accessed and used files from the user's perspective. Some examples of what a special file may do are as follows:

[p] - Named Pipes, which allow some user-specific program interaction. [s] - Sockets, which allow communication between processes. [b or c] - Device Files, which are used to apply access rights to [hardware] specific files. [D] - Door files, which are a Sun Solaris specific file type for now. They are used to communicate between client and server.

File Operations

Since nearly everything involved in a UNIX system is treated as a file, we want to be able to issue a plethora of versitile commands on these files. A “file operation” is a command issued to the system which is going to either read or write some certain amount of data to a certain file.

Listing Files

The command “ls” is our directory listing command. This displays, by default, a list of all visible files in our current working directory. The files listed by an ls happen to be colored on our system (according to file type), which enhances readability. Additional parameters may be issued to the “ls” command in order to siphon more information out of the system about the files. Of particular use is the command “ls -l” (Long Listing), which will display information about each file's type, and the permissions the file possesses.

Objectives

Familiarity with the structure of UNIX systems [Objective 1]

This will entail continued active use of the file system.

Method

In order to measure my success in this area, I will simply reflect on my amount of comfort in performaing everyday tasks currently versus my amount of comfort 2 weeks ago.

Measurement

October 18th - Although my comfort regarding the UNIX file system has not improved much at all in the past 2 weeks, it has exponentially grown since the start of the course, and the beginning of my use of Debian via Virtual Box.

 As of this date, my home directory is very cluttered, and unorganized. I'll set the goal for myself to have improved organization by my next 2-week check-in period.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • I'm currently working on personalizing my home directory further.
  • Absolute room for improvement.
  • Could the measurement process be enhanced to be more effective? Doubtful.
  • Do you think this enhancement would be efficient to employ? N/A
  • Could the course objective be altered to be more applicable? How would you alter it? One's “familiarity” is a vague concept. Perhaps it should be a test of something more specific.

The ability to accomplish / automate tasks [Objective 2]

Being able to complete a task must come before being able to automate it. We will have to excercise practice with some of the terms defined above in order to be able to accomplish something. After something becomes accomplishable, to automate it will be a simple translation of the accomplishment process into shell scripting language.

Method

It's very difficult to measure something like this. We have very few tasks, other than to fill out information about each different aspect of the system. Without specific tasks it's very hard to gague one's accomplishment level. I suppose I will simply evaluate, one time per week, whether I have learned and am competent with at least 1 new command.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

Exposure to Command-line Tools and Utilities [Objective 3]

It would seem, so far that we are exposed to a new tool / utility each class. Other than that, I am trying to get myself warmed up to using Debian through Virtual Box on my home PC. I plan to become familiar with “Aptitude” (A package management application) in order to expose myself to new tools actively.

Method

I'm currently not comfortable with Aptitude. I suppose once I am, and I can use it properly to obtain new tools regularly, then I will have been successful in this area. Each week I will look back on what I have been able to accomplish in this department, and update accordingly.

Measurement

Follow your method and obtain a measurement. Document the results here.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

  • How did you do?
  • Room for improvement?
  • Could the measurement process be enhanced to be more effective?
  • Do you think this enhancement would be efficient to employ?
  • Could the course objective be altered to be more applicable? How would you alter it?

Experiments

Experiment 1

Question

& * → and other operators I'm unfamiliar with in C. How do they all work together?

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 2

Question

How can I integrate C programming and Python scripting / programming?

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 3

Question

What are some quick and clean methods for writing data out to files, in a formatted manner? Experiment with writing files with:

Shell Scripting C programming Python scripting / programming

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

  • was your hypothesis correct?
  • was your hypothesis not applicable?
  • is there more going on than you originally thought? (shortcomings in hypothesis)
  • what shortcomings might there be in your experiment?
  • what shortcomings might there be in your data?

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Retest

If you're doing an experiment instead of a retest, delete this section.

If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

  • Do you feel the given resources are adequate in providing sufficient background information?
  • Are there additional resources you've found that you can add to the resources list?
  • Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?
  • If you find a deviation in opinion, state why you think this might exist.

Hypothesis

State their experiment's hypothesis. Answer the following questions:

  • Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover?
  • What improvements could you make to their hypothesis, if any?

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

  • Are the instructions correct in successfully achieving the results?
  • Is there room for improvement in the experiment instructions/description? What suggestions would you make?
  • Would you make any alterations to the structure of the experiment to yield better results? What, and why?

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

  • Does the data seem in-line with the published data from the original author?
  • Can you explain any deviations?
  • How about any sources of error?
  • Is the stated hypothesis adequate?

Conclusions

Answer the following:

  • What conclusions can you make based on performing the experiment?
  • Do you feel the experiment was adequate in obtaining a further understanding of a concept?
  • Does the original author appear to have gotten some value out of performing the experiment?
  • Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author).
opus/fall2011/jjohns43/part1.txt · Last modified: 2011/10/18 21:05 by jjohns43