sunnuntaina, joulukuuta 09, 2007

Time Machine internals

When I browsed the contents of my Time Machine backup, I saw lots of files which had a large link count. This led me to believe OS X 10.5 backs up files by making a single copy on the backup disk and the hourly backups only have a hard link to the file if it has not been modified.

Now I'm not sure anymore.

Take the stat of these two files, which probably do not change:

$ stat -f "dev=%d devnum=%r ino=%i links=%l" "/Volumes/Isolevy/Backups.backupdb/Sarah/2007-12-09-124244/Sarah/Applications/Address Book.app/Contents/Resources/Dutch.lproj/AddressBookHelp/gfx/border_top.gif" "/Volumes/Isolevy/Backups.backupdb/Sarah/2007-12-09-134304/Sarah/Applications/Address Book.app/Contents/Resources/Dutch.lproj/AddressBookHelp/gfx/border_top.gif"
dev=234881030 devnum=0 ino=236409 links=1
dev=234881030 devnum=0 ino=236409 links=1

The inode of the two files is the same but their link count is only 1. According to my understanding of the unix file system semantics, this should not be possible! Perhaps there is some HFS+ magic involved that is visible thru the "unix" disguise OS X is wearing. I think I read somewhere that hard links were a bit difficult to implement in HFS+ and they at least used to be very slow.

Anyone have any info?

Better-looking Squeak


Better-looking Squeak
Originally uploaded by sti.
A blogger who likes Smalltalk has customized his Squeak installation a bit. Squeak seems like a wonderful tool, it just badly needs someone with an eye for graphic design to have a go at it

maanantaina, marraskuuta 12, 2007

Turha popup


Turha popup
Originally uploaded by sti.
"Työpöydälläsi on käyttämättömiä pikakuvakkeita"

tiistaina, lokakuuta 30, 2007

Leopard firewall problems

The link in the title takes you to a story where the Leopard firewall was tested and the results were not pretty. (Thank you Timo for sharing this link.)

I also forgot to mention that I was a bit surprised to find the firewall was set to accept all incoming connections, although I'm sure my Panther was set to allow only some limited set of ports.

I'm very happy I'm behind a wireless NAT router using WPA.

If I set up my own firewall rules with ipfw, I wonder if Leopard's firewall will get upset with it. In Panther the firewall System Prefs was all grayed out when I had custom ipfw rules. Only after removing my own rules could I use Panther's System Prefs to e.g. allow access to Apple file sharing.

sunnuntaina, lokakuuta 28, 2007

Leopard second impressions

Safari version 3 is much better than version 1 in old Panther. Even some Google services work with it. I made it my default browser instead of Firefox.

Mail told me it needs to import my existing emails. Importing about 3000 messages took couple of minutes and then Mail worked with no problems.

