Category Archives: Uncategorized

My alembic migration won’t run! (Finding and killing the process that has a postgres relation locked)

You go to run your migrations against your DB, and everything just hangs. One of the causes for this is that the migration is waiting for access to a relation (typically a table, but potentially a view) to which your migration script needs to write, but another process has it locked. If that’s the reason, here’s how we find and kill that process.

That’ll give you the ID of the relation you need.

That’ll give you the pid of the locking process.

In postgres itself, you can do a

but that doesn’t work if you aren’t a superuser. Just pop back to your command line and kill the process itself.

 

On the writing and telling of jokes

In my previous comedy-related posts, I’ve talked about getting started, continuing to practice, and failing to market a show. This time I’d like to talk about jokes themselves, rather than the stuff around the jokes. I feel qualified to do this based on my slightly-more-than-one-year of experience telling jokes and the zero books I’ve read on the subject.

Joke structure

The simplest jokes have two parts: a setup (which provides enough context to establish an expectation) and a punchline (which subverts the expectation in some way). My favorite example of this is the famous Henny Youngman (not, as I earlier wrote, Rodney Dangerfield) joke

Take my wife… please.

That’s a great joke. The setup, “take my wife,” establishes the expectation that he’s about to use his wife’s behavior as an example of something. The punchline subverts that expectation: instead of taking his wife for example, we’re supposed to take his wife away from him. In this the punchline doesn’t violate the stated information in the setup, it just forces us to reinterpret that information in a novel way.

Furthermore, the “take my wife” joke is very short. The setup provides exactly the amount of information we need in order to laugh at the punchline, and no more. Don’t tell us about your college background and the interview process if your joke is about the snacks they feed you at work.

There are exceptions to this. Norm Macdonald tells very long jokes. You are more than welcome to try to be Norm Macdonald. I think you will have more fun if you tell short jokes at this stage in your career.

Anecdotes

An absurd anecdote can also be a “joke,” but I prefer to think of the anecdote as a container for several jokes, rather than as a single joke. When you’re telling a story try to find as many places as possible to put punchlines, or at least places you can reasonably expect the audience to laugh. If you go more than about ten or twenty seconds without a laugh, you’re not so much pacing yourself as you are reducing the energy in the room, which will cause your later jokes to miss. If you’re doing a five-minute set and expecting a single laugh at the end, you may wish to honestly re-evaluate a video of your performance and see whether the audience is actually enjoying it.

Where to find jokes

One of the biggest problems we have is coming up with sources for material. The most universally applicable way I’ve seen to come up with new material (which I got from a class at the San Francisco Comedy College) is to just get up on stage and complain about whatever is going wrong in your life. Usually I phrase this as “what are you mad about,” but some people insist that they’re not mad about anything. Fine. What is less than perfect in your life? Your roommate never takes out the garbage? There are too many people walking slowly on the sidewalk when you’re trying to get to work? You want a clean apartment but you don’t want to have to do the work of cleaning? All of those can be jokes!

Failing that, try to recount the last few days of your life. Write down a narrative of the events, with a pen. Did anything unexpected happen? The guy at work put the wrong soap in the dishwasher and filled the kitchen with bubbles? You got lost? The store was out of the thing you were trying to buy? Those can be jokes!

Evaluating jokes

When you’re trying to tell the best jokes, you can’t just sit in a room by yourself and write down the things you think are funny. You have to try them out on an audience, then use the audience’s reaction to help you determine what’s actually funny. I find it useful to record my sets, ideally on video, so that I can review them with an honest and unbiased record instead of relying on my own faulty memory.

The simplest version of this process is to take a few hours to review the videos of your last few months of performances, keep notes of which jokes have provoked the biggest laughs, and use those jokes for the big shows that matter.

If you continue to practice a joke without reviewing the audience’s reaction, you’re not getting better at telling a joke. You’re memorizing some words so that you can repeat them verbatim.

Furthermore, as much fun as it is to tell jokes for an engaged audience that’s laughing, it’s also important that you try jokes where audiences are a little less forgiving sometimes. The very supportive open mics and shows can give you a mistaken impression of how good a joke is. This is especially dangerous if you’re popular among the other comics at the mic: people might be laughing to support you rather than the joke. Then using that joke at a show and seeing it fall flat can be very disappointing.

On the nature of humor

People laugh when they are surprised and delighted to be surprised. My favorite example of this was a friend’s baby whose mind was blown by a light switch. I picked him up and let him turn the light on and off. He was surprised to see that the world worked that way, and delighted with his newfound knowledge. He laughed.

People laugh when they feel like they’re part of something, part of a shared experience. Because a joke subverts an expectation, the audience member who understands the joke now shares with the comic and the other audience members a new and unique perspective. They are part of an elite club who know the real truth about the topics discussed during the show. They laugh.

People laugh when they feel safe, when they feel relieved, when they have their own beliefs reaffirmed by the charismatic person with the microphone who is on the stage. This is why political humor or shock humor can work so well: if you say something that not everyone agrees with, but that the people in the audience agree with, they’ll feel again like their opinions matter and that they’re valid as human beings. They’ll laugh.

Conclusion

Tell jokes. Please. Stop wasting your time with words that don’t give the audience an opportunity to laugh. Have punchlines every ten seconds or so. Honestly evaluate your material and determine where you expect the audience to laugh. Review the recordings of your performances and see if you were right. If you were wrong, adjust the content of your material accordingly.

Get your dream tech job in 2019

sad face with a small pile of money next to happy face with a large pile of money

A detailed rendering of your current pile of money and happiness (blue) versus the larger pile of money and greater happiness available elsewhere (green)

