Writing on software design and anything else

SVG Sparklines with no dependencies

Discover how to create SVG sparklines with no dependencies, improving performance and reducing bundle size.

Dynamic Blocks with StreamField: How I Built an Online Store with Django

As a developer, I always strive to find ways to make my projects more friendly and customizable for the end user. Recently, I created an online store called passionbox.cz for my partner using Django. In this blog post, I'll share how I used StreamField, a library that allows the creation of dynamic blocks on the page, to create a flexible and easy-to-manage interface for the store.

Shopify-like product variants in Django online store

In this blog post, we will discuss how to create Shopify-like product variants in Django. Our goal was to have a product with multiple variants, each with its own price. We liked the approach used by Shopify, which uses product options and variants.

Using Github Codespaces for an Efficient Django Development Environment

I ended up writing online store almost from scratch because of product and market restrictions and then stuck with it because price and freedom it provides. Meaning some features like live preview are not available. This was possible thanks to my partner knowing basics of HTML.

Functions-as-a-Service on Fly.io with FastAPI

Fly.io recently came with a very intriguing service called Machines. Machines are designed to quickly(in around 400ms) start a docker image when a request arrives and turn off when the process exits. This is amazing because it allowed me to run getimages.social without worrying about the costs.

Plotting Strava rides with Cartopy

For a long time I was thinking of improving my GitHub profile. I wanted to show something cool. Maybe map of my last ride would do the trick.

Shopify a cookie lišta v roce 2022

Od 1. ledna 2022 se mění pravidla při práci s cookies. Je v tom trochu zmatek a konkrétní technické přístupy se velmi liší.

Podcasts I listen to

I love podcasts, I've been listening to them for years now. Here are the one where I listened almost every episode.

Inertia.js, React a Django

Po přechodu na single-page aplikaci (přibližně před rokem) se naše produktivita nezlepšila i přesto, že jsme tým prakticky zdvojnásobili. Říkal jsem si, že se to časem srovná. K přechodu nás donutil vývoj okolo 3rd party cookies, protože naše aplikace běží v `iframe` v administraci e-shopu.

You don't need a SPA

I'm building Shopify apps using Django and React. When I first created Candy Rack it was server rendered HTML with single or multiple React components on a page. Since then the web ecosystem evolved. The most important change are the restrictions around 3rd party cookies. To address this problem Shopify came with an alternative authentication method that doesn't rely on cookies called session tokens.

Websockets on Django and React

For our new Shopify app I needed to create a websocket server that broadcasts a message when model is updated. I ended up with this solution. Start with installing `channels` and `channels-redis` to you Django app.

Hi-speed request filtering using Cloudflare Workers

Recently I was facing very interesting challenge. We distribute our app's javascript using Cloudflare. Sometimes the <script> tag stays on the site after the app is uninstalled resulting in unnecessary load on our server.

Pipenv is great

I wanted to write something about Pipenv for a long time. With the new release, I think it's a good time to thank authors and maintainers of Pipfile. I started using Pipenv exactly two years ago and haven't stopped ever since. This post is a writeup of my views from the perspective of app developer.

My year 2019

I'm quite late to the party. Actually I've already done my taxes. But since I'm not using Instagram anymore. I decided to post some pictures here to remind me what actually happened.

Chrome 80, iframes and cookies

Google is always kind enough to provide us with something to do. This time it's about Chrome defaulting cookies to SameSite=Lax and a relatively new `SameSite=None` option.

Forward your voicemail to Slack with Twilio

Functions are a way to run your logic directly on Twilio servers. We'll use them to construct TwiML response and then to send a message to Slack.

Using Create React App 2 with Django 2

I finally got opportunity to work on a project that used Django together with a React app. There's a combination of packages that help with integrating CRA and Django.

Virtual support phone number with Twilio

For a long time I was looking for a simple and, well, cheap solution to isolate my support phone number from my personal number and I'm going to share my solution with you.

Cool image loading with Gatsby.js v2 and Netlify CMS v2

Time has come and even I got the opportunity to try out currently trending Gatsby.js static site generator. The most popular feature, at least from my point of view, is Image Processing with gatsby-transformer-sharp.

Visualizing Strava activites with Folium and Jupyter Notebook

Few days ago I participated in my first race ever! It was short triathlon called Slapský triatlon. My friend was talking me into it for almost two years. The swimming is 500m, cycling is 34km and running is 4.5km. I don't swim or run that much but I was pretty sure I can handle this.

Local state management pomocí Apollo

