lorenzo bolla’s blog

May 1, 2009

Windows’ bugs

Filed under: personal — Tags: , — lbolla @ 5:31 pm

a bug’s just hidden in my keyboard…
a green one…
under the Windows key!

escape sequences for rxvt

Filed under: programming — Tags: , , , — lbolla @ 10:07 am

I’m posting this info because I had a hard time searching for it on the internet.

if you are using rxvt (or urxvt), and you want escape sequences to work as in xterm, you need to specify them in your .Xdefaults.

here are the codes I had to add to have vim working properly on rxvt (I use alt-left_arrow and alt-right_arrow to navigate through tabs):

*Rxvt*meta8: false
*Rxvt.keysym.C-Left: +033[1;5D
*Rxvt.keysym.C-Right: +033[1;5C
*Rxvt.keysym.M-Left: +033[1;3D
*Rxvt.keysym.M-Right: +033[1;3C
(substitute “+” with “\”)

enjoy!

April 7, 2009

blog post with charm

Filed under: programming — Tags: , , , — lbolla @ 5:52 pm

this is a test blog entry, posted with charm!

charm is a text-based client which uses the MetaWeblog API to post entries to WordPress powered blogs. it also implements other APIs.

I’m wondering if simple ASCII entries like this one will be properly formatted by the WordPress’ Intelligent Text Formatting feature. it would be nice to use vim to edit it…

enjoy!

February 2, 2009

qwerty vs dvorak vs colemak to edit python code

Filed under: Blogroll — Tags: , , , — lbolla @ 9:30 am

yesterday, I was intrigued by the idea of choosing a more efficient keyboard layout to work with everyday.

as long as I type python code 90% of my time, I decided to evaluate the efficiency of the first 3 most widespread keyboard layouts: QWERTY, Dvorak and Colemak.

I used this excellent tool to compare the three layouts over the first 50000 characters of the webpy source code.

here are the results:

The Qwerty Keyboard Layout Vs The Dvorak Keyboard Layout

:: UP ::Overall effort

Layout Effort % improvement over worst layout
Qwerty 306,509.6 0.0 %
Dvorak 283,868.7 7.4 %
Colemak 275,347.6 10.2 %

:: UP ::Keys for each finger (stronger fingers should be used more often)

Layout Thumbs LPinky LRing LMiddle LIndex RIndex RMiddle RRing RPinky Total
Qwerty 25.9 % 12.4 % 5.3 % 9.5 % 11.6 % 7.6 % 5.6 % 8.9 % 13.2 % 54,237.0 keys
Dvorak 25.9 % 13.0 % 5.2 % 8.1 % 7.3 % 7.5 % 7.5 % 8.2 % 17.3 % 54,237.0 keys
Colemak 25.9 % 12.7 % 4.8 % 7.5 % 9.5 % 8.4 % 10.1 % 6.6 % 14.5 % 54,237.0 keys
Layout Thumbs Left hand Right hand Total
Qwerty 25.9 % 38.8 % 35.2 % 54,237.0 keys
Dvorak 25.9 % 33.6 % 40.5 % 54,237.0 keys
Colemak 25.9 % 34.5 % 39.6 % 54,237.0 keys

:: UP ::Finger Travel Distance (only the horizontal)

Layout Thumbs LPinky LRing LMiddle LIndex RIndex RMiddle RRing RPinky Total
Qwerty 0.0 % 18.1 % 2.0 % 10.5 % 15.5 % 12.1 % 8.6 % 9.9 % 23.4 % 1,441.5 m
Dvorak 0.0 % 21.1 % 4.1 % 3.5 % 10.0 % 12.5 % 7.6 % 10.8 % 30.4 % 1,210.3 m
Colemak 0.0 % 23.7 % 2.5 % 6.1 % 10.2 % 10.2 % 9.3 % 9.3 % 28.6 % 1,131.2 m
Layout Thumbs Left hand Right hand Total
Qwerty 0.0 % 46.0 % 54.0 % 1,441.5 m
Dvorak 0.0 % 38.8 % 61.2 % 1,210.3 m
Colemak 0.0 % 42.6 % 57.4 % 1,131.2 m

:: UP ::% home keys (out of all character keys plus SHIFT and ENTER, but excluding keys operated by thumbs)

Qwerty 20.4 %
Dvorak 33.7 %
Colemak 38.7 %

:: UP ::% keys typed with the same finger as the previous key (excluding repeating keys like ss)

Qwerty 4.5 %
Dvorak 3.8 %
Colemak 3.6 %

:: UP ::% keys typed with the same hand as the previous key (ex: in Qwerty sd or ss are included, but s s is not since you type the space with the other hand)

Qwerty 26.8 %
Dvorak 20.0 %
Colemak 24.6 %

:: UP ::% keys typed with the same hand as the previous key and jumping a row (ex: in Qwerty ev is a row jump – you jump over the middle row – and it’s awkward to type; ef is not a row jump)

Qwerty 10.3 %
Dvorak 5.7 %
Colemak 4.1 %

:: UP ::% keys typed with the same hand as the previous key and in reverse order (ex: in Qwerty df or kj are typed in the easier order pinky-ring-middle-index, whereas fd and jk are in reverse order index-middle-ring-pinky, and harder to type)

Qwerty 15.4 %
Dvorak 11.9 %
Colemak 15.2 %

:: UP ::% keys that need the SHIFT modifier

Qwerty 14.3 %
Dvorak 14.3 %
Colemak 14.3 %

:: UP ::Pairs of consecutive keys typed with the same finger in Qwerty

:_NewLine_ 253 times 0.47 %
de 200 times 0.37 %
tr 158 times 0.29 %
rt 102 times 0.19 %
ol 99 times 0.18 %
un 98 times 0.18 %
q_LeftShift_ 87 times 0.16 %
ce 86 times 0.16 %
“_NewLine_ 81 times 0.15 %
ed 80 times 0.15 %
}_NewLine_ 62 times 0.11 %

:: UP ::Pairs of consecutive keys typed with the same finger in Dvorak

ct 196 times 0.36 %
s_RightShift_ 169 times 0.31 %
db 152 times 0.28 %
l_RightShift_ 137 times 0.25 %
‘_LeftShift_ 133 times 0.25 %
rn 115 times 0.21 %
ls 100 times 0.18 %
}_NewLine_ 62 times 0.11 %
=_RightShift_ 59 times 0.11 %
“_LeftShift_ 58 times 0.11 %
e. 58 times 0.11 %

:: UP ::Pairs of consecutive keys typed with the same finger in Colemak

:_NewLine_ 253 times 0.47 %
ue 237 times 0.44 %
db 152 times 0.28 %
e, 89 times 0.16 %
q_LeftShift_ 87 times 0.16 %
“_NewLine_ 81 times 0.15 %
}_NewLine_ 62 times 0.11 %
]_NewLine_ 46 times 0.08 %
pt 44 times 0.08 %
‘_RightShift_ 41 times 0.08 %
“_RightShift_ 41 times 0.08 %