Becoming an effective software engineer is hard, but you’ve already done the work. You’ve studied for years, slogging through programming assignments and fighting with compilers in school. You’ve continued your education on your own time, building web apps, setting up your own Raspberry Pi-based plant watering robots, or building other admirable side projects I can’t even envision. You read the articles and comments on hacker news and /r/programming. And it’s paid off: you have a job working as a software engineer.

You’re doing alright.

But you’re not happy.

Your compensation is market rate, but you know other people are earning more money and working on more interesting projects, projects that you could do. This isn’t the life for which you stayed up so late exploring the nature of multiple dispatch or function currying! This isn’t what you were after when you read that book about dependency injection!

Fortunately, though, there are companies out there that desperately need people with your skills, companies which are eager to hire you and provide you with the respect, autonomy, and compensation you’re after. There are jobs where you can make a real difference instead of refactoring the authentication provider again!

So, how do you get those jobs?

Step 0: Know your stuff!

You already have this covered. You’ve got the degree and the job experience. If you’re not confident that you know your stuff, that’s okay! Most of us struggle with impostor syndrome.

If you want to bone up, do it. Work through Eloquent Javascript or Nick Janetakis’ excellent Build a SaaS App with Flask course. Work through Cracking the Coding Interview, which offers a strong outline of the things you’ll want to know to excel in any software engineering role, not just a collection of interview advice.

Step 1: Show your stuff!

Really, I mean “know how to show your stuff,” but I think that’s clumsier wording and doesn’t scan with the three-word step pattern established above. The unfortunate reality is that being able to succeed in a job isn’t totally sufficient to being able to get that job; technical interviews are optimized around reducing false negatives, and so we as an industry have invented an interview format that all but demands unique preparation in addition to baseline competency.

Remember that Cracking the Coding Interview book from above? Purchase it if you haven’t already, this time for the interview advice. Read through it, and try to work through the problems as it advises; that means sometimes putting the computer away and using a pen and paper to replicate the whiteboarding experience.

As a supplement to the book, I used HackerRank’s Cracking the Coding Interview track during my last job search. The links are dead now, but sites like HackerRank, CodeSignal, and LeetCode offer an excellent means to practice and level up your skills for the type of programming questions that you’ll see in interviews.

Step 2: Practice interviews!

Don’t jump straight into interviews with your dream company, unless you have an advocate within the organization, a friend or former coworker who can vouch for your abilities. Instead, practice mock interviews on sites like CS Career Hackers and interviewing.io, which will help you overcome your nervousness and learn to be a better interview candidate.

It can still be a little unsettling to switch from mock interviews with strangers on the internet or friends who can’t offer you a job in reality and start interviewing with real companies that matter, so I also recommend applying for some “backup jobs” early on in your job search. You shouldn’t waste the recruiters’ or companies’ time by flying out for a job you have no intention of taking, but there’s nothing wrong with exploring a less-appealing option. Who knows, you might find out that one of those “backup” jobs ends up being more appealing than you thought!

Consider using LinkedIn to reach out to recruiters or engineers at companies where you’d like to work, too. You don’t have to wait for them to contact you, or go through the traditional application process on the web site; it’s often better to reach out and humanize yourself early on in the process.

Step 3: Triplebyte!

Triplebyte logo

I realize that this blog post probably seems like a thinly-veiled Triplebyte ad, but it’s not. It’s a bald-faced request that you use my Triplebyte referral link. That’s for two reasons: in the first place, I’d be a fool to recommend Triplebyte publicly and leave the value of any referrals on the table, but more importantly Triplebyte is incredibly valuable to both job seekers and employers. I cannot stress this enough. If you take nothing else away from this post, even if you don’t use my referral link, you should use Triplebyte as part of your job search.

Not only does Triplebyte vet candidates with a very thorough interview, providing a strong filter to employers, they also provide a ton of validation to those candidates, which makes interviewing much easier. Every interview I booked through Triplebyte during my last job search started out with the assumption that I knew what I was doing, and in all but one case it felt like the interviewers were looking for reasons to say “yes,” whereas in past job searches I’ve often felt that they were looking for reasons to say “no.”

Much like the interview with your prospective dream company, I don’t recommend jumping straight into the Triplebyte interview. It’s a deep, rigorous interview that can cover a wide variety of topics. You should prepare with the “Cracking the Coding Interview” book and as many other resources as possible.

I’ve also heard good things about underdog.io from friends who’ve used them, and my current employer has had good luck hiring from techees.

Choosing a company to work for

If you’re working with Triplebyte, they’ll be a huge help choosing the companies where their data suggests you’ll be successful and happy. But there might be as many as a dozen such companies on their list; moreover, Triplebyte doesn’t have the entire universe of companies in their portfolio, and most of you won’t end up using them despite my advice anyway.

So you need to know how to identify promising companies which will best serve the interests of your career and your quality of life. I think you should work at as early-stage a startup as possible; favor seed-stage and series A companies, if you can.

Small companies are often perceived as risky, which is a fair assessment if you’re an investor, but means almost nothing as an employee. Having a startup on your resume is more valuable than a stint at a successful large company, and you can’t have a stint at a successful early-stage startup without taking the risk of joining a startup.

The equity portion of your compensation will be harder to value since there’s a risk that the business might not work out, but base salaries are at market rates, because candidates have grown wise to the reality of startup equity. More importantly, the opportunities for personal growth are greater and you have a better chance of making a positive impact on the company’s nascent culture.

Some of the people who work at Juniper Square

Some of the people who work at Juniper Square

