|
5 | 5 | class ProgrammingThoughtsFactory
|
6 | 6 | {
|
7 | 7 | protected $thoughts = [
|
8 |
| - "Talk is cheap. Show me the code. ― Linus Torvalds", |
9 |
| - "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live - John Woods", |
10 |
| - "Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Flower", |
11 |
| - "Truth can only be found in one place: the code. - Robert C. Martin, Clean Code", |
| 8 | + 'Talk is cheap. Show me the code. ― Linus Torvalds', |
| 9 | + 'Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live - John Woods', |
| 10 | + 'Any fool can write code that a computer can understand. Good programmers write code that humans can understand. - Martin Flower', |
| 11 | + 'Truth can only be found in one place: the code. - Robert C. Martin, Clean Code', |
12 | 12 | "That's the thing about people who think they hate computers. What they really hate is lousy programmers. - Larry Niven",
|
13 | 13 | "You've baked a really lovely cake, but then you've used dog shit for frosting. - Steve Jobs",
|
14 |
| - "The most important property of a program is whether it accomplishes the intention of its user. - C.A.R. Hoare", |
15 |
| - "Everyday life is like programming, I guess. If you love something you can put beauty into it. - Donald Knuth", |
| 14 | + 'The most important property of a program is whether it accomplishes the intention of its user. - C.A.R. Hoare', |
| 15 | + 'Everyday life is like programming, I guess. If you love something you can put beauty into it. - Donald Knuth', |
16 | 16 | "I'm a programmer. I like programming. And the best way I've found to have a positive impact on code is to write it. Robert C.Martin, Clean Architecture",
|
17 |
| - "Abstraction is the elimination of the irrelevant and the amplification of the essential. - Robert C. Martin, Agile Principles, Patterns, and Practices in C#", |
18 |
| - "It is what it is because you let it be so.", |
| 17 | + 'Abstraction is the elimination of the irrelevant and the amplification of the essential. - Robert C. Martin, Agile Principles, Patterns, and Practices in C#', |
| 18 | + 'It is what it is because you let it be so.', |
19 | 19 | "Programming isn't about what you know; it's about what you can figure out.",
|
20 |
| - "The happiest moment i felt; is that moment when i realized my ability to create.", |
21 |
| - "Could we can have developer acceptance criteria?", |
22 |
| - "The fundamental programming rules are simple. Programs we build on top of that rules tend to introduce own rules and complexity. Looks like we build our own maze and might just get lost in it- Vladimir Nikolic, Coding Wisely", |
23 |
| - "Think twice, write code once.", |
24 |
| - "Tests are stories we tell the next generation of programmers on a project. ― Roy Osherove", |
25 |
| - "First ubnderstand and solve the problem. Then, go code. - Vladimir Nikolic, Coding Wisely", |
26 |
| - "Programming is usually taught by examples. - Waseem Latif", |
27 |
| - "Simplicity is prerequisite for reliability.", |
28 |
| - "So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.", |
29 |
| - "Programming is breaking of one big impossible task into several very small possible tasks.", |
| 20 | + 'The happiest moment i felt; is that moment when i realized my ability to create.', |
| 21 | + 'Could we can have developer acceptance criteria?', |
| 22 | + 'The fundamental programming rules are simple. Programs we build on top of that rules tend to introduce own rules and complexity. Looks like we build our own maze and might just get lost in it- Vladimir Nikolic, Coding Wisely', |
| 23 | + 'Think twice, write code once.', |
| 24 | + 'Tests are stories we tell the next generation of programmers on a project. ― Roy Osherove', |
| 25 | + 'First ubnderstand and solve the problem. Then, go code. - Vladimir Nikolic, Coding Wisely', |
| 26 | + 'Programming is usually taught by examples. - Waseem Latif', |
| 27 | + 'Simplicity is prerequisite for reliability.', |
| 28 | + 'So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.', |
| 29 | + 'Programming is breaking of one big impossible task into several very small possible tasks.', |
30 | 30 | "Life doesn't have a ctrl-z. Type wisely.",
|
31 |
| - "Premature optimization is the root of all evil.", |
| 31 | + 'Premature optimization is the root of all evil.', |
32 | 32 | "Code without tests is bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don't know if our code is getting better or worse.",
|
33 | 33 | "If you're good at the debugger it means you spent a lot of time debugging. I don't want you to be good at the debugger.",
|
34 | 34 | "Over the past few years i've learned that code comments should be considered smells.",
|
35 |
| - "Programming is the art of doing one thing at a time", |
36 |
| - "Share what you have learned from your bugs.", |
37 |
| - "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. -Linus Torvalds", |
| 35 | + 'Programming is the art of doing one thing at a time', |
| 36 | + 'Share what you have learned from your bugs.', |
| 37 | + 'Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program. -Linus Torvalds', |
38 | 38 |
|
39 | 39 | ];
|
| 40 | + |
40 | 41 | public function __construct(array $thoughts = null)
|
41 | 42 | {
|
42 | 43 | if ($thoughts) {
|
43 | 44 | $this->thoughts = $thoughts;
|
44 | 45 | }
|
45 | 46 | }
|
| 47 | + |
46 | 48 | /**
|
47 |
| - * This method will generate random thought |
48 |
| - * |
49 |
| - * |
| 49 | + * This method will generate random thought. |
| 50 | + * |
| 51 | + * |
50 | 52 | * @author Vladimir Nikolic <[email protected]>
|
51 |
| - * |
| 53 | + * |
52 | 54 | * @return void
|
53 | 55 | */
|
54 | 56 | public function getRandomThought(): string
|
|
0 commit comments