It's just a tool

Previously: [Part 1][programming1], [Part 2][programming2], [Part 3][programming3], and [Part 4][programming4].

I received an interesting question the other day from a recruiter:

> Would you be open to moving away from PHP?

My answer:

First, by analogy. I’m a photographer, most of the cameras I own are manufactured by Nikon. This is like asking if I’m open to using a Canon.

I happen to be very adept with using a Nikon. However, I don’t think [the photons bouncing around care much what logo sits on front of the camera][camera purchasing] they are in. I’d be a poor photographer if what I did was care about the brand of camera I carry instead of the picture I am taking.

PHP is designed to solve one problem: the web problem. It solves it very well—as evidenced by marketshare and its continuing durability. At nearly all other stuff, PHP happens to suck at.

However it (the web problem) [isn't that difficult] of a problem (having been solved repeatedly by languages such as Ruby, Python, C, C++, Java, Javascript, etc.). The real difficult parts are invariably outside the “web problem.” (Example: Twitter’s web problem was solved in Ruby using Rails, but their real problems were not web problems and of those problems, the most prominent was solved in Scala.)

I happen to be very adept at PHP. That pretty much means knowing that there is a better tool than to use PHP to solve the problem at hand at hand, and using that instead of PHP: MySQL, Apache, memcached, MongoDB, CouchDB, Scala, Erlang, Puppet, CruiseControl, AWS, etc.—none of which, to my knowledge anyway, written in PHP.

I’d be a poor programmer indeed if I thought that the problems I solved cared much the language I was adept in.

I’m not a poor programmer.

The Short answer: “Yes. Depends on the problem and the existing environment.”

(Recruiter was amused by my answer because he was owns a Canon. I suggested we “get on either side of the street and start making threatening dance moves at each other like [the Jets and the Sharks][west side story].”)

Another question I got:

> Which do you think is better [some programming language] or [another programming language]?

My answer:

They’re just tools. That’s like asking a handyman which they think is better: a hammer or a screwdriver.

(That elicited a laugh.)

Using a programming language is simply [a choice][making choices]. There are many things that go into making a correct choice that are far beyond what language one prefers for a problem that happens to be not that hard to solve in the first place.

[programming1]: http://terrychay.com/article/learning-programming.shtml “Learning Programming Part 1: 5 million”
[programming2]: http://terrychay.com/article/learning-frameworks.shtml “Learning Programming Part 2: Programming Frameworks”
[programming3]: http://terrychay.com/article/learning-programming-part-3-c-cplusplus-superiority.shtml “Learning Programming Part 3: C/C++ superiority”
[programming4]: http://terrychay.com/article/programming-is-hard.shtml “Learning Programming Part 4: “Programming is Hard””
[camera purchasing]: http://terrychay.com/article/camera-purchasing-aphorisms.shtml “Camera purchasing advice”
: http://terrychay.com/article/is-ruby-the-dog-and-php-the-dogfood.shtml “Is Ruby the dog and PHP the dogfood?”
[making choices]: http://terrychay.com/article/simple-prescriptions-and-making-choices.shtml “Simple prescriptions and making choices”
[west side story]: http://en.wikipedia.org/wiki/West_Side_Story “West Side Story—Wikipedia”

Scrivener Ninja

I recommend [Scrivener][] as **the** application for doing long-form writing. But since I’m no longer in academia and I don’t write creatively, I don’t often use the program—unless my blog articles run away from me. (Besides, my [vim][macvim] keybinding addiction is enabled by [QuickCursor][]). Even when I do, it is pretty much limited to its [MultiMarkdown][] export to HTML for notetaking.

The other day, I noticed they added a tutorial document to the application itself. I decided to go through it.

Scrivener Tutorial
This screenshot shows both normal and “smart” collections, split screens with audio dictation handling, custom templates with custom icons, and that I love my boo :-)

Very cool. I learned a lot that I didn’t get (not) slogging through the complete(ly boring) user manual.