If that all sounds appealing to you, or if you found value in the advice above or just like to see what we have to offer, consider applying at Juniper Square. We’re a fast-growing SaaS company in the hugely underserved market for private equity fund management, providing sorely needed transparency, convenience and accuracy in a $4 trillion space.

Other posts about this stuff

I interviewed at five top companies in Silicon Valley in five days, and luckily got five job offers by Xiaohan Zeng

I interviewed at six top companies in Silicon Valley in six days, and stumbled into six job offers by Bay Area Belletrist

Get that job at Google by Steve Yegge (2008, but a classic)

Get that job at Grab by Steve Yegge (2018, not a classic yet but maybe later)

Coding interview cheatsheet by Yangshun Tay (HN thread, links to the cheatsheet itself)

Startup interviewing is f***ed by Zach Holman

Strategies, tactics and avenues for charity fundraising

You like how I did that? Write a blog post so I feel comfortable sharing it on LinkedIn, but still put a show flyer as the first image. Get tickets

Raising money for charity is gratifying, not because we’re actually doing good efficiently, but because it allows us to attach a hard numeric marker to our decency. If we wanted to do the greatest amount of good, we’d want to thoroughly study the effects of the charities in question; not only how efficient they are with distributing the money we give them as aid instead of administration or marketing, but also whether achieving their stated goals is the most efficient way to spend money. I think if we take this actuarial view that the most efficient charity in the world is the Iodine Global Network, which addresses iodine deficiency in children, a strategy which has all kinds of multiplicative benefits: these children have higher IQs across the board, which leads to reduced crime and the ability to earn more money (which they then spend locally).

But often we as donors and fundraisers are more inclined to provide charity for causes which are close to home, or for whom the beneficiaries are appealing to us in some way. Animal-related charities are very appealing because animals are cute and cannot act meaningfully on their own behalf; thus we feel really good when we give money.

I don’t think this is a bad thing. When we act charitably toward a cause that’s meaningful to us, it brings us joy. That joy in goodness provides some positive feedback, which trains us to act more charitably in the future; do it enough, and we establish a virtuous cycle in our own lives. Furthermore, by advertising our own charitable giving, we not only signal this virtue to other people to establish ourselves as worthy of social interaction; we also inspire those near us to do charity stuff on their own.

So, how can we raise money for charity?

Religion

Religion is a big one. The trouble with religious charitable giving is that it’s inexorably tied to religious ideology, which might offend some parts of the potential donor pool as much as it excites other parts. That being said many religious organizations operate charities which do universal good, and cooperate with both secular charities and the charities of other sects. Religious organizations can encourage giving directly via their members, and the constant reminder of weekly attendance associated with most faiths is an effective way to encourage charitable giving.

Social media

This is my favorite. Facebook has made it all but frictionless to start charity campaigns for birthdays, and removed all the social awkwardness both from asking for money and from tacitly refusing to give it; furthermore, Facebook in general takes advantage of our need for the attention that is a ‘like’ button, and feeling of receiving money for your chosen cause is even greater than that of a ‘like.’

Historically, I’ve taken a different tactic. Facebook fundraisers have some reach, but an influential Redditor can have a much larger reach, and depending on the nature of a particular subreddit can drive interest in a fundraising drive. I was moderately internet famous for a number of years, and so I occasionally leverage this as a charity drive, requesting donations to Rapha House International in exchange for commissioned essays at $50 each.

Comedy

I suppose this could apply to any other performance art, but comedy has been uniquely popular this year, and there’s a very low barrier to entry. A moderately-successful stand-up comedian can enjoy much larger audiences and give charitable people an excuse to donate to a given cause without too much effort. This is hardly a new idea: google for “comedy fundraiser” or some variation and see the broad result set.

Recently, Mara Marek raised $300,000 with her Bike, Laugh, Heal tour. Seth Rogen’s Hilarity for Charity must be raising millions. And as the image at the top of this post mentions, Andy Gold’s Jokes for Hope shows in San Francisco this month should raise a few thousand dollars and innumerable socks for GLIDE, a local charity which addresses poverty and homelessness in the Tenderloin.

 

Lessons from producing and marketing my first comedy show

Comedian Jide Okonkwo and audience

Jide Okonkwo and the audience at “Kaiser and Friends,” my first show

Open mic comedy can be a lot of fun, especially if you find a really good open mic. But it’s also a different experience from the real “live comedy” that people pay money to see: the barrier to entry for performers is just attendance, the audience consists of people who’ve already seen a lot of comedy over the past few days, and a big part of the process is telling jokes that just plain aren’t gonna work. The real reason to perform at open mics is to improve our material and delivery to the point where we can perform for an audience of non-comics, who we hope will enjoy the experience enough that they will tell all their friends and improve attendance at future shows, contributing to a snowball of fame that ends up paying the bills.

What worked

We did this upstairs at Edinburgh Castle Pub, which meets all the requirements for a good comedy venue: it’s small enough to encourage infectious laughter and strong engagement, it’s got a low ceiling, and it’s got a stage. Doing it at my home base open mic meant that we had cooperative bar staff and familiarity with the equipment, and the regular host at Edinburgh, comedian TK Moyer, to headline the show, run the door, and operate the camera, which really helps. If I tried to do all of that, it would be a disaster.

The four other comics on the show, Jon Gab, Loren Kraut, Max Moacanin, and Jide Okonkwo,  are reliably funny, have at least ten minutes of good material, and have shown up consistently for previous engagements. They were also friendly with the crowd after the event, which should contribute to good word-of-mouth.

