Thursday, 3 March 2011

Pixel Qi, Notion Ink's Adam, netbooks and my mobile computing needs

This is a follow up (just a quick update really) to my previous post (which can be read here) where I write about all the advantages of buying a netbook and replacing its LCD with a Pixel Qi display instead of buying an Adam tablet (or any other tablet currently available on the market).

On the 9th of February I ordered a new Samsung N220. It arrived just two days later. I replaced the 1GB RAM it originally had with a 2GB module (I have some spare parts lying around). After that I got rid of the preinstalled Windows 7 and Samsung's restore partition and used the whole hard drive (encrypted with AES) for Debian GNU/Linux. I quickly copied my old home directory from my Dell m1730 (a huge machine, a desktop replacement really, not usable as a mobile device) which, of course, transferred all my KDE and application settings to the new system (have been using the settings for years now, moving my home directory from one machine to another). I then quickly tuned my old settings to accommodate for much lower screen resolution and performance (my m1730 really is a monster... at least for a laptop ;) ) and, incidentally, fixed some minor problems with special keys and not being able to control the screen brightness because of some incompatibilities with GNU/Linux introduced by Samsung. After doing all that, I stopped working on the system and got back to systems biology and curing cancer ;). I have been using the netbook ever since without any problems (well, the only issue I had was the touchpad - it was annoyingly rough for my fingers to endure so I used an ordinary PST tape to make it nice and smooth... still unhappy about hardware vendors not installing a trackpoint instead of a touchpad though).

About a week ago I decided to go further with my little project and ordered a Pixel Qi display from Maker Shed. It came in less than a week which is impressive considering the fact that it was sent from the US (and I am currently based in England). I just installed the new display and I am writing this from my Samsung N220 equipped with a Pixel Qi. Everything seems to be working okay and the installation was extremely easy and took less than 20 minutes. After powering it on, the image quality looked a little weird (dark colours seemed bluish or violetish ;) ) and I detected one dead pixel (cannot find it now though so either it wasn't really a dead pixel or it is impossible to find during a normal day to day work). Also, PQ seems to have slightly weird viewing angles when compared to a regular LCD (the right side of the screen seemed a little different than the left side). I guess all this is what one should expect from a Pixel Qi display - it is worse than a regular LCD indoors but incomparably better outdoors. Besides, everything looks normal now so I guess I got accustomed and it no longer bothers me.

One thing is different - I can switch the backlight off (completely - just mapped a key for it) and still work with the netbook using ambient light (especially while having a good lamp or, better yet, sunlight around... the latter very difficult to come by in Yorkshire this part of the year ;) ). Extremely cool. Outside world, here I come ;)!

Recapitulating, I got my new mobile device in just two days... or seven, if one does not live in the US and wants a PQ display - if I had known that Adam would come with a glossy screen, ruining the effect of PQ, I wouldn't have had to wait for my new mobile device for almost two years instead of getting a netbook in two days ;/ . I paid only 205 (netbook) + 180 (PQ) = 385 GBP which is cheaper than the PQ version of Adam. It is faster than Adam, it has a keyboard (and a multi-touch touchpad for those who care), a better (matte!) PQ display, fully-fledged operating system with lots of applications (Debian has more than 20 000 packages) and my favourite desktop environment (KDE) with all the effects, cubes and whatnot ;). It is equipped with a huge (comparing to Adam or iPad) storage device - currently 250GB but could be easily extended as it is just a regular SATA drive - and the whole thing is encrypted with AES so I do not have to worry about my data in case I lose the netbook (or if it gets stolen) - there is no true mobile computing without keeping one's data secure while on the go and yet I know of no mainstream tablet which comes with this (essential - especially in case of mobile devices!) feature. Why? Maybe tablets and smartphones are targeted at people who want to play low-quality games (comparing to the latest products available for PC) and don't even care about someone getting their credentials for Facebook or e-mail account when the device is lost/stolen? Seriously, how can one even check their e-mail (not to mention accessing their bank account or buying something with their credit card or paypal) without having the phone/tablet fully encrypted?! Enough about security though. Did I mention my mobile device has 2GB of RAM ;)? The only feature still missing when you compare it to a tablet is the touch screen - which isn't a priority for me - yet still I plan to install it in the future. If I decided to go for one of the currently available DIY touch screen kits (resistive, no multi-touch), it would cost me about 40-60 GBP which brings the sum total to about 425-445 GBP which, I believe, would still be cheaper than Notion Ink's Adam (if you include the cost of importing it into the UK).