Now if only if I can figure out some reason to actually use the program… :-D

[Scrivener]: http://www.literatureandlatte.com/scrivener.php “Scrivener—Literature and Latte”
[QuickCursor]: http://www.hogbaysoftware.com/products/quickcursor “QuickCursor: Your Text Editor Anywhere for Mac—Hog Bay Software”
[MultiMarkdown]: http://fletcherpenney.net/multimarkdown/ “MultiMarkdown”
[macvim]: http://code.google.com/p/macvim/ “macvim: vim for the Mac”

PhotoAdvent

Last year, I decided to do a fun project with me and 25 of my closest friends called PhotoAdvent. It was a shameless copy of PHPAdvent, but wherever you see “PHP” you replace it with “Photo” — I even swiped (with permission) their theme from the previous year (delta writing it by hand because apparently they don’t use WordPress to do PHPAdvent and I have to support the mothership.)

In any case, this year I contributed an article. Let me tell you it was work convincing the curators at PHPAdvent to accept my submission. But after an intense lobbying campaign with the other two editors, we finally posted it.

PETS: Reflections of the Internal | PhotoAdvent
Four out of five Scrooges agree, this is worth reading.

So read it or die! And when you are done, you better tweet it or share it on Facebook, or I will get Gibson to CUT YOU! (No, I do not declaw my kittehs.)

Oh yeah…Happy Holidays!

Take your best "Take"

The folks at [Popular Photography][popphoto] recently published an introductory book, [Take Your Best Shot][tybs]. Since I like introductory works, and I wanted to test what a photography books look like in digital form, I purchased it on my iPad through Apple’s iBooks.

By tip 5, I was confronted with a familiar scene:

Excerpt from "Take Your Best Shot"

I lived in SOMA for a couple years. In fact, I’ve photographed this same scene before (on an SD card that got corrupted), so I made a mental note that next time I was there with a camera, to have another (and my own) take on this “take”. Because [I was visiting Yerba Buena Center for the Arts to see my cousin and her son][ybca post], I had a camera with me, though not the right lens or equipment. That never stopped me.

SFMOMA from the terrace
SFMOMA from the terrace
Yerba Buena Gardens South of Market, San Francisco, California

Nikon D3, Nikkor 24-70mm f/2.8G
9 exposures @ ƒ9, ISO200, 24mm

Handheld, and in a rush to catch up to my nephew, I set my aperture to something non-diffractive and eyeballed the hyperfocal distance with my autofocus and held down the shutter for a bracketed exposure.

Even though I’d have much preferred a wider-angle lens, and the most-level bracket had to be chucked due to ghosting, you’ll notice from my take on the “take” shows I much prefer portrait-oriented landscapes. I find [foreground interest][symmetrical comp] contains details often lost in landscape-mode. It also forces the eye to follow much more rigidly down a path toward the background creating a more dramatic image (which I encouraged with post-processing).

(An added benefit: landscape is the way your eyes sees the world, flipping your camera to portrait-orientation forces you (and the viewer) to see the world differently.)

Next time you are out-and-about with a camera and see a familiar scene. Try to copy what someone else did, then have your own take on their take. You’ll be pleasantly surprised.

(BTW, I have an iPad subscription to Popular Photography Magazine through Zinio. Always have a subscription to one magazine on photography, just to inspire you.)

[tybs]: http://www.amazon.com/gp/product/1616281219?tag=terrychay-20 “Purchase Take Your Best Shot on Amazon”
[popphoto]: http://www.popphoto.com/ “Popular Photography Magazine”
[ybca post]: http://terrychay.com/article/her-phone-has-more-levels.shtml “Her phone has more levels”
[symmetrical comp]: http://terrychay.com/article/symmetrical-compositions.shtml “Symmetrical compositions”

Notes from Checklist Manifesto

In Montreal this summer, while making idle conversation, [Paul][paul reinheimer] asked me if I had read anything interesting. Here was my answer…

