• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/69

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

69 Cards in this Set

  • Front
  • Back

T/F: Science never proves theories, only disproves them

True

T/F: When debugging, it is a best practice to make one change at a time and keep a record of the changes

True

T/F: Shell scripts are not executable by default

True

T/F: In a shell script, line starting with #! are comments

False

T/F: In Unix, the command line arguments passed to a shell script are stored in positional parametrs

Tru

T/F: A logger cannot have multiple handlers

False

T/F: It is a good practice to download the latest version of the software before you report a bug

True

T/F: A shell acts as an interface between the user and the system

True

T/F: As a command interpreter, the shell sends the commands to the kernel for execution

True

T/F: A directory is a specialized form of file that maintains a list of all files in it.

True

T/F: Unit testing is the testing of the whole class as a unit

False - method

T/F: JUnit is a unit testing framework of the Java Programming Language

True

T/F: Debugging is not algorithmic

True

T/F: In test-driven development, tests are written before the software to be tested is written

True

T/F: It is usually feasible to test all possible values of arguments to a method

False

T/F: stdout should be used for unusual output from your program, such as error reporting

False - stderr

T/F: In a Makefile, every target line must begin with a tab

False - action line

T/F: In debugging, reproducing the problem comes before fixing the problem

True

T/F: If all your unit tests pass, that means the software being tested has no bugs

False

T/F: A software version management repository holds a master copy of only text/html code

False - other artifacts as well

T/F: Making changes to a software repository means editing, adding and deleting files

True

T/F: IDE stands for "integrated development environment"

True

T/F: Eclipse does not allow you to have multiple workspaces

False - you can have multiple workspaces

T/F: In test-driven development, you must understand the specification of what the software you are testing is supposed to do

True

T/F: In Unix, executing programs have unique process identifiers

True

T/F: A Unix pipe is a way to send the output of one command to the input of another

True

T/F: As a login script, .profile runs each time a Unix shell is started

True

T/F: The Makefile contains rules which tell make what to do

True

T/F: If a target in a Makefile names a file that is older than the files is depends on, then the actions in that rule will not be performed

False

List three components of a good development environment for a mid-sized project team

- A source code version control system


- A fully automated testing system


- A fully automated compile/build system


- Frequent built/integrate/distribute policy

List two cons of test-driven development

-Doesn't tell full software


-Takes a long time to write all those tests

How is the command


$cat file2


different from


$cat > file2 and $cat >> file2 ?

cat file2 displays the contents of file 2, where > and >> redirect the input to file2

What is redirection in Unix? Provide an example command that uses redirection.

Directing the flow of data to the file or from the file for input or output




Ex: ls > wc

What Unix command is used for changing file access permissions?

chmod

What does the command "$ls | wc -l > file1" do?

ls becomes the input to wc which counts the number of lines it receives as input and instead of displaying this count, the value is stored in file1

What is a pipe and give an example?

A pipe is two or more commands separated by pipe char '|'. That tells the shell to arrange for the output of the preceding command to be passed as input the following command.




Ex: ls -l | pr


The output for a command ls is the standard input of pr. This is called a pipeline.

One can change the access permissions on a file calld 'temp.txt' to readable, writeable and executable only by the file owner.

chmod 700 temp.txt

Construct the pipe to execute the following job.



"Output of ls should be displayed on the screen and from this output the lines containing the word 'poem' should be counted and the count should be stored in a file."

ls | grep poem | wc -l > out.txt



The command


$cat par.3 par.4 par.5 >> report




a. displays contents of the files par.3, part.4 and par.4 on the command line and overwrites the file report with the output


b. appends the file report with the contents of par.3, par.4, and par.5


c. displays contents of the files par.3, par.4 and par.5 on the command line and appends the file report with the output


d. overwrites the file report with the contents of the file par.5

b. appends the file report with the contents of par.3, par.4, and par.5

The positional parameter $0 refers to:




a. Total number of arguments


b. Command or the script name


c. First argument respectively


d. All the command line arguments starting from $1

b. Command or the script name

Define a shell array called CLASS with elements "Altintas", "CSE15L", "Fall 2013" in the given order. Display the second element with the Unix command.

[


CLASS[0]="Altintas"


CLASS[1]="CSE15L"


CLASS[2]="Fall 2013"


echo "Second element: ${CLASS[1]}"


]

Complete the following sentence:


"______ command displays the current working directory in Unix shell."

pwd

List three tools for diagnostic output

-Standard output and standard error


-Java logging framework


-Java assertions


-Java profiling framework


-Debuggers

List three pieces of information provided by Java logging API

-The origin of a log entry (which application, which class, which method, etc)