Here are a few photographs (thanks Gabi :) ) - of my new machine with the PQ installed:

Believe it or not but in the above three photographs the display backlight is off (not just darkened but completely off) and the photos were taken in a dark room so the only source of light was Gabi's camera flash - and yet one can perfectly see what's on the screen. The last image shows the netbook suspended (hence nothing on the screen).

Thursday, 17 February 2011

My pseudohaiku #1


Feelings.
The words I write... just a mere shadow of what I feel.
Uttered would become a travesty.

Thursday, 10 February 2011

Goodbye Adam

Well, it is final. I am disappointed with Notion Ink's Adam... and I am not talking about the numerous business-side problems everyone can read about, but about their decision to cover the Pixel Qi display with a reflecting glass and thus turning it into another high-tech mirror (still much better than the iPad but I am not interested in half measures).
Since I still need a mobile device, I decided to stop waiting for a miracle and bought myself a netbook yesterday (hope to get it tomorrow). I decided to go with the Samsung n210/n220[plus] (they are all almost identical... really). With the right battery (these models are sold with either a 3-cell battery or a 6-cell battery which comes in two versions - 4400 and 5900 mAh) the battery life should be around 8-10 hours (Samsung claims 13.5h but I wouldn't trust them here ;)).

After it arrives and I decide I like it, I intend to replace its dipslay, which is a decent matte (Yes! Finally someone made a good design decision! Thank you!) LCD, with a Pixel Qi. This way I will be able to use the netbook even in direct sunlight and its battery life is expected to go further up by 20-25%!.

Another modification I think about is adding a touch-sensing layer in front of the Pixel Qi (matte - not the glossy abomination used in Adam!).

When everything is complete, I will have a device with the following characteristics:
  • much faster than iPad (even the old Atom N270s are faster than A4)
  • almost e-ink image quality in direct sunlight (but with the responsiveness of LCD (e.g. video playback etc.))
  • a decent LCD indoors
  • 10-12 hours actual battery life
  • a multi-touch touchpad and display
  • a decent keyboard (no Adam or iPad can compete here)
  • a full Debian GNU/Linux with KDE 4 - the best OS out there (the netbook comes with Microsoft Windows 7 so I could have a dual-boot but I don't need another gaming machine)
The only thing the above lacks is a trackpoint instead of a touchpad. Trackpoints are so much better. Invaluable to a touch-typist and they even allow people to play computer games which are impossible to play with a touchpad (e.g. FPSs). Still, Alienware (including the smallest model for mobile use) and other gaming laptops all ship with touchpads - how crazy is that?!

To wrap up, here are links to youtube videos watching which should make everyone understand why, after waiting for almost two years, I decided to give up on Adam and go for a pure Pixel Qi solution:
  • Adam vs. Kindle (e-ink) - after watching this, ask yourself if you would like to work with Adam in the sun for a few hours
  • Pixel Qi vs. iPad - not really relevant to this topic so posting it here just for the fun factor - "mobility according to Apple" or "be mobile but stay in your basement" (if you are wondering, iPad is turned on ;) ) !

Saturday, 13 March 2010

A Comparison of Qt and Java for Large-Scale, Industrial-Strength GUI Development


Here is an interesting paper for you to read: http://turing.iimas.unam.mx/~elena/PDI-Lic/qt-vs-java-whitepaper.pdf.
Just skimmed through it. The good thing is that it is based on research (numbers do not lie ;) ) and not just some anecdotal "evidence". My thoughts? If you are a computer scientist who really knows their stuff and can choose between C++ and Java for your next project - choose C++. If you are an entrepreneur or a manager - hire the best programmers and choose C++... or Python... or Python & C++... and Qt ;)... or use OpenLaszlo... or ZK... or whatever ;)...
BTW, if you are a Java (or C#) programmer interested in mastering C++ & Qt then here is a nice book for you, which, apart from introducing Qt, contains a chapter (well, an appendix really) entitled "Introduction to C++ for Java and C# Programmers":

C++ GUI Programming with Qt 4 (2nd Edition)

The best thing is that the book has been published under the Open Publication License so it can be also legally downloaded from the Internet.

But returning to the paper... if you don't feel like reading the whole then here are some interesting excerpts:

--
In conclusion: both research and practice contradict the claim that Java programmers achieve a higher programmer-efficiency than C++ programmers.


Both independent academic research and industrial experience demonstrate that the hype favouring Java is mostly unjustified, and that the C++/Qt combination is superior.


Research shows that in practice, garbage collection and other Java features, do not have a major influence on the programmer-efficiency. One of the classic software estimation models, Barry Boehm’s CoCoMo1 predicts the cost and schedule of a software project using cost drivers which take into account variables like the general experience of a programmers, the experience with the programming language in question, the targeted reliability of the program, etc. Boehm writes that the amount of effort per source statement was highly independent of the language level. Other research, for example, A method of programming measurement and estimation by C.E. Walston and C.P. Felix of IBM, points in the same direction.


This is also backed up by our own experience: if programmers can choose their favorite programming language (which is usually the one they have most experience of), programmers with the same level of experience (measured for example, in years of programming experience in general) achieve about the same programmer-efficiency.


Another interesting aspect that we noted (but which is not yet supported by any formal research) is that less experienced developers seem to achieve somewhat better results with Java, medium-experienced developers achieve about the same results with both programming languages, and experienced developers achieve better results with C++.


Again, Prechelt provides useful data. The amount of data he provides is huge, but he arrives at the conclusion that "a Java program must be expected to run at least 1.22 times as long as a C/C++ program". Note that he says at least; the average runtime of Java programs is even longer. Our own experience shows that Java programs tend to run about 2-3 times as long than their equivalent C/C++ programs for the same task. Not surprisingly, Java loses even more ground when the tasks are CPU-bound.

When it comes to programs with a graphical user interface, the increased latency of Java programs is worse than the runtime performance hit. Usability studies show that users do not care about whether a long running task takes, say, two or three minutes, but they do care when a program does not show an immediate reaction to their interaction, for example when they press a button. These studies show that the limit of what a user accepts before they consider a program to be "unresponsive" can be as little as 0.7 seconds.


Prechtelt provides figures which state that on average (...) and with a confidence of 80%, the Java programs consume at least 32 MB (or 297%) more memory than the C/C++ programs (...). In addition to the higher memory requirements, the garbage collection process itself requires processing power which is consequently not available to the actual application functionality, leading to slower overall runtimes.


When dealing with external programs and devices, for example, during I/O or when interacting with a database, it is usually desirable to close the file or database connection as soon as it is no longer required. Using C++’s destructors, this happens as soon as the programmer calls delete. In Java, closing may not occur until the next garbage collecting sweep, which at best may tie up resources unnecessarily, and at worst risks the open resources ending up in an inconsistent state.


The fact that Java programs keep memory blocks around longer than is strictly necessary is especially problematic for embedded devices where memory is often at a premium.


To sum up this discussion, we have found C++ to provide much better runtime- and memory-efficiency than Java, while having comparable programmer-efficiency.

Wednesday, 10 March 2010

VirtualBox - hibernation of a host system may cause problems

Your virtual machines may not resume properly after thawing (i.e. starting the system after hibernation) - problems with vboxdrv kernel module. Here is my script which solves this issue (most of you can just put it in /etc/pm/sleep.d/action_virtualbox). I use Debian GNU/Linux but the script should work perfectly with other distros as well (e.g. Ubuntu, Fedora or Suse). The script puts all VMs to sleep (saves their state) and stores information about the associated processes (X Window display, real uid) in a file and tries to resume all VMs upon thawing, running them with correct user/display combination.

Do not worry if you cannot see the whole script (i.e. it appears to be clipped) just select and copy it with your mouse (or make your browser window wider).

#!/bin/sh
# suspend virtual machines on hibernate and resume them on thaw

# a file for storing a list of running vms
RVF='/var/run/running_vms'

PATH=/sbin:/usr/sbin:/bin:/usr/bin

if [ ! -x $SCRIPT ]; then
      exit 0
fi

SELF=action_virtualbox
COMMAND=

# pm-action(8) -  
#
# On hibernate, suspend all running VMs to disk
# resume them on thaw.

case "${1}" in
      hibernate)
              # 1. get a list of processes for all running virtual machines
              # 2. for each list item extract a login name, vm uid and display and store them in $RVF file
              # 3. save state of each vm
              ps eax -o user,cmd|
              grep '\bVirtualBox\b.*--startvm\b'|
              grep -v '\bgrep\b'|
              sed 's/\(^\w*\b\).*--startvm\( [[:alnum:]-]*\b\).*\( DISPLAY=:[0-9.]*\).*\($\)/\1\2\3\4/'|
              awk -v rvf=$RVF '
                      BEGIN {system(">"rvf)}
                      {print "\nSuspending VM "$2" (user: "$1")";
                       system("su -c \47VBoxManage -q controlvm "$2" savestate\47 "$1);
                       print "Appending VM data to file "rvf".\n";
                       system("echo "$0">>"rvf)}'
              # \47 is the single quote (i.e. "'")
              ;;
      thaw)
              if [ ! -s $RVF ]
              then
                      echo "No virtual machines suspended at the last hibernate which haven't already been thawed, therefore nothing to thaw."
                      exit 0
              fi
              cat $RVF|awk '
                      {print "\nResuming VM "$2" (user: "$1"; "$3")";
                       system("su -c \47"$3" VBoxManage -q startvm "$2"\47 "$1)}'
              echo "\nAll thawed. Deleting $RVF."
              rm $RVF
              ;;