Despite my desire to bring a large audience of complete strangers, we also enjoyed attendance by my coworkers, their friends, and a number of comics from the local scene. The other comics on the show brought friends of theirs as well: all told, we filled the room to capacity, but didn’t overflow it.

The $10 ticket price allowed me to pay all the performers, offset the cost of advertising, and guaranteed audience engagement. We could play with the pricing, but I think it’s important to charge something, even if it’s just a nominal amount to encourage attentiveness.

Finally, I think that six comics doing about ten minutes each is a good use of the audience’s attention span. My mind starts to wander if a comedy show lasts much longer than an hour, so that was the target, and I didn’t notice any audience members losing interest the way they often do at the end of a long showcase or an open mic.

The single biggest factor was the quality of the performances: the kind words audience members say after the show can be driven by social obligation, but geniune laughter doesn’t lie, and we have recorded evidence that the show went well.

What did not work

My advertising efforts probably brought zero audience members. I made a flyer on Canva, and distributed copies to hostels, hotels, my apartment building, and a few restaurants in the neighborhood:

The show flyer

Unfortunately, I probably put these out too early: all but one restaurant had taken them down more than a week before the show, and it would be difficult for hotel and hostel staff to remember that someone had come to them a month ago and tried to invite guests to an event. It makes more sense to print cheaper copies of the flyer, then distribute them more widely and regularly, rather than printing in color on heavy paper.

My Facebook and Instagram marketing also had no noticeable effect on attendance. I seriously overspent, because each ‘like’ or ‘interaction’ provides the same dopamine rush for an ad as for a traditional social media post; however, these likes and interactions did not translate to human beings actually coming to watch the show. They may have reinforced attendance among my friends, many of whom mentioned the ads in conversation; I’d also like to think that they were an encouragement to the comics, but it would probably be more effective simply to pay the comics more rather than buying Facebook interactions at $0.10 a pop.

The ad for Jide Okonkwo

The ad for Loren Kraut

The first ad, featuring Jon Gab

The ad for TK Moyer

The ad for Max Moacanin

Another ad featuring Jon Gab

An ad for the show instead of a single performer

Another ad for TK Moyer

The last ad, used as the image for the Facebook event

I submitted the event to fullcalendar.com, which bills itself as a labor-saving mechanism to advertise via traditional media outlets in the free classified sections of local newspapers.

I also set up ticketing via Eventbrite, hoping both for some marketing via their search functionality and to provide a convenient experience for people to buy tickets online. My hastily-constructed hero image might have hurt, but as of the start of the show, a total of three people I already knew had purchased tickets on Eventbrite; nine more audience members, having forgotten cash, purchased Eventbrite tickets at the door.

Most embarrassingly, I muddled around with a WordPress marketing site for a little while, then realized that my entire goal was to get people over to Eventbrite. So I just set Dreamhost to redirect to Eventbrite. Then I changed my mind, went back to hosting the site via Dreamhost… and didn’t finish setting up the marketing site. The domain name listed on the poster ended up providing no value.

I also printed up a number of business cards, which just say “Kaiser and Friends Comedy Show,” with the domain name and the Facebook and Instagram accounts, which we handed out at the event.

Things to try for future shows

Keyword advertising should be very effective for comedy shows – the intent reflected in a Google search for “comedy shows san francisco” is tough to mistake, and probably converts better than Facebook ads did.

There’s a trope of comedians standing around, passing out handbills in Times Square in an effort to bring enough tourists to make their performance at a local spot worthwhile. In-person marketing might work better for comedy shows than it does for the various green-vested charity activists who try to befriend me on Market street.

We did get some footage of the performances, and good audio. Editing this into a format suitable for use in video advertising might drive more engagement more cheaply than the image ads, and perhaps even lead to ticket sales.

I think it’s probably important to spread the hosting and production around, too. Each of us can reliably bring each of our friends to a show perhaps once every couple of weeks. We can’t constantly beg the same dozen coworkers to come out all the time. Agreeing to participate, promote and perform at shows that are produced by other comedians will probably drive our little corner of the Bay Area comedy scene to greater heights.

 

 

Continuing to Practice Stand-up Comedy

A few months ago, I wrote about getting started in stand-up comedy. Continuing for a few more months has given me a little more to write about.

This is me telling jokes

Bringer shows

A “bringer show” is a marketing technique in which the promoter relies primarily upon the performers themselves to drive ticket sales. On the one hand, it’s important to get stage time, and having an actual venue improves the experience both for the comics and for the audience. On the other hand, incessantly nagging my friends and coworkers so that they will come see me tell jokes seems like a great way to have fewer friends and annoyed coworkers. Weirder still is getting paid a cut of the ticket sales; it feels a little like a pyramid scheme, but instead of selling overpriced essential oils or kitchen knives, we tell people jokes they’ve already heard.

Rooms themselves matter

We wouldn’t keep doing this if nobody ever laughed. Part of what helps people laugh is the intimacy of the space, which makes it easier to want to pay attention. I’m lucky to live close to Edinburgh Castle Pub, which has an excellent, dimly-lit room with a low ceiling.

The host at Edinburgh, TK Moyer, is frankly the best in the game; the other comics who are regulars are excellent and respectful; the bartender is even cool. I don’t want to discount any of those factors. But I’ve seen a lot of the very same comics perform in bars where the geometry simply isn’t as good: often there’s no stage, the ceiling is too high, the geometry of the space doesn’t lend itself to having an audience close to the comic, or there are distractions elsewhere in the room. While there are ebbs and flows and randomness to how well any of us do on any given night, comics get better laughs on average in a room like the one at Edinburgh.

