All Posts

What's new in 2016

It’s been awfully quiet around here, to the point where the last post made is more than a year ago. In the meantime I did not disappear from the face of the earth, but have been busy with putting together the Android and C++ part of the PSPDFKit SDK. My year was filled with writing blogs and talks there as well. DroidCons I talked about how to implement cross-platform development across Android, iOS, Linux, Windows and OS X with C++ and all the challenges that come from that.

Profiling native NDK code in Android

This week I had the dubius honor of trying to find out why a native subsystem of PSPDFKit is performing orders of magnituted slower than it should. As it turns out, NDK tooling on Android is exceptionally bad. A quick Google search found two ways of profiling NDK code running on an Android device: 1. Using android-ndk-profiler project from GitHub. This project provides missing gnu_mcount method implementation needed by -pg compile flag instrumentation.

Home button not working after flashing to Android Marshmallow

If you updated your device from Android 5.1 to 6.0 without wiping all data you noticed that the quick setting and home button have stopped working. That because the OS thinks the setup wizard is running and it’s trying to prevent you from escaping it. If you check logcat you’ll see a Not starting activity because user setup is in progress message when you press the home button. To get rid of the issue, you have to manually start the setup wizard so it sets the “initial setup succeeded” flag.

Use ccache with CMake for faster compilation

C and C++ compilers aren’t the fastest pieces of software out there and there’s no lack of programmer jokes based on tedium of waiting for their work to complete. There are ways to fix the pain though - one of them is ccache. CCache improves compilation times by caching previously built object files in private cache and reusing them when you’re recompiling same objects with same parameters. Obviously it will not help if you’re compiling the code for the first time and it also won’t help if you often change compilation flags.

Encoding videos for YouTube with FFMpeg

One of the most commonly asked questions on Freenode/#ffmpeg is how to use it to encode videos for YouTube in accordance to Googles Recommended upload encoding settings. Conforming to the guideline is rather simple, but not straightforward for the newcomer. 1. Get newish ffmpeg Get decently new and updated ffmpeg - the current stable release is 2.7. OS X: brew install ffmpeg Windows: Get a 64-bit static build from Zeranoe’s site.

Talk about live web video streaming on WebCamp Ljubljana

Live video streaming is still a touchy subject and not well supported across browsers and mobile devices. Hence I did a short overview of how to start on this years WebCamp Ljubljana. The lecture has since been published as a video as well.

Publishing Gradle Android Library to Jcenter

Publishing Gradle AAR libraries is one of the bigger pain points with Android’s new build system - it’s not as integrated and direct as it is with the Maven build system. Pretty much anyone has his/hers own solution to this problem and here is mine based on published FuzzyDateFormatter library. 1. Generate JavaDoc and source JARs Both Maven Central and jCenter require you to publish a JavaDoc and Source JARs for your public projects.

Project spotlight: Slovenian part-of-speech tagger for Python

Slovenian language has a terrible lack of widely available tools for text processing so about a year ago I had to build my own part-of-speech tagger based on widely available IJS JOS-1M corpus with help of NLTK library. Afterwards I published it on my GitHub account as a collection of scripts to train a model which wasn’t really widely useful. So now I’ve fixed the situation by publishing a pre-built version of the POS tagger on PyPi with updated usage and documentation.

Apache Solr Webcamp talk slides and links

This week, on april 26th, I gave a talk about Solr basics on WebCamp Ljubljana. Here I’m listing the slides, tips and the relevant links for anyone starting up with Solr. Here I’m listing relevant links from the slide-deck which are good starting point for Solr deployment.

Project spotlight: PySolarized Solr library

There are numerous Python/Solr libraries out there, each having a different subset of functionality. Obviously, as per Murphy’s law, none of them had a set of features I required. So I rolled my own - PySolarized! I wrote PySolarized because I needed a Solr connector which would dispatch and query documents to multiple cores.