« August 2007 | Main | October 2007 »

September 26, 2007

.Mac renewal date

My .Mac renewal date is approaching, but after 4 or 5 years as a paying customer, I don't think there is enough value to keep it.

I think I'm going to look at the direct competition, it seems to be heating up.

Amazon Music Store

Amazon unveiled a beta version of their new music store.

The specs look good:

  • no DRM;
  • decent bit-rate;
  • MP3 format;
  • simple Mac-based download app that places your songs into iTunes for automatic iPod synchronization.

So I'm happy. We finally have competition in the online music store market.

From Apple point-of-view, I don't think this will be a big loss: their profits come from the iPod, iTMS itself is not profitable enough to justify the cost of operations. And this new store works perfectly with the iPod. Besides, now they probably get a better deal with some of the record companies...

Yeah sure. :)

What I really think this is, is a nice finger from the record companies to Apple. I believe they are not very happy with Apple dominance of the online music market, and the best way to control it again, is to build up some competition. And given that they themselves don't have the brain to do it (all their previous attempts failed so far), this time they went all in, full guns blazing.

I mean, that is what monopolies do, right? They turn adversaries that need your products against one another. It worked for Microsoft in the past, why will it not work for record companies?

Another thing I'm curious about is which record companies are in there? Which majors? I mean, if there are some major record companies in the new Amazon store, then the question is: why has Apple got a worse deal with their music?

Two of the possible answers (the two I find most interesting) are:

  • Apple has the same deal as Amazon. Its Apple choice to inflate the prices to the values that we see today. Also its Apple choice to put DRM in the music files;
  • Apple does not have the same deal, and this is just some big power struggle.

There where some court documents that came out that showed Apple cost per song to be around $.70. Also, Apple has publicly said that they are against DRM, something that record companies never did say. So the first one is unlikely but not impossible.

The second one goes hand-in-hand with my "lets take back the control"-theory.

The last point I find interesting is that the store seems to be open to all countries. I mean I was able to buy one music from Portugal, and the only thing I needed was a valid pair state/zip code (use CA 95014, from Apple main campus address). And we all know the pains Apple went through to have a store in each country. Again: was that a fake problem or again record companies are making it easy for Amazon?

Update: Gruber got this part wrong. I was able to buy music from the Amazon store and my credit card has a portuguese address. Their check, based on state/zip code pair, is a joke.

Only time will tell.

September 20, 2007

On the move: XMPP and email

Just an heads up: I'm moving the XMPP and the email service between two servers. XMPP will be down for a day or so, email should be a painless move.

There will also be some changes:

  • XMPP domain simplicidade.org will move to ejabberd: much lower resource usage than the current Wildfire;
  • email will start to be routed through Postini.

So I might be "off" for a day or so until everything catches up.

September 18, 2007

Nothing to see, move along...

As expected, Apple unveiled the iPhone in the UK. It will be using O2 network, and EDGE for connectivity, not 3G.

I understand that EDGE is less power-hungry than 3G, and I can see it too. My Macbook battery goes from 5 hours to less than 2 when I plug my USB 3G card.

But the problem for me is that as far as I know EDGE coverage in Europe is very poor compared to 3G, and there is no way I'm going back to GPRS.

I guess I'm keeping my current phone for quite some time.

September 17, 2007

Tips

Pedro took the time to write about latest Apple news. Worth a read.

I share most of his points of view:

  • ring tones: it's a big business based on idiotic consumers, move on. I personally hate ring tones;
  • iPod Touch activation: the iTMS account is required to purchase stuff, not to activate the iPod as far as I could read, but I'll wait until I see some Linux geek reporting his life with the iPod Touch.
  • lock down of iPod database: this is something that happens on a regular basis as far as I remember. Anyway, it's a non-issue, because the hash-based protection is very week and already broken. It is a pity that Apple is losing time writing this stuff though;
  • video-out cables: this sucks, of course. I was wondering why would Apple would do such a thing, and selling more cables doesn't sound right.

Regarding the last point, about locking AV cables: my bet is HDCP. Apple is getting ready to have HD content and one part of the equation to please greedy content owners is probably having HDCP support all the way.

So they need some sort of hardware lock to make sure only approved cables can carry the digital signal from your iPod to a HD TV set.

CSS Play

I follow the CSS Play site in a low-priority mode. I don't see all the articles but some get my attention.

One of the last ones is awesome: a cops and robbers game, entirely in CSS.

I admin that I don't understand the mind of a person that takes the time to build this :).

Hours of fun

I love getting this things on a Monday, just makes the whole day a lot easier.

September 14, 2007

Lazy web request: SATA prices

I'm trying to buy some SATA drives in bulk, to have some idea of the cost of 2TB of storage.

The question to you all: do you know of a price comparison site for bulk purchases of SATA drives that I could use just to get some idea on prices?

Thank you all.

September 13, 2007

Sane policy for cyclic module dependencies

In medium-to-large Perl projects (case in point has 164 .pm files, far from over), cyclic module dependencies can become a issue.

Usually I use a lot of Module::Pluggable stuff, coupled with registry-style approaches. So each module is dynamically loaded based on his namespace using Module::Pluggable and registers itself into the core application.

The problem usually crops up when some registry class also requires a module that uses its services. For example, a registry module that uses a DBIx::Class schema, and some of the Tables use that same registry.

If your Registry class uses the your Schema, to make sure it is loaded, then the definition of the registry method will not be available when the Table classes are loading.

There are several possible solutions to this.

First, you could simple split your Registry class into a simple Registry and Registry::DB methods. This way, the Registry will not have the Schema dependency and all will just work. I don't like this much because the split is not natural in some situations.

