Sunday, November 30, 2014

Asus n550jk review

I use the laptop for both work and gaming. The important detail is that I use Linux as primary OS.
After my previous laptop started dying I started looking for replacement. The requirements were simple:
  1. Good screen, Full HD, preferably matte
  2. 16Gb of RAM (or ability to increase it to 16Gb)
  3. Good GPU. In my case this must be nVidia (because Radeon support for Linux is terrible).
  4. 13"-15"
The funny thing is that there were only 3 possibilities matching the above criteria: asus n550jk, gigabyte p34g and gigabyte p35g. p34g is 14" the remaining two are 15". asus has a better GPU (gtx 850m) comparing to gygabite models (gtx 760m). On the other hand gigabyte offered up to 2 drives (hdd/ssd) in p34g and up to 3 (three!!!) drives in p35g. And asus had a single drive + DVD (asus, who is using DVD in our days?!!!). However, both gigabyte models had a show stopper - fun noise. So, I had to give up on multiple drives and choose n550jk.

After using n550jk I clearly see its good and bad sides.
Good:
  1. Build qualit.
  2. Screen - matte, resolution (Full HD), IPS.
  3. CPU
  4. GPU
  5. Drive space (1Tb in my case).
  6. Very silent (no fan noise).
 Bad (any OS):
  1. 3 USB ports (4 is better)
  2. The USB port on the right side it too close to the front. For right-handed person this make this port usable only for wireless mouse connector. Asus engineers should put that port to back and move DVD to front.
  3. Wide screen (16:9). This is a crappy aspect ratio, suitable only for watching movies (which in turn are optimized for cinemas). 4:3 is much better aspect ratio.
  4. Connecting headphones to audio port often results in a noise. Maybe this is caused by connecting to metal case. Maybe this happens just for me.
Bad (Linux):
  1. UEFI
  2. Optimus
  3. Tachpad. For unknown reasons Asus engineers used ps2 mouse interface for tachpad. So, you can't enable-disable it in a normal way.

Sunday, September 14, 2014

Java 8 presentation

I had shown one more presentation at N-iX. This one was about Java 8.
It is also available on google drive.
Feel free to give me your feedback in comment :)

Monday, September 8, 2014

Android L presentation

I had shown a little presentation about Android L at N-iX few days ago.
It is available on google drive.
If you like it (or don't like it) you can let me know below in comments :)

Thursday, May 29, 2014

Windows 8

Few days ago AMD drop support for Microsoft’s Windows 8 in Catalyst. From now on they will support 8.1, but not 8.
The funny part is that according to resent report the shares of 8 and 8.1 are approximately equal:

Thursday, December 19, 2013

Silence caused by Agenda

As you probably noticed there in no activity on this blog for a long time. 
That's because I've spent almost all my free time working on a little startup - All-in-One Agenda. This is a handy widget for Android devices which displays your agenda (currently events and birthdays) on the home screen. Obviously it has additional paid features which fund further development.
Working on this startup is a great adventure and results in a lot of new experience.
I plan to blog about some interesting things I've learn.

Saturday, April 6, 2013

yoni 1.0.0

Finally it's here: yoni 1.0.0
This is final release. No much changes here. I just added verbose mode, just in case you like too look at lots of messages running though your console ;)
From now on I'm going to do only bug fixes.

P.S. This release is so much delayed because this project consumes almost all my non-working, non-sleeping and non-family time :)

Wednesday, March 6, 2013

Google steals photos from your Android phone

Yesterday Google invaded my privacy. The search giant added new spayware function - Instant Upload - to their social network Google+. They enabled that spyware by default. And Instant Upload silently uploaded photos from my android phone to Google+ without asking my permission!!! Google had stolen my photos!!! I realized that something evil is going on due to small notification on my phone (which many people probably will ignore or dismiss without reading).
All uploaded photos become private and not shared to general public. But still Google took them from me and can now share with their big corporate friends or US government which is unacceptable!
Obviously I deleted all those photos from Google+ and turned Instant Upload off immediately. But how can I be sure that Google did not left the copies on their servers?
What if the photos Google had stolen were intimate?
I hope that EU commission will investigate this issue and fine Google appropriately.

P.S. To turn off Instant Upload launch your "Goggle Settings" app (not "Settings"!), go to "Google+" there and uncheck "Instant Upload".

Tuesday, January 22, 2013

yoni 0.9.0

And here it is: yoni 0.9.0.
This one is beta release.
No big changes this time. I just switched to using logger instead of printing output to console. So, the amount of yoni output greatly reduced.

P.S. Version 1.0.0 should arrive in February.

Monday, December 17, 2012

yoni 0.8.1