Apollo je sada nástrojů pro práci s GraphQL od tvůrců Meteor.js. Apollo Client slouží k napojení UI na data, Apollo Engine na infrastrukturu a tooling a nakonec Apollo Server pro zpřístupnění REST API pomocí GraphQL.

Statically generated e-commerce using Shopify and Netlify

I recently fell in love with Netlify because of its simplicity and speed. Nelify allows you to build and host your website in one place with generous pricing levels. I wanted to explore what are possibilities when it comes to e-commerce so I decided to create a simple statically generated website where I could sell some products.

Export Rails model data as CSV

I needed to allow my customer to export a bunch of tables. After some digging, I found a pretty neat solution.

Toggl reports to Slack for free plan

I wanted to expose a bit of insight to my team. As we work in kind of upredictable manner we could use a report on who worked a day before. We use Trello as our time tracking tool.

Next.js - server-side rendering bez práce

Skvělý framework Next.js se dočkal už čtvrté verze. Oproti verzi 2, kterou jsem zmiňoval minule je výrazně rychlejší a má několik velmi zajímavých novinek.

Tips for writing maintainable redux apps

I attended great talk by Gabe Scholz which was full of useful and concise tips for writing better and more maintainable redux apps. It struck me that I was just recently coping with these issues so I decided to share my view on these issues.

Upload multiple files in Django admin

In my current project I wanted to let user upload multiple photos at once in Django admin. I got intimidated by huge libraries that do this and dozens of other things. So I ended up using small tweak which works surprisingly well.

Next.js - server side rendering for masses

Recently I had opportunity to use Next.js on a client project. I already heard how much work it saves but I just couldn't believe how simple it was.

Why I got interested in GraphQL and why should you too

GraphQL is query language created by developers in Facebook to make their app development manageable. There are quite a few reasons why should we be interested in it even at small scale.

React Amsterdam 2017

Last Friday I attended my first React conference. It took place in Amsterdam. So once again I got the opportunity to visit Amsterdam because of a conference.

On writing and publishing Shopify application

Recently I got interested in small and hopefully profitable projects, sometimes called Micropreneurship. Later I found that one of the most "simple" ways to start a SAAS is Shopify application.

Expose local port as HTTPS endpoint on the internet

I recently needed to expose local port of my dev machine to the internet. I realized I could combine SSH port forwarding, nginx and letsencrypt. Ubuntu 16.04 is my OS of choice on the server.

Převléknutí plastových reproduktorů do stylovější podoby

Už jsou to tři roky, co jsem rozebral plastové reproduktory a jejich elektroniku naskládal do krabice od vína a přikryl lepenkou z IKEA. Chtěl jsem jednu bednu, ideálně s bluetooth, ale nepotřebuji drahý stylový reproduktor. Nedlouho poté jsem svůj výtvor vylepšil bluetooth příjmačem a designová reprobedna byla na světě.

Django: Under The Hood

This year I a had an opportunity to attend Django: Under The Hood. A single track conference focused solely on Django. Due to a fact that significant number of contributors are attending, it's great opportunity to discuss almost any issue with people who actually have a clue what is going on.

Nodemon: Breakpoints in node applications

Nodemon is tool to improve backend JS development. It reloads files automatically so you don't have to restart the server every time. Another cool thing is that you can debug the code in chrome dev tools.

Python, LEDs and WiFi

I lost interest in electrotechnics almost a year ago. I turned off my binary clock, temperature sensor and left it in a drawer. But before that I bought ESP8266, cheap WiFi microcontroller running lua. It was unreliable and hard to program.

Island: část 2.

Cesta do Þórsmörk pro nás začíná u vodopádu Seljalandsfoss. Vodopád Seljalandsfoss jsme pocítili na vlastní kůži, dopad vody, která už ve vzduchu působí úžasným dojmem, vytváří mlhu rozlétávající se do okolí.

Island: část 1.

Island mě překvapil na několika frontách. Jak odlišně, čistě a nádherně působí zdejší příroda, jak malá jsou města a vesnice mimo Rejkjavík.


Právě sedíme v našem dočasném pokoji u Bristolských Airbnb hostitelů. Je tedy čas napsat o mých pocitech z Irska.

Výlet do Finska

Na konci října jsem si udělal výlet do Finska. Ani nevím proč, rukavice nosím hned jak teplota klesne pod 10°C a válení se na slunci je mojí oblíbenou aktivitou. Nejspíš kvůli jazyku, který mě vždy přihoval. Původní úvahy začínaly na 14 dnech, nakonec jsem skončil na sedmi. A to je, opravdu málo. Tři dny v Helsinkách, přibližně jeden den ve městě Jyvaskyla a dva dny v Oulu.