CSE 3901 MIDTERM MOCK EXAM AND STUDY
MATERIAL WITH SOFTWARE DESIGN AND
IMPLEMENTATION SCENARIOS
◉ Head.
Answer: a special reference, usually pointing to a branch. think that
this is "attached" to a branch
◉ git status.
Answer: displays differences between head and index
◉ git add.
Answer: updates index based on files in working tree
◉ git commit.
Answer: stores current content of index along with a log message
(makes wt == index)
◉ git branch.
Answer: creates a new branch pointing to where the head is
◉ git checkout xxx.
,Answer: updates index and working tree, points head to whatever
the argument is. only do this if the working tree is clean
◉ git log.
Answer: display snapshots in a store, DAG
◉ merge.
Answer: bring history together, bring work from another branch into
the current branch
◉ DVC.
Answer: Distributed Version Control, multiple people distributed
across a network contributing to a central repository
◉ Dynamically Typed Programming Language.
Answer: variables do not have to have types, objects (which
variables point to) do
◉ primitive types in ruby.
Answer: numbers, strings, ranges, regular expressions
◉ numbers.
Answer: integers (Fixnum, Bignum)
,float: double precision!
◉ strings.
Answer: over 75 built in methods
◉ split.
Answer: splits a string into an array of strings based on a separator
◉ chomp.
Answer: returns a string with the separator string removed. if
nothing, good for removing whitespace & newlines
◉ ranges.
Answer: 1..10 is represented as two values of type fixnum
0..4 includes start and end value
0...4 does not
◉ Local (ruby).
Answer: starts with a lowercase letter or _
◉ global (ruby).
Answer: starts with $
, ◉ instance (ruby).
Answer: starts with @
◉ class (ruby).
Answer: starts with @@
◉ mutability.
Answer: Constants start with Uppercase, IDIOM is all UPCASE
◉ self (ruby).
Answer: receiver of the current method (this)
◉ nil.
Answer: nothingness in ruby
◉ __FILE__.
Answer: the current source file name
◉ __LINE__.
Answer: the current line number
MATERIAL WITH SOFTWARE DESIGN AND
IMPLEMENTATION SCENARIOS
◉ Head.
Answer: a special reference, usually pointing to a branch. think that
this is "attached" to a branch
◉ git status.
Answer: displays differences between head and index
◉ git add.
Answer: updates index based on files in working tree
◉ git commit.
Answer: stores current content of index along with a log message
(makes wt == index)
◉ git branch.
Answer: creates a new branch pointing to where the head is
◉ git checkout xxx.
,Answer: updates index and working tree, points head to whatever
the argument is. only do this if the working tree is clean
◉ git log.
Answer: display snapshots in a store, DAG
◉ merge.
Answer: bring history together, bring work from another branch into
the current branch
◉ DVC.
Answer: Distributed Version Control, multiple people distributed
across a network contributing to a central repository
◉ Dynamically Typed Programming Language.
Answer: variables do not have to have types, objects (which
variables point to) do
◉ primitive types in ruby.
Answer: numbers, strings, ranges, regular expressions
◉ numbers.
Answer: integers (Fixnum, Bignum)
,float: double precision!
◉ strings.
Answer: over 75 built in methods
◉ split.
Answer: splits a string into an array of strings based on a separator
◉ chomp.
Answer: returns a string with the separator string removed. if
nothing, good for removing whitespace & newlines
◉ ranges.
Answer: 1..10 is represented as two values of type fixnum
0..4 includes start and end value
0...4 does not
◉ Local (ruby).
Answer: starts with a lowercase letter or _
◉ global (ruby).
Answer: starts with $
, ◉ instance (ruby).
Answer: starts with @
◉ class (ruby).
Answer: starts with @@
◉ mutability.
Answer: Constants start with Uppercase, IDIOM is all UPCASE
◉ self (ruby).
Answer: receiver of the current method (this)
◉ nil.
Answer: nothingness in ruby
◉ __FILE__.
Answer: the current source file name
◉ __LINE__.
Answer: the current line number