ac's blog

Steve Jobs on DRM - the third alternative

A canny business tycoon promoting an option that says the music industry may be better off without DRM? Finally! Someone of this stature saying this, this is big news - someday, consumers will gain back the rights they always had, and DRM will be relegated to the industry's dust-bins, where it belongs. May take decades, but one step at a time, this will eventually happen.

Here's the article at Apple's web site - Thoughts on Music by Steve Jobs.

As some commentators have suggested, that article may have been prompted by legal troubles, but it is still worth reading, for promoting what it calls the "third alternative" - the music industry may be hurting itself, and that Apple itself is open to supporting a world where music does not have to be restricted by being wrapped in DRM locks. A DRM-free world is not only important to consumers, but could be good for business too, which is the main group supporting DRM.

Apple's iTunes is certainly the world's largest music store in terms of volume - and it uses DRM. eMusic.com is the second-largest online music store, and it does not use digital rights management - here's how they describe their service on their web site [January 2007]:
eMusic is the world’s largest retailer of independent music and the world’s second-largest digital music retailer overall, offering more than 2 million tracks from more than 13,000 independent labels spanning every genre of music. A subscription-based service that allows consumers to own, not rent their music, eMusic is the largest service to sell tracks in the popular MP3 format – the only digital music format that is compatible with all digital music devices ...

Chase Credit Card - Good Cash Rebate

The Grapevine at Credit Card Goodies is a good source of information for getting the low down on credit card offerings.

The best cards are of course those that pay cash back - all other stuff like airline tickets, hotel rooms, can be bought with cash, so why look for anything else? And of course, use credit cards as a substitute for money you already have, using credit cards to get credit is really not a good idea - too high a cost to get credit this way.

Right now, end of 2006/early 2007, the best cash back card for those spending less than around $20,000 per year, seems to the Chase Freedom Visa Credit Card - from 1% to 1.25% back on all purchases, increasing to 3% for eligible Gas, Grocery and Quick Service Restaurant purchases.

Roth IRA vs Traditional IRA

Now that there is a 401(k) for Roth, far more people may be eligible to invest in the Roth IRA. The decision to Roth or not is not always clear cut. Simple choices - like invest in Roth vs invest in a non-deductible IRA are clear - go with the Roth. Young, and in a low bracket? Go with Roth.

Lots of web sites offer calculators and other quick advice - but be careful, many assumptions have to be made to make this simple, and that may make the conclusions reached not worth much.

The best report I have seen on Roth is from Vanguard Center for Retirement Research, their Tax Diversification and the Roth 401(k) is a very detailed analysis of this issue. Other good links are available at the 401K Help Center Collected Wisdom on Roth 401k, two good links from there: How Valuable is the New Roth 401k Option? and Watson Wyatt Insider report - Pros and Cons.

Web provider changes umask, Gallery stops working

So, I maintain a few web sites and one site uses Gallery software. This worked fine until recently - when a user tried to create a new album, it failed with an error about being unable to create lock files [ Error: Could not open lock file (/..../public_html/albums/album01/photos.dat.lock) for writing! ]

That was a somewhat misleading error, but - in the end, this turned out to be a hosting provider issue, and not a Gallery issue.

Turns out the hosting provider advertently or inadvertently set the default umask for process under Apache to 0111. This umask removes all execute permissions from new files and directories created by scripts run under Apache.

Gallery keeps the default umask, so it inherited the 0111 umask, and when it tried to create a directory with permissions 0700, it in fact got a directory with a permission of 0600 - read, write, but no execute. Of course, without execute permission, a directory is not of much use - cannot move into that directory, cannot create files in that directory, basically, things will start erroring out from that point out. Software could be written to handle this - maybe always do a chmod after a mkdir? But that is a different discussion.

It did not take too long to find this out, but getting this resolved at the hosting provider took a while - explaining umask, mkdir, and directory behavior. I guess that is the first reaction of technical support - they must get too many false reports, that when a real problem comes up, they have to take some time! [Though I am happy with the provider - they were at least engaged and responded fast with questions, and in the end, they resolved this pretty quickly.] Add to this, all morning today the Gallery site was inaccessible - so I could not search the forums for this issue. In any case, this was a new problem, not previously posted on the Web, nor mentioned at the Gallery site.

GoDaddy heavy handed in shutting down domains

nodaddy.com tells a scary story of how Go Daddy went in and disabled a site, for what seems to be totally unjustified reasons, and totally insufficient attempts made to

What is worse, is that Go Daddy continues to insist they did they right thing, compounding the significance of this issue.

My domains are registered with Go Daddy, I was hoping for a better response from them - maybe say it was a mistake and that they now have a new process in place to handle this, but looks like that is not going to happen.

Need to think hard if this is a good domain registrar - though looks like it is not that is easy to find any registrar that is good in this respect, at least in the US.

PHP regular expression issue

Fun with perl vs php regular expression handling.

PHP has a regular expression search and replace function, preg_replace. This is supposed to be the standard greedy algorithm for patterns, for example, A* means zero or more A characters, and it matches the longest string of A's at that point.