That doesn’t mean that you can’t get laughs in other situations, or that it’s somehow the building’s fault if you bomb. It’s still your responsibility to perform as effectively as you can, to put your best foot forward and show respect to the venue in exchange for being permitted to use their microphone. But all other things being equal, try to find a room with an actual stage, dim light, a low ceiling, and without TVs showing football games.

Audiences matter

In his autobiography Born Standing Up, Steve Martin talks about having told jokes to totally empty rooms – he’d try to get laughs out of the waitresses. And it’s your responsibility, when you’re performing, to get up there and tell jokes even to an empty room. But it sure feels a whole lot better when people are laughing!

This goes hand in hand with the above: one or two audience members who are actually engaged, who are paying attention and who like the performer, will really bring up the energy of the room around them. This creates a positive feedback loop which results in everyone in the place having a better time. It’s easier to pay attention when you’re sitting close enough to the comic and when you aren’t distracted by a playoff game on a TV over there, and it’s easier to feel the influence of the people laughing around you if those people are sitting close to you.

At open mics, the audiences are other comics, all of whom are waiting for a turn. Much of the time, the comics are reviewing their own material on their phones or socializing. I’m guilty of this myself – being engaged for more than two or three open mics a week is intellectually draining, and if you’ve already seen the comic before, it’s hard to laugh at the same joke again.

A dozen “real people,” though, who are there on purpose just to hear jokes? They’ll laugh! It’s a rush, like a runner’s high.

I couldn’t find a stock photo of an audience that didn’t require me to pay, and you people insist on having photographs to break up the walls of text, so here is a picture of me in a ball pit in Colombia

Jokes

I was going to say “writing matters,” but you know what? Writing matters only because you must have jokes. That means, effectively, that you must give the audience a punch line with enough setup that it’s funny – give them a punch line early enough in your set to drive engagement, and often enough throughout your set to keep them engaged. Other than that you can play with the ebb and flow of the crowd’s energy, particularly as you grow and perform longer and longer sets; I still don’t have nearly enough material to worry about it. But I watch back over videos of even my recent performances and I cringe sometimes at the time it took me to get to the first punchline, or at the length of a setup for a punchline that didn’t get laughs.

Confidence

Delivery matters. When I started, I thought I wasn’t nervous, and that people were really digging my high-energy delivery. I’d sprint up on stage, scream jokes in a crackly falsetto, and fidget like crazy. “I’m not nervous,” I’d tell my friends when they’d mention it.

Whether I was nervous or not (I was) doesn’t matter. What matters is that the audience perceived it as nervousness, and nervousness in the performer drives restlessness in the people watching. That’s contrary to engagement.

By one definition, ‘charisma’ is a metric of how comfortable other people feel in your presence.  A big contributing factor to that is the ability to be or at least appear to be comfortable around other people. It’s part of what we term “breeding,” as when a member of the landed gentry addresses a flustered social inferior on Downton Abbey.

We as comics can address failures of confidence in a number of ways. We can watch video of our own performances and consciously look for what other people might consider nervousness, whether we ourselves do or not. This means most often refraining from nervous pacing or rocking, limiting unnecessary gestures with our hands, and avoiding playing with the microphone cable. The microphone cable is not in the way. It will not become less in the way if you flail it gently like a lazy bullwhip or put it slightly left of where it is. It will not become less in the way if you move it back to the right, where it was in the first place. The audience doesn’t care where the cable is. They notice it only when it moves.

Improving jokes over time

Having written a joke is a good thing. It’s harder than it looks to have a real joke with a punchline and not just a story that you hope people will laugh at! For instance, here is a paragraph that I needed as a transition between two other jokes, which I tried to deliver humorously:

Airplane pilots always talk the same way, you ever notice this? They get on that intercom and they’re like “Ladies and gentlemen, if you look out over the right wing of the plane, you can see Mt. Rainier.”

That’s not a joke. It was okay in context as part of a larger bit about other professional voices, but it was a bit during which there wasn’t a good place to laugh, and the set needed a laugh there. So first I gave it a punch line:

Sometimes though you can’t understand them! They’re just like “mumblemumble, Mt. Rainier.”

That’s… well, it’s not funny. It’s not surprising the way a good punch line is. There’s no delight to be taken by the audience. The best we can hope for is that the audience has also ridden on an airplane, that they have heard a pilot mumble into the intercom, and that the shared context is enough for a polite chuckle. I recorded audio of my set with that as part of it, and it didn’t work. Let’s try again.

Airplane pilots always talk the same way. They get on the intercom like “Ladies and gentlemen, if you look out over the right wing of the plane, you can see Mt. Rainier.” Like I’m even on that side of the plane! Hey, you testosterone-and-xanax-voice having jerk! Turn the plane around! Let everyone see the mountain!

That’s better. That’s a joke. If that’s how long I need it to be, that’s how I’ll tell it. I recorded a set with that version; people laughed. But we can also make it longer, and get a few more laughs out of it pretty cheaply:

Airplane pilots always talk the same way. It’s like day 1 of pilot school is how to drive the airplane, and the other 399 days are how to talk on the intercom.  “Ladies and gentlemen, if you look out over the right wing of the plane, you can see Mt. Rainier.” Like I’m even on that side of the plane! Hey, you testosterone-and-xanax-voice having jerk! Turn the plane around! Let everyone see the mountain!

Okay, the tag worked! People laughed more! Let’s keep going!

Airplane pilots always talk the same way. It’s like day 1 of pilot school is how to drive the airplane, and the other 399 days are how to talk on the intercom.  “Ladies and gentlemen, if you look out over the right wing of the plane, you can see Mt. Rainier.” Like I’m even on that side of the plane! I think that’s why they don’t give me an intercom going back the other way. Hey, you testosterone-and-xanax-voice having jerk! Turn the plane around! Let everyone see the mountain!

