Stop Writing Code!

Ami Goldenberg
FairFly
Published in
5 min readJul 26, 2018

If there is one thing I’m allergic to, its wasting time. And for me, working on non-core business features is usually a waste of time so I try to minimize it.

I’m a fan of all the organizational buzzwords such as “move fast and break things”. I really do believe that a company’s main edge is how fast it runs. Especially these days when starting new businesses keeps getting easier. But as funny as it sounds, focusing on the core business is not always trivial for dev teams. There are many distractions, bottlenecks and non-core features to develop (ahem ahem, GDPR).

What can we usually save time on?

We can usually save time on tasks that have one or more of these properties:

  1. Any task that is not part of the company’s core competency
  2. Tasks that sound like someone must have done it before
  3. Tasks that have a SaaS product we can pay for that is doing the exact same thing
  4. Tasks that fall between one or more SaaS products’ features

This post is about changing the way and mindset in which we approach such tasks so that we can leverage existing tools and technologies to help us quickly burn through such tasks and move on to what’s really interesting, improving our product fast! This post is not about compromising on your standards and quality and “cutting corners”. We are merely talking about ways to get to market faster.

We are going on a short tour where you’ll see how to answer various product and R&D demands without breaking a sweat, minimal writing of code and close to zero(!) maintenance. But first…

Meet the toolbox

  1. AWS Lambda and the Lambda marketplace — Serverless code!
  2. Zapier — a workflow automation tool. It can connect to almost anything and even run code! Super quick and easy
  3. DataDog — infrastructure (and now data) monitoring tool
  4. Alfred — mac OS launcher app that lets you build amazing workflows that save you loads of time. Here’s an example
  5. Redash — A dashboarding/querying tool that connects directly to DBs and runs SQL

Lets take the tour!

“Our team is repeatedly typing the same commands or running the same tools”

If you think about it, you’ll see that there are many repetitive things you do at work. Visiting URLs and doing the same action, typing certain terminal commands, etc. To give two examples:

  1. We use Kubernetes to orchestrate and manage containers in a cluster. While the system is beautiful and the CLI tool is great, you still have a lot of repetitive work to do. There have been several solutions but one of our team members created an amazing (open source) Alfred Workflow that just made working with Kubernetes fun!
    - Need to tail one or more containers? Just type kl <name> and you you got it!
    - Need to scale containers? Just type krp <name>
    It will even notify everyone on our Slack dev channel!
  2. There are a bunch of websites we keep visiting, with or without parameters. For example, analyzing a certain container’s resource usage usually involves doing into DataDog -> metrics explorer-> selecting the deployment name and all the metrics we want. Instead, we created the kdm command in Alfred which lets us choose a deployment from a list and it will go and do all the work for us!

“We want alerts based on data from the transactional DB, based on anomaly detection”

Classic thought exercise, how do I get advanced alerts with anomaly support in the most lazy way possible?

After a quick search — DataDog supports anomaly detection monitors, but it can’t query MySQL like we want (their integration didn’t meet our demands). Should we modify their 1000 lines-of-code integration? Hell no. Write our own? Ain’t nobody got time for that!

Let’s get something that can query a DB with different schedules per query and has an API. Why that’s Redash of course!

Now we just need to connect the two and that’s where AWS Lambda comes to the rescue. Being lazy again.. it turns out that AWS Lambda has an app marketplace and they happen to have a DataDog integration (datadog-process-rds-metrics) we can tweak to our purpose.

Eventually, it only took us a few hours of simply connecting the dots to set all of this up:

  1. Writing the SQL queries
  2. Lambda code to send them to DataDog
  3. Build the anomaly alerts in DataDog.

“We need to collect feedback from users and have it entered our DB”

We used Typeform for the feedback collection. You can add hidden parameters in each sent form so we put some reference IDs to our DB. Then we used their Webhooks functionality and Zapier to have all feedbacks sent to RabbitMQ and then to a consumer of ours which inserted to the DB.

So Typeform -> Zapier -> RabbitMQ -> DB

“We need to process 4 million XMLs on S3 without breaking a sweat”

Use AWS Lambda with a trigger when files enter an S3 folder. Then just use the CLI to move to the input folder and you’re done! Learn more here

“Managing Kubernetes files is hard”

We all know managing Kubernetes files and keeping them in sync with internal standards is tough. That’s why we found Jsonnet, a JSON templating language, is an awesome tool for creating hierarchical JSON files with inheritance, saving boatloads of time and complexity. This article by the nice fellows at Databricks certainly enlightened us.

There is another tool, Ksonnet (based on Jsonnet), by Heptio which is supposed to make life even easier, but at the time it was lacking documentation and we decided to skip it.

“Auto release notes”

We wanted to have released notes sent internally to relevant teams whenever a deploy was happening. But, alas, we are lazy and do not wish to actually send them every time. So we used Zapier!

  1. Listen on pull requests to our master branch on Github
  2. A “code” block on Zapier then takes all the commit messages, looks for the pull requests notes by developers as well as the JIRA task IDs
  3. Zapier queries JIRA for the task summaries
  4. Zapier sends an email to relevant people inside the org with all the information

To conclude

By opening yourself up to the myriad of free, open source, or even paid tools out there, you can save your organization so much time and money on writing and maintaining code that may not even be part of your core business.

How does one learn about new tools? My main feeds for new tools are:

  1. StackShare weekly digest
  2. Github Explore
  3. HackerNews

So embrace the “lazy” way of thought, it will actually make you much more creative and help your team run faster!

Would love to hear other “laziness” stories or get any feedback from you at ami@fairfly.com.

--

--

Ami Goldenberg
FairFly
Editor for

Dad, geek and builder. CTO @ FairFly. Fan of moving fast mentality.