Hi, I'm Gabriel, a guy in Ecuador interested in computers and programming. Most of my projects are open source and you can check them out on GitHub. Occasionally, I write stuff here.
It’s been almost three years since the first release of OpenJisho. There hasn’t been much activity in the repository between 2022 and 2023, but I’ve been working hard this week updating dependencies and configuration files in order to add new features. I’m happy to announce a new version today with some significant changes.
I’ve been doing a lot of backend development this past few months and all my deployments so far have been with Digital Ocean droplets running Ubuntu Linux. I think it’s pretty cool how much you can do with a Linux box in the cloud for so cheap, so I decided to write a little guide with all of the things that I might want/have to do every time I create a new droplet.
I recently tried out Biometric authentication on Android using the new Biometric library. The new API is really good. The OS now provides a dialog for biometric authentication, making things smoother and more consistent for users. Google even has this neat guide to help get you started with it. Unfortunately it is a bit lackluster, it was not clear to me how to get the whole thing running correctly. I wanted to expand on it and write a better guide on how to store a key for encryption/decryption on the Android keystore and retrieve it using the user’s fingerprint.
I’m happy to announce that I am releasing “OpenJisho”, a Japanese dictionary Android app in the Google Play store today. As implied by the name is completely open source and you can get the source code on GitHub. If this sort of thing piques your curiosity, in this post I’ll go into detail about this app and explain some of the technical decisions of the project.
I’ve been using Arch Linux for the last 5 years and I’m very happy with its simplicity. It’s great to be able to install only the packages that you actually need and get their the most up-to-date versions. Arch Linux is actually really stable, but once a year or so my system breaks. This usually happens after updating the system or messing with configuration files. As this sort of incident becomes more rare I tend to forget what to do to fix my broken system, so I decided to write here the common steps that I take in these situations.
Navigating between different “places” of your app, is probably one of the most complicated things in Android. There are many APIs that you can use depending on what components you are using (activities or fragments), and how do you want to pass data (if any?) between them. Unfortunately, I don’t think there’s a silver bullet for this, so I’ll just write about the method that I like to use the most.
I’m no graphic designer, but every time I need to do some basic image editing I go with GIMP. I always try to go with free software, even for the most meaningless tasks. GIMP may not be the most popular program, or even the best one, but it is free and you can do a lot with it. To illustrate this, I’ll show you how to use GIMP to create stickers for Telegram and WhatsApp. The goal of this tutorial is to use create this sticker from a photo. Even if you are not interested in stickers, you can still learn how to work with layers, remove the background from photos, and add smooth borders to any kind of shape.
Sometimes it is necessary to process data that is so large that it is no longer practical to load it all into memory. This is often the case in mobile apps, where computational resources are very limited, so it’s better to stream the data and avoid an OutOfMemoryException
. Recently I was working in an app written in Kotlin that processes big files, up to 300 MB, so I decided to write down some useful tips for working with byte streams in Kotlin.
Android development should be easy. Most apps that I’ve worked in aren’t that complex, they usually boil down to just displaying some data from a remote server and then letting the user post new data to that server. Nevertheless, their codebases often ended up being ugly and convoluted. After all these years I think I have finally figured out how to avoid common pitfalls.
In part 5 of Building a Blog I will talk about how I automate deployments of new blog posts using CircleCI. Every time I push to the master branch of my GitHub repository, a web hook is triggered and CircleCI checks out the latest code, runs a few tests, and finally deploys it. This makes it really easy for me to add new posts. However, the process isn’t that simple under the hood, and I want to explain in this post how it works.
In part 4 of Building a Blog I will talk about Nginx and how it is configured to serve static files efficiently and forward API requests to my Scotty server. The goal is to have Nginx as a secure and performant entry point to my site.
In part 3 of Building a Blog I will talk about the implementation of the like button at the bottom of every post in this website. The goal is to have an interactive widget that lets users see the number of likes for the post they are currently reading and optionally increment it by one unit. It is written with Mithril, a modern JavaScript framework for fast Single Page Applications.
In part 2 of Building a Blog I will talk about how the small HTTP API used by this blog was implemented. Once again, because I like Haskell, I’ll use the Scotty web framework to listen to HTTP requests and run SQLite queries with the Beam library.
In part 1 of Building a Blog I will talk about how the static pages served in this blog are generated. Writing HTML for every posts is too low level and cumbersome. I don’t need to rewrite the structure of the page for every post. It’s better to write the content in a more high level language like markdown and convert it to HTML using a predefined template. Programs that are able to do this are usually called static site generators AKA just what I need.
I’ve been wanting to have my own blog for a while now, and only recently I finally had the time to sit down and work on it. I think knowing how to write and communicate effectively is a very valuable skill, specially for somebody working in tech. I’m by no means a good writer, but here I am.