Unenforceable law

19.05.2013 3 comments

A few years ago California introduced a law which bans texting or talking over the phone while driving. The problem is, that this law is unenforceable.

Every day I see many people clicking on their smartphones when waiting on the red light and often even when driving. Not only they risk their and other drivers’ lives, but they also show disrespect to other people. It always makes me angry when I am waiting on the red light behind somebody, the red light turns in to green and I am waiting multiple seconds before the clicker in front of me notices the green light. Often I have to honk to draw that person’s attention, the person starts driving lazily and keeps clicking.

The problem is so widespread that the police has no way of catching the clickers and enforcing the law. Maybe in 10 years we will have technology which blocks the phone when it is inside a car, maybe phones will automatically detect that they are inside the car and will lock their UI. Also self-driving cars will probably also take over when they detect that the driver is not paying attention or is drunk. Until then, the anti-texting law should probably be repealed, for it makes no sense.

What do you think? Do clickers annoy you when they are blocking your driving, do they offend you, or are you OK waiting for someone whose mind is somewhere else and not on the road?

Categories: Other

Skyline (2010)

7.05.2013 Leave a comment

I’ve seen this movie a long time ago, but it was in some way exceptional and thus memorable. I highly recommend seeing it if you’re into the SciFi genre.

It is not a AAA movie, I did not know the actors earlier and some of their acting was not of the best, although it was not totally bad either.

The visual effects are interesting, the story is a little bit believable and the aliens in this movie are awesome in my opinion. You can’t tell the same about most SciFi movies, especially when you take into account the recent outbreak of idiotic superhero movies. Skyline brings some fresh ideas and an original plot and that’s why I think it’s worth seeing.

Spoilers

The trailer makes it clear that it’s a movie about an invasion. What I like is that it is not one of those movies in which humans always win. To the contrary, puny humans stand no chance! There is a little twist at the end though.

The scene with huge aliens wandering around the city is my favorite.

There are some things I did not like, of course. For example the whole setting is unrealistic – the aliens came to conquer humans just to use their brains in their machines. It makes no sense to me, because computers and artificial brains we will create in the coming decades can have much better capabilities and performance than human brain. Aliens capable of interstellar travel should have computer technology beyond what we can currently imagine.

Nevertheless, it’s worth seeing in my opinion, even as a pure entertainment. Enjoy!

Categories: Movie Reviews

Three dimensions

22.04.2013 Leave a comment

How many colors do you need to color countries on a map such that no two adjacent countries have the same color? Only four.

The problem is solved by representing a map as a planar graph. The solution comes from the graph theory.

Unfortunately this is not true for non-planar graphs. Every non-planar graph can be represented in three dimensions and it is possible to connect each vertex with all the other vertices, therefore in the worst case one would need as many colors as there are vertices in order to avoid two interconnected vertices having the same color.

I suspect that this has something to do with the fact that our space is three-dimensional. Not two-dimensional and not four-dimensional. I think there must be some connection. Perhaps three dimensions are sufficient and a fourth dimension of space would be redundant? I am sure some physicist has already thought of it and wrote a nice thesis.

Categories: Universe

RIP, MacBook White

13.04.2013 Leave a comment

We got the MacBook White over 5.5 years ago. It withstood the trial of time. A year after we got it, it survived a spill of tea, which killed the IR sensor for the remote. Two years later the inverter cable went flaky – the backlight became intermittent, so we stopped closing the lid, otherwise it was difficult to restore the backlight. Then the fan started being loud. I replaced the fan with a new one. Then I upgraded the memory to 4GB and upgraded the OS. A year ago the battery died, so I replaced it. A few days ago the kids inadvertently pushed it off from the coffee table and a day later the hard drive died.

That’s it, I will stop trying to keep it alive and I will let it die.

Until its last minutes, the MacBook White worked very well, almost the same like when it was new. The only reason to ever reinstall the OS was to upgrade it. After the memory upgrade it was able to even run Lion without any problems.