esac

Wednesday, 29 October 2008

Atheist propaganda

I have stumbled upon yet another atheist propaganda clumsily disguised as a balanced article whose author pretends to be objective and friendly towards theists and their beliefs. Here are some excerpts with my "subtitles" showing what the author tried to smuggle, in between lines, to his readers' heads:



'Being openly atheist can have drawbacks for some of us. Your God fearing boss might not give you that promotion - or worse.'

Religions other than Atheism make people unethical.



'You are often confused as having God hatred. The ignorant think you belong to a cult.'

Atheists are bright. Theists? Not so much.



'But I am a man of reason and logic.'

Atheists are enlightened. Theists are backward and have huge problems with logic and rational thinking.



'If you say 'cows can fly' I will laugh heartily in your general direction but not completely dismiss you. Show me evidence of the orbiting bovine and I will take that laugh back.'

Theists' belief that God exists is laughable and on a par with statements like "cows can fly".



'You see by default everyone is born atheist in the technical sense of the word. Children are too young to understand the complexities of religion and what it means to believe in a God.'

Theists' beliefs are unnatural because people do not know nor understand them when we are born. If they were true, they would be natural, like atheism, which is natural and therefore true because we know that all babies both understand atheism and are atheists. Apart from the false belief in God, everything else in existence we don't know when we are born, like Physics and the laws of nature, is an exception to this rule and, as such, is true.



