USF-OS / FogOS

Other
1 stars 24 forks source link

History command #43

Open ainsleeSmith opened 4 months ago

ainsleeSmith commented 4 months ago

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.

katherineanthony commented 4 months ago

I will code review this one!

katherineanthony commented 3 months ago

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 :)

ghimirelava commented 3 months ago

Thank you Katherine for your code review. From the list of edits you provided we have:

AndrewLiu666 commented 3 months ago

Hi, Hana and I are going to code review this project!

hanag1234 commented 3 months ago

Hi, good job on your project!

Andrew and I (Hana) suggest these upgrades:

  1. 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.

  2. Memory Management: In enQueue(), you allocate memory using malloc but there are no corresponding free() for the dequeued elements.

  3. Error Handling: Add error checking for system calls (malloc, open, write, etc.) to handle failures.

  4. 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.

ainsleeSmith commented 3 months ago

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

malensek commented 2 months ago

Awesome work! I spent some time trying to break this to no avail. Thanks for already doing all the proposed fixes.