Five years ago, I met [D. Richard Hipp][richard hipp] because my friends were thinking of bundling a database he wrote into PHP. Since that time, besides being in the PHP core and thus about 40% of the web servers on the planet, [SQLite][sqlite] is in every smartphone, in software such as Firefox, platforms such as Adobe AIR, and operating systems such as Apple Mac OS X. It is used by Oracle and Bloomberg.

I was curious how the unassuming man I met took the new-found fame of his pet software project. This is why, despite my hatred for all things database—they’re boring and talks about them are probably what it feels like to sit through a course on actuarial accounting—I popped into [his talk at OSCON][oscon talk].

I was glad I did. It was about, of all things, [checklists][checklist new yorker].

[paul reinheimer]: http://blog.preinheimer.com/ “<?paul”
[richard hipp]: http://www.hwaci.com/drh/ “Home Page for D. Richard Hipp”
[sqlite]: http://www.sqlite.org/ “SQLite”
[oscon talk]: http://www.oscon.com/oscon2011/public/schedule/detail/18779 “Saving Time and Improving Software Quality Using Checklists—OSCON 2011″
[checklist new yorker]: http://www.newyorker.com/reporting/2007/12/10/071210fa_fact_gawande “The Checklist—Atul Gawande @ New Yorker”
[checklist manifesto]: http://www.amazon.com/gp/product/0805091742?tag=terrychay-20 “THe Checklist Manifesto: How to Get Things Right”

My brother and father are much more responsible than my mom and me. One things that separates them from us was in their methodical use of checklists. Watching his talk reminded me how important they are, how they can be used for so much more than I considered, and how thankful I was that I finally made a packing checklist before going to Portland (and Montreal). :-)

[Read the article][checklist new yorker], and, if that interests you, [buy the book][checklist manifesto].

With a little imagination, a checklist will change your life. Continue reading my notes from the book after the jump→

The Thunderscan story

I’m surprised I never got around to mentioned this, when [I promised I would][nans second story]. Since it’s been years, go back and read it, and come back. I’ll wait.

In high school, I owned a [Thunderscan][Thunderscan]. For those of you too lazy to click on the link, this was a device that would digitize photos by replacing the ink cartridge of your ImageWriter, [a dot-matrix printer][dot-matrix printer], popular with Macintosh computers of the era.

(For those of you too young to remember what a dot-matrix printer is: in the old days, our printers were slow enough that you could watch an episode of *[Cheers][Cheers]* waiting for it to print out an article or “graphics” —the latter of which was whatever came out of [Print Shop][theprintshop]. And they were so loud, that a popular accessory was huge muffled box to place the printer in, in order to contain what can only be described as the primal periodical scream of the then nascent personal computer, “Why the f*&k do I have to be tasked for the next half our printing up a sinfully ugly banner for [your terrible P.T.A Yard Sale][review the print shop]?”)

Now imagine something that did the reverse (put print into the computer) by scanning it line by line. And realize that a typical “line” of text back then was actually 24 “lines” to this scanner.

This was a Thunderscan.

Continue reading The Thunderscan story after the jump→

Glom

I found [this comment][megan] amusing:

> Finally, [[Megan McArdle][megan mccardle]] as an approximately 6’ tall, moderately attractive woman — who likes guns — libertarian, objectivist, and conservative fan-bois glommed on to her like a million sperm all trying to fertilize the same egg, which provides its own kind of mockworthy spectacle

The college I went to had a 6:1 guy:girl ratio at the time. Being an institute full of socially stunted nerds just like me, they had their own word for when multiple guys talking to or associating with a single girl: “glomming.” While it has morphed beyond its original meaning—it is short for “agglomeration”—it has become part of our [urban dictionary][urban glom], and the above example shows it in its original definition.