-The content of the log entry


-The level of importance of the log entry

Name steps in debugging in order

1. Understand the system


2. Identify the problem


3. Reproduce the problem


4. Diagnose the cause of the problem


5. Fix the problem


6. Reflect and learn from this problem, and this fix

The binary output from hprof can be opened using ________.

jhat

List two things a bug reporter should read or check to report a good bug

-Make sure software is up to date


-Search the bug repository to see whether your bug has already been reported

What is the difference between the heap and cpu options in hprof?

Heap option helps you perform analysis of memory usage (where memory was allocated)




CPU option lets you understand processor usage (where CPU spent more time than others)

Using the cpu option in hprof with value as _______ can significantly slow down progress

times

Write a Unix command that displays the contents of folder "Q1" in long form including the directory entires whose names begin with a dot(.)

ls -la Q1

List three common Unix shells

bash, ksh, tcsh

Write a command to make the file "Q3.txt" in the current directory read-only.

chmod 444 Q3.txt

Absolute path in Unix paths start at:




a. users


b. bin


c. home


d. root

d. root

Relative to the working directory, dot dot (..) refers to:


a. current working directory


b. home


c. root


d. a level above

d. a level above

List the names of the two files that a shell automatically opens when it starts up.

.bashrc, .profile

Write a command that redirects the contents of standard input to an output file called 'temp.txt'

cat > temp.txt

Write a filtering command using Unix pipes to search for occurrences of the word 'time ' in the manual page for Unix command called "time".

man time | grep time

What is the function of the Unix environment variable "PATH"?

The PATH environment variable is a colon-delimited list of directories that your shell searches through when you enter a command.

List two pros and two cons of unit testing

Pros:


-Increased productivity


-Results in modular and extensible software


-Leads to better code functionality


-Concise goal-driven code




Cons:


-Does not test full software


-Requires team buy-in


-Same developer coding and testing a feature


-Can consume too much time

Which file does make look for in the current working directory?

Makefile

For this problem, consider this Makefile:


A.class: A.java


javac A.java


B.class: A.class B.java


javac B.java


C.class: B.class A.class C.java


javac C.java


all: C.class B.class A.classa.




Suppose ls -l produces this output:


-rw-rw-r-- 1 u1 lec 150 May 7 13:16 A.java


-rw-rw-r-- 1 u1 lec 81 May 7 13:25 B.java


-rw-rw-r-- 1 u1 lec 189 May 7 13:20 C.java


-rw-rw-r-- 1 u1 lec 168 May 7 13:00 Makefile




(a) Now running “make all” will cause what command(s) to be executed? List them.




(b) Suppose ls -l produces this output:


-rw-rw-r-- 1 u1 lec 356 May 7 13:50 A.class


-rw-rw-r-- 1 u1 lec 150 May 7 13:16 A.java


-rw-rw-r-- 1 u1 lec 251 May 7 13:50 B.class


-rw-rw-r-- 1 u1 lec 69 May 7 13:25 B.java


-rw-rw-r-- 1 u1 lec 532 May 7 13:50 C.class


-rw-rw-r-- 1 u1 lec 189 May 7 13:55 C.java


-rw-rw-r-- 1 u1 lec 168 May 7 13:00 Makefile




Now running make all will cause what command(s) to be executed? List them.



a) javac A.java


javac B.java


javac C.java




b) javac C.java

To make the _________, first make all its _________, then perform all the _______.

target, dependencies, actions

List two problems that can arise in non-version controlled software when there is only one individual involved in the software development process.

1) No way to go back to previous version once saved (revert)


2) Cannot provide stable version releases, as in cannot "freeze" one version for deployment and continue working on a new version

Put the following steps in order within an version control workflow:


-makes changes


-update


-commit


-resolve conflicts

1) update


2) make changes


3) update


4) resolve conflicts


5) commit

A string enclosed in back quotes(") in a Unix shell script is treated as a ___________ and the shell attempts to execute it.

command

Complete the following shell script.


#!/bin/sh


echo Total number of inputs: _______


echo First input: _______


echo Second input: ________

1) $#


2) $1


3) $2

Square brackets ([ ]) in a Unix shell script is an alias for the _____ command.

test

a) Draw the project directory structure after you run "ant compile"

a) Draw the project directory structure after you run "ant compile"

b) What does the doc target accomplish?
c) Which target will run if you only run "ant" on command for this build file?
d) What targets does the doc target depend on?

b) What does the doc target accomplish?


c) Which target will run if you only run "ant" on command for this build file?


d) What targets does the doc target depend on?

b) generate documentation


c) doc


d) compile