Debugging Google Pixel 2

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:...

June 20, 2018 · 2 min · 287 words · Piotr Wittchen

Publishing Python package to PyPi

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....

April 8, 2018 · 3 min · 592 words · Piotr Wittchen

Avoiding merging master to master branch in Git

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....

March 25, 2018 · 4 min · 647 words · Piotr Wittchen

Deployment of the Java code to AWS Lambda

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)....

March 18, 2018 · 7 min · 1383 words · Piotr Wittchen

Introducing ReactiveBus

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:...

March 11, 2018 · 2 min · 259 words · Piotr Wittchen