I set up iChat with my Google Talk account. (Panther's iChat only supported AIM accounts.) No problems there either.

I turned Coverflow on in Finder and started to browse thru my Applications folder to throw away old apps I did not need. E.g. I removed Internet Explorer.

I did not notice any new games in there. 

Spaces was disabled by default. I enabled it. I had not realized how great it is to get more screen real estate, even when it is only virtual.

I enabled Time Machine. You need to tell it on which disk to put the backups. My external disc had 10 GB free. Time Machine immediately started to make a backup and told me it could not fit the 60+ GB on that volume. I removed a bunch of old TV recordings and now Time Machine has a small status window floating on my screen where I can follow the progress of the backup.

Even though "man crontab" says the cron functionality has been taken over by launchd, cron is still running and executing tasks from /etc/crontab. (I wonder if it should be?)

I removed my old Carbon Copy Cloner backup task from /etc/crontab.

Apparently Leopard also executes all old startup items from /Library/Startup. I had an old-style startup script that runs throttled. Killed that and removed the startup item. (OS X newer than Panther should have QoS built into the kernel.)

The firewall settings have moved. They are no longer under Sharing in System Prefs. Now they are under Security. It would appear that no matter which firewall setting I choose, "ipfw list" always prints just one line: "allow ip from any to any". I hope this does not mean the firewall is always disabled.

That's all for now... I should get some sleep.

Leopard first impressions

I got myself Mac OS X Leopard from MacPeople store on Friday. This is what happened since:

I read the installation instructions that came with the DVD box. They said to insert the DVD into the Mac and run the installer. I did so but the Leopard disc never appeared on my Mac desktop. Also the Mac became very, very slow.

I spent the better part of an hour trying to launch System Monitor and Terminal and Console to try to find out why the Mac was crawling along and why the Leopard disc was not mounted. I also launched Disk Utility, which never appeared either.

After watching a spinning beach-ball for almost an hour, I powered off the Mac and restarted. It spit out the Leopard disc and it was working perfectly, no slowness anywhere. The only hint to the problems was in system.log where something complained about timeout in connecting systemuiserverd. (I cannot find that anywhere now, apparently the Leopard install somehow lost yesterday's syslog.)

I plugged in a USB keyboard and mouse and booted from Panther installation disc, ran Disk Utility and did Repair Disk and Repair Permissions. There were some incorrect permissions in some files relating to iso9660 filesystem.

Reboot. Insert Leopard disc. This time it mounted. Run Leopard installer. It rebooted from the disc. The Microsoft USB mouse did not work in the installer, but the installer was fully operational with the keyboard. I chose default installation, which upgrades an existing OS X to Leopard. It told me it will take more than 3 hours to finish installation. I went to bed.

In the morning I was greeted by the OS X login window and hidden behind it was a window that asked what kind of keyboard I was using. Unfortunately I was unable to bring that window to the front because the Microsoft mouse was still not working. But the Mac was now up and running, so I turned on my bluetooth mouse. It worked, I managed to get the Mac recognize my keyboard and logged in.

The first thing that popped up was a window that asked me which wireless network I wanted to connect to but there were no wireless networks available. In reality my Linksys AP was on and working. I had no time to debug it any further at that time, so I shut down the Mac.

The next time I booted the Mac, the Microsoft mouse worked! And when I logged in, I was presented with a list of all wireless networks. I connected to my WPA-protected wlan with no problems.

I haven't booted the Mac since and I haven't had any other problems so far.

tiistaina, lokakuuta 23, 2007

Mac minin muistipäivitys


After memory upgrade
Originally uploaded by sti.
Mac OS X Leopard julkaistaan perjantaina. Sen sanotaan toimivan 512 megatavulla muistia, mutta Xcode-kehitystyökalu vaatii 1 gigatavun. Koska haluan päästä mukaan parantamaan erinäisiä vapaita Mac-ohjelmia, pitää Xcoden toimia ja siksi kävin ostamassa 1 gigan muistikamman.

Printtasin netistä ohjeet Mac minin avaamiseen ja muistin vaihtamiseen suurempaan ja luin niitä sydän sykkyrällään. Vaikutti vaikealta operaatiolta, jossa oli monta mahdollisuutta rikkoa mini.

Loppujen lopuksi kyseessä oli kuitenkin varsinainen antikliimaksi. Koppa aukeni melko nätisti parilla kapeateräisellä ruuvimeisselillä ja muistikamman vaihtamiseksi piti irrottaa vain yksi ruuvi, jotta sai siirrettyä wlan-antennin tieltä pois.

Paketti kasaan käänteisessä järjestyksessä, piuhat kiinni ja se on siinä.

sunnuntaina, lokakuuta 21, 2007

DVD, a standard or not? And why would it be?

I have learned that Mac mini (G4 1.42 GHz, OS X 10.3.9) cannot play DVD discs recorded with Sony RDR-HXD870B, a digital set-top-box with a built-in DVD-recorder.

This seems to be the case no matter if the DVD is recorded as DVD-VR or DVD-video. The disc was finalized.

The discs can be played on the Sony itself and on a Philips DVDR-3400 player.

I will try to get more data points before pointing an accusing finger to somebody. Right now I'm just pissed that it won't work. DVD is such an old standard that it should have matured by now. But I guess I should not be surprised. After all, I did own an old PlayStation 2 that would not recognize some of our Disney DVDs as playable discs.

But surely it was just a glitch that Sony PlayStation 2 would not play some Disney content. After all, what would Sony, itself a major movie studio, benefit from such a situation?

I can't help but recall the olden days when all the VCRs played all the videos, provided you were trying to insert a VHS tape into a VHS device and not into a Betamax device. This mistake would have been difficult to do, given the different physical characteristics of VHS and Betamax systems. You would immediately know you were trying to shove a Betamax tape into a VHS device, even in dark and your eyes closed.

After you managed to insert the cassette into the device, it would play back the video. If the recording device and playing device were not very well compatible, you would get a slightly fuzzy or noisy picture, but if the story of the video was any good, you could overlook little things like the picture quality.

Your chance of getting satisfaction were pretty high.

Fast-forward to present day of digital entertainment systems and high-definition TV screens. There are several incompatible systems on the market from several consortiums of companies who have realized it is not in their best interests to have a level playing field where every device just plays any medium.

If you were an alien who was just dropped on this planet, you might think there was a level playing field with a standard medium. The medium was a shiny, plastic disc, about 12 cm in diameter. The alien would probably be surprised to find, even though the discs all look alike (although they might have different coloring or images imprinted on them), the data on the disc can be encoded in a number of different ways, all ever so slightly different and incompatible.

The alien would need to study the economy and culture of this planet to realize the entities called companies, who the capitalistic system relies on to bring new wonderful things for people (who are called consumers), are really afraid of the the very system they are part of. In the capitalistic system, companies compete on the marketplace and the one to make the superior product will win the hearts (and pocketbooks) of the consumers.

But in this system nothing is permanent. Any time another company could arise and make an even better product and steal the customers from the previous winner. This means the winner cannot rest on its laurels, as they say, but must keep on innovating. This is hard work. It is much easier for the company if it can create a product that locks people into the system, makes it hard for them to switch the product of one company to a product of another.

The first step of creating such lock-in is to make products that are incompatible. Once the consumer has invested into one product, it would cost him a lot of money to switch to a better system because he would have to buy everything new instead of using his older products.

Hmm... this is developing into a nice conspiracy theory. Perhaps I should just take a deep breath and get a grip of myself. Obviously I'm just getting overexcited over such a little thing as Apple failing to make proper DVD player software. I'll try the disc in some other Macs first...

Ankkuri Kotkan Katariinan puistossa


Ankkuri Kotkan Katariinan puistossa
Originally uploaded by sti.
Paikalla jossa tuhkat lasketaan mereen.

sunnuntaina, lokakuuta 14, 2007

Warning: your OpenID login might be compromised

For a few months now I have used one web service that supports OpenID logins. I decided it was time for me to get me an OpenID and start using it.

The good thing about OpenID is it is a completely open system where multiple providers can compete. It is not a proprietary system that would be tied to the success or failure of one company and it is not encumbered by patents or other intellectual property issues.

I looked at some of the OpenID providers and could not really see much difference there. I knew OpenID makes it possible to use any URL as your identity, so I wanted to use my blog URL. When I was looking, the only provider that openly told how to do that was claimID.com. So I chose to register with them.

I have also started using Tor, The Onion Router to hide my location on the web (and also turned off cookies by default, installed NoScript and Adblock Firefox extensions.)

Yesterday I was told Tor was used to steal passwords.

I immediately thought this can only happen if people mistook Tor for something else than it is: Tor does not encrypt or scramble your traffic and magically make it secure, it only hides where and who you are. Tor cannot hide who you are if you reveal that in the content of the messages in the form of user names and passwords.

So, if you are dumb enough to send passwords in the clear, you deserve to get your password stolen. And of course I'm not that stupid. All the important web sites I use login over SSL-protected pages... except claimID.com.

When I use my OpenID URL to log into OpenID-enabled web services, I'm redirected to claimID.com's login page where I log in. I had been lazy and not verified that login page is secured with SSL. It is not. Sometimes the login page is not SSL protected, but the login form is posted back to the server over SSL. But this is not the case with claimID.com either.

This means it is possible someone running a Tor exit node has seen my claimID.com login name and password in the clear.

I started to fix this issue. First, I wanted to know if there is a way to login to clamID.com securely and I just haven't used it for some reason. If there was no secure login available, I would find another OpenID provider.

After some digging around, I found claimID.com has recently made it possible to login securely on an SSL protected page. (Link to announcement in the title of this post.)

I have now updated my login settings to use the SSL protected login page and changed my password at claimID.com. Also I sent an email to claimID.com's support and asked them to: 1) Add a secure login link to the old cleartext login page and 2) email their users telling them to start using the secure login and change their passwords.

I think it would be decent of them to do these things but if I were claimID.com, I would probably be too embarrassed to tell my users I have made them send cleartext passwords.

perjantaina, lokakuuta 12, 2007

Parkkeerattu puoliksi nurmikolle


Parkkeerattu puoliksi nurmikolle
Originally uploaded by sti.

EU ja Galileo

Tämän päivän Helsingin Sanomien pääkirjoituksessa tuskaillaan EU-maiden eripuraisuutta ja lyhytnäköisyyttä Galileo-projektin rahoituksen järjesteämiseksi. Galileohan on EU:n epätoivoinen yritys rakentaa amerikkalaisten GPS:ää vastaava järjestelmä. Yksi järjestelmän satelliiteista on jo laukaistu vuonna 2005.

Kun Nokia osti juuri yhden yrityksen 5.7 miljardilla, koko EU ei saa kasaan paria miljardia.

Päätoimittaja lohkaisee aika hyvin:
Jos Galileo Galilei olisi tarvinnut kaukoputken kehittämiseen eurooppalaisten päättäjien yhteistä apua, työ olisi taatusti vieläkin kesken intressiristiriitojen vuoksi.
Kokonaan toinen asiahan sitten on, onko koko hankkeessa ylipäätään mitään järkeä. Miksi kukaan valmistaisi Galileoa käyttäviä paikannuslaitteita kun GPS toimii ihan hyvin? GPS-paikantimia saa nykyään pikkurahalla ja sellainen alkaa löytymään jo puhelimistakin. 3 vuoden kuluttua se on varmasti jo kännyköiden vakiovaruste, aivan kuten datayhteys ja weppiselain ja kamera ovat nykyään.

Tietysti kilpailun lisääntyminen on hyvä asia, koska se yleensä ajaa hintoja alas, mutta käykö niin tässä tapauksessa? Eikö GPS-järjestelmän käyttäminen ole ilmaista? Jos ilmaisen järjestelmän rinnalle tehdään toinen ilmainen, miksi siirtyä järjestelmästä toiseen?

Galileon pitäisi ilmeisesti houkutella käyttäjiä paremmalla laadulla, paikan pystyy määrittämään metrin tarkkuudella. Mikä mahtaa olla GPS:n tarkkuus? Ilmeisesti se on kuitenkin jokapäiväisiin sovelluksiin riittävä.

Näin ruohonjuuritasolta asiaa katsoen Galileo-järjestelmässä ei ole mitään järkeä. Ehkä juuri siitä syystä EU:lla oli niin suuria vaikeuksia löytää yrityskumppaneita kantamaa suurin osa järjestelmän rahoituksesta.

maanantaina, lokakuuta 08, 2007

We want to hear from you. Yeah, right...

Remember the good old times when the only way to get your voice heard by other people was to write a letter to the editor of the local newspaper? Of course, the editor might not publish it, but perhaps he read it.

Then the Internet came. Everyone and everything was on it. Everyone had an email address. Newspapers had them. Some newspapers had separate addresses for every section of the paper printed at the top of every page.

Then there were newsgroups, bulletin boards and finally, social networks.

Communication is the big thing. Call us, email us, send us the phonecam pic you snapped of the upside-down car on your way to work. Tell us what you think! Help us make this site better!

Usually you have nothing to say. Sometimes you have something to say but you're busy or just can't be bothered.

And then there are the times when you really feel you have something you want to share.

You click that link.

"You need to register before you can post comments." Grrr... do I look like I need another login/password to keep track of? Well, ok, just this once.

You fill in the form, click the next-button... and they slap you with a captcha.

Ok, these guys are paranoid. You type in what the barely readable picture says.

And it tells you you got it wrong. Ok, perhaps my fingers slipped. Let's try again.

Wrong again! There's no way my motor functions are this bad. I need to complain to them and tell them they are making it too difficult to contribute and their captcha is not working. Now how do I contact them? Searching the page .... finds link called Contact Us. This looks good. Clicking... New page loading.... with ANOTHER CAPTCHA!

That does it. It is past midnight and I finally get the message: whatever it was I wanted to say was not that important and by now I have already forgotten what it was.

Good night.

maanantaina, lokakuuta 01, 2007

torstaina, syyskuuta 27, 2007

tiistaina, syyskuuta 18, 2007

Pyörätie on autotie

Kun tänään pyöräilin kotia kohti, tunsin kulkevani mahtavaa vauhtia. Vieressäni Vihdintiellä autot seisoivat paikallaan iltapäiväruuhkassa ja minä puskin eteenpäin 25 km/h.

Juuri ennen Vihdintien ja Kaupintien risteystä, ohitseni pyörätiellä ajoi vaaleanruskea Ford Mondeo! Ohitettuaan minut Fordin piti kurvata tiukasti pyörätien oikeaan laitaan, koska mutkan takaa tuli vastaan keskellä tietä pyöräilevä vanhempi naishenkilö.

Kyllähän vanhempien naishenkilöidenkin pitäisi ymmärtää, että pyörätiellä ajetaan tien oikeassa reunassa, jotta nopeampien ja leveämpien kulkuneuvojen on helpompi mahtua tielle.

Koko tilanne oli niin yllättävä, että en tajunnut painaa rekisterinumeroa muistiin. Harmi. Olisin soittanut poliisille ja pyytänyt, että käyvät kysymässä auton omistajalta, miksi auto oli harmaana sadepäivänä 18.9.2007 eksynyt pyörätielle kruisailemaan.

Mondeokuski oli varmaan kyllästynyt seisomaan paikallaan jonossa ja päätti ohittaa jonon pyörätietä myöten.

Onkohan pyöräteiden hyödyntäminen autojen oikotienä yleistäkin? Ainakin itse olen nähnyt samaa tapahtuvan täällä Martinlaaksossa. Martinlaakso on suuri asuinalue, jonka halki ei kulje autoteitä, ainoastaan pyöräteitä. Olen useamman kerran nähnyt autojen oikaisevan alueen halki pyöräteitä myöten.

Seuraavan kerran yritän olla valppaampi ja tehdä vähintään kengän muotoisen lommon autoon muistoksi kuskille.

sunnuntaina, elokuuta 05, 2007

Asiakkaan kusetusta

Soitin 2 viikkoa sitten Welhon (entinen HTV) asiakaspalveluun vikailmoituksen toimimattomasta internet-yhteydestäni. Ystävällisen asiakaspalveluhenkilön opastuksella irrotin ja kytkin piuhoja ja käynnistin kaapelimodeemin uudelleen ja kuten aina ennenkin, se korjasi ongelman. Itse vaan kovasti haluaisin, ettei kaapelimodeemia tarvitsisi vähän väliä räplätä.

Kun olimme jo lopettelemassa tätä hyödytöntä puhelua, asiakaspalveluhenkilö kysyi kiinnostaisiko minua saada 2 viikoksi MTV3 ja Viasat Kulta kanavapaketit koekäyttöön ilmaiseksi. Siis 2 viikkoa on ilmainen ja jatkuu sitten automaattisesti maksullisena ja sen voi peruuttaa 2 viikon kuluessa, siis viimeistään 3.8. mennessä.

Suostuin, koska tulevana viikonloppuna oli Formulakilpailut tiedossa ja olisin mielelläni katsonut sen Maikkarin maksukanavalta. Hieno juttu.

No, kun jonkun ajan kuluttua kokeilin digiboxilla katsella näitä maksukanavia, huomasin että MTV3 MAX -kanava ei näkynyt. Muut MTV3:n maksulliset kanavat kyllä näkyivät. Eli Formulat jäävät näkemättä. Laitoin kuitenkin kalenteriin merkinnän, jotta muistan peruuttaa nämä kanavapaketit ennen kuin niistä pitää ruveta maksamaan.

Sitten oli paljon kaikkea muuta puuhaa ja kun huomasin, että kanavat pitää peruuttaa, en ollut vielä ehtinyt katsomaan niitä ollenkaan.

Soitin Welholle 2.8. klo 19:25 ja ystävällinen asiakaspalveluhenkilö otti peruutuksen vastaan. Luulin, että tämä oli tässä.

Sitten posti toi laskun. Laskussa oli normaalin internetin lisäksi 2 kanavapakettia 12 kk kestotilauksena. Laskun summa oli 66,57. Welhon ystävällinen asiakaspalvelu saa maanantaina taas uuden puhelun, jossa saavat selittää miksi minun pitää maksaa kahdesta kanavapaketista, jotka a) eivät näy digiboxillani ja b) jotka olen peruuttanut. En aio maksaa kuin normaalit 36 euroa internetistä.