One day during Rotation, I was hanging out on the Triple on the second floor, and watched “glom pools” forming around the night’s new batch of [Freshman][frosh] girls in the dorm’s courtyard below. The image of “a million sperm all trying to fertilize the same egg” is an especially apt description. I can trace a direct line to [my intense shyness][shyness] [around women][photographing women] to that singular and instructive moment.

– **glom** *v.t.* to accost a girl who is already surrounded by multiple guys
– **glommer** *n* a male who gloms serially
– **glom pool** *n* an aggregation of many guys around a single girl

Oh yeah, if any Techers at the time are wondering about all the hacked copies of [CrystalCaltech Quest][crystal quest] on campus—the one where [ResEdit][resedit] to add Caltechisms like the infamous and indestructable “glom monster” toward the end? That was me.

[megan]: http://www.balloon-juice.com/2011/11/15/open-park-and-open-thread/#comment-2878747 “Open Park and Open Thread—Balloon Juice”
[megan mccardle]: http://en.wikipedia.org/wiki/Megan_McArdle “Megan McCardle—Wikipedia”
[urban glom]: http://www.urbandictionary.com/define.php?term=glom “glom—Urban Dictionary”
[frosh]: http://www.urbandictionary.com/define.php?term=frosh “frosh—Urban Dictionary”
[photographing women]: http://terrychay.com/article/photography-and-the-social-wave-function.shtml “Collapsing the female wave-function”
[shyness]: http://terrychay.com/article/ruby-photography-women.shtml “Ruby, Photography, and Women”
[crystal quest]: http://en.wikipedia.org/wiki/Crystal_Quest “Crystal Quest”
[resedit]: http://en.wikipedia.org/wiki/ResEdit “ResEdit—Wikipedia. Hacking the game became so popular, they created their own tool which they built into later editions of the game.”

Crunchy granola-eating rib cages just asking to be nudged with a baton

Stephen Colbert finds his humor best, when people are at their worst:

