Writing my first library in Kotlin

Aug 19, 2018
java, kotlin, android, gradle

Introduction # Recently, I decided to create a tiny Android library called RxBattery, which is monitoring battery state of the device with RxJava and RxKotlin. I created a few Java and Android libraries already and this time I decided to use Kotlin programming language instead of Java to learn something new and write something more complicated than “Hello World” app. Here are my observations. Build System # I used Gradle to build the project. ...

Solving problems with AVD and KVM on Linux

Aug 16, 2018
android, linux

I installed Android SDK and Android Studio on my new ThinkPad T470s with Ubuntu Linux 18.04.1 LTS. As usual, I wanted to create a new Android phone emulator called AVD (Android Virtual Device). I was able to create a new device, but unfortunately I encoutered problems. After opening AVD window, I saw the error message… /dev/kvm is not found # KVM (Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). ...

Poor Man's Dropbox

Aug 12, 2018

Dropbox abandons Linux users # Recently, I’ve started receiving a notification from Dropbox desktop app on Linux that they’ll stop syncing my files in November. I couldn’t understand why. I’m using this service for some time and I find it really useful. Moreover, I want to backup several important files on the web server in case of my disk crashes or I’ll need to access them from another computer or mobile device. ...

Different ways of squashing commits

Jul 21, 2018

While creating a Pull Requests it’s good to squash all of our intermediate commits into one to avoid clutter in the git log, simplify analysis and allow for simple code revert when necessary. Solution #1 # Some time ago I’ve found project made by Jake Wharton. It’s really useful, handy and allows us to rebase and squash commits quite easily. We can just call: curl | sh then edit our commit messages and push the changes. ...

Releasing ReactiveNetwork v. 1.0.0 (paying the technical debt)

Jun 24, 2018
android, java, open-source

Today, I’ve released next version of my most popular open-source project - ReactiveNetwork. I’ve released version 0.12.4 for RxJava1.x and version 1.0.0 for RxJava2.x. Please note, RxJava1.x is no longer officially supported and I’m going to follow the same approach in my RxJava-based projects. It’s not the first release of this project, but I’m breaking the API and removing existing methods, so I decided to stick to proper versioning standard. I didn’t always do it properly in the past, but it’s never too late. ...

Debugging Google Pixel 2

Jun 20, 2018

I recently destroyed my good old Nexus 6 phone. It’s still working, but display screen is broken. Due to this fact, I’ve had an excuse to buy new Pixel 2 phone. It’s pretty expansive, but its quality is really good. As usual, I wanted to debug an app on this device and encountered problem related to device permissions. Once I connected the phone, to my laptop and typed adb devices, I’ve seen the following message: ...

Publishing Python package to PyPi

Apr 8, 2018

Introduction # I have my own tiny Python project called spotify-cli-linux, which is (surprise!) command line interface for Spotify desktop app on Linux. Python is not my primary programming language and I work more with Java. Nevertheless, I find this language enjoyable and useful in many cases, so I try to learn something new about it from time to time. In the beginning, I’ve provided instructions how to install my Python script in the system via curl and wget, which is fine, but it’s not recommended and official way to do it. ...

Avoiding merging master to master branch in Git

Mar 25, 2018

Problem # If you are working with Git Version Control System, probably you have seen a commit messages in your git log like: Merge branch 'master' to 'master' or something similar. You might have even pushed such commits! Don’t worry, so did I ;-). In this article I’m going to explain why is it happenning and how to avoid it. Such situation happens when you performed changes locally and at the same time someone else performed changes on the same branch as well, commited and pushed them to the remote repository. ...

Deployment of the Java code to AWS Lambda

Mar 18, 2018

Introduction # In the cloud computing era, companies start using services like Google Cloud Platform, Amazon Web Services or Microsoft Azure. We can hear about the term “Serverless”. It doesn’t mean that we don’t have any servers. It means that third-party services provide us server infsrastrucutre, monitoring and scaling capabilities, so we don’t have to care about that stuff by ourselves and we can focus on writing code. We have concepts like Backend as a Service (BaaS) and Funtion as a Service (FaaS). ...

Introducing ReactiveBus

Mar 11, 2018
java, rxjava, android

Today, I’ve released my another tiny project. It’s a very simple implementation of Event Bus with RxJava 2 under the hood. This library is compatible with Java 1.7 or higher. I didn’t use Java 1.8 or 1.9 because I wanted to make it compatible with Android apps. You can use it as follows: Bus bus = ReactiveBus.create(); Disposable observer = bus.receive().subscribe(new Consumer<Event>() { @Override public void accept(Event event) { // handle event here } }); Once, we created Event Bus object and our observer (or more precisely: disposable subscriber), we can start sending events: ...