torstaina, heinäkuuta 26, 2007

AppleScripted downloads

I find I'm missing a download manager application. As I am a cheap bastard who is not certain he will be running Mac OS X in a few months, I don't want to spend money on the commercial or shareware download managers and I did not find any free ones.

I have a fairly standardized set of files I need to download every now and then and the files are large. It would be nice if the download had a progress indicator. Also, because the files are large and my network connection is kind of flakey, it would be a bonus if the broken downloads could be continued.

One more thing: I noticed that Safari does not allow one to download files to a specified folder, it downloads everything into the download folder and sometimes it fails to name the file with the basename of the URL and uses the host part of the URL instead. (Yes, FireFox does not have these problems. It has other problems, but let's not go into that.)

As I have played around with AppleScript during the last few weeks, I thought I would see if I can get finer-grade control over Safari downloads using AppleScript. It turns out Safari has a fairly small AppleScript dictionary and it does not allow script control over downloads.

Then I discovered there is a standard scripting component called "URL Scripting Access" that can download and upload using HTTP and FTP. The documentation even says it can display an optional progress bar.

This approach was a failure too.

There is no progress bar even when it is requested and the large downloads fail because the script times out. It would seem the download script is talking to another process called "URL Scripting Access", which does the actual downloading. Apparently there is some fixed timeout, a couple of minutes, after which the download script says a timeout has happened and exits with an error. The URL Scripting Access process is still running and still downloading (the file on the disk keeps growing and the System Monitor shows there is activity in the network.)

But I don't want to use this approach because there is no progress bar and no control over the download and it would seem there is no way to continue a broken download.

At the moment I'm considering other alternatives but they all would require more programming, especially UI programming, which I'm not familiar with. The time available for this project is getting short, next Moday my vacation is over.

I think I will use lftp for my downloads. It is available in MacPorts.

maanantaina, heinäkuuta 23, 2007

Mac-elämän loppu häämöttää?

Olin ollut Mac Minin onnellinen omistaja vähän yli 3 kuukautta kun OS X 10.4 Tiger tuli markkinoille. Olin juuri antanut Applelle 1000 euroa ja tuntui siltä, että Tiger ei ollut niin järisyttävä päivitys, etten olisi osannut ilmankin olla.

Sittemmin aikaa on kulunut ja olen huomannut, että monet ovat ne ohjelmat, jotka toimivat ainoastaan Tigerilla. Päätin, että kun OS X 10.5 Leopard tulee, siihen päivitän ja sitten en ole enää toisen luokan kansalainen.

Näin ollen minua kiinnostaa kovasti, mitkä tulevat olemaan Leopardin laitteistovaatimukset. Virallisesti en ole nähnyt muuta kerrottavan kuin että PowerPC on ainakin vielä tuettu prosessori. Netissä on veikkailtu muistivaatimuksiksi 1 gigatavua ja näytönohjaimelle 64 megatavua.

Ikävää... Oma Mac Mini kun on sitä ensimmäistä sukupolvea, jossa on 32 MB muistia näytönohjaimella ja 512 MB RAM-muistia (256 MB oli vakio, tilasin omani jo valmiiksi tuplamuistilla.)

Nämähän ovat toki vain spekulaatioita, tosin Leopardin testiversioita on jaettu jo kahtena kesänä kehittäjäkonferensseissa, joten spekulaattoreilla voi olla ihan oikeaa kokemustakin.

Nyt pitäisi alkaa ehkä suunnitella uuden Mac-koneen hankintaa. Onhän Mac Mini vähän hidas, etenkin kun sillä tekee videon koodausta tai pelaa jotain tai tekee kehitystyötä (koska silloin yleensä tarvitaan paljon ohjelmia yhtä aikaa.) Mutta saattaa olla, että kassassa ei ole tarpeeksi nappulaa ... Pitäisi ostaa ratsastushousut ja saappaat ja maksaa ratsastustunnit ja ...

Saattaakin käydä niin, että jos Leopard ei pyöri tässä Mac Minissä, taidan tyhjentää kovalevyn ja kokeilla miten hyvin Linux tukee Applen rautaa... Siitä siis otsikko: "Mac-elämän loppu häämöttää?" Rasmus on käyttänyt Ubuntua omassa Mac Minissään jo jonkun aikaa ja ollut kai tyytyväinen valintaansa.

maanantaina, heinäkuuta 16, 2007

Good article on font rendering

Lately there's been some buzz in the blogosphere about the differences in font rendering in applications from Microsoft and Apple. The title links to a blog post that goes into a lot of detail. A short summary would be: Microsoft does a really bad job of font rendering and Apple doesn't do it that well either, but at least they've got taste.

torstaina, heinäkuuta 05, 2007

3 autoa pihalla


3 autoa pihalla
Originally uploaded by sti.
Vaikka taloyhtiössä on enemmän parkkipaikkoja kuin asuntoja, on pihalla yleensä aina pari autoa. Etummaiset 2 kulkuneuvoa ovat olleet paikalla ainakin tunnin ilman, että niistä on purettu tai lastattu mitään.

sunnuntaina, kesäkuuta 24, 2007

Käytiin Linnanmäellä


Rinkeli Linnanmäellä
Originally uploaded by sti.
Veera oli pari päivää mankunut Linnanmäelle ja kun ei tässä muutakaan ohjelmaa ollut, mietittiin josko juhannuspäivän jälkeisenä sunnuntaina siellä ei olisi ihan niin kauhea tungos kuin tavallisesti.

Ei siellä nyt mitenkään yksinäiseksi itseään tuntenut, mutta väkeä oli kuitenkin sopivan vähän, ettei tarvinnut kauan jonotella laitteisiin ja peleihin.

Veeralle ostettiin ranneke ja nyt kun se on yli 140cm se pääsi ihan mihin laitteeseen vaan ja kyllä se niihin menikin. Taisi käydä parhaassa 6 kertaa perätysten.

Itse ostin vain 3 irtolippua ja kävin maailmanpyörässä (joka on siis uusittu ja nimeltään Rinkeli), Hurjakurussa ja Vuoristoradalla.

Kati ei halunnut vatkausta ja vemputusta vaan nautiskeli auringosta ja voitti peleissä taas vaikka mitä.

lauantaina, kesäkuuta 02, 2007

Länsimetro tulee, autoliikenne kasvaa?!?

Tämän päivän Helsingin Sanomat uutisoi:
Helsingin Ruoholahdesta Espoon Kivenlahteen ulottuva Länsiväylä on yksi Suomen ruuhkaisimmista väylistä Kehä I:n ja III:n ohella. Arvioiden mukaan metron tulo ei kuitenkaan radikaalisti vähennä yksityisautoilua Länsiväylällä. Selvitystyötä tekevän Siton(?) ennusteet liikennemääristä valmistunevat syksyllä. Automäärien uskotaan kasvavan.
Siis kun Länsimetro alkaa kulkemaan, Länsiväylällä autojen määrä kasvaa!

Toisaalta onhan se ymmärrettävää: kun metro valmistuu, suuri osa Espoosta Helsinkiin Länsiväylää kulkevista bussilinjoista lakkautetaan ja ne muutetaan syöttämään matkustajia asuinalueilta metroasemille. Ja kuten on useissa yhteyksissä saatu lehdistä lukea, työmatkakulkijat arvostavat eniten sitä, että matkassa ei ole vaihtoja.

Jos nykyään Espoolaiselta rivitaloalueelta Helsinkiin pääsee vaivattomasti yhdellä bussilla, Espoolainen rupeaa mieluummin ajamaan omalla autolla kuin nostaa persettä penkistä vaihtaakseen metroon.

Toivottavasti näin ei kuitenkaan käy. Tässä maailmassa kun ei ole tarpeeksi tilaa ja resursseja sille, että meistä kaikista tulisi pieniä amerikkalaisia, jotka kulkevat omalla autolla ovelta ovelle.

keskiviikkona, toukokuuta 30, 2007

Tiivi-Taavi uhkaa lapsiamme

Ajatella miten ajattelematon minä olen: En ollenkaan tajunnut, että Tiivi-Taavi on a) poika ja b) homo. Olin aina kuvitellut että teletapit ovat satuolentoja, jotka elävät jossain satumaassa ja tekevät jotain satuasioita. Hyvä että Puolan lapsiasiamies on avannut silmäni. Menenkin tästä etsimään terapeuttia jo vahingoittuneelle lapsellemme.

