Binary Solo
My name's Ayush. I'm a freelance web developer and I run Chapter24 on the side.

I mainly write about web development using "boring" tech like Ruby on Rails, HTML and CSS; with the occasional musing about product design thrown in.

I'm on Twitter @ayushn21.

000001000001100001110000111





A static HTML website starter template using Bridgetown
Static HTML websites are incredibly popular these days. They're unparalleled in performance as you can serve them via CDNs which are blazing fast. Also they're incredibly easy to deploy thanks to services like Netlify.

To build static websites with changeable content and without repeating code requires the use of a static site generator.

There's quite a few popular generators; but being a Rubyist, I've used Jekyll for a number of websites. While it's awesome; I thought it was a bit out of date as it does not integrate Webpack by default. Anyone who's looked at a webpack.config.js knows that hitting…
The usefulness of Wheaton's Law in product design
Software product design these days is becoming more and more driven by metrics. A side effect of that is products are becoming largely homogenous. The recent release of Fleet by Twitter is a case in point. Companies are focused on making some graph or other go higher and higher instead of building cohesive and engaging user experiences.

This obsession with metrics often leads to experiences that are egregiously user hostile. Wheaton's Law is an implicit or explicit prerequisite for working at most software companies; however very few seem to apply it to their product design as well.

In this post…
Demystifying cookies in Rails 6
Cookies are used in pretty much every modern web application. They're used for various purposes such as facilitating user authentication and storing user preferences. Since they're so widely used it's no surprise that a full-stack development framework like Rails has a simple and convenient API to manage them.

In this post I'll describe the different types of cookies supported by Ruby on Rails and how they work under the hood.

Types of Cookies in Rails


Rails supports the storage of 3 kinds of cookies:

  • Plain text: These cookies can be viewed and changed by a user.

  • Signed: Signed…
How Chapter24 works under the hood
Chapter24 is a super simple to use blogging platform. I built it and am running myself without any collaborators. That meant I needed a tech stack and architecture that made it quick to build and easy to run as a solo endeavour.

Tech stack and high level architecture


At its core, Chapter24 is a Ruby on Rails monolith that runs on a single $5/month DigitalOcean box. In keeping with the Rails philosophy, I'm using server side HTML rendering with Turbolinks and Stimulus on the front end. I've got Sidekiq for running background jobs and my database is a DigitalOcean managed…
Web designers, please stop punching your users in the face
Modern web design has many flaws; however it's truly mind boggling how many websites are positively user hostile with subscription popups.

It happens way too often; I load a web page or I'm scrolling down one and I get a punch in a face with a modal that says "SUBSCRIBE TO ME! I DEMAND YOUR EMAIL ADDRESS!". I have literally no idea how or why this technique even works (assuming it does work); especially when the copy is passive aggressive. All it makes me want to do is close the window.

Why a developer or designer would want…
Avoiding session replay attacks in Rails
There are a lot of good reasons to roll your own authentication rather than use something off the shelf like Devise. This comes with its own pitfalls and a rather easy mistake to make is to leave a vulnerability for session replay attacks by solely using the "user id" as an authentication instrument. 

In this post I'll describe how such an attack can be carried out; why it's so serious and how to protect your app against it. 

A typical login mechanism


A common pattern for Rails authentication is to have a SessionsController with a create action for login and…

Subscribe to Binary Solo


We'll send you an email every time a new post is published. We'll never spam you or sell your email address to third parties. Check out our privacy policy for details.