1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! Get a random developer excuse
extern crate rand;

use rand::{thread_rng, Rng};

pub fn excuse() -> String {
    let excuses = vec![
        "I thought you signed off on that.",
        "Where were you when the program blew up?",
        "That feature was slated for phase two.",
        "That feature would be outside the scope.",
        "It must be a hardware problem.",
        "That isn't covered by my job description.",
        "It's never shown unexpected behavior like this before.",
        "There must be something strange in your data.",
        "Well, that's a first.",
        "I haven't touched that code in weeks.",
        "Oh, you said you DIDN'T want that to happen?",
        "That's already fixed. It just hasn't taken effect yet.",
        "I couldn't find any library that can even do that.",
        "I usually get a notification when that happens",
        "Oh, that was just a temporary fix.",
        "It's never done that before.",
        "It's a compatibility issue.",
        "I didn't anticipate that I would make any errors.",
        "I did a quick fix last time but it broke when we rebooted.",
        "Everything looks fine on my end.",
        "That error means it was successful.",
        "The marketing department made us put that there.",
        "I forgot to commit the code that fixes that.",
        "Oh, that was only supposed to be a placeholder.",
        "I haven't had a chance to run that code yet.",
        "You must have done something wrong.",
        "Well, at least it displays a very pretty error.",
        "That wasn't in the original specification.",
        "I haven't had any experience with that before.",
        "That's the fault of the graphic designer.",
        "I'll have to fix that at a later date.",
        "I told you yesterday it would be done by the end of today.",
        "I haven't been able to reproduce that.",
        "It's just some unlucky coincidence.",
        "I thought you signed off on that.",
        "That wouldn't be economically feasible.",
        "I didn't create that part of the program.",
        "It probably won't happen again.",
        "Actually, that's a feature.",
        "I have too many other high priority things to do right now.",
        "Our internet connection must not be working.",
        "It's always been like that.",
        "What did you type in wrong to get it to crash?",
        "It was working in my head.",
        "I thought I finished that.",
        "I must have been stress testing our production server.",
        "The request must have dropped some packets.",
    ];
    let mut rng = thread_rng();
    rng.choose(&excuses).unwrap().to_string()
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        let my_excuse = excuse();
        println!("{}", my_excuse);
    }
}