Add cool quotes
the build was successful Details

This commit is contained in:
Antoine Bartuccio 2018-11-14 00:35:25 +01:00
parent 0d142365d1
commit 14a3bc27d7
Signed by: klmp200
GPG Key ID: E7245548C53F904B
4 changed files with 298 additions and 5 deletions

View File

@ -12,6 +12,7 @@ RUN go get -v -d ./...
RUN mkdir res
COPY settings.json res
COPY quotes.json res
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix nocgo -o /app .

View File

@ -2,22 +2,23 @@
* @Author: Bartuccio Antoine
* @Date: 2018-07-23 15:24:22
* @Last Modified by: klmp200
* @Last Modified time: 2018-07-27 19:59:42
* @Last Modified time: 2018-11-14 00:33:00
*/
package main
import (
"log"
"time"
"./commands"
"./settings"
"./shared"
tb "gopkg.in/tucnak/telebot.v2"
"log"
"time"
)
func main() {
registered_commands := map[string]func(*tb.Message){
registeredCommands := map[string]func(*tb.Message){
tb.OnText: commands.OnText,
"/hello": commands.Hello,
"/sponge": commands.Sponge,
@ -30,6 +31,7 @@ func main() {
"/trends": commands.TwitterTrends,
"/chaos": commands.TwitterSJW,
"/apero": commands.AperoTime,
"/quote": commands.Quote,
}
if err := settings.LoadSettings("settings.json", "settings_custom.json"); err != nil {
@ -55,7 +57,7 @@ func main() {
}
shared.Bot = b
for key, value := range registered_commands {
for key, value := range registeredCommands {
b.Handle(key, value)
}

53
commands/quote.go Normal file
View File

@ -0,0 +1,53 @@
/*
* @Author: Bartuccio Antoine
* @Date: 2018-11-14 00:15:43
* @Last Modified by: klmp200
* @Last Modified time: 2018-11-14 00:31:48
*/
package commands
import (
"encoding/json"
"io/ioutil"
"math/rand"
"sync"
"../shared"
tb "gopkg.in/tucnak/telebot.v2"
)
type quoteStorage struct {
mutex sync.Mutex
data []string
}
var sharedQuotes *quoteStorage
// Quote display a quote on the chat
func Quote(m *tb.Message) {
if sharedQuotes == nil {
loadQuotes("quotes.json")
}
sharedQuotes.mutex.Lock()
defer sharedQuotes.mutex.Unlock()
shared.Bot.Send(m.Chat, sharedQuotes.data[rand.Intn(len(sharedQuotes.data))])
}
func loadQuotes(path string) {
sharedQuotes = &quoteStorage{}
sharedQuotes.mutex.Lock()
defer sharedQuotes.mutex.Unlock()
sharedQuotes.data = []string{}
data, err := ioutil.ReadFile(path)
if err != nil {
return
}
if json.Unmarshal(data, &sharedQuotes.data) != nil {
sharedQuotes.data = []string{}
}
}

237
quotes.json Normal file
View File

@ -0,0 +1,237 @@
[
"There are two ways of constructing a software design: One way is to make it sosimple that there are obviously no deficiencies and the other way is to make itso complicated that there are no obvious deficiencies.— C.A.R. Hoare, The 1980 ACM Turing Award Lecture",
"The computing scientist's main challenge is not to get confused by thecomplexities of his own making.— E. W. Dijkstra",
"The cheapest, fastest, and most reliable components are those that aren't there.— Gordon Bell",
"One of my most productive days was throwing away 1000 lines of code.— <a href='http://genius.cat-v.org/ken-thompson/'>Ken Thompson</a>",
"When in doubt, use brute force.— <a href='http://genius.cat-v.org/ken-thompson/'>Ken Thompson</a>",
"Deleted code is debugged code.— Jeff Sickel",
"<a name='bwk'></a>Debugging is twice as hard as writing the code in the first place. Therefore,if you write the code as cleverly as possible, you are, by definition, notsmart enough to debug it.— <a href='http://genius.cat-v.org/brian-kernighan/'>Brian W. Kernighan</a> and P. J. Plauger in <a href='http://www.amazon.com/gp/product/0070342075?ie=UTF8&amp;tag=catv-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0070342075'><em>The Elements of Programming Style</em></a>.",
"The most effective debugging tool is still careful thought, coupled withjudiciously placed print statements.— <a href='http://genius.cat-v.org/brian-kernighan/'>Brian W. Kernighan</a>, in the paper Unix for Beginners (1979)",
"Controlling complexity is the essence of computer programming.— <a href='http://genius.cat-v.org/brian-kernighan/'>Brian Kernighan</a>",
"Beauty is more important in computing than anywhere else in technology becausesoftware is so complicated. Beauty is the ultimate defence against complexity.— David Gelernter",
"UNIX was not designed to stop its users from doing stupid things, as that wouldalso stop them from doing clever things.— Doug Gwyn",
"If you're willing to restrict the flexibility of your approach, you can almostalways do something better.— John Carmack",
"And folks, let's be honest. Sturgeon was an optimist. Way more than 90% of codeis crap.— viro [http://www.ussg.iu.edu/hypermail/linux/kernel/0310.0/0870.html]",
"A data structure is just a stupid programming language.— R. Wm. Gosper",
"The essence of <a href='http://harmful.cat-v.org/software/xml/'>XML</a> is this: the problem it solves is not hard, and it does notsolve the problem well.— Phil Wadler, POPL 2003",
"A program that produces incorrect results twice as fast is infinitely slower.— John Osterhout",
"Life is too short to run proprietary software.— Bdale Garbee",
"I had a nightmare once in which I a had convinced a friend how wonderful <a href='http://harmful.cat-v.org/software/c++/'>C++</a>is. A while later he came back., and he was mad.[sic]— Robin Rosenberg [http://groups.google.com/groups?selm=1fYEA-pz-21%40gated-at.bofh.it]",
"<a href='http://harmful.cat-v.org/software/xml/'>XML</a> is like violence: if it doesn't solve your problem, you aren't using enoughof it.— Heard from someone working at Microsoft",
"XML is like violence. Sure, it seems like a quick and easy solution at first,but then it spirals out of control into utter chaos.— Sarkos in reddit",
"Threads [and] signals [are] a platform-dependant trail of misery, despair,horror and madness.— Anthony Baxter [http://mail.python.org/pipermail/python-dev/2005-July/]",
"Computers are about making life easier in much the same way that the Republicanparty is about fiscal responsibility and a culture of life.— mister_borogove [http://www.livejournal.com/users/jwz/536902.html?thread=9506374#t9506374]",
"All software sucks, be it open-source [or] proprietary. The only question iswhat can be done with particular instance of suckage, and that's where havingthe source matters.— viro [http://www.ussg.iu.edu/hypermail/linux/kernel/0404.3/1344.html]",
"Mathematicians stand on each others' shoulders and computer scientists standon each others' toes.— Richard Hamming",
"It's not that Perl programmers are idiots, it's that the language rewardsidiotic behavior in a way that no other language or tool has ever done.— <a href='http://genius.cat-v.org/erik-naggum'>Erik Naggum</a>, comp.lang.lisp",
"Out-of-band == should be on a separate channel…— Al Viro",
"It's a curious thing about our industry: not only do we not learn from ourmistakes, we also don't learn from our successes.— Keith Braithwaite",
"Ethernet always wins.— Andy Bechtolsheim",
"The central enemy of reliability is complexity.— Geer et al.",
"Simplicity is prerequisite for reliability.— Edsger W. Dijkstra",
"Beware of « the real world ». A speaker's apeal to it is always an invitation notto challenge his tacit assumptions.— Edsger W. Dijkstra",
"<a href='http://doc.cat-v.org/unix/'>Unix</a> is a junk OS designed by a committee of PhDs.— Dave Cutler",
"i've wondered whether Linux sysfs should be called syphilis— forsyth",
"A program is portable to the extent that it can be easily moved to a newcomputing environment with much less effort than would be required to write itafresh.— W. Stan Brown [http://groups.google.com/group/comp.std.c/msg/083fb09444dbbc76]",
"Programming graphics in X is like finding the square root of PI using Roman numerals.— <a href='http://doc.cat-v.org/henry_spencer/'>Henry Spencer</a>",
"Forward thinking was just the thing that made Multics what it is today.— Erik Quanstrom",
"The Eight Fallacies of Distributed ComputingEssentially everyone, when they first build a distributed application, makesthe following eight assumptions. All prove to be false in the long run and allcause big trouble and painful learning experiences.<ol><li>The network is reliable</li><li>Latency is zero</li><li>Bandwidth is infinite</li><li>The network is secure</li><li>Topology doesn't change</li><li>There is one administrator</li><li>Transport cost is zero</li><li>The network is homogeneous</li></ol>— Peter Deutsch",
"From: rsc@plan9.bell-labs.com (Russ Cox)Subject: Re: [9fans] design clairvoyance & the 9 wayDate: Thu, 8 May 2003 04:05:31 GMT> What does tomorrow's unix look like?I'm confident that tomorrow's Unix will look like today's Unix, only cruftier.Russ",
"You want to make your way in the CS field? Simple. Calculate rough time ofamnesia (hell, 10 years is plenty, probably 10 months is plenty), go to thedusty archives, dig out something fun, and go for it. It's worked for manypeople, and it can work for you.— Ron Minnich",
"From: Alexander Viro <viro math psu edu>Subject: Re: ANNOUNCE: Linux Kernel ORB: kORBitDate: Sat, 9 Dec 2000 00:39:36 -0500 (EST)[...]Yeah... 'Infinitely extendable API' and all such. Roughly translatedas 'we can't live without API bloat'. Frankly, judging by the GNOMEcodebase people who designed the thing[GNOME] are culturally incompatible withUNIX.",
"> What's wrong with perl?It combines all the worst aspects of C and Lisp: a billion differentsublanguages in one monolithic executable. It combines the power ofC with the readability of PostScript.> To me perl is the triumph of utalitarianism.So are cockroaches. So is `sendmail'.— jwz [http://groups.google.com/groups?selm=33F4D777.7BF84EA3%40netscape.com]",
"From: ron minnich <rminnich@lanl.gov>Subject: [9fans] microkernelsare they the O-O of the OS world? Always the promises ...ron",
"Subject: Re: BK, deltas, snapshots and fate of -pre...From: Alexander Viro (viro@math.psu.edu)Url: http://groups.google.com/group/fa.linux.kernel/msg/caede4c7fd703c4e[...]Sigh... When it comes to software there are three systems of beliefs.One of them: * Thou shalt know by your heart that all software sucks. * Beware of those who say that their software does not suck, for they are either fools or liars. * Beware of those who give you garments and do not allow to mend them, for sooner or later thou shalt find what needs mending. * But beware also of those who give you badly rotten garments and say 'Thou shalt prefer that above everything, for thou art allowed to mend it'. * Thou shalt not treat software as a living being, for it is not one. * Choose a license of thine liking for sofware thou writest and do not blame those who choose differently for software they write. * Know when to say 'It can be mended, I shalt do that' and when to say 'It is rotten beyond repair'. * Choose free over non-free when it is better or when thou art willing to fix what is broken. * When shit happens, think how to fix it.Another: * All software wants to be free * Thou shalt not use non-free software * Thou shalt not mention non-free software * Thou shalt make all thine software free * Thou shalt choose free above working, even if free one is broken beyond repair * When shit happens, add new featuresand the last one: * Our 3133t! K3wl! Software! Does Not Suck!!! * Always choose our software above everything else * When shit happens, we add new featuresIf you happen to believe in second variant, you have my condolence aslong as you don't force your beliefs on everybody else. If you chooseto emulate door-to-door pests^H^H^H^Hreachers - don't expect to betreated differently.",
"People do have a right to put their code under whatever license they like.Now, <em>I</em> won't use the stuff I don't have a source for unless I haveexceptionally good reason to believe that authors of that stuff areamong the few percents of programmers who <em>can</em> find their arse withoutoutside help. But that has nothing to do with licensing or any moralconsiderations and everything to the fact that I know what kind of crapmost of the software is.— Al Viro on linux-kernel",
"Linus Torvalds wrote:> Ehh.. Telling people 'don't do that' simply doesn't work. Not if they can> do it easily anyway. Things really don't get fixed unless people have a> certain pain-level to induce it to get fixed.Umm... How about the following: you hit delete on patches that introducenew ioctls, I help to provide required level of pain. Deal?— Al Viro on linux-kernel",
"James Simmons wrote:> Crap can work. Given enough thrust pigs will fly, but it's not necessary a> good idea. [ Alexander Viro on linux-kernel ]Watch the attributions.With sufficient thrust, pigs fly just fine.However, this is not necessarily a good idea.It is hard to be sure where they are going to land,and it could be dangerous sitting under them as they fly overhead. From RFC1925, R Callon, 1996.— Al Viro on linux-kernel",
"In the same world where Vomit-Making System is elegant, SGI « designs » areand NT is The Wave Of Future™. Pardon me, but I'll stay in our universeand away from the drugs of such power.— Al Viro on linux-kernel",
"> > Or even XML. Ouch! No need to throw things at me!>> It seems they would be thrown! XML in kernel is too much. OpenOffice andThey won't be thrown. They will be slowly driven under the nails, so thatvictim could experience the joy equal to that of dealing with XML.— Alexander Viro on linux-kernel",
"A Professor of Computer Science gave a paper on how he uses Linux to teach hisundergraduates about operating systems. Someone in the audience asked why useLinux rather than Plan 9?' and the professor answered:Plan 9 looks like itwas written by experts; Linux looks like something my students could aspire towrite'.",
"Computer: Your nominators and endorsers for the Kanai Award consistentlycharacterized your work as simple yet powerful. How do you discover suchpowerful abstractions?<a href='http://genius.cat-v.org/ken-thompson/'>Ken Thompson</a>: It is the way I think. I am a very bottom-up thinker. If you giveme the right kind of Tinker Toys, I can imagine the building. I can sit thereand see primitives and recognize their power to build structures a half milehigh, if only I had just one more to make it functionally complete. I can seethose kinds of things.The converse is true, too, I think. I can't from the building imagine theTinker Toys. When I see a top-down description of a system or language that hasinfinite libraries described by layers and layers, all I just see is a morass.I can't get a feel for it. I can't understand how the pieces fit; I can'tunderstand something presented to me that's very complex. Maybe I do what I dobecause if I built anything more complicated, I couldn't understand it. Ireally must break it down into little pieces.",
"if you're capable of understanding `finalised virtual hyperstationary factoryclass', remembering the <a href='http://harmful.cat-v.org/software/java'>Java</a> class hierarchy, and all the details of the JavaMedia Framework, you are (a) a better man than i am (b) capable of filling yourmind with large chunks of complexity, so concurrent programming should besimple by comparison. go for it.ps. i made up the hyperstationary, but then again, it's probably a designpattern.— forsyth",
"At first I hoped that such a technically unsound project would collapse but Isoon realized it was doomed to success. Almost anything in software can beimplemented, sold, and even used given enough determination. There is nothing amere scientist can say that will stand against the flood of a hundred milliondollars. But there is one quality that cannot be purchased in this way -andthat is reliability. The price of reliability is the pursuit of the utmostsimplicity. It is a price which the very rich find most hard to pay.— C.A.R. Hoare",
" Vacuumware: n, software which was written specifically to fill a void in the industry, especially software which is successful more due to how well it fills that void than due to anything else, like usability or utility. I believe it may have been Dennis Ritchie who said (about X) « Sometimes whenyou fill a vacuum, it still sucks. » X is a prime example of vacuumware, and infact inspired the term.[http://www.uta.fi/FAST/US8/PLAY/inklish.html]",
"I remarked to Dennis [Ritchie] that easily half the code I was writing inMultics was error recovery code. He said, « We left all that stuff out [ofUnix]. If there's an error, we have this routine called panic, and when it iscalled, the machine crashes, and you holler down the hall, Hey, reboot it.' »— Tom Van Vleck [http://www.multicians.org/unix.html]",
"RMS is to <a href='http://doc.cat-v.org/unix/'>Unix</a>, like Hitler [was] to Nietzsche.— Federico Benavento",
"Unix is simple. It just takes a genius to understand its simplicity.— <a href='http://genius.cat-v.org/dennis-ritchie/'>Dennis Ritchie</a>",
"Most <a href='http://harmful.cat-v.org/software/xml/'>xml</a> i've seen makes me think i'mdyslexic. it also looks constipated, and two health problems in one standardis just too much.— Charles Forsyth",
"PHP is a minor evil perpetrated and created by incompetent amateurs, whereasPerl is a great and insidious evil perpetrated by skilled but pervertedprofessionals.",
"OAuth is the best that the wrong way of doing things can provide.— Mike Stay [http://blog.360.yahoo.com/blog-TBPekxc1dLNy5DOloPfzVvFIVOWMB0li?p=1006]",
"This users are idiots, and are confused by functionality' mentality of Gnomeis a disease. If you think your users are idiots, only idiots will use it.— Linus",
"{Ex-Cyber} some part of me desperately wants to believe that XML-RPC is some kind of elaborate joke, like a cross between Discordianism and IP Over Avian Carriers",
"The only places for icons is in a church, a burning church at that.— mhat",
"The key to performance is elegance, not battalions of special cases.— Jon Bentley and <a href='http://genius.cat-v.org/doug-mcilroy/'>Doug McIlroy</a>",
"Just because the standard provides a cliff in front of you, you arenot necessarily required to jump off it.— Norman Diamond",
"Are you quite sure that all those bells and whistles, all thosewonderful facilities of your so called powerful programming languages,belong to the solution set rather than the problem set?— Edsger W. Dijkstra",
"Measuring programming progress by lines of code is like measuringaircraft building progress by weight.— Bill Gates",
"The object-oriented model makes it easy to build up programs byaccretion. What this often means, in practice, is that it provides astructured way to write spaghetti code.— Paul Graham",
"First, solve the problem. Then, write the code.— John Johnson",
"Most software today is very much like an Egyptian pyramid withmillions of bricks piled on top of each other, with no structuralintegrity, but just done by brute force and thousands of slaves.— Alan Kay",
"Correctness is clearly the prime quality. If a system does not dowhat it is supposed to do, then everything else about it matterslittle.— Bertrand Meyer",
"Complexity kills. It sucks the life out of developers, it makesproducts difficult to plan, build and test, it introduces securitychallenges and it causes end-user and administrator frustration.— Ray Ozzie",
"If the designers of X Windows built cars, there would be no fewer thanfive steering wheels hidden about the cockpit, none of which followedthe same principles but youd be able to shift gears with your carstereo. Useful feature that.— Marcus J. Ranum, DEC",
"A language that doesn't have everything is actually easier to programin than some that do.— <a href='http://genius.cat-v.org/dennis-ritchie/'>Dennis M. Ritchie</a>",
"Mostly, when you see programmers, they aren't doing anything. One ofthe attractive things about programmers is that you cannot tellwhether or not they are working simply by looking at them. Very oftenthey're sitting there seemingly drinking coffee and gossiping, or juststaring into space. What the programmer is trying to do is get ahandle on all the individual and unrelated ideas that are scamperingaround in his head.— Charles M. Strauss",
"Haskell is faster than <a href='http://harmful.cat-v.org/software/c++/'>C++</a>, more concise than Perl, more regular thanPython, more flexible than Ruby, more typeful than C#, more robustthan <a href='http://harmful.cat-v.org/software/java'>Java</a>, and has absolutely nothing in common with PHP.— Autrijus Tang",
"You can't trust code that you did not totally create yourself.— <a href='http://genius.cat-v.org/ken-thompson/'>Ken Thompson</a>",
"Object-oriented design is the roman numerals of computing.— <a href='http://genius.cat-v.org/rob-pike/'>Rob Pike</a>",
"Not only is UNIX dead, it's starting to smell really bad.— <a href='http://genius.cat-v.org/rob-pike/'>Rob Pike</a> circa 1991",
"{ajh} I always viewed HURD development like the Special Olympics of free software.",
"cat came back from Berkeley waving flags— <a href='http://genius.cat-v.org/rob-pike/'>Rob Pike</a>",
"We have persistant(sic) objects, they're called files.— <a href='http://genius.cat-v.org/ken-thompson/'>Ken Thompson</a>",
"If you want to go somewhere, goto is the best way to get there.— <a href='http://genius.cat-v.org/ken-thompson/'>ken</a>",
"The X server has to be the biggest program I've ever seen that doesn't do anything for you.— <a href='http://genius.cat-v.org/ken-thompson/'>Ken Thompson</a>",
"A smart terminal is not a smartass terminal, but rather a terminal you can educate.— <a href='http://genius.cat-v.org/rob-pike/'>Rob Pike</a>",
"Simplicity is the ultimate sophistication.— Leonardo da Vinci",
"Increasingly, people seem to misinterpret complexity assophistication, which is baffling—the incomprehensible should causesuspicion rather than admiration. Possibly this trend results from amistaken belief that using a somewhat mysterious device confers anaura of power on the user.— Niklaus Wirth",
"Compatibility means deliberately repeating other people's mistakes.— David Wheeler",
"<blockquote>[Like programmers] prostitutes also think they all suck.</blockquote>And both, programmers and prostitutes, are right: they suck. The big differenceis that prostitutes got the term « user-friendly » right.— yiyus [http://www.reddit.com/r/programming/comments/8y348/my_programming_quotes_file_was_well_received_when/c0aspwo]",
"The Purpose of Computing is Insight, Not Numbers.— This is the motto of the book <a href='http://www.amazon.com/gp/product/0486652416?ie=UTF8&amp;tag=catv-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0486652416'><em>Numerical Methods for Scientists and Engineers</em></a> by Richard Hamming.",
"Every methodology I've come across has, at its kernel, a very small sectionlabelled « do magic here ».— Katie [http://www.fysh.org/~katie/computing/methodologies.txt]",
"I recommend the linux people to call it « GNU / Linux » instead of « GNU/Linux ».never hurts to distance yourself from GNU.— mjl on #plan9-social",
"For the sinner deserves not life but death, according to the diskdevices. For example, start with Plan 9, which is free of sin, thecase is different from His perspective.— <a href='http://glenda.cat-v.org/friends/mark-v-shaney/'>Mark V. Shaney</a>",
"Trying to express implicit and fuzzy relationships in ways that are explicitand sharp doesn't clarify the meaning, it destroys it.— Clay Shirky [http://www.shirky.com/writings/semantic_syllogism.html]",
"Unix has retarded OS research by 10 years and linux has retarded it by 20.— <a href='http://genius.cat-v.org/dennis-ritchie/'>Dennis Ritchie</a> as quoted by by Boyd Roberts in 9fans.",
"Any program that tries to be so generalized and configurable that it couldhandle any kind of task will either fall short of this goal, or will behorribly broken.— Chris Wenham",
"Nobody who uses <a href='http://harmful.cat-v.org/software/xml/'>XML</a> knows what they are doing.— Chris Wenham",
"Debugging time increases as a square of the program's size.— Chris Wenham",
"I guess it's like smart compiler for dumb people, and dumb compiler for smartpeople. But then smart compiler gets too smart.. so neither dumb nor smartpeople can understand it.— fgb on compilers and <a href='http://harmful.cat-v.org/software/GCC'>gcc</a>",
"in aeronautical circles, it's said that the f4 is proof that givenenough thrust even a brick will fly.linux is the f4 of computing?— erik quanstrom",
"It seems to me more like you use foresight and pessimism to avoid getting intosituations where you need to demonstrate exceptional programming ability.— mister_borogove speaking to jwz [http://jwz.livejournal.com/1096593.html]",
"Comparing a computer language to a human language is like comparing anoperating system kernel to a popcorn kernel.— kryptkpr [http://www.reddit.com/r/programming/comments/9upno/c_is_frequently_reviled_both_by_those_who_never/c0eiyqu]",
"Hofstadter's Law: It always takes longer than you expect, even when you takeinto account Hofstadter's Law.",
"My definition of an expert in any field is a person who knows enough aboutwhat's really going on to be scared.— P. J. Plauger, Computer Language, March 1983",
"Every language has an optimization operator. In C++ that operator is //",
"Nobody should start to undertake a large project. You start with a smalltrivial project, and you should never expect it to get large. If you do, you'lljust overdesign and generally think it is more important than it likely is atthat stage. Or worse, you might be scared away by the sheer size of the workyou envision. So start small, and think about the details. Don't think aboutsome big picture and fancy design. If it doesn't solve some fairly immediateneed, it's almost certainly over-designed. And don't expect people to jump inand help you. That's not how these things work. You need to get somethinghalf-way useful first, and then others will say « hey, that almost works forme », and they'll get involved in the project.— Linus Torvalds",
"Theory is when you know something, but it doesn't work. Practice is whensomething works, but you don't know why. Programmers combine theory andpractice: Nothing works and they don't know why.",
"A computer is a stupid machine with the ability to do incredibly smart things,while computer programmers are smart people with the ability to do incrediblystupid things. They are, in short, a perfect match",
"Q: What is the most often-overlooked risk in software engineering?A: Incompetent programmers. There are estimates that the number of programmersneeded in the U.S. exceeds 200,000. This is entirely misleading. It is not aquantity problem; we have a quality problem. One bad programmer can easilycreate two new jobs a year. Hiring more bad programmers will just increase ourperceived need for them. If we had more good programmers, and could easilyidentify them, we would need fewer, not more.— David Parnas",
"Well over half of the time you spend working on a project (on the order of 70percent) is spent thinking, and no tool, no matter how advanced, can think foryou. Consequently, even if a tool did everything except the thinking for you if it wrote 100 percent of the code, wrote 100 percent of the documentation,did 100 percent of the testing, burned the CD-ROMs, put them in boxes, andmailed them to your customers the best you could hope for would be a 30percent improvement in productivity. In order to do better than that, you haveto change the way you think.",
"The best code is no code at all.",
"Before software can be reusable it first has to be usable.",
"Old programs read like quiet conversations between a well-spoken research worker and a well-studied mechanical colleague, not as a debate with a compiler. Who'd have guessed sophistication bought such noise?— Dick Gabriel",
"This is one of the reasons Lisp doesn't get anywhere. The trend to promote features so clever that you stop thinking about your problem and start thinking about the clever features. CL's loop is so powerful that people invented functional programming so that they'd never have to use it.— G_Morgan in reddit [http://www.reddit.com/r/programming/comments/a481l/so_to_get_back_to_the_point_go_vs_algol68_tbh_i/c0fs2nk]",
"More computing sins are committed in the name of efficiency (withoutnecessarily achieving it) than for any other single reason - including blindstupidity.— William A. Wulf",
"There is not now, nor has there ever been, nor will there ever be, anyprogramming language in which it is the least bit difficult to write bad code.",
"Program testing can be a very effective way to show the presence of bugs, butis hopelessly inadequate for showing their absence.— Edsger W. Dijkstra",
"The competent programmer is fully aware of the limited size of his own skull.He therefore approaches his task with full humility, and avoids clever trickslike the plague.— Edsger W. Dijkstra",
"<a href='http://doc.cat-v.org/economics/parkinsons-law/'>Parkinsons Law</a>Otherwise known as the law of bureaucracy, this law states that…« <em>Work expands so as to fill the time available for its completion.</em> »",
"It has been said that the great scientific disciplines are examples of giantsstanding on the shoulders of other giants. It has also been said that thesoftware industry is an example of midgets standing on the toes of othermidgets.— Alan Cooper, About Face",
"Code never lies, comments sometimes do.— Ron Jeffries",
"What I cannot build, I do not understand.— <a href='http://genius.cat-v.org/richard-feynman/'>Richard Feynman</a>",
"If we'd asked the customers what they wanted, they would have said « faster horses »— Henry Ford",
"I (…) am rarely happier than when spending an entire day programming mycomputer to perform automatically a task that would otherwise take me a goodten seconds to do by hand.— Douglas Adams, Last Chance to See",
"Programming is not a zero-sum game. Teaching something to a fellow programmerdoesnt take it away from you. Im happy to share what I can, because Im in itfor the love of programming. The Ferraris are just gravy, honest!— John Carmack, from Michael Abrash' <a href='http://www.amazon.com/gp/product/1576101746?ie=UTF8&amp;tag=catv-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=1576101746'>Graphics Programming Black Book</a>.",
"I have found that the reason a lot of people are interested in artificialintelligence is the same reason a lot of people are interested in artificiallimbs: they are missing one.— David Parnas",
"Once you've dressed and before you leave the house, look in the mirror and takeat least one thing off.— Coco Chanel",
"When I am working on a problem I never think about beauty. I think only how tosolve the problem. But when I have finished, if the solution is not beautiful,I know it is wrong.— R. Buckminster Fuller",
"I have always found that plans are useless, but planning is indispensable.— Dwight D. Eisenhower",
"I will, in fact, claim that the difference between a bad programmer and a goodone is whether he considers his code or his data structures more important. Badprogrammers worry about the code. Good programmers worry about data structuresand their relationships.— Linus Torvalds",
"Software is like entropy. It is difficult to grasp, weighs nothing, and obeysthe second law of thermodynamics; i.e. it always increases.",
"A fool with a tool is a more dangerous fool.— u.",
"The best things are simple, but finding these simple things is not simple.— bill [http://stackoverflow.com/questions/58640/great-programming-quotes/1003525#1003525]",
"Some problems are so complex that you have to be highly intelligent and wellinformed just to be undecided about them.— Laurence J. Peter",
"The most amazing achievement of the computer software industry is itscontinuing cancellation of the steady and staggering gains made by the computerhardware industry.— Henry Petroski",
"Theory is when you know something, but it doesn't work. Practice is whensomething works, but you don't know why. Programmers combine theory andpractice: Nothing works and they don't know why.",
"Once a new technology starts rolling, if you're not part of the steamroller,you're part of the road.— Stewart Brand",
"Einstein argued that there must be simplified explanations of nature, becauseGod is not capricious or arbitrary. No such faith comforts the softwareengineer.— Fred Brooks",
"… the cost of adding a feature isn't just the time it takes to code it. Thecost also includes the addition of an obstacle to future expansion. … Thetrick is to pick the features that don't fight each other.— John Carmack",
"With diligence it is possible to make anything run slowly.— Tom Duff",
"Any intelligent fool can make things bigger, more complex, and more violent. Ittakes a touch of genius and a lot of courage to move in the oppositedirection.— Albert Einstein",
"A foolish consistency is the hobgoblin of little minds, adored by littlestatesmen and philosophers and divines.— Ralph Waldo Emerson",
"For a sucessful technology, honesty must take precedence over public relationsfor nature cannot be fooled.— Richard Feynman",
"Comparing to another activity is useful if it helps you formulate questions,it's dangerous when you use it to justify answers.— Martin Fowler",
"Simplicity carried to the extreme becomes elegance.— Jon Franklin",
"Software obeys the law of gaseous expansion - it continues to grow until memoryis completely filled.— Larry Gleason",
"The unavoidable price of reliability is simplicity.— C.A.R. Hoare",
"The ability to simplify means to eliminate the unnecessary so that thenecessary may speak.— Hans Hoffmann",
"Trying to outsmart a compiler defeats much of the purpose of using one.— <a href='http://genius.cat-v.org/brian-kernighan/'>Kernighan</a> and Plauger, <a href='http://www.amazon.com/gp/product/0070342075?ie=UTF8&amp;tag=catv-20&amp;linkCode=as2&amp;camp=1789&amp;creative=390957&amp;creativeASIN=0070342075'>The Elements of Programming Style</a>.",
"You're bound to be unhappy if you optimize everything.— Donald Knuth",
"A distributed system is one in which the failure of a computer you didn't evenknow existed can render your own computer unusable.— Leslie Lamport",
"But in our enthusiasm, we could not resist a radical overhaul of the system, inwhich all of its major weaknesses have been exposed, analyzed, and replacedwith new weaknesses.— Bruce Leverett, Register Allocation in Optimizing Compilers",
"The proper use of comments is to compensate for our failure to express ourselfin code.— Robert C. MartinClean Code",
"If you want a product with certain characteristics, you must ensure that theteam has those characteristics before the product's development.— Jim McCarthy and Michele McCarthy - Software for your Head",
"You can't have great software without a great team, and most software teamsbehave like dysfunctional families.— Jim McCarthy",
"Testing by itself does not improve software quality. Test results are anindicator of quality, but in and of themselves, they don't improve it. Tryingto improve software quality by increasing the amount of testing is like tryingto lose weight by weighing yourself more often. What you eat before you steponto the scale determines how much you will weigh, and the software developmenttechniques you use determine how many errors testing will find. If you want tolose weight, don't buy a new scale; change your diet. If you want to improveyour software, don't test more; develop better.— Steve McConnell Code Complete",
"Correctness is clearly the prime quality. If a system does not do what it issupposed to do, then everything else about it matters little.— Bertrand Meyer",
"Incorrect documentation is often worse than no documentation.— Bertrand Meyer",
"Software sucks because users demand it to.— Nathan Myhrvold",
"Unformed people delight in the gaudy and in novelty. Cooked people delight inthe ordinary.— <a href='http://genius.cat-v.org/erik-naggum'>Erik Naggum</a>",
"There's no sense being exact about something if you don't even know what you'retalking about.— John von Neumann",
"That's the thing about people who think they hate computers. What they reallyhate is lousy programmers.— Larry Niven and Jerry Pournelle Oath of Fealty",
"Search all the parks in all your cities; you'll find no statues of committees.— David Ogilvy",
"Good code is short, simple, and symmetrical - the challenge is figuring out howto get there.— Sean Parent",
"Fashion is something barbarous, for it produces innovation without reason andimitation without benefit.— George Santayana",
"Forgive him, for he believes that the customs of his tribe are the laws ofnature!— G.B. Shaw",
"The only sin is to make a choice without knowing you are making one.— Jonathan Shewchuk",
"It is a painful thing to look at your own trouble and know that you yourselfand no one else has made it.— Sophocles, Ajax",
"The primary duty of an exception handler is to get the errorout of the lap of the programmer and into the surprised faceof the user. Provided you keep this cardinal rule in mind,you can't go far wrong.— Verity Stob",
"A notation is important for what it leaves out.— Joseph Stoy",
"An organisation that treats its programmers as morons will soon haveprogrammers that are willing and able to act like morons only.— Bjarne Stroustrup",
"I have always wished that my computer would be as easy to useas my telephone. My wish has come true. I no longer know howto use my telephone.— Bjarne Stroustrup",
"The most important single aspect of software development isto be clear about what you are trying to build.— Bjarne Stroustrup",
"The best is the enemy of the good.— Voltaire",
"As soon as we started programming, we found to our surprise that it wasn't aseasy to get programs right as we had thought. Debugging had to be discovered. Ican remember the exact instant when I realized that a large part of my lifefrom then on was going to be spent in finding mistakes in my own programs.— Maurice Wilkes discovers debugging, 1949",
"Software gets slower faster than hardware gets faster.— Wirth's law",
"The purpose of software engineering is to control complexity, not to create it.— Dr. Pamela Zave",
"I object to doing things that computers can do.— Olin Shivers",
"Simplicity the art of maximizing the amount of work not done is essential.— From the Agile Manifesto.",
"When you want to do something differently from the rest of the world, it's agood idea to look into whether the rest of the world knows something you don't.",
"Perilous to us all are the devices of an art deeper than that which we possessourselves.— J.R.R. Tolkien",
"Complexity has nothing to do with intelligence, simplicity does.— Larry Bossidy",
"If it doesn't work, it doesn't matter how fast it doesn't work.— Mich Ravera",
"Simplicity is hard to build, easy to use, and hard to charge for. Complexity iseasy to build, hard to use, and easy to charge for.— Chris Sacca",
"… what society overwhelmingly asks for is snake oil. Of course, the snake oilhas the most impressive names — otherwise you would be selling nothing — like« Structured Analysis and Design », « Software Engineering », « Maturity Models »,« Management Information Systems », « Integrated Project Support Environments »« Object Orientation » and « Business Process Re-engineering » (the latter threebeing known as IPSE, OO and BPR, respectively).— Edsger W. Dijkstra — EWD 1175: The strengths of the academic enterprise [Today we could add Extreme Programming', Agile Software Development' and many more.]",
"They won't tell you that they don't understand it; they will happily inventtheir way through the gaps and obscurities.— V.A. Vyssotsky on software programmers and their views on specifications",
"In software, the most beautiful code, the most beautiful functions, and themost beautiful programs are sometimes not there at all.— Jon Bentley, Beautiful Code (O'Reilly), « The Most Beautiful Code I Never Wrote »",
"Computers make it easier to do a lot of things, but most of the things theymake it easier to do don't need to be done.— Andy Rooney",
"True glory consists in doing what deserves to be written; in writing whatdeserves to be read.— Pliny the Elder",
"The whole point of getting things done is knowing what to leave undone.— Oswald Chambers",
"<ul><li>Q: What is the difference between an object methodologist and a terrorist?</li><li>A: You can negotiate with the terrorist.</li></ul>",
"One Page Principle: A specification that will not fit on one page of 8.5x11inch paper cannot be understood.— Mark Ardis",
"The whole HTML validation exercise is questionable, but validating as XHTML isflat-out masochism. Only recommended for those that enjoy pain. Or programmers.I can't always tell the difference.— Jeff Atwood",
"When in doubt, leave it out.— Joshua Bloch",
"No code is faster than no code.— merb motto",
"As a rule, software systems do not work well until they have been used, andhave failed repeatedly, in real applications.— Dave Parnas",
"<a href='http://harmful.cat-v.org/software/OO_programming/'>OOP</a> is to writing a program, what going through airport security is to flying.— Richard Mansfield",
"The problem with object-oriented languages is they've got all this implicitenvironment that they carry around with them. You wanted a banana but what yougot was a gorilla holding the banana and the entire jungle.— Joe Armstrong",
"As a programmer, it is your job to put yourself out of business. What you dotoday can be automated tomorrow.— <a href='http://genius.cat-v.org/doug-mcilroy/'>Doug McIlroy</a>",
"IDE features are language smells.— Reg Braithwaite",
"PHP is [the] Sarah Palin of programming languages.— killerstorm [http://www.reddit.com/r/programming/comments/b7j9v/debian_refuses_to_package_the_embedded_php/c0ldcqg]",
"A good way to have good ideas is by being unoriginal.— Bram Cohen",
"The comment about developers making work for themselves is also spot on. Ianswer a lot of programming questions, and the questions are always askedbecause the programmer has reached the end of a twisty maze of his owncreation. Turn around, walk, spin around, and try again. You'll find a bettersolution.— Jonathan Rockway in a Hacker News comment",
"a program is like a poem: you cannot write a poem without writing it. Yetpeople talk about programming as if it were a production process and measure« programmer productivity'in terms of 'number of lines of code produced ».In sodoing they book that number on the wrong side of the ledger: We should alwaysrefer to'the number of lines of code spent'.— E. W. Dijkstra",
"it's an old observation that in order to be useful hypothesis has to befalsifiable. Similar principle applies to design proposals - to be worth ofany attention they have to be detailed enough to allow meaningful criticism.What you have done so far is equivalent to coming to a hospital and saying« aseptic good, infection bad ». That would get pretty much the same reactions,varying from « yes, we know » to « do you have any specific suggestions? » and« stop wasting our time »[1].In short: get lost and do not come back until you have something lessvague.[1] If you are insistent enough, you might also earn a free referralto psychiatrist.— Al Viro in lkml",
"<blockquote>These are some of the types of problems engineers at REAL software shops haveto solve to be able to ship REAL product for REAL money. If you haven't HADto produce code like this yourself at some point in your carrier then you'velived a sheltered life.Its disingenuous for you to get on your ivory tower to point and laugh.</blockquote>Well, you see, after spending years cleaning up the excrements of self-styled« REAL engineers » it's either get on the tower to point and laugh or get on thetower to point and shoot.— Al Viro in lkml",
"Layered approach' is not a magic incantation to excuse any bit of snake oil.Homeopathic remedies might not harm (pure water is pure water), but that's notan excuse for quackery. And frankly, most of the security improvement' crowdsound exactly like woo-peddlers.— Al Viro",
"The trick is to fix the problem you have, rather than the problem you want.— Bram Cohen",
"Security is a state of mind.— NSA Security Manual",
"Never attribute to funny hardware that which can be adequately explained bybroken locking.— Erik Quanstrom",
"Things which any idiot could write usually have the quality of having beenwritten by an idiot.— Bram Cohen",
"In programming the hard part isn't solving problems, but deciding what problemsto solve.— Paul Graham",
"[POSIX] unifying unix? more like formalizing historical design mistakes made bymajor vendors…— ttyv0",
"Do I really want to be using a language where memoize is a PhD-level topic?— Mark Engelberg about Haskell",
"The beauty of small and simple code is that you can bend or break the rules aslong it stays small and simple. Rules allow people to write code withoutthinking. [And when] you dont think […] you get bloated code that justconcatenates stupid patterns.People stop thinking and questioning [and] then its just worshipping some ruleswithout any pruporse.— Cinap Lenrek",
"If you start programming by learning perl you will just become a menace to yourself and others.— egoncasteel",
"When there is no type hierarchy you don't have to manage the type hierarchy.— <a href='http://genius.cat-v.org/rob-pike/'>Rob Pike</a>",
"Programming languages should be designed not by piling feature on top offeature, but by removing the weaknesses and restrictions that make additionalfeatures appear necessary.— RnRS",
"Software efficiency halves every 18 months, compensating Moore's Law.— May's Law",
"So-called « smart » software usually is the worst you can imagine.— Christian Neukirchen",
"Such is modern computing: everything simple is made too complicated becauseit's easy to fiddle with; everything complicated stays complicated because it'shard to fix.— Rob Pike",
"It is not that uncommon for the cost of an abstraction to outweigh the benefitit delivers. Kill one today!— John Carmack",
"So much complexity in software comes from trying to make one thing do two things.— Ryan Singer",
"The standard rule is, when you're in a hole, stop digging; that seems not toapply [to] software nowadays.— Ron Minnich",
"Languages that try to disallow idiocy become themselves idiotic.— Rob Pike",
"<ul><li>uriel: <em>When I read « OMG (Object Management Group) » I think « Oh My God! ».</em></li><li>gobongo: <em>Fitting because whenever someone suggests I use UML I think « Oh My God (is this guy on crack?)! ».</em></li></ul>",
"There's nothing in computing that can't be broken by another level ofindirection.— Rob Pike",
"A complex system that works is invariably found to have evolved from a simplesystem that worked. The inverse proposition also appears to be true: A complexsystem designed from scratch never works and cannot be made to work.— John Gall",
"« design patterns » are concepts used by people who can't learn by any methodexcept memorization, so in place of actual programming ability, they memorize« patterns » and throw each one in sequence at a problem until it works— Dark_Shikari",
"One of the big lessons of a big project is you don't want people that aren'treally programmers programming, you'll suffer for it!— John Carmack",
"Premature optimization, that's like a sneeze. Premature abstraction is likeebola; it makes my eyes bleed.— Christer Ericson",
"Premature optimizations can be troublesome to revert, but prematuregeneralizations are often near impossible.— Emil Persson",
"Premature optimization, that's like a fart. Premature abstraction is liketaking a dump on another developer's desk.— Chris Eric",
"Normal people believe that if it ain't broke, don't fix it. Engineers believethat if it ain't broke, it doesn't have enough features yet.— Scott Adams",
"If you give someone a program, you will frustrate them for a day; if you teachthem how to program, you will frustrate them for a lifetime.— David Leinweber (NOWS)",
"And don't EVER make the mistake that you can design something better than whatyou get from ruthless massively parallel trial-and-error with a feedback cycle.That's giving your intelligence <em>much</em> too much credit.— Linus (http://tinyurl.com/2kkl77)"
]