Created
September 22, 2025 20:17
-
-
Save andynu/ee66963d43bfae1a21c2145a93d69ad2 to your computer and use it in GitHub Desktop.
andyfortune
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# # Andy Fortune | |
# | |
# A personal quote and wisdom generator that displays random inspirational quotes | |
# from various sources including Lao Tzu, programming principles, and life philosophy. | |
# | |
# ## Usage | |
# ```bash | |
# andyfortune # Display a random quote | |
# ``` | |
blank_or_comment = ->(line) { /^$|^#/.match(line) } | |
paragraph_wrap = ->(str, word_width){ str.split(/ /).each_slice(word_width).map{|slice| slice.join(' ')}.join("\n") } | |
quote = DATA.readlines.reject(&blank_or_comment).sample | |
puts | |
puts paragraph_wrap.call(quote, 7) | |
puts | |
__END__ | |
# Lao Tzu | |
Act without striving. Work without interfering. Find the flavour in what is flavourless. | |
A good traveler has no fixed plans, and is not intent on arriving. | |
A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves. | |
All difficult things have their origin in that which is easy, and great things in that which is small. | |
Ambition has one heel nailed in well, though she stretch her fingers to touch the heavens. | |
An ant on the move does more than a dozing ox. | |
Anticipate the difficult by managing the easy. | |
A scholar who cherishes the love of comfort is not fit to be deemed a scholar. | |
At the center of your being you have the answer; you know who you are and you know what you want. | |
Because of a great love, one is courageous. | |
Be Content with what you have; rejoice in the way things are. When you realize there is nothing lacking, the whole world belongs to you. | |
Being deeply loved by someone gives you strength, while loving someone deeply gives you courage. | |
Be the chief but never the lord. | |
By letting it go it all gets done. The world is won by those who let it go. But when you try and try. The world is beyond the winning. | |
Do not look only at yourself, and you will see much. Do not justify yourself, and you will be distinguished. Do not brag, and you will have merit. Do not be prideful, and your work will endure. | |
Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles must begin with a single step. | |
Few things under heaven bring more benefit than the lessons learned from silence and the actions taken without striving. | |
Fill your bowl to the brim and it will spill. Keep sharpening your knife and it will blunt. | |
For the wise man looks into space and he knows there is no limited dimensions. | |
From caring comes courage. | |
From wonder into wonder existence opens. | |
Govern a great nation as you would cook a small fish. Do not overdo it. | |
Governing a great nation is like cooking a small fish – too much handling will spoil it. | |
Great acts are made up of small deeds. | |
Great indeed is the sublimity of the Creative, to which all beings owe their beginning and which permeates all heaven. | |
Health is the greatest possession. Contentment is the greatest treasure. Confidence is the greatest friend. Non-being is the greatest joy. | |
He who conquers others is strong; He who conquers himself is mighty. | |
He who controls others may be powerful, but he who has mastered himself is mightier still. | |
He who does not trust enough, Will not be trusted. | |
He who is contented is rich. | |
He who knows, does not speak. He who speaks, does not know. | |
He who knows himself is enlightened. | |
He who knows that enough is enough will always have enough. | |
He who obtains has little. He who scatters has much. | |
He who talks more is sooner exhausted. | |
How could man rejoice in victory and delight in the slaughter of men? | |
I do not concern myself with gods and spirits either good or evil nor do I serve any. | |
If the Great Way perishes there will morality and duty. When cleverness and knowledge arise great lies will flourish. When relatives fall out with one another there will be filial duty and love. When states are in confusion there will be faithful servants. | |
If you do not change direction, you may end up where you are heading. | |
If you realize that all things change, there is nothing you will try to hold on to. If you are not afraid of dying, there is nothing you cannot achieve. | |
If you would take, you must first give, this is the beginning of intelligence. | |
I have just three things to teach: simplicity, patience, compassion. These three are your greatest treasures. | |
In dwelling, live close to the ground. In thinking, keep to the simple. In conflict, be fair and generous. In governing, don’t try to control. In work, do what you enjoy. In family life, be completely present. | |
In the world there is nothing more submissive and weak than water. Yet for attacking that which is hard and strong nothing can surpass it. | |
It is better to do one’s own duty, however defective it may be, than to follow the duty of another, however well one may perform it. He who does his duty as his own nature reveals it, never sins. | |
Kindness in words creates confidence. Kindness in thinking creates profoundness. Kindness in giving creates love. | |
Knowing others is to be clever. Knowing yourself is to be enlightened. Overcoming others requires force. Overcoming yourself requires strength. | |
Knowing others is wisdom, knowing yourself is Enlightenment. | |
Life and death are one thread, the same line viewed from different sides. | |
Life is a series of natural and spontaneous changes. Don’t resist them – that only creates sorrow. Let reality be reality. Let things flow naturally forward in whatever way they like. | |
Love is of all passions the strongest, for it attacks simultaneously the head, the heart and the senses. | |
Manifest plainness, embrace simplicity, reduce selfishness, have few desires. | |
Man’s enemies are not demons, but human beings like himself. | |
Mastering others is strength. Mastering yourself is true power. | |
Music in the soul can be heard by the universe. | |
Nature does not hurry, yet everything is accomplished. | |
Nature is not human hearted. | |
Nothing is softer or more flexible than water, yet nothing can resist it. | |
Of all that is good, sublimity is supreme. Succeeding is the coming together of all that is beautiful. Furtherance is the agreement of all that is just. Perseverance is the foundation of all actions. | |
One can not reflect in streaming water. Only those who know internal peace can give it to others. | |
One who is too insistent on his own views, finds few to agree with him. | |
People in their handlings of affairs often fail when they are about to succeed. If one remains as careful at the end as he was at the beginning, there will be no failure. | |
Respond intelligently even to unintelligent treatment. | |
Silence is a source of great strength. | |
Simulated disorder postulates perfect discipline; simulated fear postulates courage; simulated weakness postulates strength. | |
Surrender your self-interest. Love others as much as you love yourself. Then you can be entrusted with all things under heaven. | |
The career of a sage is of two kinds: He is either honored by all in the world, Like a flower waving its head, Or else he disappears into the silent forest. | |
The higher the sun ariseth, the less shadow doth he cast; even so the greater is the goodness, the less doth it covet praise; yet cannot avoid its rewards in honours. | |
The journey of a thousand miles begins with one step. | |
The key to growth is the introduction of higher dimensions of consciousness into our awareness. | |
The more laws and order are made prominent, the more thieves and robbers there will be. | |
The people are hungry: It is because those in authority eat up too much in taxes. | |
The power of intuitive understanding will protect you from harm until the end of your days. | |
There is no greater offence than harbouring desires. There is no greater disaster than discontent. There is no greater misfortune than wanting more. | |
The sage does not hoard. The more he helps others, the more he benefits himself, The more he gives to others, the more he gets himself. The Way of Heaven does one good but never does one harm. The Way of the sage is to act but not to compete. | |
The snow goose need not bathe to make itself white. Neither need you do anything but be yourself. | |
The softest things in the world overcome the hardest things in the world. | |
The ten thousand things flourish and then each returns to the root from which it came. Returning to the root is stillness. Through stillness each fulfils its destiny. | |
The True Person avoids extremes, self-indulgence, and extravagance. | |
The True Person benefits yet expects no reward, does the work and moves on. There is no desire to be considered better than others. | |
The True Person governs by emptying the heart of desire and filling the belly with food, weakening ambitions and strengthening bones. | |
The wicked leader is he who the people despise. The good leader is he who the people revere. The great leader is he who the people say, ‘We did it ourselves.’ | |
The wise man does not lay up his own treasures. The more he gives to others, the more he has for his own. | |
The words of truth are always paradoxical. | |
Those who have knowledge, don’t predict. Those who predict, don’t have knowledge. | |
To know yet to think that one does not know is best; Not to know yet to think that one knows will lead to difficulty. | |
To lead people walk behind them. | |
To realize that you do not understand is a virtue; Not to realize that you do not understand is a defect. | |
To see things in the seed, that is genius. | |
To the mind that is still, the whole universe surrenders. | |
Treat those who are good with goodness, and also treat those who are not good with goodness. Thus goodness is attained. Be honest to those who are honest, and be also honest to those who are not honest. Thus honesty is attained. | |
Truthful words are not beautiful; beautiful words are not truthful. Good words are not persuasive; persuasive words are not good. | |
Violence, even well intentioned, always rebounds upon oneself. | |
Weapons are not proper instruments for gentle people; they use them only when they have no other choice. Peace and quiet are what they value. They do not glory in victory. | |
What is well rooted cannot be pulled up. What is firmly grasped will not slip loose. It will be honoured from generation to generation. | |
When a nation is filled with strife, then do patriots flourish. | |
When I let go of what I am, I become what I might be. | |
When the best leader’s work is done the people say, “We did it ourselves.” | |
When virtue is lost, benevolence appears, when benevolence is lost right conduct appears, when right conduct is lost, expedience appears. Expediency is the mere shadow of right and truth; it is the beginning of disorder. | |
When you are content to be simply yourself and don’t compare or compete, everybody will respect you. | |
Without stirring abroad, One can know the whole world; Without looking out of the window One can see the way of heaven. The further one goes The less one knows. | |
# Pragmatic Programmer | |
Rule of Clarity: Clarity is better than cleverness. | |
Rule of Composition: Design programs to be connected to other programs. | |
Rule of Diversity: Distrust all claims for one true way. | |
Rule of Economy: Programmer time is expensive; conserve it in preference to machine time. | |
Rule of Extensibility: Design for the future, because it will be here sooner than you think. | |
Rule of Generation: Avoid hand-hacking; write programs to write programs when you can. | |
Rule of Least Surprise: In interface design, always do the least surprising thing. | |
Rule of Modularity: Write simple parts connected by clean interfaces. | |
Rule of Optimization: Prototype before polishing. Get it working before you optimize it. | |
Rule of Parsimony: Write a big program only when it is clear by demonstration that nothing else will do. | |
Rule of Repair: When you must fail, fail noisily and as soon as possible. | |
Rule of Representation: Fold knowledge into data so program logic can be stupid and robust. | |
Rule of Robustness: Robustness is the child of transparency and simplicity. | |
Rule of Separation: Separate policy from mechanism; separate interfaces from engines. | |
Rule of Silence: When a program has nothing surprising to say, it should say nothing. | |
Rule of Simplicity: Design for simplicity; add complexity only where you must. | |
Rule of Transparency: Design for visibility to make inspection and debugging easier. | |
# Azimov | |
If knowledge can create problems, it is not through ignorance that we can solve them. | |
Part of the inhumanity of the computer is that, once it is competently programmed and working smoothly, it is completely honest. | |
The most exciting phrase to hear in science, the one that heralds new discoveries, is not 'Eureka!' (I found it!) but 'That's funny ...' | |
# How to win friends and influence people -- Dale Carnegie | |
1. “Don’t criticize, condemn, or complain.” | |
2. “Give honest and sincere appreciation.” | |
3. “Arouse in the other person an eager want.” | |
4. “Become genuinely interested in other people.” | |
5. “Smile.” | |
6. “Remember that a person’s name is to that person the sweetest and most important sound in any language.” | |
7. “Be a good listener. Encourage others to talk about themselves.” | |
8. “Talk in terms of the other person’s interests.” | |
9. “Make the other person feel important–and do it sincerely.” | |
10. “The only way to get the best of an argument is to avoid it.” | |
11. “Show respect for the other person’s opinions. Never say, you’re wrong.” | |
12. “If you are wrong, admit it quickly and emphatically.” | |
13. “Begin in a friendly way.” | |
14. “Get the other person saying, ‘yes, yes’ immediately.” | |
15. “Let the other person do a great deal of the talking.” | |
16. “Let the other person feel that the idea is his or hers.” | |
17. “Try honestly to see things from the other person’s point of view.” | |
18. “Be sympathetic with the other person’s ideas and desires.” | |
19. “Appeal to the nobler motives.” | |
20. “Dramatize your ideas.” | |
21. “Throw down a challenge.” | |
22. “Begin with praise and honest appreciation.” | |
23. “Call attention to people’s mistakes indirectly.” | |
24. “Talk about your own mistakes before criticizing the other person.” | |
25. “Ask questions instead of giving direct orders.” | |
26. “Let the other person save face.” | |
27. “Praise the slightest improvement, and praise every improvement.” | |
28. “Give the other person a fine reputation to live up to.” | |
29. “Use encouragement. Make the fault seem easy to correct.” | |
30. “Make the other person happy about doing the thing you suggest.” | |
“The bitterness of poor quality remains long after the sweetness of low price is forgotten.” — Benjamin Franklin | |
“True knowledge comes with deep understanding of a topic and its inner workings.” —Albert Einstein | |
"Facts do not cease to exist because they are ignored" -- Aldus Huxley | |
“When you realize how perfect everything is you will tilt your head back and laugh at the sky” -- unknown | |
“If we knew what we were doing, it wouldn’t be called research.” -- Albert Einstein | |
"The lurking suspicion that something could be simplified is the world's richest source of rewarding challenges." - Edsger Dijkstra | |
"Hardware eventually fails. Software eventually works." - Michael Hartung | |
"It is more important to reduce the Effort of Maintenance than it is to reduce the Effort of Implementation." -- Understanding Software | |
"The Effort of Maintenance is proportional to the complexity of the system." -- Understanding Software | |
An unexamined life is not worth living. -- Socrates | |
True knowledge exists in knowing that you know nothing. -- Socrates | |
To find yourself, think for yourself. -- Socrates | |
I cannot teach anybody anything, I can only make them think. -- Socrates | |
Let him that would move the world first move himself. -- Socrates | |
I know that I am intelligent, because I know that I know nothing. -- Socrates | |
Beware the barrenness of a busy life. -- Socrates | |
Employ your time in improving yourself by other men’s writings, so that you shall gain easily what others have labored hard for. -- Socrates | |
The way to gain a good reputation is to endeavor to be what you desire to appear. -- Socrates | |
# agile manifesto : principles | |
# http://agilemanifesto.org/principles.html | |
Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. | |
Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage. | |
Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. | |
Business people and developers must work together daily throughout the project. | |
Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. | |
The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. | |
Working software is the primary measure of progress. | |
Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. | |
Continuous attention to technical excellence and good design enhances agility. | |
Simplicity--the art of maximizing the amount of work not done--is essential. | |
The best architectures, requirements, and designs emerge from self-organizing teams. | |
At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly. | |
One, remember to look up at the stars and not down at your feet. Two, never give up work. Work gives you meaning and purpose and live is empty without it. Three, if you are lucky enough to find love, remember it is there and don't throw it away. - Stephen Hawking | |
# Laws of Spacecraft and Software | |
# https://island94.org/2022/06/laws-of-spacecraft-and-software | |
In nature, the optimum is almost always in the middle somewhere. Distrust assertions that the optimum is at an extreme point. | |
(Shea’s Law) The ability to improve a design occurs primarily at the interfaces. This is also the prime location for screwing it up. | |
A bad design with a good presentation is doomed eventually. A good design with a bad presentation is doomed immediately. | |
Capabilities drive requirements, regardless of what the systems engineering textbooks say. | |
(McBryan’s Law) You can’t make it better until you make it work. | |
If there’s not a flight program, there’s no money. If there is a flight program, there’s no time. | |
# https://wagslane.dev/posts/zen-of-proverbs/ | |
Optimize for simplicity first | |
Write code for humans, not computers | |
Reading is more important than writing | |
Any style is fine, as long as it’s black | |
There should be one way to do it, but seriously this time | |
Hide the sharp knives | |
Changing the rules is better than adding exceptions | |
Libraries are better than frameworks | |
Transitive dependencies are a problem | |
Dynamic runtime dependencies are a bigger problem | |
API surface area is a liability | |
Returning early is a good thing | |
Use more plain text | |
Compiler errors are better than runtime errors | |
Runtime errors are better than bugs | |
Tooling is better than documentation | |
Documentation is better than nothing | |
Configuration sucks, but so does convention | |
The cost of building a feature is its smallest cost | |
Types are one honking great idea – let’s do more of those! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment