Part 1 – Peer Code Review Session
I reviewed Zeyad Abdelkader’s and Anthony Torres’s code (from my group).
Both had very similar and clean code, so this section will cover both: {
Encapsulation:
Are instance variables private?
Do getters and setters exist where appropriate?
Constructors:
Does the constructor validate its inputs? What happens if someone passes an invalid suit or value?
(Should add this)
Is there a default constructor? Should there be one for Card? For Deck?
Yes, there should always be a default constructor.
Readability and Style:
Can you follow the logic without running the code? 
Does the code follow the Google Java Style Guide in terms of naming, braces, and spacing?
(Class names UpperCamelCase, methods and fields lowerCamelCase)
No case for a negative drawCards
Code is easy to follow and readable, variable names are simple and informative 
}
Say it out loud:
Everything looks really good , I think the only thing is for Zeyad to add the javadoc method comments for everything that's not generated. For Anthony’s everything is very similar to mine without the bugs, and Zeyad’s but with comments.
Part 2 – Written Reflection
1. Your Approach and What It Revealed
I went right into coding instead of coming up with a plan. I started with Card just because it's more specific and since cards are what make up a deck. I'd say my approach is pretty indicative of how I approach problems and learning in general. I always go straight in and try to figure things out as I go. I'd say it was effective for understanding what makes up the cards that would go into the deck. I think looking into the overall structure first before beginning would be effective, and I will consider doing it in future projects.
2. The Peer Review: What You Saw and What You Learned
I worked with Zeyad and Anthony for my peer review. Their methods for equals were a lot cleaner than mine, with Zeyad setting up using this.suit and this.rank with other.suit and other.rank as opposed to mine which used, for example, getSuit() and object.getSuit(). I think Zeyad's approach is far more readable and makes sense as to what is being compared. I got an incredible piece of advice from Zeyad: my drawCard() and drawCards() methods were drawing from different spots. drawCard was drawing from the end while drawCards was drawing from the front. I didn't even realize I had this bug as all the tests had been passing.
3. Consolidating the OOP Concepts
I have actually had some experience with OOP from my old C++ classes. I struggled a lot in those classes and I think Java actually did a great job at making the concepts more approachable. I still have nightmares about asking for help and being told that I "referenced a null pointer." That said, I still learned a lot about the structure of java and autogenerated methods (I love these.)
toString() is the one I learned the most about, while enums are the thing I am the most shaky on still.
toStrings take a bunch of data and turns it into a readable string of text.
enums have something to do with fixed sets of values that are grouped logically, but I don't fully get where I'd be using them yet.
4. Did you celebrate?
I always breathe a sigh of relief and spend a day playing games and unwinding at the end of the week, and this was no different. I wouldn't say that I celebrated to any particularly higher degree this time than usual, but I took my time to relax and de-stress. I might go out and get a special meal to celebrate at the end of this whole project.
Comments
Post a Comment