Skip to content

Instantly share code, notes, and snippets.

View mphuff's full-sized avatar

Micah Huff mphuff

View GitHub Profile
namespace AnimalKingdom
{
// I'm sticking a bit more with pseudo-code than FORMAL c-sharp (I'm a bit rusty there)
// More worth understanding some of the key concepts I would look for as an interviewer here:
// 1) Inheritance - check - you've got the idea of this in the bag
// 2) Encapsulation - you don't necessarily want just anybody to be able to take your object and modify properties about it
// - By setting the setters to private, utilizing them in a constructor (or other private-to-Animal method), you encapsulate any logic
// that may accompany that. Imagine having some logic in Animal base where, given a size and weight, you perform validation on that
// pair of data. If just anybody is able to modify the members, you wouldn't necessarily force validation. Yes, C# makes it a bit
// simpler with their get/set built-ins but it's best practice overall not to depend on the public get; set; methodology given that
@mphuff
mphuff / ProtocolA.avsc
Last active December 16, 2015 16:10
Demonstration of bug with Type generation between multiple protocols
{
"protocol" : "ProtocolA",
"namespace" : "com.inome.common",
"doc" : "Protocol A",
"types" : [ {
"type" : "record",
"name" : "Date",
"doc" : "Represents a Date",
"fields" : [ {
"name" : "month",