Sign in to follow this  
failos

Programming Instructions For Eppler's Offseason

Recommended Posts

10 hours ago, Φαήλος said:

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
    }
}

 

This is your finest work dude. Job well done!! 

Share this post


Link to post
Share on other sites
8 hours ago, Angel Oracle said:

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.  

I paid a COBOL programmer like 250k a year and he maybe put in 30 hours a week.  COBOL programming is lucrative because there aren't many programmers out there.

Share this post


Link to post
Share on other sites
12 hours ago, nate said:

I paid a COBOL programmer like 250k a year and he maybe put in 30 hours a week.  COBOL programming is lucrative because there aren't many programmers out there.

I'm thinking about going back and finishing up the career there then.   Back when I was programming in it, it was crazy how many people would mix their GO TOs and PERFORMs, even having GO TOs not be top down.   Guaranteed screwing up of the run! 

Edited by Angel Oracle

Share this post


Link to post
Share on other sites
5 hours ago, Angel Oracle said:

I'm thinking about going back and finishing up the career there then.   Back when I was programming in it, it was crazy how many people would mix their GO TOs and PERFORMs, even having GO TOs not be top down.   Guaranteed screwing up of the run! 

Just imagine how much broken 40 year old code you'll be fixing

Share this post


Link to post
Share on other sites
On 1/13/2020 at 10:22 AM, Φαήλος said:

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
    }
}

 

what kind of low budget work is this? what do you take us for, a bunch of morons???

fatal error for not including "when he's healthy."

 

Share this post


Link to post
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.

Sign in to follow this