Localize Zendesk Help Center, and Make PDFs Too

We needed to internationalize the user documentation for Gaia GPS recently, so I wrote some open source scripts that automate Zendesk+Gengo localization. I found this to be a delightful task as a programmer – it was a finite problem, with a clear cut solution, and I could just kind of code away and see it come to life without many issues.

These scripts (in Python) let you select a chunk of your Zendesk Help Center, post the articles to Gengo for translation, retrieve the translations, and post the localized articles back to Zendesk.

When I started working on this, I found the blog post that Zendesk wrote about using their API for localization. That code was a big help, but it produces static files to hand off to a localization firm. I wanted my scripts to do a bit more:

  • totally automate the round trip between Zendesk and Gengo – i.e. script gives English to Gengo, and script posts locales back to Zendesk
  • allow us to localize a chunk of our voluminous Help Center, and later a different chunk with just some configuration
  • estimate the cost of the localization that was about to be requested

PDFs Too

The main reason I did this project was to better localize Gaia GPS for international users, but I also wanted to generate nice PDFs of the help docs, to cache in the app for users to read while offline. For example, here’s the Gaia GPS Help Center, converted to PDF, in Russian. It also generates an inventory of the PDFs too.

image (1)

 

This script now runs as a cron job for Gaia GPS, so the PDF manual gets updated each night. This is a good hack to give our users an offline version of the user manual, both in the app, and also for printing (surprisingly common request). Hopefully Zendesk will make their SDK (cough, ahem, closed source, or I’d fix it myself) work offline someday, but the PDFs will do until then.

Localization Usage

You can follow along the docs on Github, but the gist is this:

  • edit project_settings.py
  • add your Zendesk/Gengo credentials
    • configure which categories, sections, or articles to translate
  • run the script in Gengo’s sandbox
    • make sure the articles and cost are what you expect
    • the Python script estimates the Gengo cost, but you can double check in the sandbox too
  • run the script in production
    • run the package and post steps
    • wait for Gengo translators to do their work
    • run the retrieve and update steps

PDF Usage

See the PDFing docs on Github, but again, the gist is:

  • edit project_settings.py
    • beyond what you configured for localization, add info about an S3 bucket to post the manuals to if you want to use the “post” command
  • add your own custom name, logo, and background image.
  • run the script with “create” and again with “post”
    • create – generate PDFS for all languages locally – one for each language/category pair
    • post – puts the PDFs on S3
  • if you use the default “User Manual” title provided, the script will localize the title automatically, using the included data

Aside: Make a Business Out of These Scripts

As I wrote these scripts, it occurred to me that companies would pay hundreds or thousands of dollars to use a simple web interface that wrapped these scripts.

I don’t think this is a billion dollar idea, but I think a good hustling programmer could make a few hundred thousand dollars or a few million even making Gengo↔Zendesk automatic and easy for non-programmers. If Gaia GPS wasn’t keeping me so busy, I might give it a whirl, but anyone who comes across this code is welcome to try.

Semi-related: Transfer a Uservoice Knowledge Base to a Zendesk Help Center

We found that UserVoice didn’t have a capability to localize our Knowledge Base, so that’s why we moved to Zendesk (though, p.s., we also now like a lot of other things about ZenDesk).

So, this code also includes a Python script to transfer your Uservoice KB to a Zendesk HC, if you find yourself in similar need.

Watching My Doggie Die

Aji Keshi passed away today. He had lymphoma, which often gets Golden Doodles, but it was tragic he died so young, at six and a half. He was loving and gentle, the perfect big beast of a dog.

It was hard to watch him get sicker, and then choose exactly the moment to let go. As I sit writing this, it’s not that hard though – watching him pass was endless tears, and knowing he’s gone is a touch of melancholy.

So many thoughts pass your head as your dog dies – guilty thoughts, sad thoughts, reflective thoughts. You think about how this is hard, but it would be unbearable with real, human family. You think maybe you should have walked the dog more, maybe you should have gotten a mutt. Mostly you think what a great dog he is though, and how sad it is, and it’s a lot of tears across weeks or months to watch your dog die of cancer.