I expect the new generations of MacBooks sold today to be even better.

  • The very nice looking plastic of which MacBook White was made was nevertheless – plastic. There were tiny cracks here and there and tiny pieces chipped off on the edges of the keyboard. All current MacBooks are made of aluminium and are not susceptible to this kind of damage as easily.
  • The lid hinges in the aluminium MacBooks feel much more solid, not sure if his is because the hinges are better, but I have no problems whatsoever with the one I’ve been using for over 3 years now.
  • The latest generations of MacBooks don’t have hard drives. Hard drives are delicate. Some people rightfully call them the spinning discs of rust. The latest MacBooks have flash-based non-volatile memory instead of hard drives, which should theoretically have longer average life time and is more reliable than mechanical hard drives.

Apple’s MacOSX integrates really well with the hardware. But one can also run Linux or Windows just fine on MacBooks, either in a virtual machine or natively. It’s certainly a piece of hardware worth recommending. It is expensive, but it is worth every penny spent on it.

Categories: Computing

Brain is a simple device

14.03.2013 1 comment

The video of a live brain at work is mind-blowing. From this video we can see how signals propagate through the brain. There is a lot we know about the brain, but there is still a lot we don’t know. Here are some of the things we do know:

  • It works in primitive animals, too. It just can’t process as much data as ours.
  • Apes are not as intelligent as we are. We evolved to be more intelligent than apes. This indicates that the basic architecture of the brain is encoded in DNA.
  • Some information is encoded in the DNA as well. Many animals immediately know what to do right after they are “born”, e.g. newborn lizards know how to hunt and zebras know how to walk.
  • When we sleep, the brain sorts all the information and learns. Sleep works like a feedback loop for learning.
  • Some time ago I read somewhere, but I can’t find the link right now, that only certain patterns of information passing through the brain is valid. For example, when single neurons fire, they are ignored. When they fire randomly, they are also ignored. But when nearby neurons fire together, they fire like a wave and the wave passes through the brain – then the actual processing happens. This explains why animals are better at seeing movement than seeing static images.

These and the video of a live brain at work may lead to the conclusion that overall the brain is quite simple, in its own complexity. Processing happens when the signals are passing through the layers of neurons in the brain. Brain is also a memory device, so the passing signals may retrieve information or may store it or enforce it during learning feedback loops.

The question that bothers me is: how do we think? I suspect thoughts are output through the same routes as speech, but instead of reaching the speech apparatus (vocal cords, face) they go back to the brain as input. That would explain why we often think as if we were leading a monologue, speaking to ourselves.

The more interesting thing is how the actual thought processing happens which leads to ideas and solutions. I suspect the information is just passing through appropriate parts of the brain which process it. The information is probably routed based on its type (numbers, words, images, etc.).

So how do you think?

Categories: Universe

Daylight jetlag

12.03.2013 Leave a comment

Daylight saving is a popular topic these days. There is no proof that daylight saving really helps with anything nor that it has ever helped save energy. Yet all who live in daylight saving zones have to suffer from it.

The result of moving clocks one hour backward or forward is that most people experience a jetlag-like effect, because their rhythm has to suddenly change. So during the spring daylight saving event many people feel tired for a few days before they adjust.

Perhaps it’s time for legislators around the world to stop this madness?

Categories: Universe

Android calendar idea

3.02.2013 Leave a comment

I have an idea for an Android device which I want to share with you.

At some point in my life I started using calendars on portable devices, first on Palm Z22, then on iPod touch. Whenever I am I can always turn on the device and check if I have anything to do this day or the next day, so I can plan ahead. There is so much going on that it’s hard to remember all the things I have to do, let alone things planned months ahead, such as dentist appointments for example.

But when I am home, the problem is I have to walk to the place where I put my device, unlock it, then open the calendar app. This costs time.

This is easily solvable by having a calendar hanging on the wall in the central place of the house such as the kitchen. Another good place is the door of the fridge. But a static, paper calendar can only be looked up where it is placed. I cannot check it when I am away from home.

Android to the rescue! I’ve seen people using their Android tablets as picture frames. Why not use an Android tablet as a calendar? There could even be a device especially suited for this task. The nice thing about Google calendar is that you can share it with other people, so you could have a common family account and all members of the family would share their calendars with it (you can have multiple calendars with your Google account).

