I've been thinking about writing a note on this topic for a long time. I have this outline in mind where I describe the long (1000-year) history of how musicians make money, and how a momentary blip in technology (between Thomas Edison and Vint Cerf) created a short-lived industry (the audio media manufacturing, marketing and distribution industry). But Chris Andersen just wrote a nice, clear article on this subject, that succinctly gets to the core of this idea.
A shorter version: for decades the music business consisted of touring musicians around (at low or no profit), to generate interest in buying physical media (records and CDs).Today, the physical media that contain music have almost no economic value, the business should be reversed: spread the music around to generate interest in attending live performances.
It's not a business plan the RIAA likes: they own trucks and media manufacturing plants and retail distribution. The musicians own the talent. Going forward, the money will now flow to the talent, rather than the disc manufacturing and delivery people.
January 2007 Archives
I'm a sucker for these things:
http://ishi.blog2.fc2.com/blog-entry-206.html
This is pretty cool.
Some people are actually using webtrends and hitbox AND omniture. Sounds like somebody has too much money in their marketing budget!
You'd think this would be incredibly obvious, and maybe it is. Maybe I'm an idiot. Whether or not I am, I recently was trying to figure out why Socket connect timeouts weren't working. Here was the code that didn't work:
This was supposed to set a connect timeout of 5 seconds. But what actually happens is that the constructor initiates the connect(), when that the timeout hasn't been set. So you get the default timeout, which is like 75,000 centuries. The right way to do it:
And now everything is working. Yay.
Socket sock = new Socket("hostname", port);
sock.setSoTimeout(5000);
This was supposed to set a connect timeout of 5 seconds. But what actually happens is that the constructor initiates the connect(), when that the timeout hasn't been set. So you get the default timeout, which is like 75,000 centuries. The right way to do it:
SocketAddress sockaddr = new InetSocketAddress(host, port); Socket sock = new Socket(); sock.connect(sockaddr, 5000);
And now everything is working. Yay.
You'd think this would be pretty much automatic, but it hasn't been my experience.
There are two problems: CentOS 4.x distribution still has MySQL 4.1.x as the default MySQL installation. I really like to use MySQL 5 now, it's pretty stable. The other problem is that the PHP packages that claim to have MySQL enabled, actually don't. Or that's the way it seems to me, after several hours pounding my head against "yum."
Step 1: install MySQL 5
This is pretty easy:
% yum --enablerepo=centosplus install mysql-server mysql-devel % /usr/bin/mysql_install_db % /etc/init.d/mysqld start % mysqladmin password your_secret_password % mysql -h localhost -p Enter password: mysql>Step 2: Compile PHP Assuming you have the standard apache httpd package installed on the machine, we have to build PHP 5 with mysql enabled. This is the only way I have been able to get PHP 5 to work. It's annoying, because you'd think that PHP + Apache + MySQL 5 would be the second most popular config on these machines. First get PHP from http://www.php.net/downloads.php You'll also need to make sure that httpd-devel is installed so you can have apxs.
% yum install httpd-devel % yum install libxml2 libxml2-devel flex (you might already have these) % tar vxzf php-5.2.0.tar.gz % cd php-5.2.0 % ./configure --with-apxs2=/usr/sbin/apxs --with-mysql % make % make installThat's it. This should also take care of updating your httpd.conf to load the PHP module. Now restart apache.
At work, we have these message declaration files for localizing the application. I wanted to make an emacs mode where at least the message identifiers were highlighted in a different color. I found this nice tutorial on getting started with the hooks.
It only took me 10 minutes to get my mode working well enough. Here is my mode, as an example.
(defvar r9msg-mode-hook nil)
(defvar r9msg-mode-map
(let ((r9msg-mode-map (make-keymap)))
;;(define-key r9msg-mode-map "\C-j" 'newline-and-indent)
r9msg-mode-map)
"Keymap for r9msg majo mode")
(add-to-list 'auto-mode-alist '("\\.msg\\'" . r9msg-mode))
; comments begin with #
; msg ids begin with *
; directives begin with @
(defvar r9msg-font-lock-keywords-1
(list
'("^#.*" . font-lock-comment-face)
'("^\\*.*" . font-lock-constant-face)
'("^@.*" . font-lock-variable-name-face)
)
"Minimal highlighting expressions for r9msg mode")
(defvar r9msg-font-lock-keywords
r9msg-font-lock-keywords-1)
(defun r9msg-mode ()
"Major mode for editing msg files"
(interactive)
(kill-all-local-variables)
(set (make-local-variable 'font-lock-defaults)
'(r9msg-font-lock-keywords))
;;(set-syntax-table r9msg-mode-syntax-table)
(use-local-map r9msg-mode-map))
This is hilarious stuff.
[via Infectious Greed]
Gizmodo has a thought about the next gen iPod. Their take: same form factor, touch screen, but with 100GB drive (or something), and way cheaper.
My speculation: the next iPod will be identical to the iPhone in every way except that it won't be able to make phone calls or do SMS. That is, everything except what they need Cingular for. But it will have:
1. WiFi (and hence full Safari etc.)
2. bigger disk (maybe not 100GB, but bigger.)
It will be sort of an iPod crossed with a UMPC, but actually portable. Good for email and browser as long as you can find a hotspot, which is really pretty easy these days. And it makes the "multi-year" Cingular exclusive not so much of a bad deal for Apple. Heh.
This is cool, and hopefully will lead to more funky filesystem hacks for Mac, like maybe the Flickr file system that is available for Linux.
Love the Google.
In your ruby script, start with this line:
#! /usr/bin/ruby -W0
Don't even think of lecturing me on the wisdom of this. Sometimes I just want to write one-off scripts and have them read files from globally writable directories.
I like OpenOffice. It's certainly good enough to do what I need: open Word documents, Powerpoints written by other people, and create a spreadsheet now and then. I don't like that it requires X11 on Mac.
OpenOffice is working on a more native integration, but it's not ready yet. Hopefully soon.
I know there is NeoOffice, but I don't like it as well as OpenOffice.
What kind of processor does it have that it can run OS X and not drain the battery in 15 minutes? What kind of graphics chip does it have in it that it can do all the 3D stuff from Core Graphics subsystem (and not drain the battery or burn your hand)?
How much RAM does it have?
How fast does it boot? I hate that my iPod, Treo, (former) BlackBerry takes 30 seconds to boot. Pocket device should boot up in 5 seconds.
It has Bluetooth. Does it support pairing with a bluetooth keyboard and mouse so I can put it on a desk and type a bunch of stuff in? (I don't care how smart the touch screen is; if I need to take notes in a meeting, I need a real keyboard.)
What does it take to get an app to run on it? Recompile? Special SDK? Of course, this relates to the kind of processor it has.
Gizmodo originally reported it's size at 6.26" in height, which totally put me off. But apparently that was an error, it's only 4.5" x 2.4" which is just fine. (Their original post is just gone from their site, I guess they were embarrassed. Screenshot attached, thanks to Google Reader cache.) I really wanted to replace my Treo 650 with a 750, but now, who cares about crappy any-other-phone-in-the-world? I'll save my pennies and wait for the first round of patches and fixes, and then I'll get an iPhone.
Need to encode a URL quickly? Too lazy to look up the hex codes? Or write your own program (whereever you happen to be.) Here is a good tool to encode/decode URLs.
Or you could just google for "url encoder" and find it that way.
The new Apple iPhone looks awesome. Wifi, iTunes, full sync, random access voice mail, IMAP client, maps. But but here's what I really want to know:
Does it have ssh?
Julie sent me this link: http://www.taimila.com/ubuntuosx.php
Remember to try it out on Ubuntu machine at home. Though I'm not sure what the point is... I use mostly Macs instead of Ubuntu on desktop not because I think the UI is any prettier, but because there are apps on Mac that don't exist on Linux. In particular, iTunes and Quicktime, but also other weird ones like Quicksilver.
This is not a very difficult one, but it's handy. In my case, I reinstalled the operating system on a new disk, but I kept the old disk in, so I could copy my user files and reference the other config changes I had made.
It's been about two weeks on the new disk, and I don't need the old one anymore. So I went to use Disk Utility to erase the old boot drive, and it wouldn't unmount the volume, because it was in use.
I didn't think anything should be using that disk, but I ran this command in a terminal:
% sudo lsof | grep '/Volumes/Macintosh HD' coreservi 107 root 9u REG 494296 /Volumes/Macintosh HD/Desktop DB coreservi 107 root 10u REG 494297 /Volumes/Macintosh HD/Desktop DF GrowlHelp 2016 billo txt REG 050895 /Volumes/Macintosh HD/Library/PreferencePanes/G... GrowlHelp 2016 billo txt REG 050839 /Volumes/Macintosh HD/Library/PreferencePanes/G...I'm not sure why growl decided to install itself on the bogus, non-boot hard drive. But I simply shut it down, and then was able to reformat the disk. Yay.
A friend at work found this handy tool for measuring the weight (and hence, speed) of web pages. It's very simple and well done.
It's actually quite strict and fussy, which is nice. Even the Google doesn't get all straight A's.
Amazon.com, on the other hand, whew, what a pig.