Notes from Barcelona: Calçotada

It’s calçots season in Catalonia, and this past weekend I experienced a calçotada.

What the heck is a calçot?

A calçot resembles a thin leek, but it is actually a member of the onion species (allium cepa).

What the heck is a calçotada?

A calçotada celebrates the harvest of calçots with a feast, typically held from early January through early March. The calçots, which are served as the first course, are grilled until their exterior chars and their interior steams perfectly. The calçots are served with romesco sauce, a roasted pepper and almond sauce that is both easy to make at home and delicious.

How does one eat a calçot?

Let’s start with how NOT eat a calçot: with utensils. The first time I encountered calçots, they came as a side dish at a restaurant. I tried to eat them like a regular vegetable, but the charred outer layers were too tough to cut with a knife. I launched one of my calçots onto the floor but on a trajectory that made the neighboring table nervous. Fortunately, they were foreigners too, so they didn’t find it as worthy of scorn as the locals might have.

To eat a calçot, peel off the outer charred layers, dip the sleek and well-cooked interior layer in romesco sauce, hold the calçot vertically above one’s mouth, and gently lower it to its yummy conclusion. Discard the top leaves, which serve as a hand-hold.

This image illustrates how it’s done, right down to the spot of romesco sauce on the middle person’s sweater.

Here’s what things looked like for me:

The Mr. Calcot pack included a bib, plastic gloves, and a wet nap. I opted for extra napkins instead of the plastic gloves, but I definitely wore the bib.

The second course of the calçotada consists of grilled meats and sausages. Calçotadas pair well with a bottle of granatxa negra (red grenache), as pictured above.

Error page when visiting Bonobos' website from abroad.

Americans Travel. Please Don’t Block Us.

Many websites block Americans traveling abroad.

For Americans traveling abroad, these things are surprisingly difficult to do:

– Paying your water bill

– Accessing US-based e-commerce sites

– Accessing your bank or stock broker

These tasks are difficult because many websites block all foreign internet traffic. Worse, most sites don’t tell visitors. Here’s what I see when trying to log in to my water utility from abroad:

Safari Can't Connect to the Server "cas.ebmud.com"

It’s relatively simple to work around these limitations, so they’re not an effective security measure. Hackers know how to use Virtual Private Networks (VPNs) to make their traffic appear to originate from the US.

I’ll give Bonobos an ounce of credit for having an informative message, though I’ll take it back for showing “403 – ERROR” in the text:

Bonobos Fail. We're currently unable to offer products and services to customers in the European Economic Area. We apologize for the invonvenience.

Americans took 98.5 million trips abroad in 2023. Does Bonobos really think none of them wanted to order some pants to be waiting when they got home? Does my water district think it’s fooling hackers by making it harder for travelers to pay their bills?

I understand that in many cases US-based financial services businesses cannot serve folks outside of the US. That’s fine, just tell them, as Fidelity does:

Fidelity Warning. You are using Fidelity.com from outside of the United States… I Decline or I Accept. Simple.

Here are my recommendations for best practices for US businesses dealing with foreign internet traffic:

1. Don’t block foreign internet traffic.

2. Don’t block foreign internet traffic.

3. Don’t block foreign internet traffic.

Seriously. Your US customers travel. They may hear about your business while they’re abroad and want to check you out. Why prevent them?

If you’re in a regulated industry and absolutely must restrict traffic, do something similar to what Fidelity does. Tell the user what you’re doing, and offer foreign visitors an alternative destination.

Finally, if you’re Bonobos, it’s fine to put up a page for foreign traffic letting them know you don’t sell in their country, but then have a link for US-based shoppers who are travelling abroad. Please don’t make it difficult for me to buy my pants when I’m traveling.

Notes from Barcelona: Tibidabo

The highest point in the City of Barcelona, Tibidabo, hosts both a church and an amusement park. They are found in remarkable proximity – close enough that a roller coaster passes the foundation of the church.

