Engineering Blog

Show/Hide Password Text View—In Swift!

Getting the UX around user sign up is important. That’s why we built our own password visibility toggle, and we’re open sourcing it so you can use it too.

ShowHidePasswordTextField

Continue reading Share on Twitter View on Github

Single Sign-On Using Guidebook

Guidebook supports a form of single-sign on (SSO) called SAML. SAML is a process that allows users to authenticate themselves against an external Identity Provider (IdP) rather than obtaining and using a separate username and password stored by Guidebook.

Using SAML, Guidebook can serve as a SAML Service Provider (SP) allowing you to provide SSO services for your domain.

This document outlines the steps required to add a new SAML Identity Provider (IdP) to Guidebook.

Continue reading Share on Twitter

Guidebook's Progress Button Open Sourced

The recent release of Guidebook 4.0 included a new version of our download progress button which was heavily inspired by the progress button employed in the iOS app store. We received a number of requests to demonstrate how we created the progress button, and we decided to take it even further: we open sourced it.

Guidebook's progress button

Continue reading Share on Twitter View on Github

Django: Super debugsqlshell Shell

When you’re nearing the expressive limit of the Django ORM, it’s often useful to open up a python shell and see exactly what SQL Django is generating for you. django-debug-toolbar includes the debugsqlshell command for printing out the SQL run in the django ORM – making SQL exploration easy.

debugsqlshell can be a little plain, though – we’ve grown used to the shell_plus command from django_extensions for automatically importing all our models and tools.

For the best of both worlds, we put the two shells together in a third management command that imports all your django models and prints any SQL you run via the Django ORM:

Continue reading Share on Twitter

Indexing HTML Documents In Elasticsearch

In preparation for a new “quick search” feature in our CMS, we recently indexed about 6 million documents with user-inputted text into Elasticsearch. We indexed about a million documents into our cluster via Elasticsearch’s bulk api before batches of documents failed indexing with ReadTimeOut errors.

We noticed huge CPU spikes accompanying the ReadTimeouts from Elasticsearch. The culprit, as it turned out, was a combination of our user-inputted text and our currently configured text analyzers:

Continue reading Share on Twitter