CS1632 at University of Pittsburgh, taught by Bill Laboon (Spring 2018 semester)
laboon / cs1632_spring2018 Goto Github PK
View Code? Open in Web Editor NEWCS1632 at University of Pittsburgh, taught by Bill Laboon (Spring 2018 semester)
CS1632 at University of Pittsburgh, taught by Bill Laboon (Spring 2018 semester)
The Markdown file describes the WolfPack
class as having a method to "make one random wolf bark", but no such method was found in the skeleton code.
Code for test methods should say assert_equal but says assert_equals.
Deliverable 3 doesn't require that groups add the professor and TA as contributors to the GitHub
Issue #20
My Pitt Handle: zjb14, Github: zachbugay
Partner Pitt Handle: atd26, Github: adrizos
The hashing algorithm was not clear for D3.
On line 64 of 100.txt for D3, the timestamp for the transaction is 1518893688.8960000 and then the timestamp for line 65 is 1518893688.11869000, which causes the blockchain to be invalid as the second time is older. I think line 64 is supposed to be 1518893687.8960000.
Requirements state to run flamegraph on long.txt and include said html file in your repo. But flamegraph create a file too large to load with long.txt.
create_arr should have:
arr[x][y] = prng.rand(101) <= percent
ACTUALLY has:
arr[x][y] = prng.rand(101) < percent
Under the Automated Test Suite section:
"You do NOT need to run rubocop or simplecov on the test code itself."
But we need to run simplecov on the test code itself to know the coverage... did you mean like "reek" instead of "simplecov"?
The last several slides in Lecture 5 that featured various examples that were shown on the projector in class were not the same as the slides that were in the downloaded version of the Lecture I got from the GitHub site that day. I started to notice the discrepancy around the 4th to last slide (I think). The examples were not the same. Ive attached the version I have to compare with what you used.
CS1632_Lecture5_SmokeExploratoryPathBased.pdf
Under automated test suite the word program is misspelled to be pogram.
"Your test suite should also (as mentioned above) have >70% statement coverage (as measured by simplecov) of the pogram."
63|206c|Cyrus>Peter(26):Mzila>Wu(35):Rana>Gaozu(14):Anne>Rana(15):SYSTEM>Peter(100)|1518893687.998872000|51d6
64|51d6|SYSTEM>Wu(100)|1518893688.8960000|7
65|7|SYSTEM>James(100)|1518893688.11869000|fec
Line 64 seems to be out of place in the 100.txt file? Sample output shows the block to be valid, but our program and investigation seems to show this to be causing an issue.
It is not stated whether blank lines should increment the line counter in either REPL or file mode.
In the errors for REPL, "LET A" outputs "Operator LET applied to empty stack". However, "LET" is a keyword. Shouldn't this be an error code 5 instead?
Laboon's Response:
This is ambiguous based on the requirements (since I say "blank lines should be ignored") but I would say that even blank lines increment the counter.
Good point. The way I wrote it, both keywords and operators do the same "kind" of thing and I didn't differentiate. Ideally it should be error code 5 but I would be content with either way of doing it.
After: Each line consists of one block. A block consists of the following elements, separated by pipes (| characters):
Typo in block order: 1 -> 2 -> 3 -> 5 -> 6
Only 5 blocks, block 5 should contain hash of blocks labeled 1, 2, 3, 5
On the slide for "Minitest Assertions", instead of assert_equals it should be assert_equal for Ruby.
-brv11
Reproduction steps slide says
Make sure you give:
Running the following for file in *_test.rb; do ruby $file;done
repeatedly overwrites the coverage/index.html. Thus, I cannot generate a coverage report for all of my test files.
During the lecture, the professor said the lyrics in the print command were from U2, but R.E.M. wrote "This one goes out to the one I love". ๐ฌ
In D4, requirement 1, I think there is a typo in the first statement.
As of now, it reads the output should be, "Welcome, friend, to a land of pure calculation"
However, on the website, it reads "Welcome, friend, to a land of pure calculation."
Notice that there is a period at the end.
I believe that this is a typo as opposed to a defect.
Now maybe I'm making a dyslexic error but it would appear that in line 97 of 'long.txt':
97|9f79|Edward>Maria(30):Mzila>Yaa(53):George>Rana(39):George>Pakal(71):Amina>Maria(41):Rana>James(21):Puyi>Anne(49):Amina>Tang(36):SYSTEM>Yaa(100)|1518892465.90871000|fd1b
The timestamp is 1518892465.90871000
And in line 98 of 'long.txt':
98|fd1b|Rana>Sheba(21):Wu>Rana(32):George>Pakal(76):Cyrus>Sheba(75):Anne>Kaya(35):Rana>Amina(4):Louis>Peter(15):SYSTEM>Yaa(100)|1518892465.106013000|53b6
The timestamp is 1518892465.106013000
Hence the error I mentioned to you in 1980. I believe my timestamp_checker method is not flawed so hopefully I'm correct here and not just being oblivious to some digit mis-match.
In wolf_pack.rb, when discussing how to create a wolf pack it should be "new" not "mew"
Last example of neighbors views as:
01234
0n..nX
1n..nn
2.....
3.....
4...nn
But should include one additional neighbor at (4,0):
01234
0n..nX
1n..nn
2.....
3.....
4n..nn
The create_arr method in the exercise 1 starter code creates a size + 1
by size + 1
array instead of a size
by size
array as specified in the method description.
This is due to ..
being used instead of ...
on lines 22 and 24.
When is the first midterm? (It's in the title)
I want my extra credit :)
Wei-Hao Chen
Under Security Testing, I'm under the impression that "XSS" should be "CSS" for Cross Site Scripting.
deliverable 4 markdown is called 'deliverable3.md'
I neither expect nor want a +1 for this, it'll just bother me on a personal level :D
"billcoin.rb" should be "billcoin.md", since there is no "billcoin.rb" provided. Issue noticed by Zachary Barlotta and Colton Taylor
D6 does not specify whether we can simply do Integer Division, or if we must use Floating Point Division with the RPN calculator.
Can we just use ints for everything, and assume the inputs from user are integers? If they pass a float, can we simply truncate the decimal and use the integer?
"You should alsi include the generated .html file in your repository." Did you mean "also?"
Maybe this isn't a issue per say, but when testing with bad_tx.txt my program will catch the bad hash:
Line 5: String '4|7419|Kublai>Pakal(800):Henry>Peter(10):Cyrus>Amina(3):Peter>Sheba(1):Cyrus>Louis(1):Pakal>Kaya(1):Amina>Tang(4):Kaya>Xerxes(1):SYSTEM>Amina(100)|1518892051.768449000' hash set to 97df, should be 1c95
Before it catches the negative balance. Changing the aforementioned hash from 97df to 1c95 results in:
Line 4: Invalid block, address Kublai has -796 billcoins!
As is suggested by sample_output.txt. Just thought this may be useful info for anyone else trying to isolate issues with their negative balance check, as editing balances in sample files will also screw up the hash.
In the posted solution to the wolf pack exercise, the wolf_pack_test.rb file has a few objectionable cross-method dependencies. Throughout, in order to test operations on the entire WolfPack
instance (here as @wolf_pack
), the method add_wolf
is called in order to add wolves to the pack (in order to test howling, retrieving a wolf, etc). However, the add_wolf
method is one of those this test class is meant to test! So we are using an untested (and possibly faulty) method to test the other methods in the class WolfPack
.
A better approach might be to simply call @wolf_pack.wolves << w1
if, for instance, w1 is the wolf to be added. This adds the wolf directly to the array that holds wolves in the WolfPack
class rather than relying on an untested method. This is possible because of the attr_accessor :wolves
line in wolf_pack.rb, which is there for a reason!
One of the earlier paragraphs has a typo in the final sentence (should be "an" instead of "and").
The program shall accept three arguments: size (size of the 2-D array - the number of rows and columns should always be equal, an integer > 0), percentage to be randomly assigned to be living (an integer between 0 and 100 inclusive), and the number of iterations to run (and integer >= 0).
For Exercise 2, wolf.rb contains extra sleep in the initialize method at line 6. Also, wolf_pack.rb does not contain an attr_reader:wolves to access the wolves array.
On line #102 in graph_test.rb of mock_examples, should it read " # which just returns TRUE, similar to: " as it goes on to explain? The existing sentence says to return "new".
SUMMARY: The command that deliverable2.md indicated should be used to run multiple Ruby test files runs only one.
DESCRIPTION: The command ruby *_test.rb
does not execute all files ending in "_test.rb", but only one of them.
REPRODUCTION STEPS: Make two Ruby files, one called a_test.rb
and one called b_test.rb
, each containing a print statement. Ensure there are no other files ending with "_test.rb" in the current directory. Run ruby *_test.rb
.
EXPECTED BEHAVIOR: Both files are run.
OBSERVED BEHAVIOR: Only one file is run.
Note: This is just being filed as a formality. deliverable2.md has been revised with a solution to this issue.
There was a slight misunderstanding in class about the semantics of the expect() method. It was said that if its second parameter is true
, a test like that below would pass if the method indicated in the first argument were called, and that if it's false
, the test would fail if the stubbed method were called. However, the second parameter actually determines what the stubbed method returns, so it cannot be used this way. (The Minitest docs certainly could make this more clear...)
mocked_node = Minitest::Mock.new("mocked node")
mocked_node.expect :alone?, true
@g.add_node mocked_node
assert_mock mocked_node
THe syylabudsabufisdbasijdfbijhdsfbvjh ed
The hash for the example in billcoin.md:
8|e01d|Sam>John(3):Joe>Sam(4):SYSTEM>Rana(100)|1518839370.605237540|c922
instead of "c922", it should be "c87b"
The seed value is listed as optional and required for deliverable 2.
Deliverable 2 instructions do not have a TA's username listed for the Tuesday/Thursday lecture.
Course info does not have any TA information listed at all.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.