So, if you want to match zero or more slash (/) characters at end of a string the pattern to use is: /*$

And, if we want to replace zero or more slash characters at end of a string with a single slash character, the perl code is:   s!/*$!/!

Full example in perl:

foreach ('path/to', 'path/to//', 'path/to///', 'path/to////') {
    my $s = $_;
    $s =~ s!/*$!/!;
    print "string: $_ changed to $s\n";
}

Output is: 
string: path/to changed to path/to/
string: path/to// changed to path/to/
string: path/to/// changed to path/to/
string: path/to//// changed to path/to/

And the above output is all correct.

Equivalent PHP code does not work, using PHP version 5.1.6.

Following PHP code:  $t = preg_replace('!/*$!', '/', $s); fails, it will end up with one / if the input has 0 or 1 / characters, but it will end up with two / characters if the input has 2 or more / characters, instead of a single / character. So, the match was not greedy, but for reason, was split into two matches, and then each matched group was replaced with a single / character.
The workaround for this is to specify a limit count of 1 to preg_replace, which makes the code work fine. preg_match seems to work fine, only preg_replace has this problem.

Here's php code, and its output, showing the failure:

<?php
foreach (array('path/to', 'path/to//', 'path/to///', 'path/to////') as $s) {
     # preg_match('!/*$!', $s, $matches); // works fine, is greedy - $matches[0] is zero or all slashes
     # $t = preg_replace('!/*$!', '/', $s, 1); // works, limit of 1 helps

Citibank flags EFF as suspicious!

An example of a good intention and a good idea, but the implementation and execution of which completely messes everything up.

Citibank uses a Fraud Detection system - this is a software based analysis of a customer's credit card charges. If they find a suspicious charge or pattern, it is flagged.

So far so good.

From that point on, the consumer gets the raw end of the deal. To this day, it amazes me that people will believe the results from a computer program, and blindly act on it, without having it go through the smell test, without applying some human common sense.

Citibank policy is that if the computer has flagged a charge as suspicious, then they want the customer to call them, and explain why the charge is ok. If the customer is out traveling, or does not want to endure the hassle of a customer service phone call, then Citibank will automatically block all further use of the credit card.

So, based on a what a software program told them, without even confirming if what it told them looks really suspicious, they will automatically block use of the credit card. There are so many other options to handle this better - do have a fraud detection scheme, but don't automatically block the card - why not inform the customer of the charge pro-actively, and ask them if it was valid instead of asking the customer to call in? And so many other possibilities exist, before taking the drastic step of blocking the customer's use of the credit card.

Just don't travel or be out of town when using your Citibank credit card!

The charge in question here was a payment to the Electronic Frontier Foundation. This is what amazed me even more - how could Citibank flag the EFF as suspicious - could they not do a simple search, find out what it is, and maybe even bump into the fact that it is a IRS registered, tax-deductible organization, and hence, not a fraudulent charge?

Spammers are here

Like clockwork, these pests are able to locate new sites on the web, to infect with their spam postings!

For the past two years, I've not updated these pages much, so had escaped the attention of spammers. But just a month ago, when I got back to updating this site regularly, the spammers have woken up and now I've to keep a closer watch on the new posting activity here.... sigh...

Currently just using the spam module in drupal, which is working fine - though may need to change the configuration so that it marks things as spam as soon as a single URL is found in the post.

Yahoo still no good

I used to use Yahoo a lot, and now go there only for news and email - not for search, and will probably switch over for those old legacy uses as soon as I find something else.

In Firefox, if I go to the Yahoo search page, it would tell me:

Use Yahoo! to search from Firefox

which is something I am never going to do - for a long time now, Yahoo search results have always excluded mention of any aczoom.com link, other than somewhere way below in the search results. Given this, no way am I going to switch my Firefox search box to Yahoo - Google is much better.

This is why I presume there are so many pages on the web related to "SEO" - trying to figure out what search engines do, and how - it is too complex. For example - how come a search engine can list 100s of pages that all link-back or refer to the main page on a topic, but never have that main page show up higher on the search results?

aczoom.com uses Drupal and I suspect this issue is related to that, and URL re-writing is confusing the Yahoo bots. But there are also static pages at this site, and Yahoo does not show them either. And both Google as well as Microsoft MSN search get it right - for all Drupal hosted pages here, as well as the static pages.

So, Yahoo shall remain unused in the Firefox browsers that I use. Hopefully, this should have Yahoo engineers all concerned and rush to fix their search engine :-)!!! Until then, I'll stick with Google Search.

Older blog entry related to same topic: search engine fun

Updating kernel and consequences

On a Fedora FC5 system, it is very easy to update the software using yum update.

This also updates the kernel, which is good, but given the number of "non-standard" items installed on my system (VMWare Server, NVidia Display, PVR-150 TV Tuner/MPEG Encoder), it requires a lot of fixing up after every yum update. [So I have automatic update disabled, do the update only when time permits to do all the fixups.]

After a kernel update:

  • Check to see that the matching kmod-nvidia-* module also made it in, otherwise the display won't work well. In some cases, the kmod-nvidia module site is down, so may have to build module by hand.
  • yum install ivtv ivtv-kmdl-`uname -r`
    to get the driver for the PVR-150 TV-Tuner/MPEG Encoder card.
    This should also install the firmware, if it does not, visit the ivtvdriver pages to do the firmware install manually.
  • If mplayer has problems with audio, check alsa-lib. I have the atrpms site listed for updates, and that is considered risky, packages may not match the other sites. In Sep 2006, started to get this error when using mplayer:
    alsa-lib: pcm_direct.c:1632:(snd_pcm_direct_parse_open_conf) Unknown field ipc_sem
    The fix is to remove alsa-lib:
    yum erase alsa-lib.i386
    (which may uninstall packages like firstboot, and control-center,m which I don't use )
    and then re-install it using this:
    yum --disablerepo=atrpms install alsa-lib
    (and if needed, reinstall firstboot, control-center, etc).
  • Rerun vmware-config.pl