The most famous church in Barcelona is Gaudi’s masterpiece Sagrada Família. It’s a marvel of ambition, design, and the longest-running construction project in the city.

Sagrada Familia church in Barcelona with construction crane in the background

The second most famous is Sagrat Cor, situated at the top of Tibidabo, the highest point in the City of Barcelona. Not nearly as many tourists visit Sagrat Cor as Sagrada Familia, both because the interior is quite modest and it takes some effort to get there (it’s literally on top of the tallest hill in the city).

Sagrat Cor church atop Tibidabo in Barcelona

Sagrat Cor also seems like the greatest zoning failure of all time. That’s because an amusement park practically overlaps the church. Here’s a broader shot so that you can see what I mean:

Broad view of Tibidabo in Barcelona showing Sagrat Cor church in remarkable proximity to Tibidabo Amusement ParkCC BY-SA 4.0, Link

There’s a roller coaster which runs along the base of the church, but remarkably, the roller coaster came first. The timeline is roughly:

1886-8: Hermitage built atop Tibidabo

1899: Amusement Park construction begins

1903-11: Crypt of Sagrat Cor built

1905: Tibidabo Amusement Park opens

1915-1951: Main Church of Sagrat Cor built

1952: Sagrat Cor consecrated

It seems that the church was willing to accept the proximity of the amusement park in exchange for building on the highest point in the city.

PS  The word for “roller coaster” in Spanish is montaña rusa, which translates literally as “Russian mountain.” This is because our modern roller coasters originated as sleds on specially-constructed ice slides in St. Petersburg back in the 17th century.

Notes from Barcelona: Roscón de Reyes

I used to think that the Twelve Days of Christmas (as in the famous carol) were the lead-up to the 25th. Turns out, they’re Christmas Day through January 5th (also known as Twelfth Night or Epiphany Eve). The lead-up is Advent, as in the calendars.

On Twelfth Night, the Three Kings (also known as the Three Wise Men or Magi) are said to have brought gifts (frankincense, gold, and myrrh) to the newly-born Baby Jesus. 

Here in Barcelona, and in other Spanish-speaking countries, there is a specific pastry to celebrate the occasion. It’s called a Roscón de Reyes, and it looks like this:

Paper crown, explanatory paper, and Roscón de Reyes cake

The one pictured above has candied fruit with marzipan on the interior, and I can tell you firsthand that it’s delicious!

The tradition here in Barcelona is that there are figurines representing the Three Kings inside the cake, as well as a dried bean. Finding a figurine is good luck. Whomever gets the bean with their piece is obliged to pay for the cake (bad luck?).

In Mexico, there are figurines of the Baby Jesus hidden in the cake, and whomever finds them is blessed.

Tonight in Barcelona, there are Parades of Kings (Cabalgata de Reyes) in neighborhoods throughout the city, as well as a grand main parade. At these parades, the Three Kings toss sweets to the onlookers, among other festivities.

Update #1: Found the Bean

Plate showing green ceramic "bean" with smiley face and marzipan residue

Update #2: Found the King

Plate showing ceramic "king" with marzipan residue

How to Get Bugs Fixed by Apple

You can do a lot to help get serious bugs fixed by Apple. The “What can you do?” section of Corbin Dunn’s well-publicized blog post “The Sad State of Logging Bugs for Apple” is far too thin. The post is mostly inside baseball on how bugs are screened at Apple. Neither you nor I can do much about how Apple screens bugs. However, there is a *lot* you and I can do to get serious bugs into the hands of people who can act on them.

First and foremost, write good bugs. This is fairly easy to do, though it can be time-consuming. If you’re not already familiar with bugreport.apple.com, that’s the site for reporting bugs to Apple. When you create a new bug, Apple includes a template in the description for exactly how they want you to report your bug. Apple isn’t looking for you to create your own format or to report things entirely in prose. They also include a handy page of tips for reporting bugs, which you should follow.

Reductive Examples