lauantaina, toukokuuta 26, 2007

DVD-levyn suojauksen purkaminen on nyt laillista

Helsingin käräjäoikeus päätti perjantaina, että DVD-levyn suojauksen purkamista ei voida pitää tekijänoikeuslaissa määriteltynä suojauksen purkamisena.

Oikeus perusteli päätöstään sillä, että suojauksen pitää olla tehokas ja koska purkamiseen tarvittavia ohjelmia on helposti saatavilla, joissakin käyttöjärjestelmissä jopa valmiiksi asennettuna, ei suojausta voida enää pitää tehokkaana.

Tarkoittaako tämä, että Suomessa olisi laillista tehdä DVD-levystä kopio omaan käyttöön?

torstaina, toukokuuta 17, 2007

Hyvin parkkeerattu


Hyvin parkkeerattu
Originally uploaded by sti.
Isolla bemarilla ei näköjään tarvitse ymmärtää liikennemerkkejä.

Tänään grillataan


Tänään grillataan
Originally uploaded by sti.

Suomalaisten hiilidioksidipäästöt

Mielenkiintoista: Suomalaisten hiilidioksidipäästöistä suurin osa tulee autoliikenteestä.

Ei siitä nyt niin kauan ole, kun kauppa-ja teollisuusministeri Mauri Pekkarinen sanoi, ettei Suomessa ole mitään järkeä pienentää liikenteen päästöjä, koska ne muodostavat niin pienen osan kokonaispäästöistä. Eli ei muutoksia autoverotukseen, auton käytön verotukseen tai tukia biopolttoaineiden valmistukseen. Suomelle on kannattavampaa vähentää päästöjä suurissa teollisuuslaitoksissa ja jos vanhat merkit paikkansa pitävät, se hoidetaan ostamalla teollisuudelle päästöoikeuksia verorahoilla.