Here is first bug-fix release for alpha yoni release :)
No much changes here.
  1. I've discovered that my Arch Linux's python 2 binary is 'python2', while it is 'python' in my Sabayon. So, I added ability to configure path for python 2 binary. Just edit bin/yoni and update "PYTHON" variable accordingly.
  2. yoni 0.8.0 did not closed vpn connection on exit. I believe this was wrong, because once the application established the connection it is supposed to close it on exit. Kind of clean-up. yoni 0.8.1 has no such problem any more.

Thursday, December 6, 2012

yoni 0.8.0

So, here it is: yoni 0.8.0!
I consider it alpha right now. Nevertheless yoni is fully functional tool.
The package contains usage instructions and list of required packages. No installation is needed - just unpack and run. The launcher is (unsurprisingly) in bin folder :)

Further plans. I plan to release 0.9.0 (beta) in January, 2013. Then in February 1.0.0 should see the light of the day.
There might be also bug-fix releases in this period.

Any questions/suggestions are welcomed :)

Wednesday, December 5, 2012

Introducing yoni

The sad truth is that majority of people of the world are living in totalitarian countries now. This includes not only my beloved Ukraine, its neighbour Russia and a few remaining communist states. This also includes US, Australia and most of EU countries.
As the government tumour grows the space for privacy and anonymity shrinks. 
Luckily, we still have the generic computer. And technology advances very rapidly. And greedy politics are too stupid to keep the pace :)
One example of technology that defends privacy and anonymity is vpn. It's cheap and easy to use. But it has a caveat: sometimes vpn connection breaks. Starting from that moment the privacy and anonymity of vpn user might be compromised.
Until now Linux users had 2 solutions: play around with TCP/IP routes of use VPNCheck. This software is free, but has multiple limitations comparing to paid version, requires Mono and is closed-source.
So, I decided to provide a 3-rd option for Linux folks. It's a very simple open-source software. I called it yoni. It requires puthon, dbus and networkmanager. Yoni is available on sourceforge in git repository (no package yet!) along with a little howto right now. And I'm going to make an alpha release soon.
How it works? It connects to vpn (of user choice) and launches application(s) (of user choice). In case vpn connection is lost, yoni kills the application(s) and tries to connect again. Once connected it launches the application(s) again. And so on. Until user stops it.
Try it out! But be warned: this is my second python application. The first was hello world :)

Monday, April 23, 2012

Do not buy Intel's Ivy Bridge CPU!

Intel just launched new CPU line - Ivy Bridge family. There is a problem however. With shiny new CPU you will buy a back-door for your PC. Intel calls the back-door "Intel Insider". 
Intel Insider is DRM. More precisely it allows third-parties to remotely control your PC when the third-parties wish to.
This anti-feature first arose in Sandy Bridge family. It was warmly greeted by Intel customers. In fact it was so warm that many Intel customers become AMD customers.
Returning to Ivy Bridge. Intel listened to MAFFIA and not to its customers. Intel Insider is still present in those new CPUs.
So, If you want to control your PC, do not buy Ivy Bridge!

Wednesday, April 4, 2012

Aligning partitions, lvm and encrypted volumes on SSD

The disk: OCZ Vertex3 120GB
The goals:
  • partition disk with GPT
  • prepare disk to host multiple Linux-es (multiboot)
  • setup an LVM
  • make a few encrypted logical volumes
  • make the whole stack work fast, namely align all :)
The tool: sysresccd (on USB stick)

The main idea is to make sure every layer aligns to SSD erase block.
If there is any error on any level the whole work is probably wasted. I'm not an expert, so, I can be wrong :)

Erase block size is probably 2 MiB. The post on forum states 2 MB, but I assume they actually mean 2 MiB. This is very important number. Every step must take it into account. As extra caution measure I would align everything to 4 MiB.

1. Creating GPT partition table
Warning! This destroys all data on the drive!
Boot from our sysresccd, and load gui.
Start GRparted.
Device > Create Partition table... > Advanced > select "gpt" > Apply

2. Creating aligned partitions
We are still using GParted.
2.1. Unallocated space at the beginning of the drive. The purpose of this space is to hold partition table. I'm giving it 8 MiB (dividable by 4 MiB). To create such space you need to create the first partition which starts at 8 MiB. I'm not sure if this step is need, I've read different opinions about this. But I don't worry too much about this, it's just 8 MiB after all :)
2.2. Bios boot partition. 32 MiB (dividable by 4 MiB), fat32, flagged as "bios_grub" (this is important). Wikipedia article states a few MiBs should be fine, but Sabayon howto recommends 32MiB. I'm not greedy, so I choose the latter. Again, it must be flagged as "bios_grub". It might be good idea to add labels to partitions. I named this one "groob_boot".
2.3. Multiple partitions for /boot volumes of multiple Linux-es (each Linux will have its own /boot). 400 MiB (dividable by 4 MiB), ext2 each. This is where grub2 will put its staff. I'm labeling them like "ubuntu_boot", "sabayon_boot", etc. I created 5 such partitions, which is probably a little bit overkill. But who knows :)