Ha, ha! It’s brilliant, right? Because the notion of passengers having an intercom would be fair and egalitarian, but it’s also totally absurd. Everyone sure will laugh!

They don’t. They actually laugh less at the part about turning the plane around when it is prefaced by the “that’s why they don’t give me an intercom” line – so if I do a show that matters, it won’t include that line, no matter how funny I think it should be.

We can continue to play with the structure of that joke, of course. I don’t know how much mileage the premise has, since observational humor about airplanes retroactively stopped being funny right before the first time Seinfeld did it. But if we continue to deliver different versions of the same joke at open mics and small rooms, and listen back to the recordings each time, it’ll allow us to determine what people actually laugh at, and tell our best jokes at the big shows.

It’s important that we do this by actually recording and listening to the audio from the set, rather than relying on our fallible memories.

Writing in groups and receiving feedback from other comics can be helpful. Other people can come up with tags and punchlines that didn’t occur to you. Fundamentally, though, you have to get up on stage and try out the material in front of an audience, and you have to record it.

Gimmicks

A gimmick

Anything that drives audience engagement is a good thing in that it makes it easier for the audience to want to pay attention and laugh. I’m using the term “gimmick” here not as a pejorative, but to distinguish non-joke things that a comic might do in order to promote engagement via reactions other than laughs.

The single best gimmick I’ve seen is one that the host does on behalf of the performer – that is, to act as a “hype man” for the next comic before that comic even goes on stage. Again, that’s a huge advantage that Edinburgh has: TK has been doing this for a long time, and his enthusiasm spills over and brings audience attention in a big way.

Comics can have our own gimmicks, of course. The other day I just got up and sang “Wagon Wheel” and played guitar. People responded better to that than they usually do to my comedy! At another venue the same night, I did the song again, but then followed it up with jokes: it was late, and the audience wasn’t engaged with the other comics who went up around the same time I did, but they engaged strongly with the music. Now, after the song, many of them went back to ignoring the comedy, but some of them remained engaged throughout my set.

I’m torn on continuing to use this gimmick, because while it’s driving engagement and making my job easier, it’s not making my jokes or delivery any better. Dave Chappelle and Jerry Seinfeld don’t go on stage and lead the crowd in a rousing John Denver sing-along.

Maybe it’s okay that interviewing is broken

Technical interviewing is broken. We all know it. As interviewers, we frequently pass on candidates who end up excelling elsewhere. As candidates, we spend demeaning hours trying to solve brain-teaser data structure traversal problems on whiteboards, and then don’t get an offer.

This is so bad that there are libraries full of books dedicated to how to pass a programming interview. There’s that thick green one, ‘Cracking the Coding Interview,’ which I worked through last summer. A candidate brought that in his backpack, actually, and it came up in conversation with one of the other interviewers… who was horrified that that’s how things are. “Do you study for an interview in any other job? You think the sales guys go home and memorize the stuff from college? No! You just talk about the things you did at the last job!”

Honestly, it seems much of the time like we’re not so much trying to determine whether the candidate is going to be able to perform the job duties correctly (which is the goal of a technical interview) but rather to show off our own prowess in choosing a clever interview problem, the hope being that if the candidate can’t solve the question they’ll be impressed with how we the interviewers are such sorcerers of code that we’re able to traverse a Luxembourg-Schnauzer tree in log(sqrt(log(n))), and that if they can solve the problem they’ll respect us for the low-grade telepathic exchange that’s just taken place.

Now it’s supremely important that we filter out candidates who can’t code from a software development position. If you hire a non-FizzBuzz developer, you’re doing neither the developer nor your firm any favors; the ultimate frustration and non-productivity will not be worth the temporary social kindness of receiving the job offer.

Depending on the nature of the role, it’s also important that we filter out candidates who can program successfully in a competitive programming setting but can’t bootstrap the understanding of our tech stack. If the role requires a deep understanding of the Spring framework for dependency injection, or a whole lot of ORM work, or immediate productivity with Angular 5, whether the candidate could successfully navigate your favorite whiteboard question is almost totally irrelevant.

But how can we test for that in a timely fashion? We can’t rely on spinning the candidate up to fix a bug on our production system, because we’re not guaranteed to have a suitable bug (or a suitably small feature) that we could reasonably expect them to fix in a day, and we can’t necessarily spin them up on the development environment either. We can’t give them a take-home problem, because developers have better things to do with their time, like finding another job and getting paid.

If it was entirely up to the employer, we’d contract-to-hire all the time; let the engineer work with us for 3 months, and if it doesn’t work out, no harm and no foul. That’s not ideal for us as candidates, though, because we might end up building some really great software with no job or equity to show for it at the end of the contract.

In any case, I think this is broken to the point of being stupid. The interview process is a hazing ritual and it allows the employees (who explicitly passed or implicitly would have passed) to be members of an exclusive in-group, and we get to regularly torment total strangers and see some objective proof that we are smarter than they are.

But I also think that this is okay!

“Now wait just a minute, Kaiser, you’re okay with tormenting strangers?”

-you, probably

YES! I am okay with tormenting strangers. I am okay with hypothetically being a tormented stranger again in the future – with enduring back-to-back interviews on consecutive days in which interchangeable 24-year-olds in hoodies asks me about function currying in JavaScript and silently judge my hairline.

I’m okay with this for one reason: If you endure enough interviews with 90% false negative rates, eventually, you will pass one.

