Jalapeño Peppers

I was looking in my archives for a snickerdoodle recipe. Rummaging through those old sites was nostalgic and horrifying. The very first sites were hosted on Earthlink. I don’t even know the URL any more. The later sites have all been on Hurricane Electric.

I pushed the first Red Leopard website out on October 29, 2000 using Microsoft Publisher 98. Yikes! What a dog’s breakfast. Eventually, I migrated to Notepad and by 2002 had a site that I liked. A static site but I liked it. I was horrible at CSS but improved my skills in raw HTML.

When I jumped into Moveable Type in June 2003, I didn’t bring the old material over.

Too bad. It was a simpler time. I wrote about the things that delighted me. Here’s one example, republished from March 2003:

label from a can of Preciosa peppers

Ahhh. The Preciosa brand jalapeño is perhaps the tastiest jalapeño on the market. This is no ad copy. It comes from the heart. I’ve tried every brand of pepper at the mega-Albertsons just down the road. Most of the brands leave me cold but the Preciosa makes my mouth water just thinking about them.

It starts when you open the can. There is this Valdez class oil slick, a green layer of 100% jalapeño flavor covering the bounty. And I don’t just mean flavor like flavor that tickles the taste bud, but that kind of flavor that’s fat and chewy. You poke a cheese stick down in that vat and it comes out looking like a pepper popsicle.

Each pepper has been pickled just right. Not so much that it’s sloppy with no tooth. Not so little that it’s too young and lacks depth. No, these peppers are righteous and wise. Their character is summed in one word: Seasoned.

There is nothing tame about the Preciosa. It is definitely outside the bell curve. If you cannot order “spicy hot” at the local Thai joint, you may want to pass. But if the current can of jalapeños in your fridge has all the excitement of a rice cake, give these diablos a try.

Why I believe I can learn Chinese

Let me tell you. Learning Chinese is damned hard. The character set, the tones, the pinyin phonetic alphabet (which uses latin characters but the characters rarely correlate to English pronunciation), the grammar…

In comparison, learning German was a snap. And German is no snap. I can babble like an idiot in German but I’m understood. I’ve found Germans, Austrians and the Swiss quite accomodating of my linquistic struggles. Perhaps its because they already speak English and can decipher my grammatical gymnastics, translate my mangled vowels, forgive my nouns’ gender jumping. Perhaps English is a piece of common ground.

The highlight of my German-speaking adventures was at a hotel in Vienna. After speaking (strictly in German) for a few minutes, the bar tender asked if I was French. I may still have had an accent but it wasn’t an American accent. A HUGE day for me.

With Chinese, I have yet to gain purchase on terra firma. It often seems as if I were lost at sea, bobbing around like a fishing cork in the middle of the Pacific.

I have a plan.

I draw my inspiration from the essay by Konstantin Ryabitsev, How I learned French in One Year.

He is spot on about the flash cards. Flash cards are vastly underrated. Drill with them until they are grimey with fingerprints. He created his own “flip-card strategy”. I experiment with different approaches. None of them are a waste of time.

When learning the characters, you must also learn the tone that goes with the character and learn the radicals. Drill, drill, drill.

I served in the United States Infantry (1978-1982). We were issued vehicle and aircraft identification cards. Basically, they were flash cards with a silhouette of a truck, tank, helicopter… on one side and info on the other. We were tested periodically. Flash cards work really, really well.

I also use the Yellow Bridge dictionary. It accepts characters, pinyin or english for translation. You can enter the character using the keyboard or ‘draw’ the character with the mouse. I use this in conjunction with Google’s online translator.

My plan is to

(i) continue taking classes at Stanford Univeristy’s Continuing Studies. Taking a class give me a schedule to push me along. And I like school.

(ii) listen to chinese lessons on my iPod. I find it hard to run while listening to chinese but walking is fairly easy.

(iii) flash card drills

(iv) watch DVDs with both Chinese and English with subtitles (no luck so far finding them)

(v) use my account on palabea to practice my writing (like modern day penpals).

I’ve completed a couple of learning annex classes, worked with a tutor and just finished the first introductory course at Stanford. The coming year is my big push to climb out of the sea, up on the beaches and onto dry ground.

The biggest challenge to learning a language is boredom, embarassment, apathy, frustration, resignation. These are the enemies that lurk in the dark corners of the mind. These are the enemies that assault one’s resolve.

What makes me think that I can learn Chinese?

In the words of Winston Churchill, “Never give in. Never give in. Never, never, never, never–in nothing, great or small, large or petty–never give in, except to convictions of honor and good sense. Never yield to force. Never yield to the apparently overwhelming might of the enemy.”

It’s a matter of declaration and conviction. I will speak, read and write Chinese.

Sepia MacWorld

I’m reading the news of Apple pulling out of MacWorld with a touch of sadness. MacWorld Boston is long dead. It was only a matter of time before MacWorld San Francisco ended, too. It makes sense to me.

Consider the history of COMDEX. In it’s heyday, COMDEX rocked. There was excitement, drama, confusion. I attended my first COMDEX in 1991, my last in 2003. Fall COMDEX reigned supreme but I also have fond memories of Spring COMDEX in Atlanta. (Never made the Chicago show).

That last COMDEX was a week of the living dead. Sad. Like the last moments of an ailing pet.

