Starting with Ruby

Recently I was digging through the many PDF and other ebooks that I have purchased and found Learn to Program by Chris Pine. The book has a publication date of 2011, but I have no idea when I bought it, so I started looking into it. Rather than a philosophical approach to programming, it introduces the reader to programming with Ruby. As with nearly all introductory books, this one is easy to get moving with. The concepts are almost universal, so I have been making nice progress. However, Python is what I really need to be working on.

A blurb I read somewhere claimed that Ruby draws on the best of Perl, a language I never touched, but I once read it was developed by a linguist, which explains some of its quirks. Since I once studied linguistics, that made me chuckle. All the same, the linguistic basis might explain some of the nifty string methods in Ruby.

Oh, I also upgraded the default Ruby installation on Mac OS X to 2.5.0. I picked up some nice gems, too.

Add Tab-Autocompletion to Terminal

For my internship, I have been learning Python, particularly v2.7.11, with Learning Python the Hard Way, various online resources, and a couple of books. Usually I do my work in my office on a Windows machine, on which I typically use Spyder and Windows PowerShell—how had nobody ever heard of it?—for Python.

At home, in the past, I have used the text editor BBEdit to write the Python code and IDLE. Now I am trying to copy what I do in the office, which led me to discovering that Mac OS X' Terminal does not have tab-autocompletion enabled by default. A travesty!

Thankfully, has very helpful page that explains how to add tab-autocompletion functionality and make Terminal far more useful.

Trip to San Carlos, Sonora State, Mexico

My current internship began May 23rd, but It began with PTO (Personal Time Off) for my expected period, so I took some to have a five-day Memorial Day weekend in San Carlos, Mexico. My friend and I had planned it months before I came to Tucson. We loaded his truck and 16.5-foot boat with everything we could and set off for the border at 5:30 am. Around 8, we exchanged money on the US side then crossed over.

The drive was on much better roads than I had expected, but there were very few shoulders along the way. We passed a road crew assaulting a section with a pick axe, picked up a hitchhiker and let him sit in the truck bed, saw a fatal traffic accident with the dead body covered with a blanket, and were accosted by squeegee boys in Hermasillo. Some towns looked quite decent, while others were bleak. I heard how the Federal police patrol the highway during the day and conceal their faces to avoid being identified and killed; at night, the gangs control the road.

Arrival in San Carlos was uneventful until we started to make a wrong turn. The police car behind us honked but my friend the driver kept going anyway, whereupon the police pulled us over. They said we were going downtown, but 200 pesos solved that problem. My friend did make a mistake, so it was not a simple shakedown. We then launched the boat in the marina without incident.

Over the next couple of days, we made five dives and cruised up and down the coastline. While he spent every night sleeping on his boat, I slept on the back of a larger boat owned by one of his friends. In the course of my dives, I saw a sea lion swim about us, watching; many small beige rays and one large manta ray that had not tried to cover itself in sand; countless spires of kelp around 8'–10' tall; a lamprey eel in its recess and another large leopard-like eel; many starfish and various sea fans and other things. Perhaps the most amazing encounter was with two breaching orcas that later followed our boat, one approaching so class to the small boat's rear ladder that it seemed as if it wanted to come aboard; it rolled onto its side so we could see it eyeballing us, after which it slipped beneath the waves and disappeared.

It was a very good time, and I look forward to returning once more.

To Pay the Duck

Since developing a friendship with a Brazilian EE professor, I have been spending time each day on Duolingo to learn a bit of Portuguese. I also read some Brazilian news and follow the ongoing protests for the removal of sitting president Dilma Rousseff. Today I encountered the expression to pay the duck, which is mentioned in this article.

Exactly how it's said in Brazilian Portuguese, I have yet to confirm, but perhaps it is pagar o pato.

Free Online Spanish

For some months now I have been putting in a few minutes most days to study Spanish. Since I am a student, I do not want to use money. Instead of taking Spanish classes or investing in Rosetta Stone, I use Duolingo.

Like many free sites, Duolingo requires that you set up a free account. A number of European languages are on offer: English, French, German, Italian, Portuguese (Brazilian), and Spanish. My Peruvian friend says the Spanish audio bits were recorded by Mexicans. Regardless, Duolingo offers basic conversational lessons through sessions that combine dictation, translation, and narration. Instead of using the desktop interface, I practice on my iPod with the free Duolingo app, which tracks my progress, sends reminders, and let me see how friends are doing on their Duolingo languages.

For a free program, it all seems quite well done. The iOS app often crashes after every two 12-question practice block; I just reopen the app. My only real gripe is that the practice sessions tend to focus on your most recent lesson's content; if you hope to get some vocabulary or grammar from 8 lessons back, you'll probably have to work through a recent practice before an older content practice lesson is served.


The other day an English student had a bag of M&Ms out. We were helping ourselves to them when he announced that they are quite morish.

Since the letters didn't appear in the air, I initially thought he meant "Moorish," but I was perplexed at the connection. Then I realized he meant "makes you want it more." Despite having worked with a number of Britons in Japan, I hadn't recalled hearing that. When I asked him whether it were a Britishism, he laughed and shrugged his shoulders.

He did acknowledge it had nothing to do with Moors, moors, or even mores.

Mathematicus Interruptus

math•e•mat•i•cus in•ter•rupt•us |'mæθ•ǝ•'mæt•ɪ•kǝs ɪntɜ:ʳ•'rǝpt•ǝs|
1: an interruption of any mathematical process that can subsequently not be provided with a solution: The sudden ringing of a cell phone resulted in temporary mathematicus interruptus during the calculus exam.
2: the frustration that results from mathematicus interruptus, whether voluntary or not: For question number two, we were only required to set up the equation, not solve it, which caused me such intense mathematicus interruptus that concentrating on other questions became more difficult.