'I might add that unlike a lot of my God fearing friends'

Theists live their life in fear. The life of an atheist is better. Be free from fear!



'This isn't the dark ages after all. And besides, I would consider that a form of child abuse.'

Theists are child abusers still living in the dark ages. Atheists are different as they do not train their children to adhere to theist beliefs but allow them to "choose" atheist belief.



'I want my children to learn about God and read the Bible, and when they are old enough even explore other religions if they so desire.'

Atheists are better than theists, because they do not force anything on their children but rather allow them to study Bible and other religions from the atheist point of view (i.e. after children fully "understand" that all beliefs incompatible with Atheism are false).



'The reason I want my children to learn about religion is because although no-one can prove the existence of God to me, I on the other hand cannot 100% disprove the existence of God, even though every last shred of evidence would seem to.'

Not only are atheists the only people who were able to estimate the probability of non-existence of God (and, as such, can make legitimate evaluations of which belief is more probable and which is not) but there is overwhelming evidence (?!) clearly showing to any reasonable mind that there is no God.
No one could even try to prove the existence of God. On the other hand, though it is true that the author cannot FULLY disprove God but it does not mean that disproving God is impossible. Quite the opposite... probably...



'This is what separates believers from atheists. Religious people will not allow for the possibility that God might not exist. If they did, then they are technically Agnostic.'