Create a reductive case of your bug if at all possible. Most likely, you’ll initially encounter a bug in a specific context. For example, I received an email with a fractional street address, and Mail’s data detector chopped off the whole number portion of the address. Rather than report the bug with steps in Mail, I figured that the data detector itself was broken and made a very small Xcode Playground to demonstrate the problem. It’s time-consuming to create reductive cases, but it also reduces the likelihood of confusion. Consider that the person reading and reproducing your bug needs to see it as simply as possible.

If there’s no action on your bug, the next step is to mail [email protected] and request status. Note that it can take a while to get a reply. Filing and following up on getting bugs fixed with Apple is a process, as with anything else.

File a Technical Support Incident incident (TSI). This generally will result in a Developer Technical Support (DTS) engineer testing your repro steps. Assuming they can reproduce, generally they’ll track down the correct person to whom to assign the bug. In my experience, often they’ll reverse the incident charge in this situation without even being asked. This is an excellent use of the two TSIs included in your Apple Developer Program membership. If you’re not going to fight for your bug, how do you figure anyone at Apple will?

Develop a rapport with DTS and others at Apple. I’ve had several bugs transit a specific DTS engineer. I could email that engineer directly if I felt that would help. I would generally only do so if the process seemed broken somehow in order to get it back on track. Keep in mind that there are vastly more developers than Apple engineers, and please be respectful of their time. I’m quite sure you’ll get farther with brevity, clarity, a reductive example, and by being courteous than you would any other way. If you’re able to attend WWDC, bring your bug list to the labs and track down someone on the team that owns your bug. Talk to them.

Reach Out and Advocate

Open Radar is a great resource. You can search for your bug before filing and perhaps duplicate someone else’s reductive example rather than having to create your own. You can also post your bugs there to help other developers.

If you know someone else who is impacted by the same bug as you, let them know and point them to your report on Open Radar. If they can duplicate the bug on bugreport.apple.com, that may help get it attention or increase its priority.

Apple’s Developer Forums are another good place to advocate for your bug. The Forums may connect you with other affected developers, or if you’re quite lucky with a DTS engineer or product engineer who can help take up your case internally.

Filing good bugs is time-consuming, as is making good, reproducible, reductive cases. Do that, then don’t forget about the follow-up. Don’t just throw it over the wall and think it will magically get the attention you expect it deserves. Advocate for your bug, and you’ll increase the odds it gets fixed.

Automate Greenhouse Watering with HomeKit

Recently, I’ve been able to replace a pile of equipment to automate greenhouse watering with three small HomeKit devices from El Gato. Here’s the pile:

Obsolete Automation

Here’s the story. I’m responsible for ensuring that a 72 square foot greenhouse does not cook or dry out the plants within. There are two sets of misters in the greenhouse – the lower misters and the upper misters. The misters themselves are patio misters.

The lower misters are below the benches and can be left on for long periods to increase the humidity in the greenhouse. The upper misters are above the benches and must be limited to short stretches, as they get water on the plants, which tend to die if overwatered.

In an ideal world, the misters work like this:

  1. Active only from 10am to 5pm, maybe a bit later in the early summer
  2. Lowers on when the humidity drops below a certain point, and off back above that point
  3. Uppers on only when the temperature exceeds a certain value, and off once cooler

Until recently, I would approximate this using timed valve controllers at the faucet, followed by electrically activated solenoid valves attached to either a humidistat (for the lower misters) or a thermostat (for the upper misters). To limit time of day, I plugged all the electrical components into a mechanical timer. The picture above shows everything except the solenoid valves, which I still use.

Enter HomeKit

Enter the El Gato Eve Weather, two El Gato Eve Energy, Apple’s Home app, and the Eve app.