Tämä oli ääni kellossa ennen vaaleja. Liekö ääni kellossa nyt muutunut, etenkin kun vihreät ovat hallituksessa?

Ja tietysti kyseinen HS:n linkki on vain mielipidekirjoitus. Pitäisi tietysti tarkistaa sen tiedot jostain, mutta se olisi ihan liian vaivalloista.

tiistaina, toukokuuta 15, 2007

Push vs. Pull

I have recently started using Twitter together with my collegues at work.
(For those who have spent last few months under a rock: Twitter is a social-web-2.0-service/miniblog where you can send max. 140 character messages and your Twitter-using-friends will see on their page your message. The stated purpose for these messages is for people to tell where they are and what are they doing so their friends don't have to call/email and ask what's up, when are you going to lunch. Sounds simple, eh? The real trick is that you can send messages to Twitter by IM and SMS and also receive updates from your friends the same way. It sure is better than hitting Reload on your Twitter home page. Being able to update and receive updates while on the road is cool.)
There are 4 ways to use Twitter:
  1. Keep the Twitter home page open in a web browser. The page reloads every few minutes. (Until it fails to reload once, after which the automatic reload stops completely. Most annoying.) The home page shows last few updates from you and your friends and has a text box for posting a new message (with a nice prompt: "What are you doing?")
  2. Subscribe the RSS feed of the home page to your feed reader app. This method is, of course, read-only. There is no way to post new messages.
  3. Configure Twitter to know your IM handle. Then add Twitter to your IM app buddy list. The Twitter buddy sends you new messages from your friends and you can post new messages to Twitter by chatting.
  4. SMS messages on your mobile phone.
