New blog, new system, new domain

I’ve just finished migrating my personal website and blog from Wordpress to Hexo. I’ve been using Wordpress for more than 5 years and decided to check out something new. Hexo amazed me with its simplicity and ease of use. Probably this tool is more recognized around JavaScript developers, because it’s written in that language. I discovered it in the last month. Features of Hexo Static website generator For a simple blog with static content I don’t really need dynamic website like Wordpress. Content of the articles changes quite rarely. I just generate static content and deploy it to the server. ...

March 4, 2018 · 3 min · 447 words · Piotr Wittchen

Automating generation of the on-line documentation for Java library

Introduction In one of my open-source projects - ReactiveNetwork I have a documentation in README.md file and I have JavaDocs as well. This project is an Android library written in Java and built with Gradle. Moreover, I develop this project on two separate Git branches - one for RxJava1.x and another one for RxJava2.x. Similar convention is in the RxJava repository, so I followed it. After each release I publish documentation and JavaDocs on GitHub pages for both versions. It’s kind of boring and repeatable task, so I was wondering if there’s any way to automate it. ...

February 11, 2018 · 3 min · 491 words · Piotr Wittchen

Quality Meetup no. 15 - Fixing a billion dollar mistake

On the 8th of February 2018, during Quality Meetup #15, I gave a presentation titled “Fixing a billion dollar mistake”. Tony Hoare introduced Null Reference w in ALGOL language in 1965. He calls this decision a “billion dollar mistake”. It was so easy to implement and probably it caused a loss of millions of dollars due to the mistakes done in the software over the 40 years. During the time, people came up with different ideas of solving that problem with software libraries, good programming practices, static code analysis and compile time code analysis. Moreover, we have new programming languages with null safety features. During the presentation I’ve shown how to deal with the null reference problem in the JVM projects no matter if it’s a greenfield solution or legacy code. ...

February 9, 2018 · 1 min · 156 words · Piotr Wittchen

Air quality monitoring script for Argos (Linux) and BitBar (macOS)

From some time, I wanted to create my own app, which will display some data in top panel in macOS or Gnome environment on Linux. I collected some resources about that and I knew that for macOS I need to write an app in Obj-C and for Gnome I need to write a plugin in JavaScript. In both cases it requires some ceremony and preparation. Recently I’ve found a great app for macOS called BitBar (by the way it’s open-source). BitBar allows to put anything to macOS menu bar (top panel) in no time! With this project creating top panel apps is simplified to the limit. Moreover, there’s another project called Argos, which does the same thing, but for Linux with Gnome (it’s an open-source Gnome Extension). In both cases, we just need to create a shell script, put it into appropriate directory (in case of Argos, it’s ~/.config/argos/ and in case of BitBar, we define it during the installation or first run) and then app displays our data automatically. We can also set refresh rate. E.g. if we want our script to be executed every 60 seconds, we can name it script.60s.sh. We can also create more advanced scripts and more details can be found in BitBar and Argos documentation. In my case, I wanted to create a script, which reads CAQI (Common Air Quality Index) in my current location based on Airly sensors. Airly provides nice API, which we can use in our projects. Please remember that most of the sensors are located in Poland. On my Ubuntu Linux with Gnome 3, I created a new script in the following path: ...

December 29, 2017 · 3 min · 487 words · Piotr Wittchen

Creating a Docker container with Alpine Linux including Java 8 and 9

Recently, I’ve decided to refresh my knowledge regarding Docker and created an image with Alpine Linux and Java 9, which can be a useful base for the future projects. I used Alpine as a base image because it became quite popular in the Docker world due to its simplicity and the fact that it’s pretty lightweight when we compare it to containers based on other Linux distributions. Pure Alpine Docker container has about 4.144 MB, what is really impressing. ...

December 27, 2017 · 2 min · 399 words · Piotr Wittchen