CakePHP Concatenation

I had to concatenate two fields to search them as a single string. Another programmer created a table of phone numbers with the columns area_code (INT 3) and phone_number (INT 7) respectively. But people were searching for all ten digits as a single unit, so I needed to search both the columns as a single field.

This blog post on virtual fields and this doc about same made me think that  $virtual_fields was the answer, but it didn’t work out for me. The following solution worked well enough.

$conditions = array(
'CONCAT(NoCallList.area_code, NoCallList.phone_number) LIKE' => '%' . $this->data['NoCallList']['search_term'] . '%'
$this->set('items' , $this->{$this->modelClass}->find('all'
, array(
'order'=>array($this->modelClass . '.phone_number')
, 'limit'=>500
, 'conditions'=>$conditions

In Starbucks Next Week

This story is about kombucha. The first time I ever played bike polo was winter 2010… I think. I played 2 matches on my front suspension, department store mountain bike, then sat down in exhaustion. A man named Fish, who had a handlebar mustache, started talking to me. He was travelling south from Alaska with his friend, whose name I can’t recall, who looked like every lumberjack – thick, solid, beardy and plaid.

Around midnight, polo was breaking up and Fish’s friend asked if I would like to join them at their host’s house for kombucha and nut butter. Terrified, I said yes and followed them on their bicycles up what seemed to be the steepest hill I had ever encountered.

(Years later I learned that it was halfway up the hill Hillside is named for, and moved into a condo at the peak of it. Moved out 3 months later when I got tired of biking up it every damn day. I currently live at the base. But I digress.)

At the home of (again, I learned this much later) Luke Postle and most of his band (Slam Dunk, unGoogleable), a young blond person of indeterminate gender, with a bicycle chain tattooed on her/his face, offered me a large mason jar.

A soft, pink jellyfish-shaped fungus floated in the jar. “What’s this again?” I asked.

Kombucha Day 3

You may recall that I’m hard of hearing – when I encounter new words, it often takes three or four repetitions with increasing volume, and sometimes a spelling using either the Air Force alphabet or pen and paper.

We did get to Air Force alphabet stage on this one before I got it. Then I asked, and Fish provided, a detailed explanation of just what the hell kombucha is, while I made the sort of facial expressions that a back-country hick makes during their first real-life lesbian sighting.

The stuff seems to be of Japanese origin, and is made of fermented tea. It’s a little fizzy and tastes a little boozy though it doesn’t have alcohol in it, and it’s great for drinking at parties where you don’t want to accidentally forget that you’ve sworn off alcohol forever because of what happened last time. (No more merlot. Never again.)

It’s the cheapest thing in the world to make, and you can get good results without much effort. If you ever find yourself in an anarchist commune and wonder what all the glass jars filled with jellyfish fungus are, that’s probably it. Anarchists like kombucha.

OK, so that was my first in-person encounter with the stuff. My second one was tonight. Outside of Fairway Market in Quadra Village, I ran into my friend Lee and two women friends of his.

Lee is a dumpster diver and brought in a massive haul of eggs the other night. I already got my dozen and hardboiled them. One of his friends said, “Have you ever heard of tea eggs?”

She tells us, you hardboil the eggs, crack the shell a little, soak it in tea for a few days, and it tastes yummy. I want to try it, but with coffee.

“They’ll be in Starbucks next week” says Lee.

“Starbucks doesn’t have kombucha yet, though,” I pointed out.

I went inside for a beverage.

As I stood thinking hard about beverage choices, my eyes slowly focussed on the bottles right in front of me. Yeah, you guessed it. Not one, but three different brands of kombucha were there, surrounded by root beer and ginger ale. They had multiple flavours, including “classic” and “green”.

I goggled at the bottles, thinking about the blog post I am even now writing for you, and at least 5 hipsters grabbed some from in front of me while I did so.

I bought the kombucha. It’s pretty tasty. I am living in the future.

Small Talk

A facebook friend felt ranty and posted this:

“You know what? Small talk can just fuck off and go away forever. Why do we do this shit? We all have the same issues, why can’t we share them? Why can’t we connect on a deeper level, like… a fundamental animalistic level? I want to know why you have a strained relationship with your father. I want to what hurts you and what helps you get though the day. I want to know your preferred masturbation techniques. I want to know exactly what you think when you look at the stars. I want to know what makes you feel betrayed. I want to know all your doubts and fears. I want to know everything about you. I want us to all celebrate each other. I don’t want to stare through each other and fearfully talk about the weather because that’s what we’re fucking supposed to do. I don’t want you to ask me what I do for a living so I can stare at you and say “Really? Do people still ask questions like that?” Let’s share. Put all your fears on the table and remove the power they have by talking about them. Just like why black people have used the word “nigger” for generations. It removes the power that shitty word has. And you know what? It’s genius. Why do we have to pay psychiatrists to listen to us. We PAY them, like it’s a service that has a fiscal value attached to it. Even as I am typing this, I feel like a gushing Pisces asshole, but why? Why isn’t this completely innate? I just want us all to connect on a human level and have it NOT be some social taboo to think of such things.”

I could tell you about my relationship with my father or my favorite way to wank, but I won’t unless I trust you. If I tell you the whole truth about what’s going on in my head right now, you might get it, and love me more for it. Or, you might look at me in silence fora few seconds too many and say “Um, okay.” And end the conversation. I’ll know that I can never trust you again. That’s the end of our friendship. You might think that it’s best to get that out of the way quick, but I argue that there’s still value in people who aren’t close friends, but are acquaintances who have some knowledge or interest you might share at some point in the future, that might develop into friendship once they and you grow into yourselves a little more. I don’t want to throw them away too soon.

So this is why we start with small talk. I ask you about the weather, you say “sure is hot.” I say, “yeah you are, but what about the weather?” If you laugh, we’re closer. I’ll drop my walls alittle more next time. And a little more the time after that, until we’re naked in bed talking about the second grade bully that stole my pogs, that I never really got over.

If you stare at me blankly, I’ll go “sorry, just kidding” and continue talking about the weather.

If we’re drunk we can streamline the process – alcohol doesn’t really drop my guard at all, but I can say that it did, and claim to not remember the vulnerable things I said, or say that it was the drink talking, not me.

You can get past the walls faster without drinking. You have to lower yours first. Take your skin off and show people what’s inside. Feel the rejection you get from most people. Find out how bad it feels and determine to keep on taking your skin off and showing the inside. It hurts, it’s fatiguing, and you have to do it 9 times to get one good result. Or, who knows, maybe you’ll get 9 good results for every 10 tries, but that last one is a killer. The answer, as always, is hard work. You don’t get to connect with people and avoid the tedium of small talk unless you put in the effort. So start doing it. Nothing’s going to change unless you do the work.

Incidentally, I’ve never bothered small talking with the friend who posted the original rant. We always started with the weird stuff.