Blog
5 Tips for Improving Database Performance in Django
Optimizing the performance of a Django project with a SQL database is essential to ensure smooth operation and a great user experience. This post explores five techniques for optimizing the performance of your Django SQL database.
Mar 08
· 4 min. read
· django
Deploying a Django app with Gunicorn and SQLite
Deploying your Django project is a tedious task that those who like coding normally prefer to avoid. In this post we explore how to get a Django app running in no time with proven and reliable technologies by staying out of the hype.
Feb 22
· 5 min. read
· django
A Django template tag for displaying datetime ranges
A simple implementation of a custom Django template tag to render date ranges in your HTML templates.
Feb 20
· 4 min. read
· django
Testing validation errors in Django
At Negative Epsilon we write a lot of tests and most of our projects are translated into at least another language using Django's excellent internationalization system. However, this means that there are some issues while writing tests that check for specific validation errors (raised by forms and models) using the error message (with assertRaisesRegex or assertRaisesMessage). We wrote a very simple assertion to use the code field instead (which is not supposed to be translated).
Jan 25
· 2 min. read
· django
How to Use Huey in Your Django Project for Asynchronous Task Execution
Using a task queue library in a Django project can improve performance and efficiency by allowing asynchronous execution of tasks. This improves the responsiveness and scalability of the application, enabling it to handle more traffic and complex workloads without slowing down.
Dec 12
· 6 min. read
· huey
Time series class prototype generation for classification with DBA
Time series classification is an important task in many fields, such as finance, healthcare, and meteorology.
A common approach to time series classification is to use class prototypes generated by a time series “averaging algorithm”. Each of the classes is represented by a class prototype, which is typically the "average" time series for that cluster. These class prototypes can then be used to classify new time series data.
In this post, we will explore the use of class prototypes for time series classification and discuss some of the advantages and challenges of this approach.
Dec 05
· 5 min. read
· time-series
Adding deep linking to your expo app
Deep linking is one of the most desired functionalities when building an app. Sadly, it's also one of the hardest to get right on the first try. Whether you want to use custom scheme URLs, universal links, or app links, we've got you covered.
Nov 10
· 9 min. read
· expo
Adding dark mode to your expo app
Darkmode is a new standard design in phone interfaces from the last years, basically beacuse of the benefits for your eyes when you are in the dark with your phone close to your face instead of going to sleep. So in today's post let implement it in the easiest way possible.
Oct 06
· 16 min. read
· expo
Adding notifications to your expo app
Push notifications are a fundamental part of any mobile app in order to comunicate with your users, so in today's post we are going to add push notifications support to your expo app.
Jun 30
· 24 min. read
· expo
Improving queue times in large events with maths and cashless solutions
Queue analysis theory is an extensive field in computer science for optimizing servers performance and it is based on mathematical probabilistic models. It has been in use for a while and it can be applied to real-life situations such as lines in supermarkets. In today's post we are going to analyze festival queue times from a mathematical perspective and optimize them with cashless solutions and queue theory.
Nov 17
· 5 min. read
Adding Stripe payments to your React Native App with Expo.
There are some projects that need to integrate payments of some kind. To approach this with an expo project we are going to use stripe, an online payment processing platform. We are going to build minimal flow within an expo project that covers payments with ApplePay, GooglePay and credit/debit cards.
Nov 11
· 29 min. read
The effect of sample size on rate estimation for low-prevalence events
We look at the effect of sample size on a naive rate estimation model for a low-prevalence disease. In this context, small populations are likely to have extreme incidence rates on both ends of the spectrum. We also look at how a more elaborate model using Bayesian inference can help mitigate the effect of limited data (as in low sample size) on rate estimations for subpopulations, given the global prevalence of the event is known.
Oct 05
· 8 min. read
· statistics
Adding react-redux to your expo app
Any app, no matter how small, has to keep some sort of state with the necessary data to display to the user. The best way to integrate state in our expo project so that it is efficient, easy to use and to avoid corruption is to use react-redux.
Sep 08
· 13 min. read
· expo
Adding react-navigation to your expo app
Navigation is fundamental in any mobile application. In this post, we'll add navigation to our Expo app using
Aug 26
· 28 min. read
· expo
react-navigation
, one of the best and most widely used community libraries.
First steps in building an expo app and good practices
The scalability of a project such as an app is a complex task because it is impossible to know all the functionality you'll end up implementing from the beginning of development. Even if you have a plan for what you want to implement, new ideas almost always arise. In today's post we'll talk about a couple of best practices to minimize scalability issues when your Expo project starts growing.
Aug 18
· 8 min. read
· expo
Setting up an Expo app project
Expo is a library built on top of React Native that allows you to write code once and run it in iOS and Android. It has a great deal of prebuilt components which makes building an app a much easier task. It also provides multiple tools such as Expo Go, which is integrated in both the iOS and Android emulators as well as in your phone and it allows you to test your app in real time. Expo provides mechanisms to compile the app for distribution but that will be covered in a future post.
Aug 10
· 3 min. read
· expo
Managing multiple configuration environments in Django
When working on a sufficiently large Django project that is expected to be developed for a while, the need for managing configurations across different environments quickly becomes apparent. In this post we discuss how these differences can be managed so that repetition is minimal. We leverage Python's own module and import system to implement cascading configurations without introducing new project dependencies and without breaking Django's
Jul 17
· 4 min. read
· django
conf.settings
functionality.