The first 2 methods are Pull. The last 2 are Push.

With Pull, you have to poll Twitter to find out if anything new has happened. If you poll often, you cause unnecessary load on Twitter's servers (which seem to be struggling with the load as it is.) If you pull seldom, your friends may wonder what's the matter with you because you don't answer. Slow and heavy.

Push is better. There is no need to poll. Twitter sends the updates to you immediately when it has new messages. Fast and light.

On the other hand, Push method needs you to be connected in order to receive. With Pull, you can be behind firewalls or even offline and come online only to poll.

I wonder which is better for sending updates from server to clients? Would it be better for clients to poll the server or to be always connected to the server and server would push new data to clients when it wants?

Pull can be made lighter by e.g. using a single UDP packet and only use the more-demanding HTTP over TCP when the first UDP query returns information that something new is available. Another nice trick is used by the ClamAV virus scanner: it uses the DNS system to carry the version number of their latest database. A simple DNS query will reveal if the new database needs to be downloaded.

On the other hand, could you keep TCP connections open to the clients to implement Push? How much memory does an idle TCP connection consume? Are there limits to how many clients can be connected to a single port?

Then there is the wacky idea of doing Push by making the server connect to the clients. I used to work on a system that worked like that. It has its benefits, but it needs lots of smarts in the clients, who have to be able to be able to deal with firewalls and set up NAT traversal/port forwarding by some automatic way (SOCKS, UPnP, Bonjour).

I have no answers at this time. The world in general seems to be very much Pull-oriented these days with the Web and RSS feeds and its related protocol, HTTP. On the other hand, Push is also widely used, but mainly in instant messaging systems like IRC, MSN, AIM, ICQ, Skype, and others.

maanantaina, toukokuuta 14, 2007

Tiedotustoimintaa Vantaan kaupungin tapaan

Lapsen mukana tuli kotiin tiedote koulun johtokunnan kokouksesta. Puuttumatta kokouksen sisältöön, haluan jakaa kanssanne lauseen tiedotteen lopusta:
Kokouspöytäkirjat ovat nykykäytännön mukaisesti nähtävillä koulujen kansliassa kuukauden ensimmäisenä arkipäivänä klo 9.00-12.00.
Vilkaisin sivun yläreunaan. Päiväys oli 11.5.2007. Hetken jo tuntui kuin aikakone olisi pudottanut minut vuoteen 1897. Tsaarinaikainen tiedotus ja virkamiesten avoimuusperiaate näyttävät olevan voimissaan ainakin Vantaan kaupungin opetustoimessa.

Pitäisiköhän yrittää samaa töissä? Kun pomo tulee kyselemään projektien statuksesta, pitäisikö vastata, että "nykykäytännön mukaisesti voimme vastata kirjallisiin kyselyihin kuukauden ensimmäisenä arkipäivänä klo 9-12"

Virkamieskoulussa pitäisi järjestää vähän koulutusta tästä nykyaikaisesta uutuudesta nimeltä Internet ja World Wide Web ja siitä mitä mahdollisuuksia se avaa erityisesti tiedon jakamiseen.

Tietysti... vain siinä tapauksessa että virkamiehet oikeasti haluaisivat jakaa tietoa tekemisistään.

maanantaina, toukokuuta 07, 2007

Quoting text in email

Today's Dilbert seems to make fun of people who reply to emails and do not include the original email in the reply. Why is this?

I am a dinosaur and I can still remember there was a time when email programs did not have graphical user interfaces and buttons. Instead you pressed keys on the keyboard to make things happen. Most of the email programs had assigned the R key to reply and the Shift+R to reply with quote. (To those who are coming late to the game, "quote", refers to including the original email.)

This assignment of key commands tells me that in the past it used to be more common to reply to emails and NOT quote the original email.

However, I never witnessed such time myself. When I was new to email, it was common practice to quote a small part of the original email, just to show what part of the original your reply was about. It was considered rude to the extreme to quote the original email in full and then reply with only a couple of words.

Seldom could you quote the full original email and that was reserved for the occasions when you wanted to disprove everything in the original email. You would do this by adding your witty commentary after every sentence or paragraph of the quoted message, puncturing the other's arguments step-by-step like they were a string of balloons.

Then something changed.

I'm not exactly sure what it was. Was it the AOL users who flooded the Internet? Or was it the redmondian software giant that created the abomination called Microsoft Mail and it's spawn, Outlook.

Whatever it was, it changed the existing culture of Internet email. Suddenly, it became the norm to always include the original email in full. And because it would be inconvenient for the person reading the reply to scroll all the way to the end of the message to see what, if anything, worth reading would be there, it also became the norm to write the reply to the top of the message, above the quoted text. "Top-posting", as it was called, used to be considered bad behaviour.