3. Creating physical volumes (which will host my logical volume group)
Physical volume contains metadata  area at the beginning of the volume followed by actual data area. Here it's important to start your data area aligned. So, we use --dataalignment option with value 4m (which is 4 MiB):
pvcreate --dataalignment 4m /dev/sda7
--dataalignment option means that data area will start to a multiple of its value. 
Following command will show you where the data area starts.
pvs -o +pe_start

4. Creating logical volume group
Due to physical volumes were created with  --dataalignment option, we need set physical extent size for volume group. To do so we pass -s option to vgcreate. As you can see I'm passing the same 4 MiB:
vgcreate -s 4m vg_main /dev/sda7

5. Creating logical volumes
Nothing special here. E.g.:
lvcreate -L 10G -n lv_ubuntu_root vg_main

6. Creating encrypted containers
Next we setup an encrypted volume above logical volume. According to this mail the encrypted container also should be aligned. To do so we pass --align-payload option which value is in 512 bytes sectors. To align to 4 MiB we do:
cryptsetup luksFormat --align-payload=8192 /dev/vg_main/lv_ubuntu

7. Creating file systems
The post in OCZ  forum states that tuning ext3 and ext4 "probably won't effect performance". One of benchmarks I've found shows questionable effect from such tuning. Arch wiki page omits the tuning also. So, I'm not using it :)

Monday, March 26, 2012

Idea 11 does not supprot TestNG 6.4

In one of my project I've started using TestNG as unit testing framework. The project itself is Maven based. So, obviously I added appropriate dependency to my pom file:
        <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.4</version>
<scope>test</scope>
</dependency>
As you can see I've used the latest TestNG version available at this time, which is 6.4.
But when I was trying to run any test from Idea, I saw following error:
java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1838)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1747)
    at java.io.ObjectOutputStream.(ObjectOutputStream.java:226)
    at org.testng.remote.strprotocol.SerializedMessageSender.sendMessage(SerializedMessageSender.java:24)
    at org.testng.remote.strprotocol.MessageHub.sendMessage(MessageHub.java:44)
    at org.testng.remote.RemoteTestNG$RemoteSuiteListener.onFinish(RemoteTestNG.java:248)
    at org.testng.SuiteRunner.invokeListeners(SuiteRunner.java:200)
    at org.testng.SuiteRunner.run(SuiteRunner.java:243)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1170)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1095)
    at org.testng.TestNG.run(TestNG.java:1007)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:109)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
    at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:106)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
The error is strange and there is no my code in the stack trace. Also, test was finishing fine if run by maven. This hints that there is something wrong. And this something is IDE-related.
I used a linux answering machine to find out what is wrong. The answer was found very quickly: Idea 11 does not support TestNG 6.4. The workaround is to downgrade TestNG version to 6.3.1. I did just that and the problem vanished :)

P.S. I'm still confident that Idea is the best java IDE :p

Friday, January 27, 2012

Downgrade svn from 1.6 to 1.7

I'm using a Sabayon as my primary OS now. It's a rolling distro. And it fairly quickly incorporates latest changes from mainline projects.
Few weeks ago among other updates subversion was upgraded from 1.6 to 1.7. At first there were no problems, because I mainly used command line svn client. I upgraded my working copies to 1.7 and was happy.
The problem started to arise when I tried to work with upgraded working copy from my IDE - Idea. The first problem was that Idea does not support subversion 1.7. And will not support it for a few more month. 
So, I tried to downgrade subversion package on my OS. This failed, because 1.6 was removed from repository. 
There was a chance to build 1.6 from sources. But I prefer not to mix binary and compiled from sources packages. 
I ended up with solution suggested on stackoverflow. I used another OS (Ubuntu) on my multi-boot machine which still has subversion 1.6. From there I deleted a subversion folders from my projects. Which is easy in subversion 1.7 ;) Then I made a checkout to existing projects. This allowed me to not loose any changes. Then I rebooted to my primary OS and used subversion from IDE only.

Saturday, September 3, 2011

Fixing UI font in Idea

Recently I switched my Linux OS from Ubuntu to Sabayon. And I've noticed the UI fonts of Idea (many java developers would agree IntelliJ Idea is the best IDE) are bad. Probably something related to anti-aliasing went wrong. The fix is easy, just add following line to your {idea-installation-directory}/bin/idea.vmoptions:
-Dawt.useSystemAAFontSettings=on