COMDEX was a dealers expo. The conference tracks had more to do with channels than with end user training. It was a time of the backroom demo, of systems companies meeting with component suppliers, of mom and pop shops meeting with distributors. That time is past. Or, at least, has moved offshore.

MacWorld outlived COMDEX precisely because its focus, its purpose was different. Look at the conference tracks. MacWorld is less about refining the channel and reshaping manufacturing supply chains. Its more about the end user. And frankly, MacWorld is Apple’s big show, “Look at me.”

I felt MacWorld 2008–while interesting–was unnecessary. The Apple booth was packed but it was the SAME APPLE BOOTH. Adobe was noticeably scarce. Macromedia had been assimilated. Microsoft was promising big advances in Office 2008. Thankfully, the number of iPod skin vendors was down. It was a nice show. Like a nice visit with your favorite Aunt.

I would rather Apple bow out now at a pleasant MacWorld 2009 than drag out its inevitable death. I would have rather remembered COMDEX 1999 as the last hoorah than witness the emphysemic COMDEX 2003.

The world is changing. Computers are increasingly a commodity product. In the ’80s and ’90s, each year brought amazing new advancements to the relatively crude PC. The ’80s more so. I am lucky to have attended SOG in ‘87. That event wasn’t a show, wasn’t an expo. However, the people who attended were the living soul of personal computing… and the revolution. Everyone I talked to was a gift. Every conversation a revelation. The big shows never had that.

There will still be Apple’s World Wide Developers Conference. Microsoft has the Professional Developers Conference. Adobe has an analogous event for designers/developers with Adobe Max. Intel has Intel Developer Forum. But the PC pioneer days are over.

If you really, really have a need to join La Revolución, there’s still some life left in the penguinistas. But you better hurry. Even Linux World is changing. It’s now OpenSource World. Still, it’s not the same as a computer show. It’s more of a movement.

The era of big shows is past. The personal computer industry has grown up. We now have smaller developer-focused shows. It’s the times we live in. It’s just this way. For now. Who knows what 2020 will bring.

Mandarin Tuesdays II

My Tuesday dancecard is filling up. The first mandarin course has ended and I’m now registered in the next chapter of Mandarin.

Stanford Continuing Studies icon

Beginning Chinese II

“This course is the second of a three-quarter sequence of beginning Mandarin Chinese. It is designed for students with little knowledge of Chinese. With an emphasis on conversation, the course will focus on the acquisition of basic communication skills for travel, business, and everyday use.”

Stanford Continuing Studies
Tuesdays, January 13 – March 17, 7-9 pm

centos l10n problem

Just about the time I believe the UTF-8 beast is in the cage, it escapes and runs amok.

This AM, I started to deploy an update to the webapp on EC2. Seems that some of the static strings in the app contained UTF-8 encoded non-ascii characters. The java compiler barfed. “The heck?”, I thought. I just compiled the app on my MacBook. I checked the usual suspects (tomcat’s server.xml, JAVA_OPTS) but everything looked fine. However, when I looked at the code, it was indeed mangled.

Crap! Was this a bug in CVS? (Yes, we still use CVS). Wait. What if I cut and paste the correct code from my Mac to the Centos server version. No luck. Couldn’t be vi. Trusty old vi. Could it be that Centos is confused? Let’s look:

$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

What the…?

I don’t know what I did but when I created my ec2 image, I must have omitted a step. None of the googled web-geniuses had solved this exact problem but it seems everyone flails about with LANG environment variable.

export LANG=en_US.UTF-8

That did the trick!

$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

A fresh cvs checkout and I was back in business. I don’t feel I completely understand Centos localization configuration. At least I’m aware of it, now.

bash array crawler

I wanted to complement my bash directory crawler post with a bash array crawler example.

Sometimes, it’s easier to jack a list of identifying tokens into an array and process them rather than to build an end-to-end script with database access. For this contrived example, I grab a list of UUID from MySQL with a simple SQL statement.

mysql> SELECT id, uuid FROM icons;
+-----+--------------------------------------+
| id  | uuid                                 |
+-----+--------------------------------------+
|   1 | fe0b16ed-3369-4dda-8e60-faffb966375d |
|   3 | 82bfcbc2-84a2-4ca7-914b-13172b94feb6 |
|   6 | ab5e7265-3698-4205-b081-e6aec528fee2 |
|  11 | 4b6ca26b-c6ed-494f-aeb4-9bf369e2d465 |
|  19 | e7cc807b-7f15-46fa-b1c5-85d1f1050155 |
+-----+--------------------------------------+
5 rows in set (0.00 sec)

Next, jack the tokens into an array and simply crawl over the tokens.

#!/bin/bash

uuids=(
 fe0b16ed-3369-4dda-8e60-faffb966375d
 82bfcbc2-84a2-4ca7-914b-13172b94feb6
 ab5e7265-3698-4205-b081-e6aec528fee2
 4b6ca26b-c6ed-494f-aeb4-9bf369e2d465
 e7cc807b-7f15-46fa-b1c5-85d1f1050155
)

for uuid in ${uuids[@]} ; do

  # do something interesting here
  echo "http://icons.example.com/${uuid}.jpg"

  # curl
  #   --request GET
  #   --remote-name
  #   --url "http://icons.example.com/${uuid}.jpg"

done