I too must plead guilty to both of these crimes. I am no better than others. I see everyone else do it, and I somehow think it makes it less of a crime to do likewise.

My only defense is that Outlook makes it darned difficult to behave properly:
  • Outlook does not have a button to reply without quoting (well, none of the modern email programs do.)
  • Outlook places the cursor to the top of the reply.
  • Outlook's insane way of wrapping text makes it hard to edit the quoted text. It is such a mess that one takes a quick look at it and turns one's eyes in disgust, deciding only to write the reply and hoping the receiver won't pay attention to the eyesore the quote has become.
Many people actually like that the thread of the conversation is recorded and accumulated in the end of the message. It makes it possible to easily review what was said earlier and it allows those who get invited in the thread later to easily catch up.

As an engineer and a professional programmer, this insults my intelligence. Can we really not come up with anything better than sending the same bits back and forth? Would all of this even be necessary if email programs could group messages relating to the discussion, making it easy to refer to earlier emails? We used to have email clients capable of performing this magnificent feat but Outlook most certainly fails, badly.

However, there is some hope: The best web-based email, Google's Gmail, threads email discussions elegantly and reliably. Gmail even hides the quoted text, because the engineers at Google understand that it is only wasted space. If you need to see the original, they make it available only one keystroke away.

If only I could use Gmail for my work email. And don't even get me started on the fiasco that is Outlook's Search feature.

lauantaina, huhtikuuta 28, 2007

F-Secure Linux Blog

F-Securen Linux-tiimi on tehnyt itselleen blogin. (Klikkaa otsikkoa.) Meillä saattaa silloin tällöin olla jotain mielenkiintoista sanottavaa koska kuljemme tiellä, jolla ei ole kovin montaa muuta kulkijaa: Teemme maksullisia ohjelmia Linux-käyttöjärjestelmälle.

keskiviikkona, huhtikuuta 25, 2007

maanantaina, huhtikuuta 23, 2007

lauantaina, huhtikuuta 14, 2007

Helikoptereita

Martinlaaksossa on viimeisen puolen tunnin ajan kuulunut helikopterin ääntä. Mitähän lienee tekeillä?

Kesä on tullut

Tänään tallilla Veikkolassa nähtiin sitruunaperhonen. Kesä on tullut.

tiistaina, huhtikuuta 10, 2007

Helppoa tiedostojensiirtoa

Pitäisi siirtää iso tiedosto kaverille. Mitä tehdä? Sinä ehkä tiedät miten se käy, mutta tietävätkö isäsi ja äitisi? Entä isovanhempasi?

He yrittävät lähettää tiedoston sähköpostina ja huomaavat, että se ei onnistu. Joko tiedosto on niin iso, että operaattorin postipalvelin antaa kummallisia virheilmoituksia lontoonkielellä tai sitten vastaanottajan postilaatikko on tullut täyteen eikä sinne enää kulje posti. Usein tästäkin saa vieraskielisen ilmoituksen, joka ei oikeastaan kerro muuta kuin että ATK on taas rikki.

http://www.senduit.com/ näyttäisi olevan vastaus ongelmaan. Ei tarvitse kuin mennä kyseiselle sivulle, näyttää minkä tiedoston haluaa kaverille siirtää ja kuinka kauan tiedosto pidetään jaettuna (max 1 viikko) ja painaa nappia. Kun tiedosto on siirretty, ruudulle tulee linkki, joka lähetetään kaverille.

Kaveri klikkaa linkkiä ja lataa tiedoston itselleen. Kun tiedoston jakoaika menee umpeen, linkki lakkaa toimimasta ja tiedosto häviää palvelusta.

Palvelu ei ehkä tarjoa 100% aukotonta tietoturvaa, koska palvelun luoma linkki on vain 6 merkin mittainen. Paha rosmo voisi helposti kokeilla kaikki linkit ja löytää arvokkaan tiedostosi. Tämä on hyvä tiedostaa. Senduitin kautta ei kannata panna jakoon mitään sellaista, jonka leviäminen YouTuben etusivulle voisi olla ikävää.

Useimmiten jaettava tiedosto on kuitenkin melko harmiton: kuvia lastenlasten syntymäpäiviltä tai videokuvaa häistä ja hautajaisista. Jos ne jotakuta kiinnostavat, niin katsokoon.

Senduit on toteutettu Amazonin S3 -palvelulla. S3 tarjoaa rajatonta, mutta maksullista levytilaa. Senduitin käyttäjälle tiedostojen tallettaminen on maksutonta. Senduit maksaa Amazonille myymällä sivuilleen mainostilaa ja luultavasti saa vielä vähän rahaa taskunpohjallekin.

Hyödyllinen ja kiva idea. Olisinpa keksinyt sen itse.

lauantaina, maaliskuuta 31, 2007

Liikennesäännöt muuttuneet!

Olen ajanut autolla melko vähän viime aikoina ja uutisten katsominenkin on jäänyt monesti väliin kun lapsemme haluaa katsoa talon ainoasta telkusta Simpsoneita (tulee siis samaan aikaan uutisten kanssa.)

Minulta on tainnut jäädä huomaamatta liikennesääntöjen muuttuminen. (Oletan, että olisihan siitä kerrottu uutisissa, ainakin ennen on niin tehty.)

Nähkääs, ennen oli niin, että kun risteystä lähestyi vastakkaisista suunnista kaksi autoa, joista toinen kääntyi oikealle ja toinen vasemmalle, vasemmalle kääntyvä väisti oikealle kääntyvää.

Eilen matkalla Kotkaan ja tänään matkalla ratsastamaan minä olin molemmissa tapauksissa oikealle kääntyvä, mutta minun oli tehtävä hätäjarrutus kun vasemmalle kääntyvä änkesi väkisin edelleni.

Yksittäisiä tollojahan liikenteessä aina tapaa, mutta kun näin kävi perättäisinä päivinä, on kyseessä varmaan jotain muuta, kuten liikennesääntöjen muuttuminen. Ehkä EU on taas tehnyt uuden direktiivin.