:: UP ::Key frequency in your text

_Space_ 14067 times 25.94 %
_LeftShift_ 4391 times 8.10 %
e 3239 times 5.97 %
t 2184 times 4.03 %
s 2170 times 4.00 %
r 1890 times 3.48 %
a 1619 times 2.99 %
o 1557 times 2.87 %
l 1530 times 2.82 %
n 1519 times 2.80 %
_NewLine_ 1511 times 2.79 %
i 1372 times 2.53 %
_RightShift_ 1357 times 2.50 %
d 1014 times 1.87 %
f 971 times 1.79 %
c 855 times 1.58 %
u 851 times 1.57 %
m 716 times 1.32 %
p 715 times 1.32 %
( 674 times 1.24 %
) 673 times 1.24 %
. 658 times 1.21 %
623 times 1.15 %
, 573 times 1.06 %
b 571 times 1.05 %
563 times 1.04 %
_ 554 times 1.02 %
= 518 times 0.96 %
: 490 times 0.90 %
q 463 times 0.85 %
y 423 times 0.78 %
h 416 times 0.77 %
w 352 times 0.65 %
> 348 times 0.64 %
g 304 times 0.56 %
v 257 times 0.47 %
x 253 times 0.47 %
k 231 times 0.43 %
< 154 times 0.28 %
/ 125 times 0.23 %
[ 120 times 0.22 %
] 119 times 0.22 %
; 113 times 0.21 %
0 86 times 0.16 %
` 85 times 0.16 %
+ 84 times 0.15 %
1 81 times 0.15 %
{ 80 times 0.15 %
} 79 times 0.15 %
78 times 0.14 %
j 76 times 0.14 %
* 72 times 0.13 %
# 69 times 0.13 %
2 67 times 0.12 %
% 55 times 0.10 %
$ 52 times 0.10 %
3 31 times 0.06 %
6 29 times 0.05 %
8 18 times 0.03 %
@ 17 times 0.03 %
\ 14 times 0.03 %
z 13 times 0.02 %
5 13 times 0.02 %
4 8 times 0.01 %
? 8 times 0.01 %
9 7 times 0.01 %

:: UP ::Frequent pairs of keys in your text

_Space__Space_ 9243 times 17.04 %
_NewLine__Space_ 1233 times 2.27 %
_Space__LeftShift_ 805 times 1.48 %
_LeftShift_( 674 times 1.24 %
_LeftShift_) 673 times 1.24 %
_LeftShift_” 563 times 1.04 %
_LeftShift__ 554 times 1.02 %
se 549 times 1.01 %
,_Space_ 543 times 1.00 %
_LeftShift_: 490 times 0.90 %
el 405 times 0.75 %
er 377 times 0.70 %
in 364 times 0.67 %
_Space__RightShift_ 362 times 0.67 %
or 352 times 0.65 %
_LeftShift_> 348 times 0.64 %
_Space_i 344 times 0.63 %
_Space_s 341 times 0.63 %
te 340 times 0.63 %
e_LeftShift_ 338 times 0.62 %
=_Space_ 332 times 0.61 %
_Space_= 321 times 0.59 %
re 306 times 0.56 %
lf 294 times 0.54 %
)_NewLine_ 281 times 0.52 %
e_Space_ 281 times 0.52 %

actually, I was disappointed: there seem to be no clear advantage of Dvorak or Colemak, wrt QWERTY and, given the popularity of the latter, switching does not seem to be a good idea…

February 1, 2009

this is another weblog client test

Filed under: personal — Tags: , — lbolla @ 1:44 am

…and this is using BloGTK, which seems a little bit better.
it support tags, too!

better…

test with gnome-blog

Filed under: Uncategorized — lbolla @ 12:54 am

this is a post using gnome-blog, a weblog client for gnome.

here I read about this possibility, but there were no instructions about how to configure the client…

if this is published, it can’t be so difficult…

January 31, 2009

wordpress.com and text based web browsers

Filed under: personal, tech — Tags: , , — lbolla @ 11:07 pm

today, I was appreciating how well wordpress.com renders on text based web browsers (using elinks).

unfortunately, even if reading posts looks great, posting does not. actually, I’ve been able to delete one of my posts, while searching to edit it. completely wiped out. luckily, google cache saved my time and promptly found an older copy.

beware!

command line html validator

Filed under: programming — Tags: , , — lbolla @ 11:00 pm

valid HTML is something we should strive to achieve.

W3C Validator is an invaluable tool to do just that.
unfortunately, validating a local file you are working on can be annoying after the 100th time you’ve uploaded it to the W3C website.

Here you can find a command line HTML validator that simply uploads anything passed to it from stdin to the W3C Validator.

The basic syntax is:
$> python validate.py < file_to_validate.html

enjoy!

Note: before using the file, rename it from validatepy.pdf to validate.py. unfortunately, I’m not allowed to post .py files on this website…

December 24, 2008

pubblicita’ non richiesta da parte di RAI su e-mail

Filed under: italiano — Tags: , — lbolla @ 9:06 pm

RAI utilizza la e-mail degli utenti per informazioni pubblicitarie non richieste.

se questo vi da’ fastidio tanto quanto ne da’ a me, evitate di compilare il modulo disponibile qui.

io l’ho fatto, purtroppo, per lamentarmi delle sciocchezze pseudo-scientifiche diffuse dalla trasmissione “La medicina“. ecco l’e-mail, automaticamente generata dal sistema, che mi conferma il successo dell’invio… e fa un po’ di pubblicita’:

Grazie per averci contattato, la Sua e-mail verra’ esaminata nel piu’ breve tempo possibile.

Con l’occasione, La informiamo che chiamando il numero 800.389.389, e’ possibile ricevere gratis e senza impegno il catalogo “La Rai per la cultura”; una pubblicazione gratuita che raccoglie i migliori programmi culturali realizzati dalla Rai nell’arco di oltre 50 anni: 40 collane di dvd comprendenti oltre 500 titoli. Per ulteriori informazioni consulti il sito www.perlacultura.rai.it

Contact Center ScriveR@i
– snip –

la RAI non sa proprio piu’ dove altro mettere la sua spazzatura…

October 5, 2008

py2dot

Filed under: programming — Tags: — lbolla @ 2:17 pm
py2dot example

py2dot example

py2dot is a python script to generate graphs from a  python program.

it interprets a python program as a graphs of function calls. it can represent classes and imported modules.

py2dot is available from pypi.

more information are available here.

Older Posts »

Blog at WordPress.com.