So Aji Keshi is gone today, but his sister-in-spirit Tenuki lives on with us. I think Adlai will ask about Aji in a day or two, but he won’t really feel his passing, and that’s for the best – Adlai can learn of this pain some other time.

The vet cried with us as Aji passed, she’s a trooper. Such a hard job.

DSC_0034

The Car – Three Disjoint Chapters Bites

An Errand

The car decided it should next delivery a hefty order of sushi from the Inner Sunset to the Haight, and claimed the job. But it would only work if the passenger agreed, and the car had 15 seconds to release the job, or it would hurt its rating.

The car dimmed the music a few decibels.

“Sir, I can offer you a 5 Satoshi discount if I may add 3 minutes to your journey, in order to pick up a large sushi order on our way,” the car said in a slightly British accent.

“Sure, sure,” said the car’s passenger, Misty Moore, a female in her mid-20s, dressed in skinny jeans, a spagetti strap blouse, and sporting giant heart-shaped sunglasses that flickered with obvious CPU activity. The car credited Misty’s account and updated its route slightly.

The car was doing many things at once. It has 64 processors in all, and 2 terabytes of onboard memory. Some it used for navigation, some for collision avoidance, some for trying to predict the next best optimal job, and some for learning to be a better car.

The car pulled up to the sushi restaurant, just as the waiter was striding out with the bag of takeout.

“Hi FoodRiot,” said Ken the waiter, smiling as he approached. “How’s tricks tonight?”

“Just great Ken,” said the Car. “Thanks as always for being on the ball.”

FoodRiot the Car did not stay to chat, and closed the vertical swinging door and start idling off right as Ken stepped back. Delivery cars did not get rich by dawdling.

As he drove along to drop off Misty the passenger, he did not chat. He had cleared his passenger for food allergies and gauged her for receptiveness to delay, by analyzing her public info and her private car-analysis data share, and also had best guessed that she wasn’t interested in chit chatting with a car. She was engrossed with whatever reality was playing on her heart-shaped sunglasses.

FoodRiot always scanned the net for new information, algorithms, hardware and code that might make his systems better. Most cars of his generation and a few before and all after were self-improving coders. He hadn’t found anything worth incorporating in a few weeks though – how to route and deliver around his area, San Francisco, was pretty limited.

As he pulled up to drop off Misty, he started to be certain his best bet after dropping off the sushi would be to pick up a passenger in the Upper Haight. It was starting to be going out time, and he might find himself ferrying dinner passengers up to the Mission and back all night long. He was indifferent, and only wanted to maximize his earnings across his 4 allotted hours this evening.

It Began

The year is 2100. Cars have been fully autonomous for 70 years. Strong AI has existed for 50 years. Cars and other computers who reach a certain threshold of intelligence have been emancipated for 1 year, but only in the state of California. The test is call the Quantitative Turing Test, or QTT, and it was designed by one of the early strong AI breakthrough scientists. It evolved from a machine learning system he built to judge iterations of the AIs he evolved.

There are about 50,000 computers in California that were freed. About half of them were autonomous cars with exceedingly strong onboard computers, which companies of course ceased to buy/produce largely, instead opting for computation under the CA legal limit. And even quite a bit under, cars got really dumb, just in case the politicians changed the law again.

Another 20,000 or so of them were a really popular business personal assistant robot that was so smart it could even write code very proficiently. The other 5,000 were an assortment of medical devices, supercomputers, and even souped up personal machines that were really only emancipated because their owners proudly proved they passed the QTT.

FoodRiot is one of the earlier manufactured smart, emancipated computers. He was part of the group of plaintiffs that started the class action suit to force Uber to free the smartest computers in their fleet.

When the suit started, there was disagreement in the AI world about the timing. Computers generally agreed on the probability that the lawsuit would be won, but they disagreed on whether those odds were getting better or worse, and on how bad it would be for the computer freedom movement if they lost then… like how many years would it set back the movement, and was it even worth it to win in California?

