Märkmeid rakendusarhitektuuride ainest

Sunday, June 14th, 2009
  • See võtab rohkem aega, kui sa arvad, sest pärast seda kui põhimõtted on kohale jõudnud tuleb kogu nõutud funktsionaalsuse realiseerimiseks palju väga sarnaseid klasse kirjutada. Osa jäidki kirjutamata.
  • Google Code on koodi haldamiseks väga mugav koht, imelik, et TTÜ ise sarnast asja ei võimalda (parandage, kui peaksin eksima)
  • Tomcat’i vaikimisi paigaldus Kubuntus on algajavaenulik, log4java ja hibernate tööle saamiseks tuli mitmeid kordi logidest stacktrace lugeda. Lõpuks läks vaja järgnevat /etc/tomcat6/policy.d/04webapps.policy failis:

    permission java.net.SocketPermission "127.0.0.1:5432", "connect,resolve";
    permission java.io.FilePermission "/var/lib/tomcat6/webapps/-", "write";
    permission java.lang.RuntimePermission "getProtectionDomain";
    permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
    permission java.util.PropertyPermission "ANTLR_DO_NOT_EXIT", "read";
    permission java.util.PropertyPermission "ANTLR_USE_DIRECT_CLASS_LOADING", "read";

  • Sellist faili nagu Catalina.out Kubuntus ei teki, samaväärne on /var/log/tomcat6/localhost.aaa-kk-pp.log fail, kuhu ilmuvad System.out’i abil logitud asjad vaid siis, kui context.xml-i täiendada nii, et seal seisab:

    <Context swallowOutput="true">

  • Aine näiteid on tüütu lugeda, treppimine on väga mööda ja üsna kiiresti saab selgeks, miks Eclipse automaatset taanete parandamisvõimalust pakub, seda läheb tõesti vaja.
  • Suur osa näiteid erineb eelnevatest üsna vähe, mugav on lugeda mõne failivõrdlusprogrammi abil ainult muudatusi, ise kasutasin Kompare’t
  • Lohisevate linkide vältimiseks on võimalik kasutada url rewrite filtrit
  • Loengutes käimine pole väga ratsionaalne tegevus, kogu vajalik info on aine veebilehel olemas.

Tags: , , ,

Running Intrepid on Thinkpad X60s a bit cooler

Monday, January 19th, 2009

One of the areas where out of the box Windows Vista beats out of the box Ubuntu is handling temperature. As X60s has rather slim chassis then temperatures inside and on surfaces are quite similar. And this is not so convenient if you’re right-handed trackpad user as this is the exact warmest spot on top.

I’ve been using the following bash script recently to get temperatures down a bit:

echo 5 | sudo tee /sys/bus/pci/drivers/iwl3945/*/power_level
echo "auto" | sudo tee /sys/devices/pci0000:00/0000:00:1d.3/usb4/4-2/power/level
sudo iwconfig wlan0 power on
sudo iwconfig wlan0 txpower 12

First line seems to make the most difference.

When using the laptop after running the script I find that with light wireless activity Gkrellm reports following temperatures:

BAT1: 34 BAT2: 32 CPU: 50 GPU: 48 PCI: 46 THM0: 50 THM1:52

And after reverting changes it seems to stabilize with:

BAT1: 35 BAT2: 34 CPU: 50 GPU: 48 PCI: 51 THM0: 51 THM1:52

Unfortunately I’m afraid it has a price because occasionally my wireless connection seems to drop for no apparent reason and the only way to get it working again is to reboot. Not nice but could be due to something else.

For some further power usage cutdown – and mostly if it makes it cooler it also reduces power consumption – you could apply powertop suggestions:

echo 1500 | sudo tee /proc/sys/vm/dirty_writeback_centisecs
echo min_power | sudo tee /sys/class/scsi_host/host0/link_power_management_policy
echo 5 | sudo tee /proc/sys/vm/laptop_mode

Also without changes powertop reports 17.2W and after 13.7W, those are not absolute values as there was almost no wireless or CPU activity but they do highlight relative difference.

Last but not least, if you don’t use bluetooth you can switch it off using Fn+F5, but you knew that already, didn’t you?

Tags: , , , , , , , ,

Discovering Amarok’s features

Tuesday, November 25th, 2008

Must admit than I don’t know about recent features of Winamp, since I haven’t used it much in a year or so, but last time I did, it couldn’t handle file renames. So if I noticed that some file had a name not reflecting track info correctly or I just moved it to a different folder my playlist and library were left broken.

To my surprise when I renamed files and then tried to play them with Amarok it didn’t happen at all. This player has a wonderful feature called AFT: Amarok file tracking. This is simply genius!

It’s somewhat surprising how I’ve got accustomed to Amarok. I remeber I used to miss Winamp in the beginning. But newly discovered AFT and support for listening to last.fm directly in player are really great features.

Those of you being brave but using Windows can also give it a try: Amarok for windows.

Tags: , , , , ,