It’s amusing to read right wing defenses of these actions. My personal favorite is “the clip is too short”—as if [you can't use the googlez][occupy cal] to find that the full clip is even worse.

Another interesting one is that this is okay because Berkeley “accepts about 10-12% public money (or 88-90% private).” A cursory use of the google shows that they’re one quarter state funding. The other three quarters are from public AND private funding. For instance, any professor who brings in a grant (most grant, but not all, are publicly funded), has about 40% siphoned off by the university as overhead. This has always been the case. The university is also supported by [a $3.15 billion endowment][berkeley endowment].

(State funding used to be a much higher percentage of Cal’s budget, but was cut by the governator so the state could keep its prisons. The [largest single private grant to the university][bp grant] was done by [the hippies at British Petroleum][oil spill]. Those two facts explain why the “powers that be” at the University of California tacitly approved of these actions and [the one in 2009][2009 budget crisis].)

No matter, the discussion of “public” vs. “private” with respect to speech is a red herring. The [Free Speech Movement][free speech movement], which began in exactly the same place, settled this matter. Arguing that “pitching tents” is a bridge-too-far isn’t really going to save a lost cause when videos of your police dragging people by the hair and beating 4’10” asian girls in the stomach are going viral on the intarwebs.

But perhaps the most damning argument comes from [this observation][observation]:

> If we were to view the actions of police as Americans watching people attempting to gain their rights in a foreign country, we would find them appalling. Yet somehow there are those in this country who are all too happy to deny rights afforded to all Americans under the Constitution. The right of peaceful assembly is guaranteed and those who seek to deny them are ignorant of this “fact.”

Whether or not it is legal to “nudge with batons” to take down some students’ tents, it is clear what is right—which is why, I suppose it, [is a Right][first amendment].

> “The individuals who linked arms and actively resisted, that in itself is an act of violence.
> —[UC Police Capt. Margo Bennet][use of batons]

> It is unfortunate that some protesters chose to obstruct the police by linking arms and forming a human chain to prevent the police from gaining access to the tents. This is not non-violent civil disobedience.
> -[UC Berkeley Chancellor Robert J. Birgeneau][chancellor letter]

Good luck with that line of thought. [Bull Connor approves][Birmingham campaign]!

Clearly these people needs to be “nudged” in the rib cage by a police baton.

[chancellor letter]: http://newscenter.berkeley.edu/2011/11/10/message-to-the-campus-community-about-occupy-cal/ “Message to the campus community about ‘Occupy Cal’—UC Berkeley News Center”
[2009 budget crisis]: http://budgetcrisis.berkeley.edu/?page_id=1949 “Nov-Dec ’09 News—UC BErkeley Budget Crisis”
[occupy cal]: http://www.youtube.com/watch?v=buovLQ9qyWQ “Occupy Cal 11/9/11 PART 1—YouTube”
[free speech movement]: http://en.wikipedia.org/wiki/Free_Speech_Movement “Free Speech Movement—Wikipedia”
[observation]: http://www.mediaite.com/online/stephen-colbert-mocks-u-c-berkeley-campus-police-for-attacking-occupy-protesters/
[first amendment]: http://en.wikipedia.org/wiki/First_Amendment_to_the_United_States_Constitution “FIrst Amendment to the United States Constitution—Wikipedia”
[use of batons]: http://www.sfgate.com/cgi-bin/article.cgi?f=%2Fc%2Fa%2F2011%2F11%2F11%2FMNH21LTC4D.DTL “UC cops’ use of batons on Occupy camp questioned—SFGate”
[Birmingham campaign]: http://en.wikipedia.org/wiki/Birmingham_campaign#Fire_hoses_and_police_dogs “Birmingham Campaign—Wikipedia. Bull Connor. “When the students crouched or fell, the blasts of water rolled them down the asphalt streets and concrete sidewalks.[68] Connor allowed white spectators to push forward, shouting, “Let those people come forward, sergeant. I want ‘em to see the dogs work.”.”
[bp grant]: http://berkeley.edu/news/media/releases/2007/02/01_ebi.shtml “BP selects UC Berkeley to lead $500 million energy research consortium with partners Lawrence Berkeley National Lab, University of Illinois—Berkeley. I like this article because it tells me that in 2007 one of my physics/math professors is chief scientist at BP. Smart guy but he always was an asshole, so I’m not surprised.”
[oil spill]: http://en.wikipedia.org/wiki/Deepwater_Horizon_oil_spill “Deepwater Horizon oil spill—Wikipedia”
[berkeley endowment]: http://www.berkeleyendowment.org/ “Berkeley Endowment Management Company”

Last-Place schadenfreude is short-lived

It is said that the reason many poor are opposed to social programs that benefit them is [a fear of coming in “last.”][last place aversion]

If that is the case, the [impending implosion of the euro][euro ends], as [predicted for years by center-left economists][can europe be saved], offers a marked example of schadenfreude for us Americans.

Besides the obvious worry over whether the death spiral will reach our shores, there’s the question of how [Rupert-Murdoch-on-steroids][sylvio berlusconi] could run the third largest European economy (7th largest in the world) into the ground, what’s with right wing obsession with inflation in times of deflationary spirals, and why this prediction seemed to only have been made by liberals.

So my thinking is our laughter has a touch too much nerves.

[last place aversion]: http://www.scientificamerican.com/article.cfm?id=occupy-wall-street-psychology “The “Last Place Aversion” Paradox—Scientific American”
[euro ends]: http://krugman.blogs.nytimes.com/2011/11/09/this-is-the-way-the-euro-ends-2/ “This is the way the Euro ends—Paul Krugman @ New York Times”
[can europe be saved]: http://www.nytimes.com/2011/01/16/magazine/16Europe-t.html?_r=1&pagewanted=all “Can Europe Be Saved?—New York Times”
[sylvio berlusconi]: http://www.guardian.co.uk/commentisfree/2011/nov/09/silvio-berlusconi-italy-great-procrastinator