Another approach is to limit the uses on each module to the minimal number of classes you need to load the module. In this case, the Registry doesn't need to use the Schema class if he doesn't require it during the compilation phase. If you only use the Schema in some methods, you only need to make sure it is loaded at the time of the method call. This can be scary if you look at the code and see a module being used without the proper use first.

A third approach is to do the least amount of stuff during compile time and use the INIT or CHECK blocks to do the proper initialization of your modules. This would be my favorite but I'm uncertain of the problems with mod_perl. (on a side note, be sure to check the proper documentation to learn about these Perl blocks: the begincheck program in there is very enlightening).

In the end, I usually use a combination of the first two. I do plan to see what are the caveats with INIT and CHECK in mod_perl, given that it would be a much better approach.

September 12, 2007

SynergyKM

Beta6 of SynergyKM is working ok for me. I recommend the upgrade to anybody using Synergy on a Mac.

Things that can bite you:

  • if your clients can't see the server, disable Bonjour discovery: it fails miserably with me;
  • don't use screen names with spaces in it: it will fail with some strange error about failing to read /tmp and friends. If you look at the log file, you'll see that it barfs with spaces.

Apart from that, smooth sailing.

September 06, 2007

if unless

In Perl, you can do something like VERB if CONDITION or VERB unless CONDITION.

There is not clear rule about which one to use, and I can say that I've preferred one of the other at different parts of my Perl-life.

Recently, I've settled on a simple rule to decide which one to use. The decision is based on the type of CONDITION that follows.

For me, something like 'CONDITION && CONDITION' is much easier to read and understand than 'CONDITION || CONDITION'. The reason is simple: the first, using &&, has less positive outcomes, and usually thats the one you are testing for, so my brain doesn't need to keep several possible options in my memory. I can short-circuit and forget what was before the && as soon as I decide that it is true.

So my current rule is simple: use the one who converts your condition to a &&.

So if I have:

return unless $estado eq 'clean' || $estado eq 'dirty';

I rewrite it as:

return if $estado ne 'clean' && $estado ne 'dirty';

update: I need sleep, really. Updated the examples to make some sense. Thanks to Pedro Leite.

There is a new git in town

Git v1.5.3 was released earlier this month but I only noticed today.

There are a lot of tweaks and improvements, but for me the killer feature of this release is git-stash.

That feature alone is worth the upgrade.

Touch me, touch me

There was a lost opportunity yesterday when the new iPod Touch didn't use Samantha Fox hit "Touch me". Lots of '80 teenagers (ok, me!) where saddened by this lack of vision on Apple.

Back to the goodies, the best value still is the lower end of the iPod Classic. The iPod Touch is cool, but I believe the iPhone 3G will be the one that makes me buy something with a multi-touch interface from them. The lack of capabilities of Bluetooth in the iPhone line-up still baffles me.

The $200 drop in price of the iPhone is very very nice. It makes a nice comparison to the same-day $50 price drop of Zune. I'm sure the Zune team is having a hell of a day today...

So, me, I'll keep waiting for news about the 3G iPhone to see if I switch phones or not. Nothing like waiting 9 months to see something beautiful being born.

September 05, 2007

Changes ahead

In the next few days, I'll be moving all my feeds to Feedburner and reorganizing them a bit.

Zee plan right now is:

  • feeds for:
    • full blog content;
    • blog comments;
    • flickr photos;
    • project change sets;
  • a full feed: aggregates all of the above except change sets.

The first to move will be the full blog content. Others will join him with time.

I'll place permanent redirects on all my current feed urls, so decent news readers will do the right thing.

I have zero plans to start putting any kind of advertisement in my feeds. I just want the stats they collect.

In bed with birds

It seems that Oracle buying InnoDB left MySQL uncomfortable enough about their dependency on the only transactional engine they had.

The new MySQL6 alpha is pretty much a Falcon-lovers buffet.

There is a lot of stuff to read about the new engine, but I will wait for MySQL Performance take on this.

September 04, 2007

The E-word

Last week I had a discussion in the local perl mongers mailing list about threads in Ruby vs Perl, and parallelism in general.

My view is that it's the programmer responsibility to start using all those core coming our way, and that the Java/Ruby-style of threads, with a share-everything model, are the wrong way of doing it.

I a very big fan of shared-nothing by default when it comes to threads. From all the things that are wrong about Perl (and believe me there are many), that is the one they got right, and I can only hope that Perl6 takes the same approach.

The language that comes closer to what I think is the nirvana of the parallelism models is Erlang. With it you get three concepts:

  • shared nothing approach with lightweight threads (processes in Erlang lingo): your program is modeled as a set of cooperating processes, each one performing some specific task;
  • fast message passing interface: processes communicate by passing messages between them;
  • location independence: each process has a PID, and you can send messages to it. But you don't need to know where the process is, he can be in a server across the ocean.

This set of concepts allows you to build reliable applications, where memory corruption and simultaneous access to data is limited, therefore causing less bugs.

The problem is that programming in Erlang, for someone like me who has been programming in Basic, Assembler, Pascal, C, Perl, and others of the same type, for 25 years now, it requires a big change in mentality, it requires a different brain.

I'l be attending a Erlang course in the next couple of months, courtesy of SAPO, and I hope to change that.

In the meantime, check out Tim Bray post about multiple cores, concurrency and Erlang where I stole the title for this one.

Flickr web upload widget

The new Fickr web uploading form is very very nice.

The interesting part for me is the capability of selecting multiple files with a single "open file" dialog box. The rest is pretty standard, although the look and feel of Flickr is very nice.

Now to write something like that as a jQuery plugin...

September 02, 2007

Resizing images

An amazing new technology to resizing images. The video is pretty impressive.