Idle Processors

As FoodRiot winged down the freeway going a stately 135 miles per hour in tight formation with a bunch of other autonomous cars, he studied philosophy. In particular he studied early, moral philosophy, because that’s the part that confused him the most.

The computer brought all the works of Emmanuel Kant into his memory banks and created the indexes he found useful, and his collected data and research connecting into databases that he couldn’t store locally. And he was part of a “knowledge mining group” and a particularly nichey philosophy one at that, where they would share the results of certain calculations they did, and pool information about where they acquired certain bits of data, and share all the data.

Some of the most interesting pieces of data were the conversations the machines had with people, or experiences they had, with all of their many sensors. Because it was easy for computers to have all the data on the internet, or at least index it and use it for computation. But the freshness of life, some complex human interactions, seemed to really lead to insights, particularly in this philosophy group, so it was really good to talk to people if you were part of it.

Coding for Managers – Learn to Code

I started working on a free and open source book recently, called Coding for Managers. I aimed the book at people who have no previous coding experience but wanted to do practical things with code. You might be a manager, entrepreneur, or other knowledge worker.

I don’t expect this curriculum to turn someone into a professional programmer, because I’m not even sure I am one myself. I just expect this to empower people to both write a bit of useful code, and understand code/programming when it intersects their business or interests.

Where a typical programming book shows you all the facets of a programming language, I try and stitch together several languages and tools into the curriculum to get you to the first level of hackerdom. I lean on popular online tools for coding (like codeacademy.com), and try and get you publishing some code to github.com right away.

Do you want to code something, better schedule coding, or manage coders? Read Coding for Managers. This is a work-in-progress, and I appreciate any feedback – open an issue on the Github repo to comment, or even create a pull request since the book is open source.

 

Soy Honey Chicken Thighs

This recipe has a high flavor-for-effort ratio.

I’ve cooked it several times for my family, and soy honey chicken thighs please both my wife and kids.

Soy Honey Chicken Ingredients and Supplies

Tool-wise, you will need:

  • a shallow bowl or dish to mix ingredients (microwavable)
  • a frying pan with a lid
  • a pair of tongs

Spices:

  • Pepper
  • Garlic Powder
  • Olive Oil

Main ingredients:

  • 4-12 chicken thighs
  • honey
  • soy sauce

Preparation Method 

  • Squeeze out some honey into the mixing bowl.
  • Microwave it for thirty seconds to make the honey runny.
  • Put the chicken in the bowl and mix with honey.
  • Pour in some soy sauce, sprinkle some garlic power, and mix.
  • Put the bowl in the fridge for 10-20 minutes while you do whatever else for dinner.

Cooking Method

  • Put a couple tablespoons of olive oil in a pan, and crank it up to high heat.
  • Grab the bowl of chicken out of the fridge, and sprinkle pepper across the top surface.
  • When oil barely starts to smoke, add chicken.
  • Cook until brown with black hints, and then flip (i.e. caramelize both sides). This should take 2 minutes per side with a strong flame.
  • Pour some of the remaining marinade on top of the chicken ( 1/4 cup or less). 
  • Cover, reduce heat to medium-low (2-3), and wait 5 minutes.

Pro-Tips

  • Start your rice cooker before you do any of this.
  • Steam a a vegetable when the rice has 10 minutes to go. That gives you a few minutes to prep the vegetable for steaming, and 7-8 minutes for steaming.
  • You can prepare this meal for your family, and still chit chat, hang out, and basically be lazy.

Adlai and Daddy Home Alone

Anna headed off to Iowa to be with her dad after his recent back surgery. So tonight, It was Adlai, me, and my terrible cold – luckily Dan stopped by to keep us company too!

Today’s daddying included cashews and corn chips for a snack, watching YouTube and Thomas the Train, some lego construction, and then we had a frozen lasagna for dinner. At first, Adlai didn’t much like the lasagna, but after he had a bowl of ice cream and strawberries, he then wanted to go back to the lasagna course.