In smaller markets, this means that we as candidates might have to move for work. That’s emotionally and financially draining. It’s also one of the best ways we can undergo personal growth.

Furthermore, there’s not really an alternative. Employers can’t pull the rug out from under the engineers in your organization and say “no, this interview process which we used to select you was fundamentally flawed, we are going to be kinder and gentler to the new hires,” because then they don’t get to ask the cool Schnauzer tree question any more and that’s demoralizing. Furthermore, there might not actually be an alternative to whiteboarding (or the equivalent of whiteboarding, but with a laptop), because otherwise somebody probably would have figured it out and we’d all be doing it out of economic necessity.

So yeah, interviewing is broken. And it will be for the foreseeable future.

Do you have a better idea?

Improving Comedy by Imitating Nathaniel

My cousin Nathaniel (called ‘Nano,’ since that’s how he pronounces his name) has Down Syndrome. He is charismatic, exuberant, affectionate, and driven by a desire for attention. In other words, he’s exactly like a comedian.

Comedy genius

As I’ve been formally studying comedy, reading about the structure of jokes, I think back to some of Nano’s performances: he has an intuitive understanding of basic joke structure. For instance, here’s his favorite joke:

That’s Kaiser. No, I am just kidding. That’s Schaeffer.

Here, “That’s Kaiser” is the premise. It’s a false premise, which establishes the expectation that the person he has identified is Kaiser. “That’s Schaeffer” is the punchline – he reveals the truth that the person he’s pointing to isn’t actually me, but rather my brother. And of course we need the sentence in between them for narrative purposes, because otherwise we’re just making two contradictory statements, one after the other.

He iterated on that joke, too. He punched it up by simply calling people by the wrong name, and then laughing. Instead of telling a joke for the sake of the whole room, he did crowd work with an individual, which serves to really engage that one audience member so that they’ll laugh more and bring up the energy of the whole room.

I don’t mean that Nano is doing this on purpose. He’s genuine, raw, and necessarily improvised, which means that his performances are really authentic and conversational. Sometimes this means that he can lose the audience, or that we might go too long between laugh points and get bored. But we can consciously consider the differences between when his antics make us laugh, versus when we’re annoyed with our family member, and use that information as either a pattern to follow or an antipattern to avoid in our own comedy.

Nano also has a tape recorder, which he’ll use to record the audio of things he likes on YouTube, or just to record himself talking. He’ll play it back, and just listen to previous monologues he’s delivered over and over, intercut with this constantly-expanding YouTube-driven mix tape. It’s common advice that you should record every set, listen to it, and consciously consider how to improve. I actually think there’s value in even the type of undirected listening Nano does – he’s not taking notes and tweaking his jokes, he’s just re-listening. When we do that, it helps subconsciously remind us what the order of the routine was last time; if we spoke imperfectly, it also constantly reminds us of the thing we missed, and helps us avoid repeating the same mistake the next time we do that bit.

So be kind and energetic; be direct in your joke structure, with punchlines as close as is practical to the setup; consider your audience feedback; and record and listen to your sets. Really target Nano’s methods. You’ll be glad you did!

 

Getting Started in Stand-up Comedy

Stand-up comedy seems to be undergoing an ongoing resurgence in popularity. Part of this is probably Netflix’s appetite for low-cost content: stand-up is even cheaper to produce than reality TV. The variety of new content delivery channels like YouTube also means that barriers to entry are lower than ever for new performers, and stand-up is easy to bootstrap. Finally, I moved to San Francisco from Montana recently, which means that now I live in a place where there are a bunch of stand-up comedy venues, so maybe it’s always been this popular and I just now noticed.

Kaiser at Edinburgh Castle Showcase

 

Many of us watch comedy in part because we’d really like to perform. We’ve all told jokes that our friends have laughed at, and the glamorous lifestyle enjoyed by luminaries like Louis CK and Bill Cosby is appealing. Like lottery tickets, cryptocurrency speculation, and startup equity, a successful comedy career promises fame, fortune, and a lifetime of enduring prestige. Unfortunately, it can be hard to figure out how to go from casually watching specials on your couch to actually telling jokes in front of an audience. I’ve been doing this for over two months now, and so I decided to write this guide to help you stop dreaming and start doing.

Step 0: Take a class (optional)

A lot of people think comedy classes are a waste of time and money. I respect their incorrect opinions, which is why I wrote “(optional)” up there and made this step 0 instead of step 1.

The funniest people I know didn’t take classes to start, and that includes the people who teach the classes I waste my time and money on. The funniest people I know also spent a long, frustrating time getting to the point where their material was strong and their delivery was funny.

Taking a class doesn’t immediately short-circuit the need to put in the time writing, re-writing, and practicing new material. But it does hold you accountable to work on your jokes every week, and it comes with a built-in framework to get started. Furthermore, your classmates will be a more forgiving and engaged audience than any you’re likely to encounter elsewhere. Finally, many of those same classmates will be out there trying to do comedy themselves, which means they’ll invite you to quality open mics and shows.

I take a weekly class at the SF Comedy College, which I highly recommend if you’re local.

Step 1: Write and practice some jokes

This is a stock photo from energepic.com which I am using to represent ‘writing’

This seems obvious. It’s not. Some people come out to do comedy and they don’t have jokes. They have stories, which might have a sensible chuckle somewhere at the end, but are otherwise sad, rambling, and hard to follow. Depending on the performer that can still be engaging enough that the budding comedian will keep trying it.

Sometimes, people will come out there without any jokes and just try to come up with them on the fly. That’s no good either. Those people are me. I do that. Don’t do that. It’s a huge waste of everyone’s time.

