2011-10-29

The most important lesson from Steve Jobs

I've stayed well away from all this Steve Jobs mourn-mania, but there's one thing I owe him.
He showed us that you can do business without wearing a tie.



Sure, you have to wear a big personality instead.

2011-10-22

Geekscapes



Weird stuffs, mostly relevant only to geeks...

Air cooling towers of an Amdahl mainframe component from the 80's.
Way ahead of its times: IBM mainframes were water cooled at the times, while air cooling was cheaper and required less maintenance.


2011-10-15

Pioneer One

Sense of wonder and food for thought.
This is what good Science Fiction should be all about.
Pioneer One is a web-only TV show that's worth watching.

What's the most used button of a browser?


I bet it's the back button.
I usually get it by pushing the mouse left until it hits the screen border
Too bad this actually brings up the left bar on Ubuntu and it covers the button itself.
This actually requires to move the mouse again to clear the bar and then retry to center the button again.
Bad design decision.
Time to give Gnome 3 a try.


Update:
I've found that I'm not the only one that stresses the importance of the back button:
http://www.useit.com/alertbox/990530.html

2011-10-13

\n

There's an ongoing census here in Italy right now.
I've just sent my form using the website of the Italian statistic institute.
Here's my receipt:


I presume that the "\n"s are just a tribute to Dennis Ritchie in the day of his passing.

Dennis Ritchie (1941 - 2011)

One of those obscure heroes that might will never receive the recognition they deserve.
I've found this little gem on slashdot

main()
{
    printf("Goodbye, World");
}

He may not have been glamorous and "visionary", but indeed he shaped our world to a great extent.

2011-10-08

The zip lockscreen

Look at this Android lockscreen:


it may be stylish and minimalist, but do you think that your grandma could understand that she need to touch the circle and drag it around?
This is a geek oriented lockscreen, not one targeted at the mass market.

The iphone lockscreen is lightyears ahead:


I've seen children unlocking the phone the first time they've seen it without anyone telling them how.

I think Android needs an equally strong UI metaphor to appeal to a broad user base.
What can you use to convey the sliding action?
Take a look at this (badly) photoshopped (actually GIMPed) proof-of-concept:


I bet even the most techno-phobic can understand that he needs to pull and slide the zip.

Note: at the first try I've used the image of a zip from a blue jeans, but the risk of a two-way joke was too high, and that's not the spirit of this post.

Migrating logical volumes between volume groups

Some time ago I added a second hard disk to my machine and I joined it to the root volume group. I've also created a logical volume with a /data filesystem on it.
Now I need to move that data disk to a new machine, but as long as it's part of the root volume group I can't easily move it without making the whole machine unbootable.
These are the steps on a Red Hat 5.4 machine:
First, make sure that the disk you want to migrate does not contains logical volumes that are spanned on other disks also: I checked it with the system-config-lvm GUI, that shows how logical volumes are mapped to physical volumes, and I saw that my logical volume lv_data was entirely on /dev/sdb.

This is the initial fstab with the /data mounted from VolGroup00

/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/VolGroup00/lv_data         /data           ext3    defaults        1 2

first, unmount the /data filesystem as this whole operation can't be done online.

[root@testlvm /]#umount /data

deactivate the logical volume

[root@testlvm /]#lvchange -an /dev/VolGroup00/lv_data

now split the root volume group creating a new VG_data

[root@testlvm /]# vgsplit VolGroup00 VG_data /dev/sdb
  New volume group "VG_data" successfully split from "VolGroup00"

you can see that the logical volume lv_data now belongs to the newly created volume group.
if you get an error, read at the bottom of this post.

[root@testlvm /]# vgdisplay -v
    Finding all volume groups
    Finding volume group "VG_data"
  --- Volume group ---
  VG Name               VG_data
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1.97 GB
  PE Size               32.00 MB
  Total PE              63
  Alloc PE / Size       63 / 1.97 GB
  Free  PE / Size       0 / 0
  VG UUID               67mnJx-WyyP-7XQz-D1na-CNhr-rjUJ-79V8Fu


  --- Logical volume ---
  LV Name                /dev/VG_data/lv_data
  VG Name                VG_data
  LV UUID                lcwb7r-n0YZ-lslK-HoqE-VL6V-IMNl-rIY6N0
  LV Write Access        read/write
  LV Status              NOT available
  LV Size                1.97 GB
  Current LE             63
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto


  --- Physical volumes ---
  PV Name               /dev/sdb
  PV UUID               uwiyVE-Hkvt-dG3c-x1Ak-KBng-T91O-5Xuz2l
  PV Status             allocatable
  Total PE / Free PE    63 / 0


    Finding volume group "VolGroup00"
  --- Volume group ---
  VG Name               VolGroup00
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               9.88 GB
  PE Size               32.00 MB
  Total PE              316
  Alloc PE / Size       316 / 9.88 GB
  Free  PE / Size       0 / 0
  VG UUID               CJqD4r-kRQM-Cj9e-XwOr-6dn8-TkPH-MfTTyZ


  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                d4iToX-8m0c-jf9s-sMMN-VDpO-brE8-4kWhf2
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                7.91 GB
  Current LE             253
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0


  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol01
  VG Name                VolGroup00
  LV UUID                kEzo7d-AHuv-xiPD-3Qbo-v8yY-6w1D-DFMIwN
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.97 GB
  Current LE             63
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1


  --- Physical volumes ---
  PV Name               /dev/sda2
  PV UUID               7bPvQd-H8yE-v00N-asPT-WQ92-6oCS-bBh6nj
  PV Status             allocatable
  Total PE / Free PE    316 / 0

bring back online the logical volume

[root@testlvm /]#lvchange -ay /dev/VG_data/lv_data

note that you can't use TAB to complete the path of the logical volume, because the dev node won't be created until you activate it, so just type it as it is.

edit /etc/fstab with new new mount point


/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
/dev/VG_data/lv_data            /data           ext3    defaults        1 2

and finally mount the /data filesystem from his new home

[root@testlvm /]#mount /data

now you can safely umount it, export the volume group and reimport it on another machine.

Note that as of Red Hat 5.4 you may get a an error on the vgsplit command if the target volume group already exists and has active logical volumes.

  Logical volumes in "VolGroup00" must be inactive


The error message is somewhat misleading: you'll get it even if the logical volumes you are migrating are already inactive.

Workaround: just make it in 2 steps: first split into a new "temp" volume group, then vgmerge the "temp" volume group into the target volume group.

2011-10-06

Ubuntu Unity

While I like the bravery of trying something new in the GUI field, I think there's some overshooting in Ubuntu Unity.
Merging the menu bar with the title bar can save some screen estate in full screen applications:
look at this maximized terminal window.
A full row is gained by merging the menu and the title, and the menus are accessible as before: by going up and pressing the right mouse button.


Problems arise when using the terminal at its native size and get worse if you put the window in the lower half of the screen: to access the menu you have to travel up half the screen with the mouse.


I'd propose to keep the menu bar attached to the window while not in maximized mode.

2011-10-03

Bad Design


Look at this sign:


Warning: wet floor.

But if one does not understand italian, what would he see? A string puppet? Or a man who's falling, but not because of the water on the floor: because he's beeing pulled from his feet with ropes.
In comics, the movement effect is done with lines that follow the subject in his motion, they don't trail it.

Look at this one, courtesy of http://www.chumpysclipart.com/


This one is really falling.