CSE 3901
STUDY GUIDE 2026 MIDTERM 1 EXAM
QUESTIONS WITH DETAILED ANSWERS
Git Repository - ANSWER-working tree + store + index
Git Working Tree - ANSWER-project itself
Ordinary directory with files & subdirectories
Git Store - ANSWER-history of project
Git Index - ANSWER-virtual snapshot
Gateway for moving changes in the working tree into the store
Git History - ANSWER-DAG of commits
Each commit represents a complete snapshot of the entire project
Git Revision - ANSWER-Just the manual editing of the file
Git Commit - ANSWER-updates head and branch (permanent)
identified by a hash
Git Branch - ANSWER-a pointer to a commit
how to add git branch - ANSWER-git branch branchname
git checkout branchname
how to change git branch - ANSWER-git checkout branchname
Git Head - ANSWER-a pointer to a branch
(where you're at)
Git Add - ANSWER-adds the submission
how to add (all steps) - ANSWER-git add name.rb
,git commit -m "comment"
git push remote_name branch_name
Git Checkout - ANSWER-moves head to look at another branch
Git Merge - ANSWER-brings two together, adds new commit
Git Fast-Forward Merge - ANSWER-bring old into new head
Git Fetch - ANSWER-bring in commits that given user lacks
Git Push - ANSWER-opposite to fetch. Give someone a change
Git Pull - ANSWER-combines fetch and merge
Git No Conflict Merge - ANSWER-Automatically commits
Distributed version control - ANSWER-Multiple people, distributed across network
- each person has their own repository
- units of data movement: changesets
Number of repositories per team - ANSWER-n+1.
1 shared, 1 local for each
Discard Changes in Git : reset - ANSWER-git reset --hard
git clean --dry-run
git clean --force
Discard Commit in Git : reset - ANSWER-git reset --hard HEAD~1
Strongly Typed Language - ANSWER-Classes determine valid operations
Interpreted Program - ANSWER-Run a program directly, without compiling
pro:
platform independence
read-eval-print loop (REPL)
reflection
, con:
speed
later error detection
Dynamically typed - ANSWER-objects have types, variables don't
Objects in Ruby? - ANSWER-Everything
Fixnum Numbers in Ruby - ANSWER-83, 0123, 0x53, 0b1010011, 0b101_0011
Float Numbers in Ruby - ANSWER-123.45, 1.2345e2, 12345E-2
Rational Numbers in Ruby - ANSWER-2/3r
Complex Numbers in Ruby - ANSWER-4+3i
Strings Delimeters - ANSWER-" " and ' '
String Interpolations inside " " - ANSWER-#{ ... } --> allows executions inside string
Range inclusive - ANSWER-0..4
Range end exclusive - ANSWER-0...4
Single Line comment - ANSWER-# start with hashtag/pound/octothorpe
Multi-line comment - ANSWER-=being
words
words word
=end
# MUST appear at beginning of line
Arithmetic Operators - ANSWER-+ - ** / % ***
Integer / (div) rounds towards - ANSWER-negative infinity
.0 - ANSWER-0.33333333333333333333333
- ANSWER-0
- - ANSWER--1
STUDY GUIDE 2026 MIDTERM 1 EXAM
QUESTIONS WITH DETAILED ANSWERS
Git Repository - ANSWER-working tree + store + index
Git Working Tree - ANSWER-project itself
Ordinary directory with files & subdirectories
Git Store - ANSWER-history of project
Git Index - ANSWER-virtual snapshot
Gateway for moving changes in the working tree into the store
Git History - ANSWER-DAG of commits
Each commit represents a complete snapshot of the entire project
Git Revision - ANSWER-Just the manual editing of the file
Git Commit - ANSWER-updates head and branch (permanent)
identified by a hash
Git Branch - ANSWER-a pointer to a commit
how to add git branch - ANSWER-git branch branchname
git checkout branchname
how to change git branch - ANSWER-git checkout branchname
Git Head - ANSWER-a pointer to a branch
(where you're at)
Git Add - ANSWER-adds the submission
how to add (all steps) - ANSWER-git add name.rb
,git commit -m "comment"
git push remote_name branch_name
Git Checkout - ANSWER-moves head to look at another branch
Git Merge - ANSWER-brings two together, adds new commit
Git Fast-Forward Merge - ANSWER-bring old into new head
Git Fetch - ANSWER-bring in commits that given user lacks
Git Push - ANSWER-opposite to fetch. Give someone a change
Git Pull - ANSWER-combines fetch and merge
Git No Conflict Merge - ANSWER-Automatically commits
Distributed version control - ANSWER-Multiple people, distributed across network
- each person has their own repository
- units of data movement: changesets
Number of repositories per team - ANSWER-n+1.
1 shared, 1 local for each
Discard Changes in Git : reset - ANSWER-git reset --hard
git clean --dry-run
git clean --force
Discard Commit in Git : reset - ANSWER-git reset --hard HEAD~1
Strongly Typed Language - ANSWER-Classes determine valid operations
Interpreted Program - ANSWER-Run a program directly, without compiling
pro:
platform independence
read-eval-print loop (REPL)
reflection
, con:
speed
later error detection
Dynamically typed - ANSWER-objects have types, variables don't
Objects in Ruby? - ANSWER-Everything
Fixnum Numbers in Ruby - ANSWER-83, 0123, 0x53, 0b1010011, 0b101_0011
Float Numbers in Ruby - ANSWER-123.45, 1.2345e2, 12345E-2
Rational Numbers in Ruby - ANSWER-2/3r
Complex Numbers in Ruby - ANSWER-4+3i
Strings Delimeters - ANSWER-" " and ' '
String Interpolations inside " " - ANSWER-#{ ... } --> allows executions inside string
Range inclusive - ANSWER-0..4
Range end exclusive - ANSWER-0...4
Single Line comment - ANSWER-# start with hashtag/pound/octothorpe
Multi-line comment - ANSWER-=being
words
words word
=end
# MUST appear at beginning of line
Arithmetic Operators - ANSWER-+ - ** / % ***
Integer / (div) rounds towards - ANSWER-negative infinity
.0 - ANSWER-0.33333333333333333333333
- ANSWER-0
- - ANSWER--1