Skip to content

Review for assignment 2. #1

@sriram-srinivasan

Description

@sriram-srinivasan

Hi Santosh,

This is a review of your assignment 2.

  1. Nice clean code

  2. README is too brief. A user cannot be expected to read the source to figure out the API, how to create the Server etc. In fact, he doesn't even know there is a Server object unless he reads the source. Treat this like a product, not a homework assignment

  3. envelopeToMsg does not correctly encode the message because it relies on a string representation of the msg. What if the msg was not a string but a structure with pointers?

    type Person struct {x
      Name string
      Parent *Person
    }
    
    parent := &Person{Name: "A", Parent: nil} 
    person := &Person{Name: "B", Parent: A} 
    server.Inbox() <- person
  4. There are race conditions in your code. Test with go test -race

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions