Open ainsleeSmith opened 4 months ago
I will code review this one!
Hi all! Great work! Here are some suggestions I have for y'all:
Code-specific reqs:
Overall I think y'all did a great job!! This was super great & I'm super impressed :)
Thank you Katherine for your code review. From the list of edits you provided we have:
Hi, Hana and I are going to code review this project!
Hi, good job on your project!
Andrew and I (Hana) suggest these upgrades:
Consistency in Coding Style: Consistent comment styles (//
for inline comments and /* */
for block comments) and ensuring they are meaningful and explain how the code functions.
Memory Management: In enQueue()
, you allocate memory using malloc
but there are no corresponding free()
for the dequeued elements.
Error Handling: Add error checking for system calls (malloc
, open
, write
, etc.) to handle failures.
queueWriteFile: This function has a bug in calculating sz
and using it for modulus operation j = (j+1) % sz;
which might not correctly wrap around the queue if it's not full. Use SIZE
for modulus operation to correctly cycle through the queue.
Overall, I think you did great and the code is well written.
Thank you for your code reviews! From the suggested edits we have fixed(pt2): • fixed the sz for queueWriteFile() • closed our files in queueWriteFile() and queueStart() • added comments and fixed comment style consistency • fixed spacing differences in code
Awesome work! I spent some time trying to break this to no avail. Thanks for already doing all the proposed fixes.
README is called history.txt. There is no test file, but to test it we have it set to 10, and we were inputting commands to test it out and make sure it prints the commands in the right order. We were testing them with typing numbers in the command line.