Brain-Computer Interfaces - Science Fiction or Reality?

Recently, I had an opportunity to speak at the software development conference abroad for the first time. I visited Malmö in Sweden and gave a talk during the Øredev 2018 conference. The main theme of the conference was Deus Ex Machina, so I decided to adapt to this topic and prepared presentation about Brain-Computer Interfaces, which is my interest since the end of my studies at the Silesian University of Technology where I wrote a Master Thesis about similar topic....

November 21, 2018 · 3 min · 515 words · Piotr Wittchen

Creating a fat AAR

I recently wrote a new library called NeuroSky Android SDK. It’s used for writing Android apps using signals of the brain waves received from the NeuroSky MindWave Mobile headsets. Probably I’ll write a separate article about it because it’s quite interesting topic. This library uses ThinkGear library, which is distributed by the NeuroSky as a *.jar file, so I couldn’t use it as a Gradle or Maven dependency in my project and I had to put this *....

October 2, 2018 · 3 min · 470 words · Piotr Wittchen

Separate execution of unit and integration tests in Gradle

During development process, we often write unit and integration tests. While unit tests verify corectness of the small pieces of code, integration tests verify software as a whole project and sometimes can treat it as a black box where concrete results are expected. During development of the REST API, we can write integration tests for such API with REST Assured. Integration tests are usually slower, because they need to start the server and sometimes do other stuff....

September 22, 2018 · 2 min · 268 words · Piotr Wittchen

Excluding generated code from JaCoCo report

I recently wrote a simple java app with Dagger 2 as a DI container and Gradle as a build system. I wanted to generate unit test coverage report for this app, so I used Jacoco. In my build.gradle file I configured JaCoCo as follows: plugins { id 'jacoco' } jacocoTestReport { reports { xml.enabled = true html.enabled = true } } Now, I could type: ./gradlew test jacocoTestReport Report was generated in build/reports/jacoco/ directory....

September 18, 2018 · 2 min · 236 words · Piotr Wittchen

Testing exceptions

In Java, we can test exceptions via unit tests in a few different ways. In this article, I’ll present common methods of doing that. Nevertheless, I suppose we there are different methods as well. First method is basically wrapping a method call with try-catch block, assigning an exception to a variable and performing appropriate assertion. In these examples, I’m using JUnit for unit tests and Truth for assertions. @Test public void shouldTestExceptionWithTryCatch() { Exception caughtException = null; try { throw new RuntimeExcetpion("message"); } catch (final Exception e) { caughtException = e; } assertThat(caughtException)....

September 4, 2018 · 3 min · 483 words · Piotr Wittchen