June 30, 2010
psi im: very obvious and ugly bugs in opensource programs
Another open-source-soft-is-shit post. Sorry for multiple post negative. Next day of linux-is-best-BDSM-tool. Today I installed the popular open-source 'psi' messenger (0.12 version from stable ubuntu 9.04 repository). Here's two chat windows of psi where same friend conversation is handled:
How is such error possible in VERY popular IM?! Seems that developers think like 'oh, such a small bug, let it remain, 'cos I know how to avoid it'.
How is such error possible in VERY popular IM?! Seems that developers think like 'oh, such a small bug, let it remain, 'cos I know how to avoid it'.
June 24, 2010
VPN tunnel configuration
Using OpenVPN, OpenVPN GUI at client and also iptables on server-side for NAT.
client openvpn config (replace $SERVER_IP with actual real ip):
server NAT:
clear rules:
NAT enable (replace param $SERVER_.... with external ip):
server openvpn config:
also possible to compress traffic, but i did not yet tried it.
client openvpn config (replace $SERVER_IP with actual real ip):
remote $SERVER_IP
dev tun
ifconfig 10.8.0.2 10.8.0.1
secret static.key
redirect-gateway
server NAT:
clear rules:
iptables -F; iptables -t nat -F; iptables -t mangle -F
NAT enable (replace param $SERVER_.... with external ip):
iptables -t nat -s 10.8.0.2 -A POSTROUTING -j SNAT --to $SERVER_EXTERNAL_URL
server openvpn config:
dev tun
ifconfig 10.8.0.1 10.8.0.2
route 10.8.0.0 255.255.255.0
secret static.key
push "redirect-gateway"
push "dhcp-option DNS 10.8.0.1"
also possible to compress traffic, but i did not yet tried it.
June 23, 2010
Gimp usability Hell
Gimp is very strange thing for me who used to use windows for image processing. I like linux and solaris as server-side OS and it's very simple for remote administering, but desktop usage of linux is faaar behind windows. Today's three examples.
File saving joke
1. User thinks that he is going to save JPG (selected from drop-down list)..
When press save got strange filename.xcf file. WTF? (go next img)
2. Actually, there's another conflicting switch ('mode' in Raskin terms AFAIR) setting: 'Select by type' (see red border), which says 'by extension', but user entered no extension, so it uses the first item in list: 'Gimp XCF image'.
Layer moving joke
1. Make print screen, select copy to clipboard
2. open gimp, File->New, Ctrl-V (paste)
3. Try to make selection. Good luck. You only can move newly addded layer.
Keyboard shortcuts
No way of changing keyboard shortcuts to Photoshop style. I think whole keyboard profiles could attract MANY of Photoshop users to GIMP.
Hey, GIMP programmers, HAVE YOU EVER TRIED TO USE YOUR APP?!
File saving joke
1. User thinks that he is going to save JPG (selected from drop-down list)..
When press save got strange filename.xcf file. WTF? (go next img)
2. Actually, there's another conflicting switch ('mode' in Raskin terms AFAIR) setting: 'Select by type' (see red border), which says 'by extension', but user entered no extension, so it uses the first item in list: 'Gimp XCF image'.
Layer moving joke
1. Make print screen, select copy to clipboard
2. open gimp, File->New, Ctrl-V (paste)
3. Try to make selection. Good luck. You only can move newly addded layer.
Keyboard shortcuts
No way of changing keyboard shortcuts to Photoshop style. I think whole keyboard profiles could attract MANY of Photoshop users to GIMP.
Hey, GIMP programmers, HAVE YOU EVER TRIED TO USE YOUR APP?!
Gnome (@ubuntu 9) usabiluty tips: fast window switching
To switch between windows faster (like in windows) without even showing window switcher and drawing window placeholder (which is very annoying and antiusability thing itself - in any case it seems better to show next window itself instead of its border rectangle!), open System->Preferences->Keyboard shortcuts and change 2 options as show below:
Then relogin. Multiple alt-tabs works as before (cycles windows) without annoying visual effects.
Then relogin. Multiple alt-tabs works as before (cycles windows) without annoying visual effects.
Labels: linux, look and feel, tip, usability
Notes on Clipping and translation in MIDP
To make less mistakes in MIDP graphics it's important to know how is it work. Actually, MIDP docs and books I've read describes clipping and translation very superficially.
The notes 1 and 3 described below was some a surprise for me.
1. Graphics calculates and stores clipping: a) on each clipRect() call; b) in absolute (screen) coords.
Example:
you could expect nothing on screen, but it's wrong.
2. (obvious) Graphics' clipRect() offset is expected in current translated coords. (see example below in (3))
3. Graphics always have clipping enabled (by default is's equal to the whole paintable area size, different depending on fullscreen mode).
Example:
The notes 1 and 3 described below was some a surprise for me.
1. Graphics calculates and stores clipping: a) on each clipRect() call; b) in absolute (screen) coords.
Example:
clipRect(0,0,50,25)rect is painted with height 25
translate(0,-25)
fillRect(0,0,50,50)
you could expect nothing on screen, but it's wrong.
2. (obvious) Graphics' clipRect() offset is expected in current translated coords. (see example below in (3))
3. Graphics always have clipping enabled (by default is's equal to the whole paintable area size, different depending on fullscreen mode).
Example:
you get nothing painted, because on clipRect() call clipping was intersected with default clipping -> become (w=0,h=0) which is stored. On second translate call clipping area is not recalculated.
translate(0,-25)
clipRect(0,25)
translate(0,25)
fillRect(0,0,50,50)
Labels: graphics, j2me, java, midp, programming
June 21, 2010
Smart movies
If you want to spare some time for reflection and better understand your thoughts about the world you live in (or simply just have some fun :-) ):
Code Geass (both)
Great Teacher Onizuka
Full Metal Alchemist 2
Disclaimer: just plz don't blame me :-) control your time.
be happy,you everyone live only once! ;-)
Code Geass (both)
Great Teacher Onizuka
Full Metal Alchemist 2
Disclaimer: just plz don't blame me :-) control your time.
be happy,
Labels: life
June 19, 2010
iphone updating hell - free apps lost
Yesterday i needed to update iphone (legal: not jailbroken, version 2 firmware to 3) for my friend. The whole task took more than 4 hours and was not fully successfull as iphone completely lost all free apps. Surely I backed up before updating. No success after several "All reset"->"Restore". What is interesting is that I can see all the apps icons and metadata in Backup data!.. No apps that are installed are incompatible with iphone os 3. Apple surely degrades.
So please note: if you have free apps and update to 3.1.3 ios from 2.* you have to find and install your free apps again. (hmm, after each update? or even after each restore from backup?).
Iphone is surely the odd waste of money.
So please note: if you have free apps and update to 3.1.3 ios from 2.* you have to find and install your free apps again. (hmm, after each update? or even after each restore from backup?).
Iphone is surely the odd waste of money.