Jump to content
  • Welcome to AngelsWin.com

    AngelsWin.com - THE Internet Home for Angels fans! Unraveling Angels Baseball ... One Thread at a Time.

    Register today to join the most interactive online Angels community on the net!

    Once you're a member you'll see less advertisements. Become a Premium member and you won't see any ads! 

     

IGNORED

Programming Instructions For Eppler's Offseason


failos

Recommended Posts

You are tasked with creating an algorithm that encapsulates Eppler's methodologies.

 

I did one for Epp's pitching methodology.

class Peanut {
    let name: String
    let age: Int
    let isInjuryProne: Bool
    let isTommyJohnProne: Bool
    let hasGreatControl: Bool
    let throwsHeat: Bool
    let isAce: Bool
    
    init(name: String,
         age: Int,
         isInjuryProne: Bool,
         isTommyJohnProne: Bool,
         hasGreatControl: Bool, throwsHeat: Bool, isAce: Bool) {
        self.name = name
        self.age = age
        self.isInjuryProne = isInjuryProne
        self.isTommyJohnProne = isTommyJohnProne
        self.hasGreatControl = hasGreatControl
        self.throwsHeat = throwsHeat
        self.isAce = isAce
    }
}

class PeanutsStore {
  	/// Examples only
    private let peanut1 = Peanut(name: "Ordisamer Despagne",
                                 age: 32,
                                 isInjuryProne: false,
                                 isTommyJohnProne: false,
                                 hasGreatControl: false,
                                 throwsHeat: true,
                                 isAce: false)
    
    private let peanut2 = Peanut(name: "Julio Teheran",
                                 age: 30, isInjuryProne: false,
                                 isTommyJohnProne: false,
                                 hasGreatControl: false,
                                 throwsHeat: true,
                                 isAce: false)
    
    private let peanut3 = Peanut(name: "Trevor Cahill",
                                 age: 45,
                                 isInjuryProne: true,
                                 isTommyJohnProne: true,
                                 hasGreatControl: false,
                                 throwsHeat: false,
                                 isAce: false)
    
    var peanuts: [Peanut] {
        return [peanut1, peanut2, peanut3]
    }
    
    init() {}
}

class EpplerOffseason {
    let peanuts = PeanutsStore().peanuts
    
    func getPeanuts() -> Peanut? {
        // Iterate over peanuts to find the right one
        for peanut in peanuts where peanut.isInjuryProne {
            
            if peanut.isTommyJohnProne && peanut.throwsHeat && !peanut.hasGreatControl {
                // Sign Peanut if Peanut is not an ace.
                return !peanut.isAce ? peanut : nil
            }
        }
        return nil
    }
}

 

Edited by Φαήλος
Link to comment
Share on other sites

Just now, nate said:

Also, swift is a weird language.  Does that mean you do ios app development?

It has some quirks, but I think it's one of the cleanest, most idiomatic languages out there.

Yes, I am a mobile developer for medical devices--primarily iOS. What's your specialty?

Link to comment
Share on other sites

Just now, Φαήλος said:

It has some quirks, but I think it's one of the cleanest, most idiomatic languages out there.

Yes, I am a mobile developer for medical devices--primarily iOS. What's your specialty?

Director of an Analytics team for a health insurance company.  Mostly SAS with some python sprinkled in.  My background is VB/C#/C++.  I have kept up with other languages like Python, Ruby, Go and Java but no functional experience with them, just managing them.

Link to comment
Share on other sites

23 minutes ago, nate said:

Director of an Analytics team for a health insurance company.  Mostly SAS with some python sprinkled in.  My background is VB/C#/C++.  I have kept up with other languages like Python, Ruby, Go and Java but no functional experience with them, just managing them.

That's really cool. I used R and SAS in grad school--they are very powerful languages. I bet you have a lot of fun with your job; I know I do.

Link to comment
Share on other sites

5 minutes ago, Φαήλος said:

That's really cool. I used R and SAS in grad school--they are very powerful languages. I bet you have a lot of fun with your job; I know I do.

Good days and bad.  SAS is great, it is just very old, been around since the 70s.

Link to comment
Share on other sites

Have worked with RPG and 4th generation SYNON tool for many years.    Also took C# and JAVA classes a decade back, but have never actually used them on the job yet. 

I go so far back, that I even worked with COBOL for the first 5 years in the software field.  

Edited by Angel Oracle
Link to comment
Share on other sites

Just now, Φαήλος said:

Sure as long as my work is good, which it is.

But is it? What’s good? What’s bad? Who determines this? Is there a scoreboard? Are you salary or hourly? Do you feel good about stealing money from an employer? Would you consider stealing cheating? Does a straw have one hole or two?

Link to comment
Share on other sites

5 minutes ago, Kevinb said:

But is it? What’s good? What’s bad? Who determines this? Is there a scoreboard? Are you salary or hourly? Do you feel good about stealing money from an employer? Would you consider stealing cheating? Does a straw have one hole or two?

Performance reviews

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...