Thursday, July 21, 2011

Updating versionCode and versionNumber in Android manifest via Gradle

I'm working on Android project which has multiple builds for different customers.
Each build is organized as separate project and is build via Ant script. The problem is that building all those builds and updating versionCode and versionNumber is all manifest files takes a lot of time. So, I decided to use some tool to this for me. Yes, I'm a bit lazy :)
I've chosen Gradle. It leverages the power of Groovy and is able to call Ant scripts.
Groovy has great tools to work with XML, like XmlSlurper. So, updating versionCode and versionNumber in Android manifest files seemed easy. Unfortunately after significant amount of time all I got was ugly formatted Android manifest with tag0 namespaces :(
Then I put XmlSlurper aside and used String.replaceAll(Pattern pattern, String replacement) method. It took me about 5 minutes to do all replacements :)

Sunday, July 4, 2010

Goodbye to Firefox Sync and welcome back to Xmarks

Some time ago I was using Xmarks for bookmark synchronization. Then I switched to Firefox Sync. I used only Firefox and only on Linux powered machines. Firefox Sync worked perfectly and is synchronized not only bookmarks, but also other useful things like history.
But with starting from Firefox Sync 1.2.3 (it was called Weave Sync back then) it failed to synchronize bookmarks on x64 Linux. The problem was still present in 1.3 as well as in latest 1.4.
So, I gave up and switched back to Xmarks. The latter doesn't have many fancy features. But at least it works.

Tuesday, May 25, 2010

Wine in Fedora 13 x64

The shiny new Fedora 13 is to be released in a few hours. I've installed its x64 variant since beta. And I've spent a lot of time to make wine work in Fedora. And it actually works with PulseAudio :) So, if you are going to use wine in Fedora 13 x64 here is some info which might be helpful.

Getting the latest wine version
At the time of this writing latest wine version in Fedora repos is 1.1.38, in upstream 1.1.44. The latter is also available if Fedora testing repo. So, you might want to enable that repo while installing wine:
yum --enablerepo=updates-testing install wine

Getting rid of crash on audio tab
x64 build of wine is not perfect yet. It actually crashes on audio tab. So, use 32-bit version to configure wine:
wine32 winecfg
It's actually a good idea to use wine32 instead of wine.

Adding readable wine fonts
Default wine font is hardly readable. You should have sharp eyes and good imagination to understand what is written on wine dialogs :)
Installing corefonts with winetricks should fix it:
yum install cabextract
wget http://www.kegel.com/wine/winetricks
chmod a+x winetricks
./winetricks corefonts


Adding mp3 support
Some games (including Morrowind) require mp3 support. Fedora's wine without mp3 support in contrast to Ubuntu. To enable it you should install a mp3 codec. It is recommended to use l3codecx codec, then rename l3codecx.acm file to winemp3.acm. Alternatively you can grab that file from Windows, if you have one at hand. I had no Windows, so I tried installation approach. I've searched for l3codecx and found a few installators (for Windows, of cause). One of them failed in wine but another one worked. l3codecx.acm file appeared in $HOME/.wine/drive_c/windows/syswow64 folder. Instead of renaming it I just made a symbolic link:
cd .wine/drive_c/windows/syswow64 folder
ln -s l3codecx.acm winemp3.acm


And that's all :)


Wednesday, May 19, 2010

Android's sharedUserId

Android is a wonderful platform for development. It also provides good security framework. Each application has its own user ID and thus application A can't directly access the data of application B. So, Android is quite resistant to viruses plague. In contrast to Windows.
But this security makes it difficult to develop a set of applications which should work tightly with one another, e.g. browser and its plugins, translator and its dictionaries, etc.
To address this problem Android provides the developer with sharedUrerId attribute in manifest. Setting the same sharedUserId to multiple application and signing them with same signature will enable them to access one another's data. Great!
But... but there are two nasty bugs related to sharedUserId which you must take into account.
  1. Issue #3763 messes up if you decide to change the sharedUserId value.
  2. Issue #1227 bites you if you add sharedUserId to your application.
In both cases after upgrade to the new version your application won't be able to access its own data (probably, because its user ID was changed, but chown was not called on its data). You'll see some strange errors in console. Like database can't be opened.
So, if you are developing some application for Android and if there is even a slightest chance that the application might need to use sharedUserId attribute - use it right from the start. Before uploading the application to the Market. And don't change sharedUserId value in the future.

Update. Issue #1227 just celebrated it's 5-th birthday. And people are sill affected by the problem. Looks like Android is getting closer to Java when it comes to anniversaries of important issues.