FINLEX sanoo:
Risteyksessä kääntyvän ajoneuvon kuljettajan on väistettävä risteävää tietä ylittävää polkupyöräilijää, mopoilijaa ja jalankulkijaa. Samoin on kuljettajan, joka muualla kuin risteyksessä, aikoo poistua ajoradalta tai muuten ylittää sen, väistettävä tien reunaa käyttävää polkupyöräilijää, mopoilijaa ja jalankulkijaa. Vasemmalle kääntyvän kuljettajan on lisäksi väistettävä vastaan tulevaa liikennettä.
Eivät ole tainneet vielä päivittää noita verkkosivuja. Vai ovatko oikealle kääntyjät osa "vastaan tulevaa liikennettä"?

tiistaina, maaliskuuta 27, 2007

Moni on kakku päältä kaunis vaan on silkkoa sisältä

Kuuntelin MacBreak weeklyä ja latasin siellä mainostetun HumaneText-"palvelun" eli OS X "service" kokeillakseni sitä. Kääntelin ja katselin sitä vähän kun kiinnosti miten se on toteutettu ja selvisihän se... perimmäisenä on shell-skripti, joka on tässä kokonaisuudessaan:

#!/bin/sh
cat|./SmartyPants.pl|./Markdown.pl

Eikös äiti jo opettanut, mitä on useless use of cat.

maanantaina, maaliskuuta 26, 2007

My fixed throttled 0.4.6

First, some background:

If I had OS X 10.4 Tiger, I could set up my kernel to do packet prioritization, but since I'm still using 10.3 Panther, I had to come up with something else.

Fortunately someone else had already done the hard part and created throttled. It is a user-space daemon that sucks all the packets in using the kernel firewall divert rule and sends them according to a few rules that make life a bit easier.

I can divide traffic to high and low priority and it also gives highest priority to packets containing the ACK bit, which has the benefit of keeping your downlink live and well even if your uplink is congested.

I also reviewed the code of throttled and having just spent the last 3 years working on a pretty tricky piece of threaded software, I discovered some thread-locking related problems in the code.

I created a patch to fix them and sent it to the authors of throttled.

Here's the email I sent to them:

Lähettäjä: sjtikka@gmail.com
Aihe: Patch for throttled
Päiväys: 1. helmikuuta 2007 22:37:12 GMT+02:00
Vastaanottaja: throttled@intrarts.com

Hello. I have been using throttled for a week now and it really works!

I was curious to see how it does its magic and took a look at the source code. I think I discovered a small problem that could lead to the sender thread going to sleep and never waking up, or at least until throttled gets a new outgoing packet.

The problem is that the size of PacketQueue is checked without holding queueMut mutex. This means that sender thread may check PacketQueue size at a moment when it is empty and decides to go to sleep. But then, just before sender calls pthread_cond_wait, scheduler runs one of the receiver threads, which places a packet into the queue _and_ calls pthread_cond_signal. This signal does nothing, because there is no-one sleeping on the condition variable. Then scheduler starts running the sender thread again, which calls pthread_cond_wait too late, it missed the signal to wake it up.

Sure, the sender gets woken up when the next outgoing packet causes receiver thread to call pthread_cond_signal, but sometimes that might take a long time.

I have made the attached patch to fix the problem. I hope you consider merging the patch to the next version of throttled.

Thanks,

-- Sami Tikka

I never heard back from them. Because I'd like others to also be able to enjoy this amazingly useful piece of software, I'm making the fixed version and the patch available.

keskiviikkona, maaliskuuta 21, 2007

Review of Skullcandy Proletariat NC headphones

I recently got myself Skullcandy Proletariat NC headphones. The "NC" stands for noise canceling. "Proletariat" stands for affordable.

The price at Digitoday Shop was 79 euros (shipping included.) This is much cheaper than noise cancelling headphones generally cost, which is over 100 euros, often more than 200.

I was initially tempted to go with Sennheiser's PXC 150 but I did not like the extra enclosure for batteries and noise canceling electronics. I already dislike the one wire from my iPod to the headphones, two would be unbearable.

The Skullcandy headphones are a bit bulky for outdoor use but they contain all the electronics and batteries in the headphones themselves.

The sound quality is fair. It is nowhere as good as my old Koss SportaPros, but much, much better than the Koss Plugs (which, in turn, are better than the headphones that come with iPod.)

The noise cancel feature really works. You can still hear sounds from your surroundings, only their level is much subdued. This means that music/podcasts can always be played at a normal volume level, regardless of the noise that surrounds you.

This is great. Before these headphones I was cranking up the iPod volume close to the max when listening to Science@NASA podcast while walking in Helsinki city centre. I had to constantly reach into my pocket to adjust the volume depending if I was sitting in the train, walking on the street, escalator or traveling in the subway. Sometimes I would just pause the iPod until I got past a particularly noisy location.

With these NC headphones I can set the volume level to something confortable to my ears and I never have to touch the volume setting during the commute. I should have gotten NC headphones years ago. I should kick myself for not doing that.

I have found a problem with the headphones: They are very sensitive to electromagnetic interference. Walking near high-voltage wires, like the ones at train station, causes a low, loud pulsing sound to emit from the headphones. The sound is so loud that I switch the NC circuit off when that happens. It only takes me a couple of minutes to get into the train or far enough from the powerlines.

The headphones are also sensitive to radio interference of mobile phones. While traveling in a train car full of commuters, each carrying a mobile phone, every couple of minutes I hear the same TA-TA-TA-TA-TA sound that you get if you place your mobile near the loudspeakers of your computer.

This is pretty annoying. None of the reviews I read on the Internet mentioned this. I think it would have been worth the money to get the Sennheisers after all, if they do not suffer from the same problem. (But how would you know?)

Also, the Skullcandy headphones are targeted to people with small heads. I have a fairly big hat size and the Skullcandy sits very tightly in my head, too tightly to be comfortable for extended periods.

Summary: Noise canceling is great but they should have been better shielded from radio interference.

lauantaina, maaliskuuta 10, 2007

Hyvin parkkeerattu?


Hyvin parkkeerattu?
Originally uploaded by sti.
Siitä onkin aikaa kun on viimeksi nähnyt näin huonosti parkkeerattun auton. S-marketin piha, Veikkola.

keskiviikkona, helmikuuta 21, 2007

torstaina, helmikuuta 08, 2007

Räkä on hyvää


Räkä on hyvää
Originally uploaded by sti.
Aamulla metrossa istui kaveri, joka keskittyneesti veti kahdella sormella räkää molemmista sieraimista suuhun. Kiehtovaa. Ihan kuin luontofilmissä...

perjantaina, tammikuuta 05, 2007