I plugged each solenoid valve into an Eve Energy, so now I can control upper and lower misters independently. I put an Eve Weather into the greenhouse, so I’ve got real-time temperature and humidity. I set a Timer in the Eve app to limit when the misters are active (#1), and I set Rules for the lower and upper misters (#2 and #3).

The icing on the cake was when I learned that I could set up my AppleTV as my HomeKit hub to monitor and manually control all of this when I’m away from home.

HomeKit and El Gato have greatly improved my greenhouse automation, eliminated a pile of fussy equipment, and offered me remote access. Needless to say, I’m thrilled.

Good Names for macOS 10.13

Stephen Hackett posted a good list of Bad Guesses for the Next macOS Name.

Here’s my list of Good Names for macOS 10.13. These are all places in California I can imagine Apple choosing for the next name.

  • Big Basin
  • Big Sur
  • Idyllwild
  • La Jolla
  • Lassen
  • Oceanside
  • Ojai
  • Pacifica
  • Palm Springs
  • Pasadena
  • Paso Robles
  • Santa Barbara
  • Santa Cruz
  • San Diego
  • Solvang
  • Sonoma
  • Temecula
  • Tahoe
Big Sur Coastline
Photo by DAVID ILIFF. License: CC-BY-SA 3.0

Big Sur is one of my favorite places, and it has been badly damaged and partially cut off by landslides from California’s epic rainfall this Spring. It would seem very much like Apple to choose Big Sur to highlight this beautiful area and bring attention to its current plight. Big Sur has my vote. Fingers crossed.

Setting Up and Customizing Your JSON Feed

Last week, I added a JSON Feed to the TextExpander Blog. If you’re not familiar with JSON Feed, it’s an alternative to XML-based RSS created by Manton Reece and Brent Simmons. There’s plenty of background info on the JSON Feed site and their respective blogs. And, of course, it has its own cool vector icon:

JSON Feed icon

Setting up the JSON Feed plugin

For sites running WordPress, just follow these steps:

  1. Sign in as Admin (i.e. https://yoursite.com/admin)
  2. Click on Plugins in the left column
  3. Click Add New
  4. Enter “JSONFeed” (no quotation marks, no spaces) in the Keyword search box (Search plugins…)
  5. Click Install Now
  6. Click Activate

Be careful to do Step 6, as it’s important and easy to forget.

That will get you set up with a JSON Feed for your WordPress posts at https://yoursite.com/feed/json. You can check our our TextExpander JSON Feed here.

Add Filters to Customize Your Feed

The default feed template lacks a few things I want in our feed, particularly images for posts and icons for the feed itself. These are easy to add using WordPress filters. We maintain a custom plugin for our site for little tidbits of code like this. You could also place such code in a child theme’s functions.php file.

The two filter functions provided by the JSON Feed Plugin are json_feed_item for feed items and json_feed_feed for feed metadata.

This code includes our OpenGraph image in each feed item. It works with the WP Meta SEO plugin.

function filter_json_feed_item($feedItem, $post) {
	$meta = get_post_meta($post->ID);
	if ($meta["_metaseo_metaopengraph-image"]) {
		$image = $meta["_metaseo_metaopengraph-image"][0];
		if (strlen($image) > 0) {
			$feedItem["image"] = $meta["_metaseo_metaopengraph-image"][0];
		}
	}
	return $feedItem;
}
add_filter('json_feed_item', 'filter_json_feed_item', 10, 2);

This code includes our icons and authorship info in the feed.

function filter_json_feed_feed($feed) {
	$addItems["author"] = array(
		"url" => "https://twitter.com/TextExpander",
		"avatar" => "https://textexpander.com/static/images/feed-icon.png",
		"name" => "TextExpander"
		);
	$addItems["icon"] = "https://textexpander.com/static/images/feed-icon.png";
	$addItems["favicon"] = "https://textexpander.com/static/images/feed-favicon.png";
	return $addItems + $feed;
}
add_filter('json_feed_feed', 'filter_json_feed_feed', 10, 1);

Hopefully, these code tidbits are of some help if you choose to customize your JSON Feed. Feel free to send me some feedback on Twitter or micro.blog.