Look: jokes have punchlines and tags and laugh points. I’m not telling you how to design jokes, or opining on the nature of humor. I’m just suggesting, gently, that you tell jokes as part of your comedy routine.

It’s also important that you practice the jokes before you go on stage to tell them. You don’t have to memorize the funny bit about your cat eating your gluten-free quinoa like it’s Hamlet’s soliloquy, but standing up there and reading verbatim off your phone can be really frustrating and it creates distance between you and the audience. I’ve done that, too.

Step 2: Find an open mic and tell your jokes

This is me again. I don’t have a bunch of pictures of other comedians I can just use for this.

Tell your jokes to other people. Tell your coworkers. Tell Lyft and Uber drivers. Corner your neighbors in the elevator. Once you feel confident that you’ve hit upon something funny, find an open mic in your neighborhood and try it out! Depending on the audience, your delivery, the quality of the material, and any number of other factors, the people there might not laugh at it. Other comedians often don’t laugh even at jokes we think are really good. Sometimes we’ll shake hands afterwards and say “good job,” which is genuine.

Most open mics will let you go up for about five minutes. Some will let you have four minutes, and give you more time if you buy a drink. Sometimes, especially if there aren’t too many people signed up, the host will let you go for nine or ten minutes, until you run out of material. In any case, they’ll flash a light at you to let you know you should wrap it up – it’ll probably be the face of a cell phone or a smart watch, but it might be an actual flashlight. Usually, the light means you have one minute left. Once you see the light, wrap up your set and get off the stage. It might not seem like a big deal to you, but for professional gigs, “running the light” (going over time) can seriously mess with other people’s schedules. Get into good habits now. Once you get the light, finish up your current joke and say goodnight.

The jokes that are the best are usually the jokes that get laughs, and you keep those around and try to iterate on them – in software development, we talk about A/B testing, or the multi-armed bandit approach. That’s what we’re doing here. If you’re a psychology student, think about performing operant conditioning on yourself and your set, training your jokes to be good via the stimulus of audience reactions.

If people don’t laugh – and they won’t, not as much as you expect or hope – that’s okay too! If it was easy, if you could just come out and be like a combination of Dave Chappelle and the ghost of Richard Pryor after writing jokes for half an hour, there’d be no reason to do it. Keep practicing, keep writing, and keep attending open mics.

Step 3: Be a regular at your favorite open mic

TK Moyer, @tkmoyer88 on social media, host of my favorite open mic

If you remember only one thing from this post, make it this one. If you go to different open mics all over the city you’ll see a whole lot of new faces, hear a whole lot of new jokes, and you and they will blend forgettably into each other’s backgrounds. If you pick one open mic and make it your church, though, it opens up the possibility of building a real mutually beneficial promotional relationship with the venue. The other regulars at the same place will have seen you before, which encourages you to try new material frequently so they don’t get bored. It also means that the other regulars will grow to like you, which means that your performance will be more engaging, and you’ll get better feedback.

Furthermore, if you get to the point where you’re feeling confident enough that you want to invite your friends and coworkers to come watch you, having a consistent time and place at which you do comedy means that they’re more likely to be able to attend in the future. If your schedule constantly changes, it’s harder to bring an entourage with you, which means it’s harder for the venue to care since you’re not bringing in people who will buy drinks.

I got really lucky with this strategy. The first open mic I went to was Edinburgh Castle Pub, which is a short walk from my apartment. The host, TK Moyer, is a high-energy showman and a great comic, which makes it easier to bring other comedians and audience members back again and again. Really this whole blog post is just an ad for the Edinburgh Castle open mic, which happens every Monday at 8 pm at 950 Geary in San Francisco. 

Step 4: Keep going

It’s hard. Comedy is hard. You get funnier as you keep working at it. You get funnier faster if you work at it consciously, considering the rhythm of the setups and punchlines and tags instead of just going at it haphazardly. But regardless of how quickly or slowly you improve, you have to put in the time.

 

Wrapping Text and Making Memes

Play with the meme generator here.

The project I’m moving to on Monday is written using a different tech stack than what I’ve done previously. Instead of a web service in Spark or Play, this is a world-facing web app written in Spring Boot. I’m decently comfortable with Spring for dependency injection, so jumping in isn’t too terribly weird. I chopped up their tutorials on form submission and handling uploads and built a feature-poor meme generator.

Captioning images on the server side is a task for ImageMagick, or at least it used to be. I found Im4Java, a Java wrapper last updated in 2012, and hacked together a service method to write some text on the image:

It’s not my favorite code I’ve ever written. The wrapper library is fighting an uphill battle because you’re literally just putting a string together and then executing it as a system command, and that makes it difficult to get useful feedback. You have to call those property methods on the operation object in the correct order, since they’re just concatenating the string together. It’s frustrating. But it kinda sorta worked, and the rest of the application did some file storage and form handling stuff, and it served the purpose of “play with Spring Boot.”

Unfortunately, I didn’t have the means to compute how big the text was going to end up being on the resulting image.

download

When I showed this to my friend Chase Maier, he pointed out that this is a much easier task using an HTML5 Canvas – splat the image onto the canvas, draw your text, and do whatever you want with it. Now, “play with canvas again” doesn’t count for the “play with Spring Boot” part, but we’ll still be able to do our persistence in Spring Boot later.

The full source is here, but let’s focus on the js method that’s doing the equivalent of my java code above:

It’s not that the equivalent js code is much more compact than the Java code was – the important thing is that it’s easier for me to measure the width of the lines for the sake of wrapping:

The results are much prettier:

download-1