Skip to content

Instantly share code, notes, and snippets.

@denis-bz
Created September 14, 2015 10:15
Show Gist options
  • Save denis-bz/220587f031e726ed4c4a to your computer and use it in GitHub Desktop.
Save denis-bz/220587f031e726ed4c4a to your computer and use it in GitHub Desktop.
Several dozen cookies: e.g. `random-paragraph cookies` in your `.login`
source less-or-grep.sh # this file -> less, file 'pattern' -> egrep
Alice: "Would you tell me, please, which way I ought to go from here ?"
"That depends a good deal on where you want to get to," said the Cat.
"I don't know where ...," said Alice.
"Then it doesn't matter which way you go," said the Cat.
On the planet Earth, man had always assumed he was more intelligent than dolphins
because he had achieved so much -- the wheel, New York, wars and so on --
while all the dolphins had ever done was muck about in the water having a good time.
But conversely, the dolphins had always believed they were far more intelligent
than man -- for precisely the same reasons.
-- Adams, Hitchhiker's guide to the galaxy
What problem the suggestion is designed to solve, and how it actually helps to solve it
If the English language made any sense, lackadaisical would have something
to do with a shortage of flowers.
I won't deny that plenty of people may have published peer-reviewed papers using
such a model, but it's still wrong and not defensible for use in any realistic study.
This section is quite technical and can be skipped by the disinterested
or intimidated reader.
-- Hastie p. 167
I have never worked on an open source project before
so I'm not exactly sure what I'm doing.
-- scipy-dev apr 2012
It is well to remember that there are five reasons for drinking:
The arrival of a friend;
one's present or future thirst;
the excellence of the wine;
or any other reason
Its ecosystem of unsupported modules provides many specialized features
This is not secret knowledge. It’s just secret to this pop culture.
-- Alan Kay
[Numerical Recipes] is intended as a cookbook for cooks,
not a restaurant menu for diners.
Q: What is the difference between a hypothesis and a theory?
A: Think of a hypothesis as a card. A theory is a house made of hypotheses.
counselor: Fine, fine. But do you, do you have any qualifications?
Anchovy: Yes, I've got a hat.
counselor: A hat?
Anchovy: Yes, a hat. A lion taming hat. A hat with 'lion tamer' on it. I got it
at Harrods. And it lights up saying 'lion tamer' in great big neon letters, so
that you can tame them after dark when they're less stroppy.
1. Ask the right questions. The more specific the question,
the better targeted and more relevant the responses will be.
2. Ask the right people. Creating opportunities for self-selection
allows expertise to find the problem.
like ... could have been, if not for the voting system's inherent bias against
material that requires thought and time to evaluate and appreciate
The main idea is to have a declarative file which can fully describe
all that's needed for most packages, and have a stable and specified
interface with real build systems like make/scons/waf for the others.
-- Cournape
The needless diversity problem:
a large community of talented people can come up with a dozen prototype
solutions to a problem very quickly.
But reducing the dozen to two or three takes forever
like banging rocks together and being proud that you've re-derived fire
from first principles
A C, an E-flat, and a G walk into a bar.
The bartender says, “Sorry, but we don't serve minors.”
What's grey? A melted penguin
A triangle was an improvement to the square wheel. It eliminated one bump.
-- BC
graphics is for showing the obvious to the ignorant
Someone else will now explain why this is a terrible idea
only free if your time is worthless
The list of deleted features in this standard is empty.
-- Fortran 90
Democracy is three wolves and a sheep voting on what's for dinner
The client wants something that is significantly superior to the competition.
But if superior, it cannot be the same, so it must be different
(typically the greater the improvement, the greater the difference).
-- Jef Raskin, Intuitive equals familiar
Whenever something can be done in two ways, someone will be confused.
Whenever something is a matter of taste, discussions can drag on forever.
-- B. Stroustrup
preference of one technology over another
oftentimes has to do with the developers' age.
"The journey was quite beyond individual enterprise,
though a surprising number of visionaries, romantics, and crackpots
at least began it."
-- Bernard DeVoto, Across the wide Missouri
I take no offense at your attempts to insult me.
How does your obfuscatory behavior in any way support your technical points?
Every scientist I know has trouble keeping track of what parameters they used
last time they ran a script
Anarchy is not chaos, but order without control
I'd rather write programs that generate doc, than write doc
Drawing on my fine command of language, I said nothing
The concept of NIH was actually invented at Bell Labs in the late fifties.
[matlab] makes it easier for beginners,
but once you hit the wall, you hit it very hard
Many individuals with little more knowledge than the dismal average
seem to find it hard not to imagine themselves to be colour experts.
I hope I have avoided this syndrome myself, and I offer this work
in the hope that others by their comments and criticisms will assist
its author in its continual improvement
-- David Briggs, huevaluechroma.com
A lot of designing [programming languages] is not so much about,
"What's a cool feature? What fits some fancy academic criteria?"
It's really about, "What fits with the developers?"
... one of these things where a lot of people feel like,
"If only the rest of the world was educated enough to understand
what this is about, they'd be better off."
And I actually kind of agree with that.
The problem is that most of the world could actually care less.
-- James Gosling
Begin by making a first take of the entire work with all its movements,
then listen to it.
-- Charles Rosen
This advisory may constitute "too much information".
Readers who are easily panicked or confused may be needlessly
panicked or confused by this advisory.
-- mac math.h
Bloomberg's Law of Complexity:
the state of technology at any time is as complicated as it possibly can be
and still mostly work.
This explains the ever-increasing complexity of languages like C++ and
operating systems like Windows. A corollary to the law of complexity is:
if something can be added, it will.
-- leptonica.com/design-principles.html
If I were being charitable, I would say that they are instructions
written by man who is excited by the possibilities of his project
and is documenting what it intends to become
(and is currently, under certain conditions, namely his).
Speaking as an ex-hardware designer, I'd like software components
to have pins around their edges, like ICs, so they can be 'wired up',
but otherwise should be well behaved.
-- Sarah Thompson, sigslot.sf.net
When [] takes the time to actually explain things,
the book is very interesting.
nVidia or ATi make magic smoke.
Magic smoke is compressed and placed carefully into FPGA.
If the smoke gets out, it doesn't work any more.
Overclocking your smoke increases the risk of it getting out.
2005 will probably be remembered as the year when the graphics
companies went crazy and released more power graphics than 99,9%
of the user base needs (it may be useful in workstations, but the
game development lags behind this crazy tempo of new releases.)
-- history of computer graphics, hem.passagen.se
If it's going to cost you an hour,
make sure it saves somebody more than an hour,
and make sure the savings isn't "someday over the rainbow."
-- Marshall Cline, c++-faq-lite
My long search had not been in vain. It had led me to a full appreciation
of the UML, this admirable self-feeding machine, devoted from A to Z to
the creation of a new market, free of any of the difficulties associated
with the unpleasant business of software development: UML books! UML
courses! Courses on the books! Books on the courses! Books on the books!
Introductory courses to prepare for the advanced courses! Courses for those
who teach the courses! Revisions! UML journals! Conferences! Workshops!
Tutorials! Standards! Committees! T-shirts! The more you think about the
possibilities, the more dazzling they look. And for any reader brave or
bored enough to read the documents to the end, the grand scheme is all
there, laid out in the final paragraph
...
Everything was coming into place. With the air of inevitability that reveals
the genuine masterpiece, in all the glory of the document's inimitable
style, the last six lines suddenly gave sense to the hundreds of vacuous
pages before them:
-- Bertrand Meyer, The Positive Spin
The idea for information design is: Don't get it original, get it right.
-- Edward Tufte, April 27, 2001
The idea is to find important problems that can be solved.
-- Edward Tufte, December 17, 2006
The maintenance of ___ has slowed down, because I am currently (desparately)
looking for employment. But once I've found new employment and living quarters
and settled in, I will continue to enhance ___ in my spare time.
I was told that at CMU once upon a time, the computer-science TAs
would have a teddy bear outside their office, and before you could ask
the TAs a question about a bug, you had to ask the bear.
And darn if the teddy bear didn't answer about half of the questions...
[Richter] gave up composition shortly after moving to Moscow.
Years later, he explained, "Perhaps the best way I can put it
is that I see no point in adding to all the bad music in the world".
Optimizing two things at once -- food vs. money, work vs. play --
requires an arbitrary tradeoff or weighting
cf. wikipedia Bounded_rationality
#!/usr/bin/env python2
""" print a random paragraph from the input file """
# paragraphs delimited by empty lines
import random
import re
import sys
if len(sys.argv) > 1:
filename = sys.argv[1] # your file
else: # random-paragraphs/../cookies
filename = re.sub( "[^/]+$", "cookies", sys.argv[0] )
alllines = open( filename ).read()
paragraphs = re.split( r"\n\n+", alllines ) # ["p0" "p1" ...]
irand = random.randint( 0, len(paragraphs) - 1 )
print paragraphs[irand]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment