Linux: activate Bluetooth adaptor

rfkill unblock bluetooth

KDE UI problem with non-KDE4 apps

I'm a big fan of Linux. I've started with Ubuntu and used it for several years, but then switched to Debian and been using it for couple of years now. Debian is probably one of the best OSs I've used so far and I really enjoy it. As a DE I use KDE which is simple, light and yet beautiful. There is one thing I don't like though and it's about how KDE handles apps that don't support the KDE features. There is no problem of launching those apps, but sometimes the UI of those apps is modified by KDE in a way that they become hard or completely impossible to use. Let me show you what I mean.

So this is how XCTU app for configuring Zigbee modules from Xbee looks like with default KDE settings, i.e. modify colors of non-KDE4 apps, enabled.

XCTU UI with default KDE UI settings (left) and with modified ones (right)

As you can see it's hard to read something in the text fields on the right side of the window. And this is very annoying, believe me.

So how do I fix that. Easily. Just go to "System Settings > Application Appearance > Colors > Options" and disable "Apply colors to non-KDE4 applications" option.


That's it. Enjoy the apps with the proper UI and stay calm.

Arduino Yun: Problem uploading sketch to the board

I've got few Yuns to play with. It's a nice piece of hardware with 2 CPU's one of which is responsible for running Arduino code and the other one adds wifi connectivity to the board and runs modified version of OpenWrt (great!).

So configuration of the board was pretty straightforward. Same with the OpenWrt upgrade. However, when it came to uploading my sketch to the board from Arduino IDE I've got the following error:
avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy avrdude: ser_send(): write error: Bad file descriptor Problem uploading to board. Seehttp://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
I've also noticed that right after the failed sketch upload, the IDE was showing that the device was now connected to the other port (incremented by one), like /dev/ttyACM0 before and /dev/ttyACM1 after. So if I would ls /dev/ttyACM* I'd get something like this:


lsusb command also showed weird output. Arduino was detected but not properly recognized.


Clearly there was some problem with the bootloader of the device. So before trying to restore it I decided to try one more thing: uploading the sketch via wifi (Arduino IDE automatically detects the device if your computer is on the same network). So I gave it a try and it worked! Moreover, afterwards I could upload a sketch through the serial connection (micro USB).

When uploading through the wifi Arduino IDE displayed the message that something was wrong with the flash memory and it was going to fix it. Well, I guess it did, 'cause afterwards everything worked as it should have.

So in short, try to upload a sketch through wifi.

Android Development

For several projects I currently work on I need to develop an Android application. For me it's a challenging task since I've never developed anything for mobile platforms and to be honest didn't have much programming experience at all. Fortunately I'm not alone and there are plenty of people on internet sharing their experience and tips. Moreover, Google itself provides documentation for Adnroid developers of different levels, starting from the complete beginners like me and professionals.

Here I just want to keep a track of what I've done to learn Android programming and what sources I've used.

So I've started from the obvious step which was taking an online course to cover the basics. I've found Learn Java  from Codecademy. Since I was new to Java it was a good starting point. The course was quite short though and covered only the very basics.

I now moved to another online course I've found from Udacity. Developing Android Apps seems to be exactly what I need. The course was prepared and supported by Google and these guys do know about Android development. Good thing about the course that it's free.

Installing Android Studio on Debian 8

Android Studio is downloaded from official website:
http://developer.android.com/sdk/installing/index.html?pkg=studio

You gonna need Java SE Development Kit 7:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

To install the java devkit follow instructions from here:
https://wiki.debian.org/JavaPackage

change the default jdk used in the system (openJDK doesn't work with Android Studio):

sudo update-alternatives --config java

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0    /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      auto mode
  1    /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2    /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      manual mode

Press enter to keep the current choice[*], or type selection number:
select the one from Oracle (in my case number 2)

Install lib32stdc++-4.9-dev package. If you don't install it you gonna get "unable to run mksdcard sdk tool" error message while installing Android Studio

Unzip Android Studio archive somewhere and go to /bin directory. Run ./studio.sh script and follow the instructions

Install additional library for Android Studio
sudo apt-get install lib32z1

Install KVM libraries:
https://wiki.debian.org/KVM#Installation

Minimizing Commit Latency of Transactions in Geo-Replicated Data Stores

F NawabV AroraD AgrawalA El Abbadi 2015


  • data centers keep a log of all transactions (prepared to be committed and those that were committed already)
  • this log is exchanged between the data centers every now and then
  • clients create a list of read/write transactions and then commit them
  • data center before committing a transaction marks it as ‘prepared to be committed in the log
  • log is shared with all other data centers
  • after some time data center checks if there are conflicting transactions (prepared to be committed or the ones committed already) in the latest transactions log [Prepared Transactions Pool - PTP local and remote)
  • if there is a conflict - discard the transaction, if no - commit and add it the log
  • remote transactions are either preparing or finished (committed or aborted)

Blog update

Long story short I've recently started my PhD in sunny Lisbon, Portugal. Doing PhD here (like in any other place, I guess) involves reading a lot of papers. When I read any paper I tend to make notes. So, I thought why not putting them all in one place here to make it easier to find them later. 

I might also put here some notes related to stuff I do besides PhD. All of that would still be somehow related to IT.