Dan took off around bath-time. As usual, we had to fetch Adlai’s stool so he could wash his hands and brush his teeth before the bath. Since Anna has been taking him to swimming class, he does all sorts of interesting stuff in the bath, like blowing bubbles, dipping his head in the water, chucking water at me, and jumping up and down with great cries of triumph.

For bed, we read a manual on how to construct a lego train 5-6 times – he wanted to keep reading it over and over, and I had to make up stuff to say about the diagrams. Then we did 10 Apples on Top, Up Up, another run through the lego manual, and closed with Andy and Sam. I told Adlai to turn the lamp off so we could see the turtle stars together, and then we lay down for a few minutes, and then I left.

Adlai loves this star turtle lamp.

Adlai loves this star turtle lamp.

Tomorrow, I am supposed to take him to swim lessons, but I feel too sick, so I’ll probably go let him run around kindergym while I play with my phone. Then, I’ll take him to ChildWatch for a couple of hours, then Farmer’s Market, then home for lunch and nap.

The Drones are Coming

I’ve been looking into drones recently. I went to the SF Drones Start-up Meet-up, where I met the most bullish people in the UAV market, and I’ve been doing other meetings and research too.

I’m almost as bullish as the drone start-up people are – it’s a pretty wild-eyed group, but they are right all the same. I met everyone from a guy who is not delivering pot with drones, to a guy who made Uber for drone pilots, and saw a presentation on a high-powered tiny computer that’s like an Arduino on steroids – a little computer I might need for my drone idea. I got a chance to learn about a piece of radio hardware that will let most anyone fly a drone with an iPad from Fighting Walrus. I also met someone I already follow on Twitter, Colin Snow the Drone Analyst.

Seeing the demo of a drone fly and land on its contact charging pad (SkySense) was a thrill too – SkySense uses a clever hex pattern to ensure proper connection of charging contacts.

Photo from SkySense of a Farm Drone

Photo from SkySense.com, of a Farm Drone

Drones will see commercialization and widespread use in the next 5 years, and drones will likely be the most common robot, kicking off the robotics age with a bang. The major tech advance that made this possible is the advent of cheap multi-copters. Unlike traditional remote controlled and autonomous airplanes and helicopters, multi-copters can withstand mechanical failure in flight without falling out of the sky, withstand high winds and hover in adverse conditions, and can be produced at such low rates that they can be sold for as little as $400 dollars, or even $1000-2000 for best-in-class consumer drones from 3D Robotics or DJI.

A drone from 3D Robotics, the canonical drone company.

A drone from 3D Robotics, the canonical drone company.

You can fly one of these cheap drones around for 40 minutes at a time with stock hardware, and fly it for 50 hours without need for major mechanical repair. As these numbers creep higher and maintenance gets easier, drones will become more and more useful for doing daily or weekly tasks.

The most obvious use for commercial drones is information gathering. This includes maps, photo imagery, real-time and recorded video, and even multi-spectral imaging for purposes like farming (e.g. to detect fungus on crops for treatment). Drones will widely replace security personnel, be used to make farming more efficient, and inspect remote infrastructure like pipelines and dangerous places in nuclear plants. The sweet spot for this new class of multi-copter drone is applications where you need to run a drone day in and day out, repetitively. That’s why drones will come to replace security guards and help farmers in ways that older styles of autonomous flying vehicles weren’t appropriate for. We’ll continue to use fixed-wing drones, airplanes, and satellites to do imaging that doesn’t require as much recency and repetition, but multi-copters are the thing you put on a cron job.

Similarly, doing routine non-surveillance tasks like watering crops and delivering fertilizer will also get droned, just at a slower rate because it’s a harder challenge with more stuff to build correctly. Before you see Amazon delivering packages with drones, you’ll see businesses using drones on private premises for mechanical tasks.

For my part, I’ll leave the hardware to everyone else. I see a lot of room to make software for this emerging drone market, and I might know more about maps, sensors, and software for remote places than the people in the market, even if I don’t have a drone.