venta: (Default)
[personal profile] venta
Yesterday I had one of those moments where I realise I have a very specific opinion on something - but no real justification for it, and no clear idea where I got it from.

So, you, my dear self-selecting sample of guinea pigs, have the opportunity to prove me right. Or wrong. But I'm not going to tell you which is which. I'd hate to bias my otherwise-scientific survey.

I'm asking here about portable mp3 players (or mp3-a-likes). If you use your computer to play mp3s at you at home, or have some form of mp3 monster in the car, that's not what I meant.

[Poll #442057]

Date: 2005-02-22 02:31 pm (UTC)
From: [identity profile] wimble.livejournal.com
Yes, it is. But it does mean that every track I've got is is first generation copy of one that has been legally paid for. As such, it's several orders of magnitude less "illegal" (has less financial impact) than downloading gigabytes from Napster, or anywhere else.

It also counters the possible claim that nobody with more than 200 CDs would rip their entire CD collection. (I'm having a hard time counting up the number of actual CDs I've got involved in my collection, as it requires counting leaf - and only leaf - directories.) But it's less than 1400 CDs to make 80 Gig. So a 700 CD collection would be legitimate enough to fill a 40 Gig ipod.

What are CD collection sizes?

Date: 2005-02-22 03:02 pm (UTC)
From: [identity profile] onebyone.livejournal.com
it requires counting leaf - and only leaf - directories

find . -type d | perl -w thingy.pl

thingy.pl:
$leaves = 0;
$previous = <STDIN>;
chomp($previous);
foreach (<STDIN>) {
  chomp;
  $pos = index($_,$previous);
  if (($pos = 0) && substr($_,length($previous),1) eq "/") {
    # then this one is a subdirectory of the previous one,
    # so the previous one is not a leaf
  } else {
    # this one is not a subdirectory, so because find returns
    # children before siblings, the previous one has no
    # subdirectories
    ++leaves;
   }
   $previous = $_;
}
print 


Or something like that, I haven't tested it. You can make it more concise at the expense of clarity.

Date: 2005-02-22 03:02 pm (UTC)
From: [identity profile] onebyone.livejournal.com
Should say "print $leaves, "\n";" at the end.

Date: 2005-02-22 03:13 pm (UTC)
From: [identity profile] wimble.livejournal.com
897 it says, after typo fixing.

So there you go. Where "there" is, I dunno :)

Profile

venta: (Default)
venta

December 2025

S M T W T F S
 123456
78910111213
14151617181920
212223 24252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 27th, 2025 02:44 am
Powered by Dreamwidth Studios