The device I am looking for could be described as follows:

  • It is an Android tablet.
  • It is very thin and very light.
  • It has an e-ink screen so it does not consume much energy. The screen will display the last image even if the battery is discharged.
  • It has a low power CPU. The CPU can be slow, it does not matter for this purpose.
  • It does not need to have any connectors.
  • It has WiFi.
  • It has a solar cell with which it charges its battery. No charger necessary.
  • It has a touch screen as an input device.
  • No other gimmicks necessary, no Bluetooth, no camera.
  • It can be hung on the wall, it can stand on the shelf or it can be attached to the fridge door using magnets on its back.
  • It has no unlock screen. In the default mode it displays the calendar app.
  • It is cheap. The upper limit would be $50, but $25 price tag would be perfect. There are e-ink readers which cost less than this (although they are subsidized). Some printed calendars cost this much.

I would certainly purchase such device if it was available. So far I failed to find one. If you find a similar device, let me know.

Categories: Computing

Game consoles

2.02.2013 Leave a comment

High-end game consoles are past their best days. The top consoles from Microsoft and Sony haven’t been refreshed in 6-7 years. Meanwhile the PC platform kept improvements coming and Nintendo has shown with Wii that a console doesn’t need top hardware to be popular. In the recent years console manufacturers faced a new challenge – iOS and Android platforms introduced casual gaming and started eroding the console market.

The nice thing about iOS and Android is that the games for these platforms are super cheap. Spending a few bucks a month for a few games is not a big deal, home budged will certainly not notice that. More sophisticated games cost $5+ which is still not a big deal. For a small portion of a cost of one console game one can purchase several good quality games and play them anywhere, not attached to a TV.

Nintendo has already released a new version of their console – Wii U. However it seems that their new console doesn’t sell as good as they anticipated. Sony and Microsoft are expected to release new versions of their consoles later this year. Will they enjoy better sales, or will they face similar problems to Nintendo’s?

Well, the Android ecosystem isn’t sleeping either. Ouya is one example of an Android-based console, which was an overwhelming success on Kickstarter last year, confirming that this is what the users want. Ouya will certainly steal more market share from the big guns.

I anticipate that Sony’s, Microsoft’s and Nintendo’s consoles will face a really touch competition. My advice for them is to jump on the Android bandwagon, otherwise they will share the same fate as Nokia.

Do you think the high-end consoles will survive?

Categories: Computing

The end of “Made in China”

18.01.2013 Leave a comment

We may be on the brink on the next industrial revolution. One company is trying to introduce robots in manufacturing. So far this has been the domain of cheap workforce in China. But this robot costs as much as a small car and can work without breaks for long periods of time. Some estimates suggests this robot’s cost could be as low as $1 for an hour of its work, or less.

In the coming years, these robots will get cheaper, smarter and more reliable, reducing the cost of manufacturing even more and making them usable in other areas. Soon many products will be assembled locally, so they will become cheaper not only because making them will be cheaper, but also the shipping costs will become lower.

Categories: Universe

Package management on Ubuntu, Linux Mint, Debian, etc.

7.01.2013 3 comments

One area in which Linux shines compared to, let’s say, Windows, is how the OS is put together. An entire working Linux distribution is just a set of installed packages. Each file in the system outside of the user’s home directory belongs to some package. There are no mysterious directories containing lots of files of questionable origin and purpose. One can remove any unwanted packages which came pre-installed. In fact one can even install the whole OS from scratch onto a clean drive, package by package, just by installing individual packages.

For years I’ve been using Gentoo Linux, which distributes packages in the source code form, so installing any package involves compiling it from source. The compilation itself is automatic, the user only needs to choose which packages to install, like on any other distribution. When installing Gentoo Linux, one can choose to start from a pre-installed base, or start from scratch and install individual packages one by one, including the kernel, C library and all basic packages.

This approach is great when you want to learn how Linux works and how it is built. Thanks to this, Gentoo Linux is very configurable, since you can choose dependencies and features for every package. I once leveraged this to build fully functional mini Linux OS which occupied 20MB and booted in 3 seconds.

Gentoo Linux comes with a very good package management system. At the core there is the emerge tool, which is used to install and uninstall packages. There is also an optional tool called equery, which can provide various information about the installed packages.

