Improving the UI of a dashboard

Overview

The original design has been doing the job for some time, but over the time some of the customers experienced issues with certain parts of the UI. Furthermore, we had ideas of our own of what could be improved. This is the list of issues that we ended up with:

  • The overall user interface could be more elegant and professional
  • The website is hard to use on large screens
  • There is no efficient way to switch between organizations (a user can be associated with multiple organizations)

Over the course of this post I’ll be solving these problems,…

JavaScript, Django and PostgreSQL timezone handling

Please have a look at the first part, which covers date, time and time zone basics in detail. DjaoDjin caters to micro-SaaS products. These are specialized and local products. As an example, A1Ceus targets compliance with New York State professional certification requirements. Usually the teams behind those websites are small (1-3 people) with a pulse on the daily business numbers. Reporting graphs in UTC did not cut it. Questions kept pilling up in the customer support inbox about discrepancies between what those micro-SaaS entrepreneurs were experiencing and what the reports charts were saying.…

Working with time in Python

How time is measured?

Time is usually measured by earth rotation or by astronomical observations. There are a lot of standards which specify how this should be done exactly: GMT, UT, TAI, UTC. In this post we will focus on UTC because of its widespread use in computing.

What time is it now?

The answer to this question will likely be different for people who live in different countries. Various geographical areas have their own time zone and their local time is derived from it.…

How to increase the open files limit on Ubuntu

Increasing file limits might be helpful if you’re running a web server which handles a lot of concurrent connections, because every connection opens a socket and socket is a file. In my case, I needed to increase the open file limit from 1024 to 65536 to make sure that server won’t drop connections in the future. At first, I added this line to /etc/security/limits.conf:

  * - nofile 65536  

Where the first column is the user of the process, in our case wildcard * which makes this a default setting for all processes, the second…

What is the point of using NGINX in front of a Django application

Recently, a friend of mine asked me to tell him more about the rationale behind using NGINX with a Django app and how these two work together. It actually makes perfect sense for someone to raise this question: Python has a builtin web server which can render pages, serve static files on its own. So what’s the point of adding one more component to the stack?

PHP Land

When I started to learn programming, my first language was PHP. The only program I needed to run PHP scripts was Apache. My understanding back then was that Apache can serve static…

Configuring a headless Raspberry Pi

Recently, I got my hands on a brand new Raspberry Pi and was asked to make it usable. I didn’t have an HDMI monitor or keyboard, so I decided to configure it as a headless station. I don’t have an Ethernet cable at home but I have a Wi-Fi router. So, the task was to prepare the Raspberry Pi with MacBook Pro (with card reader), Micro USB cable and 4GB SD card. I picked Raspbian as an OS. There are images available for download on the official site. I used Raspbian Jessie Lite, because the full version wouldn’t…

Creating a test environment for Ansible

I’ve been working with Ansible for the last several days. I’ve been testing my Ansible scripts on DigitalOcean. First, I’d create a fresh $5 droplet, run my script a couple of time against this server and soon after the tests were finished, I’d destroy the droplet. But it wouldn’t end with that, I’d often want to make a quick change in the script and test this change, but the environment is already different and I can’t be sure that my script will work the same on the fresh environment, so I would go and create another droplet and repeat the…

Building a simple Scrapy parser

While building my Telegram bot, I was in need to scrap the data from a local website. The last time I scrapped something was metrolyrics.com website. My goal was to build a local database with lyrics — I built that using Ruby. Since, I work mainly with Python nowadays, I decided to give a try to Scrapy. Scrapy is a popular Python framework to build crawlers, parsers and scrapers. Scrapy has several main entities that we’re going to use. I’m going to talk about them in detail now.

Request & Response

Those classes are central to the…

Telegram Bot

I’ve decided to give a try to a Telegram Bot Platform. Initially, I tried to build the bot for a Facebook Messenger, but it turned out that I have to pass a review (for example you must have a logo) before my bot can go public. I had no time and resources to spend on this review process so I decided to stick with Telegram for now, which has a pretty straightforward procedure. In order to create a bot in Telegram you have to chat to another bot. Type /newbot and enter the name of your bot. Then…

Upwork — a freelancer’s paradise

I’ve been working via Upwork since it was oDesk. I started around 2012 and have been an active user since. It wasn’t perfect then — it was ok. Their pricing policy was pretty transparent — 10% of all your earnings and that’s it. oDesk had 2 types of contracts: hourly and fixed-price. Back then oDesk didn’t provide any escrow services for fixed price contracts but still would charge 10%. Recently, this has been changed — now you have escrow for both hourly and fixed-price contracts, which is nice. Now, aside from escrow what else does Upwork provide you with for…