Goodbye, WordPress

WordPress is really great. But when you are a programmer, nothing beats Git + Markdown + YAML metadata for a blog 🙂

My professional home page is: http://www.cirosantilli.com and I am collecting beautiful things at: https://github.com/cirosantilli/art

May you continue to serve Millions of non programmers as well as you have served me, WordPress.

RIP

Arecibo message

http://en.wikipedia.org/wiki/Arecibo_message

Shot at the “How to communicate with aliens” problem.

Minimum light response time: 50k years.

Neat techniques used:

– message is 23 x 79 (both primes), meaning that there are only two ways to make it into a rectangle. Using the wrong direction makes it clearly jumbled.

– human height encoded relative to wavelength of message

– solar system simplified representation. Drawing of human stands on top of earth representation.

Eduardo Saverin

http://en.wikipedia.org/wiki/Eduardo_Saverin

Facebook cofounder and billionaire. Fun facts:

– Saverin took advantage of Brazil’s lax insider trading regulations and made $300,000 via strategic investments in the oil industry.

– he renounced his U.S. citizenship; the citizenship change may have reduced the capital gains taxes Saverin would have paid after the Facebook IPO.[7][20] In response, Senator Chuck Schumer introduced the Ex-PATRIOT Act, which could have prevented Saverin from ever entering the U.S. again, but the bill died in committee.

Tomatos and Persimmons

In Chinese, tomatoes are literally called Red Persimmons from the West (西红柿 = West + Red + Persimmon). This is so because persimmons are native from China, where they are simply called (柿子), where 子 only indicates that  the grammatical class of the word is noun (and not, say, verb).

Origin of the term kike

Derogatory term used to refer to the Jews.

Origin according to wikipedia:

The word kike was born on Ellis Island when there were Jewish immigrants who were also illiterate (or could not use Latin alphabet letters), when asked to sign the entry-forms with the customary ‘X,’* refused, because they associated an X with the cross of Christianity, and made a circle in its place. The Yiddish word for ‘circle’ is kikel (pronounced KY-kul), and for ‘little circle,’ kikeleh (pronounced KY-kul-uh). Before long the immigration inspectors were calling anyone who signed with an ‘O’ in place of an ‘X’ a kikel or kikeleh or kikee or, finally and succinctly, kike.[2]

glibc abort

Excerpt from the glibc manual found here:

Future Change Warning: Proposed Federal censorship regulations may prohibit us from giving you information about the possibility of calling this function. We would be required to say that this is not an acceptable way of terminating a program.

Explanation: a joke about the extreme sensitivity of the abortion issue on the US.

stackoverflow upvotes

sometimes, it is not your most important post that gets your repo up…

stuff that really helps:

– important subjects that everyone uses like git or vim

– the top answer is incorrect/incomplete. People will upvote you untill your answer overcomes the other one

sheakespeare king lear have more than thou showest

http://nfs.sparknotes.com/lear/page_56.html 105

FOOL

Mark it, nuncle.
Have more than thou showest,
Speak less than thou knowest,
Lend less than thou owest,
Ride more than thou goest,
Learn more than thou trowest,
Set less than thou throwest,
Leave thy drink and thy whore
And keep in-a-door,
And thou shalt have more
Than two tens to a score.

FOOL

Listen up, uncle.
Have more than you show,
Speak less than you know,
Lend less than you owe.
Ride more than you walk,
Don’t believe everything you hear,
Don’t bet everything on one throw of the dice,
Leave behind your booze and your whore,
And stay indoors,
And you’ll end up with more
Than two tens to a twenty.

Film lists to quench your film thirst

Top 100 AFI, American only:

http://www.afi.com/100Years/movies10.aspx

Digital dream door films:

http://www.digitaldreamdoor.com/pages/movie-pages/movie_movies.html

Mubi, social film site:

http://mubi.com

Theme lists from Criterion:

http://www.criterion.com/explore

Essential art house (Criterion):

http://www.criterion.com/boxsets/305-essential-art-house-50-years-of-janus-films-50-dvd-box-set

Get a webpage and all the pages it links to for local viewing with wget

wget -r -l1 -p -np -k -nH -P 'outdir' http://www.aaa/bbb.html

#download bbb.html
#-r: recursivelly
#-l1: up to level 1 links, that is, download only the pages imediately linked to by www.aaa/bbb.html
#   (-l1, could be -l2, -l3, ... for nth level links)
#-p: saving all necessary files to view the page locally (images, css)
#-np: not downloading parent directories pages
#-k: converting links in htmls that were downloaded into local links for offline viewing
#-nH: not creating a directory 'www.aaa' as would be default
#-P 'outdir': saving output inside a directory 'outdir', and creating it if it doesn't exist

Synctex forward search example

  1. make a multipage tex document with INPUT_PATH

    INPUT_PATH="/path/to/tex/file/asdf.tex"
  2. compile with:

    pdflatex -synctex=1 "$INPUT_PATH"

    this should generate “asdf.pdf” and the synctex file ( because of -synctex=1)

  3. run synctex as

    synctex view -i 77:1:/path/to/tex/file/./asdf.tex -o asdf.pdf

    77:1 means you are on line 77 column 1 of the tex file, and you want to get the position on the pdf. Note the ugly “/./” between the parent directory and the basename. It must be there!

  4. sample output

    This is SyncTeX command line utility, version 1.2
    SyncTeX result begin
    Output:report.pdf
    Page:2
    x:261.757507
    y:492.330658
    h:255.095062
    v:495.319450
    W:100.061378
    H:13.902562
    before:
    offset:0
    middle:
    after:
    SyncTeX result end

    amongst other things, this is telling you that this position on the tex file corresponds to Page 2 of your pdf.

  5. Now all you have to do is to tell your pdf viewer to open that page. In Okular this would be:

    okular -p 2 asdf.pdf

Reasons to learn the bash command line

Bash suffers from a few disadvantages

  • Linux only
  • quite complicated variable/parameters passing

which in my opinion make python a better choice for anything that is not a one liner.

On the other hand, learning bash and the basic Linux commands can be very useful for a programmer

  • interface. the bash command line contains interface that is widely recognized and that has survived the test of time, meaning that you will be able to understand others programs and create programs that are more easily understandable. For example, if you name a method ‘find’, which does more or less the same as the Linux command, chances are that others will immediately understand and remember this, which is a crucial step to coping with complexity of programs.
  • raw power. some standard bash utilities are so amazingly powerful for the amount of code that you have to write, that it is just worth learning it.