Thunderbird Grammar Checker 0.7 has been released


This is a maintenance release that has fixed the compatibility issues with the LanguageTool API v2 (the current one) and the new Thunderbird API. No functionality has been added, but now the add-on actually works.

Development of the add-on have been moved to Github:

Unfortunately, I can't actively maintain the add-on, but all pull requests are welcomed.

Gradle task for launching Android simulator

Android build toolchain, albeit being powerful, sometimes lacks some essential functionality required for the modern software development. In particular, running instrumented unit-tests in the CI environment: those tests require a device or a simulator running, however developers need some scripting to make it work.

To simplify the task, I've created a Gradle task that verifies if any Android device or simulator is connected. If not, the task launches a simulator with the first AVD in the list (or fails if no AVDs are found). It's up to you to make the dependencies for the connectedCheck task. The sample output:

> ./gradlew connect --info


:AndroidSampleApp:connect (Thread[main,5,main]) started.
Executing task ':AndroidSampleApp:connect' (up-to-date check took 0.001 secs) due to:
  Task has not declared any outputs.
Detecting devices...
Launching emulator for Nexus_5_API_25 ...
:AndroidSampleApp:connect (Thread[main,5,main]) completed. Took 14.18…

Simple HTTP/HTTPS server on Scala/Akka

Let me present a simple Scala script to serve local files over HTTP or HTTPS. I've used Scala/Akka to get the good performance and to play around with the programming language I really like.

We need Scala, SBT (Scala interactive build tool), Conscript (a distribution mechanism for Scala apps) and Scalas (the script runner for Scala). Conscript is needed only to install Scalas here, so you may want to install the runner manually (see the Scalas link above) if you don't want to install Conscript.

For Mac OS X we're going to use Homebrew to install Scala and SBT:

 $ brew install scala sbt

Next step is Conscript (please follow the installation instructions on the official site):

 $ wget
 $ java -jar conscript_2.11-0.5.1-proguard.jar

Next step is installing Scalas (please follow the installation instructions on the official site):

 $ cs sb…

Android screen capture with GIF format

GIF format is still here, and it's a handy way to make small videos. It's very easy to do despite of all ads telling us to buy their commercial software, and I'm going to describe the tools we need.

First, we need to capture the video of the screen. For Android, you can use ADV Screen Recorder, but surely there are tools for any platform. Please verify the recorder settings (you may want to disable mic recording and change the output folder to be on an external SD).

Second, after we recorded the video, we need to convert it into GIF-format. For that we're going to use FFMpeg tool (on Mac, just use "brew install ffmpeg").

GIF uses 256 colors, so we need to create an auxiliary palette file. Therefore, the converting process takes two steps: 1) create a palette, 2) use a palette and an input file to create the output GIF. The commands for that:

$ ffmpeg -i input.mp4 -vf fps=10,scale=320:-1:flags=lanczos,palettegen palette.png
$ ffmpeg  -i input.mp4 -i palette.png …

shelljs node module

Let me share a little gem I've found: shelljs node module. I was working on updating my Cordova hooks to work with Windows environment and had to replace my bash script with the corresponding JS code. Unfortunately, the node modules I've found were disappointing, especially copying the files. Surely I could write the copying code by myself, but I supposed that in 2016 year one is not required to do such menial tasks.

The biggest problem for the modules I've tried was the glob matching - I have to copy files from the sibling directory, and modules couldn't find it (looks like they don't parse ".." notation). I've tried fs.extra, fs-extra, ncp, filecopy, cp, but no luck. I guess I could find the good module after all, but after I've discovered shelljs I don't need it anymore anyway. With shelljs porting the code was a piece of cake - see the results below (the original and the new scripts).

Software licensing

For my software projects I've always preferred the GPL license, but nowadays its time has gone, at least for me. The IT industry is mature enough, and all copyleft (and copyright) licenses create more problems than advantages. Few examples:

Inability to use the code in the commercial applications. Commercial applications are infamous for their poor quality, security-by-obscurity and other issues. I guess we all agree that in the perfect world the applications should be polished before releasing, but free market dictates faster release cycles, and therefore the overall poor quality of the software. At the end, it influences us all, directly or indirectly (commercial OSes, routers, cloud solutions and other infrastructure elements), and by lifting the software licenses restrictions we may help the commercial developers to use our code in their projects (instead of implementing their own, in many cases, inefficient, solutions). For example, because of the readline library restrictions…

glSatellite Demo

During my research for 3D graphics application development I've noticed that a lot of tutorials and advices on the Internet are obsolete, imcomplete or even incorrect. That's why I've decided to create an open source technological demo of OpenGL for Android platform. That's just a demo, so it doesn't have any particular useful purpose, but shows the methods and algorithms to accomplish certain tasks.

For now the application reads public NORAD satellite database and shows the satellite positions and altitude related to Earth in the form of beams (the height of the beam represents the relative altitude).

The 3D features present:
 - OpenGL ES 2;
 - rotating, multi-touch zooming and moving the globe;
 - stars on a fixed background;
 - each satellite is represented by a beam with a unique color;
 - identifying the corresponding satellite if a beam has been tapped (based on color picking method).

Additionally to 3D features presented the application is:
 - using NDK wit…