Atheists are open-minded. Theist are not. Theists who are open-minded stop being theists so, by definition, there are no open-minded theists. Open-minded atheists do not stop being atheists even when they become agnostic and stop claiming that there is no God.



'Science however acknowledges the possibility of God however remote, because good science is about the collection of evidence to support theories, and the subsequent process of trying to disprove said theories.'

There is no God and Science knows it, but it needs to acknowledge the possibility of God to be able to prove its impossibility ;). Atheists do not need to wait for Science to disprove anything because they know the truth and Science will also, eventually, learn that truth.



'When my children get older they will naturally follow what they believe or disbelieve, and I will want it to be their choice - not mine or anyone else's.'

Unlike theists, atheists are good for their children because they allow them to "choose" atheism while theists, in contrast, force their children to choose theism.



'They (children) are too young to understand now but one day they will thank me for it.'

Atheists' children are too young to understand why they have to become atheists but it is for their own good and, since atheism is so much superior to theism, they will eventually feel grateful. Let us remind everyone here that theists' children are abused and forced to believe in theism! No one would be grateful for something like that!



'The chances are high you were doctrined into the same religion as your parents.'

All belief systems other than atheism are guilty of brainwashing their younglings. Atheism is different. Atheism is all about free will and the freedom of choice.



'You could argue the same can be said for atheists - that they need to have experienced religion before simply discarding it. That may be an overstatement, because you could say 'how do you know you wouldn't like Nazism if you haven't tried it?' - as there are some things we can all be certain of without trying.'

All religion (apart from Atheism) is as despicable as Nazism and people should not try it because even without trying it is obvious that it is better for them to be atheists.



'But religion differs in that there is a common theme of peace, harmony, enlightenment etc...and one main difference of course being the Deity in question. Jehovah? Ganesh? Christna? Yet some people will kill in the name of rather than concede there may be more than one God.'

Theists are dangerous hypocrites - they tell you lies about peace and harmony but what their religions are really about is killing and deception. And, of course, there is no God because all belief systems other than Atheism differ between themselves. Oh and Pol Pot did not used to murder families of theists who did not want to become atheists because he was a fanatical atheist but because he was evil. By the way, crusaders and popes were killing other theists not because popes and crusaders were evil but because theism implicates killing and suffering.



'But I like to think that this generation (my generation) might be a little more open minded when it comes to religion.'

Theists are so close-minded. If you want to be cool you have to become an atheist. Choose the bright future, not the gloomy past!



'If we don't keep asking the question, we will be slaves to the religious concept forever without knowing an alternative.'

All theists are blind slaves. Atheists are different because they do not believe in some unproven superstitious nonsense but in scientifically proven truth revealed to all atheists.



'Partly as a 'guess what?' to those who didn't know this about me, and also for anyone who might be afraid to explore atheism.'

Explore atheism or everyone will think you are a coward!



'The mere fact you are questioning religion says you are probably more open minded than your religious colleagues.'

So you are questioning your religion? Good boy...
No? Better start questioning it or everyone will know you are a narrow-minded fool!

New marketing trick is being used by atheists to brainwash less bright

Atheists love to announce to everyone that their credo is on a par with any scientifically proven assertion. Recently, I have noticed that some of them adopted a new way of deceiving agnostics and theists (and, in most cases, I am sure, also themselves) into believing that Atheism is not based on belief. Since it was impossible for them (or anyone else for that matter) to prove their claim that "there's no god" they modified it and now you can hear and read everywhere (e.g. on some buses in the UK) that "there's probably no god". This way they try to avoid the necessity of confronting the fact described in my previous post, where I explained that Atheism is, without doubt, based purely on belief (like any other religion - be it (in alphabetical order ;) ) Christianity, Islam or Judaism).

Are atheists right? Is their new claim any more "scientific" than the previous one? No.

What did they confuse this time?

They abused the word "probably". Since no one can calculate (or even estimate) the probability of (non-)existence of god their use of this word, from the scientific point of view, is invalid. In other words, both their statements are basically the same as "probably" just does not mean anything when (ab)used this way.

So what do I think about the new atheist campaign in the UK? Is it silly? Certainly... but will it be successful? I expect that a crowd of new atheist converts will soon mushroom in Britain. It is a shame that such a primitive trick will wreck havoc among weaker minds.

Popular Posts