Not long ago I switched my desktop to Linux Mint. Linux Mint is either Debian-based or Ubuntu-based, depending on the flavor. Ubuntu leverages all the tools and structure from Debian, although its packages are often not compatible with Debian.

The immediate problem I faced was how to manage the packages installed on my system. It turns out that on Debian and all derivatives thereof, package management is more complicated than on Gentoo Linux. There are two tools available, which are providing similar functionality. The first one is dpkg, which is the primary package management tool on Debian. Unfortunately dpkg is not that easy to use and has several missing features, so there is another tool called Debian APT, which is in fact a conglomerate of several, separate tools, such as apt-get. On top of that there are graphical tools, such as aptitude or Synaptic, which try to make package management easier, although they are lacking more sophisticated functionality. Overall, package management on Debian feels like an afterthought, the authors of dpkg probably did not intend to address its shortcomings, so other teams kept creating other tools, which have their own shortcomings.

To install new packages I like to use Software Manager on Linux Mint. This is the best graphical package management tool I’ve ever used on Linux. I just type a portion of the name of the package I want to install, and it gives me a list of all packages matching this name, so I click on the one I was looking for and install it. I used Synaptic before on Ubuntu, but Software Manager is easier to use and less confusing.

However, to acquire any kind of information about packages installed on my system, or to uninstall packages, I use command line tools. It’s not because I am used to this approach from Gentoo Linux, there is simply no better way.

Here is how to perform various package management tasks on Debian-derived Linux distributions like Ubuntu or Linux Mint.

Install a package
sudo apt-get install $PACKAGE_NAME
List all installed packages (brief)
dpkg --get-selections [$PACKAGE_PATTERN]
List all installed packages (detailed)
dpkg -l [$PACKAGE_PATTERN]
List files belonging to a package
dpkg -L $PACKAGE_NAME
Determine to which package a file belongs
dpkg -S $FILE
List packages needed/used by a particular package (dependencies)
apt-cache depends $PACKAGE_NAME
Uninstall a package (using dpkg)
Also removes all configuration files.
sudo dpkg --purge $PACKAGE_NAME
Uninstall a package (using APT)
–purge is optional and also removes configuration files
sudo apt-get remove --purge $PACKAGE_NAME
Remove all unneeded automatically installed packages
Once you remove the package you don’t need anymore, some stale dependencies will still remain. You can remove all unneeded packages like this (–purge is optional):
sudo apt-get autoremove --purge

Show all automatically or manually installed packages

When you install packages you want, they are marked as “manual”. But the packages you choose may often require other packages to be installed, the dependencies. These packages, when installed are marked as “auto”.
apt-mark showauto
apt-mark showmanual
Mark a package as automatically or manually installed
Sometimes some packages you really don’t want or need are marked as “manual”, so they cannot be automatically removed. Or the packages you need are marked as “auto”, so they would be automatically removed. You can rectify this with the following commands:
sudo apt-mark auto $PACKAGE_NAME
sudo apt-mark manual $PACKAGE_NAME

Update all packages in the system

Here is the best way to do this, but it requires you to install aptitude:
sudo apt-get update
sudo aptitude safe-upgrade
Unlike apt-get upgrade, this will also update all kernel packages and prepare unneeded older kernel packages for removal. After this finishes, you can remove unneeded old packages:
sudo apt autoremove

Update GRUB configuration

This is not really part of the above, but if you ever need to tweak the boot menu, e.g. to make GRUB remember the last option chosen, then after you edit /etc/default/grub, you need to run this:
sudo update-grub
Opportunities for improvement
I would like to have one tool, instead of a bunch. It would be great to have this kind of functionality in a GUI, but a command line tool would be sufficient. The tool would have to have meaningful commands, which would be much easier to remember, instead of shortcuts, such us dpkg -S which is meaningless.
The tools are also not fully documented. An example from man apt-cache: “For the specific meaning of the remainder of the output it is best to consult the apt source code.” This ridiculous sentence should not be there in the manual. The result of confusing and missing functionality as well as incomplete documentation is lots of users wandering on forums looking for answers to simple questions.
Hopefully the above post will help you.
Categories: Computing