jwz [entries|archive|friends|userinfo]
jwz

  www.jwz.org
  userinfo
  archive
  rss

Links
[»| [DNA Lounge] [Blog] [iCal] ]
[»| [DNA Lounge Legal Defense Fund] ]
[»| [WebCollage] [LJ WebCollage] ]

The C Programming Language, by Brian W Kernighan & Dennis M Ritchie & HP Lovecraft [Fri, 25-Dec-2009 3:09 PM]
[Tags|, ]
[music |The Asteroids Galaxy Tour -- The Golden Age]

Exercise 4-13. Write a function reverse(s) which reverses the string s by turning the mind inside out, converting madness into reality and opening the door to allow the Old Ones to creep forth once more from their sunken crypt beyond time.
link7 comments   ·   post comment

Playstation and Facebook: unclear on the concept. [Thu, 17-Dec-2009 6:41 PM]
[Tags|, , ]
[music |Say Hi To Your Mom -- But She Beat My High Score]

I saw that in the latest PS3 OS update, they added Facebook integration. Now, there's one and exactly one thing that could possibly be useful for, right? You've already thought of it in the time it took you to read that sentence. The one useful thing would be to unify your friends lists, so that your PS3 can automatically know which of your Facebook friends are online without you having to search for and then manually enter all of their Playstaion Network IDs.

Guess what, it doesn't do that. All it does is make it so that the PS3 can spam your Facebook Status every time you buy a game, and every time you upload a trophy. Who would ever, ever want it to do either of these things?

I'll bet a "Social Media Consultant" was involved.

link21 comments   ·   post comment

putting a border around an embed [Sun, 13-Dec-2009 5:39 PM]
[Tags|, , ]
[music |Thieves Like Us -- Program of the Second Part]

Dear Lazyweb,

I want to put two embedded videos side by side. I want each of them to have a 1 pixel border around the embed box. (E.g.) In Safari and Opera (no idea about IE), you can do:

    <EMBED ... STYLE="border:1px solid">

But in Firefox, the border does not show up. One way to accomplish it in all three is this:

    <DIV STYLE="border: 1px solid; width:480">
    <EMBED ... WIDTH=480 ...></DIV>

which is dumb because you have to specify the width twice, and also because that doesn't let you put the embeds side by side unless you wrap a TABLE cell around each of them.

Any other ideas of how to make this work?

Is it a bug in Firefox that EMBED and OBJECT ignore the CSS "border" attribute?


UPDATE: Problem solved.

link23 comments   ·   post comment

an argument against minimax. [Thu, 10-Dec-2009 10:58 AM]
[Tags|, ]
[music |Concrete Blonde -- 100 Games of Solitaire]

The others in the set are nice too. Previously.

link4 comments   ·   post comment

I had always imagined it thus. [Tue, 8-Dec-2009 2:58 AM]
[Tags|, , , ]
[music |The Chemical Brothers -- Block Rockin' Beats]

link6 comments   ·   post comment

elisp.js [Sun, 6-Dec-2009 1:58 PM]
[Tags|, , , , ]
[music |The Faint -- Machine in the Ghost]

Indeed.

...
else if (c == "'") {
  this.consumeChar();
  value = ['list', [['symbol', 'quote']]];
  value[1].push(this.parseExpression());
}
...

Previously, previously, previously.

link10 comments   ·   post comment

stupid CSS tricks 2 [Thu, 26-Nov-2009 1:12 PM]
[Tags|, , , ]
[music |Headscan -- Metadata]

I think I've almost managed to get the DNA Lounge popup webcast window to resize the video when you resize the window. (Unsurprisingly, the only way that worked portably was to use tables.) Does it work for you? This seems to resize properly in both Firefox and Safari. It mostly works in Opera: it resizes properly, but there's a scrollbar and the bottom text is off the bottom of the screen. I'm not sure how to fix that.

What does it do in IE? Does the video resize, and is there a green box around it?

Previously.

link8 comments   ·   post comment

stupid CSS tricks [Sat, 21-Nov-2009 10:31 PM]
[Tags|, , , ]
[music |Shriekback -- Feelers]

Dear Lazyweb,

When you go to the DNA Lounge Webcasts page and click on the "Video Webcast" link, it pops up a chromeless window with the Justin.TV Flash embed in it.

I'd like to make it so that when you resize that window, the embed resizes with it.

This is what I tried. It works great in Safari, but in Firefox, the embed is always 100% wide and 1 pixel tall; and in Opera, it's always 100% wide but about 200 pixels tall.

Ideas?

link23 comments   ·   post comment

bottom-posting! [Tue, 17-Nov-2009 4:47 PM]
[Tags|, ]
[music |Add N to (X) -- Buckminster Fuller]

> Because it messes up the order in which people normally read text.
> > Why is top-posting such a bad thing?
> > > Yes.
> > > > Is top-posting bad?

So there's a plugin for Mail.app called QuoteFix (download) that makes it do bottom-posting by default instead of top-posting. It also supposedly strips signatures out of the quoted text. Sadly, I can't get it to do anything at all. Anyone have any luck with it on 10.6.2?

link32 comments   ·   post comment

Cyberpunk. [Thu, 12-Nov-2009 8:02 PM]
[Tags|, , ]

link3 comments   ·   post comment

iPhone worm [Sun, 8-Nov-2009 3:29 PM]
[Tags|, , , ]
[music |Rick Astley vs Nine Inch Nails -- The Hand That Gives You Up]

First iPhone worm discovered

Apple iPhone owners in Australia have reported that their smartphones have been infected by a worm that has changed their wallpaper to an image of 1980s pop crooner Rick Astley. Once in place, the worm appears to attempt to find other iPhones on the mobile phone network that are similarly vulnerable, and installs itself again

On each installation, the worm - written by a hacker calling themselves "ikex" - changes the lock background wallpaper to an image of Rick Astley with the message: "ikee is never going to give you up".


link18 comments   ·   post comment

normalizing audio volume on movies [Fri, 30-Oct-2009 12:53 PM]
[Tags|, , , ]
[music |Cabaret Voltaire -- Big Funk]

The last time I asked this I didn't get any practical answers, but that was a year ago, so I might as well ask again:

Dear Lazyweb,

How do I normalize the audio volume of a bunch of MOV and MP4 files?

The "Sound Check" option in iTunes works passably well for MP3 files, but doesn't do anything for videos. This makes it annoying to use a playlist full of music videos as a source of ambient entertainment, since the volume fluctuates wildly.

I think that a solution involving manually pulling the audio out of the movie files, normalizing it as a WAV, and re-inserting it into the movie is probably doomed to synchronization errors. So let's not.

I have tried using the "Get Info / Options / Volume Adjustment" slider manually on a few videos, but that is far too manual and annoying to do for all of them. Perhaps an approach would be to compute the volume boost desired of each movie, then set whatever ID3 tag corresponds to that slider? Or failing that, do it with Applescript?

Update: I kinda got something working with Applescript here. It fails if any video requires a volume increase of more than 100% (~6dB), but I only have a few videos of which that is true.

link26 comments   ·   post comment

syncing iPhone photos [Sun, 25-Oct-2009 12:14 AM]
[Tags|, , , ]

Dear Lazyweb, what's the sensible way to synchronize photos between my iPhone and Mac, given that I do not have iPhoto installed? I'm hoping to have a directory, say, ~/Pictures/Phone/, which is bidirectionally mirrored: photos I take on the phone show up there. Photos I place there show up on the phone. Photos I delete from there are deleted from the phone.

If I just let Lightroom launch when the phone is attached, it always pops up the import dialog even if there are only already-imported photos on the phone, which is annoying.

link23 comments   ·   post comment

Dear Palm, it's just not working out. [Mon, 19-Oct-2009 9:25 PM]
[Tags|, , , , ]
[music |King Cannibal -- So... Embrace the Minimum]

Folks, I couldn't take it any more. Today I wiped my Palm Pre and bought an iPhone.

Believe it or not, this actually has nothing to do with my utterly nightmarish experience of trying to get my applications into Palm's app catalog, and everything to do with the fact that the phone is just a constant pain to use.

This should be obvious, because my complaint about Palm's developer relations is that they are setting up a closed ecosystem, and Apple is even worse than Palm in that regard. (And while Palm is also slow and unresponsive to respond to developers, Apple is, again, even worse.)

So why would I get an iPhone? Because it's an appliance that just fucking works.

I have a list of 30-ish reports of more-or-less irritating bugs that I encountered during my first week of using the phone that I back-channeled into Palm via several of their developers, but most of those bugs were tolerable. The deal-breaker bugs are as follows:

  1. I still can't reliably sync my phone to my Mac.

    Now, I have to say that since the last time I publically bitched about this, the developers of Missing Sync really stepped up: I've been exchanging emails with a couple of the Missing Sync developers for months now, doing tests and sending logs and trying out alpha versions, sometimes several times a week. So I really appreciate the effort they went to to try and diagnose the bugs that I was experiencing. But, the bottom line is, it still doesn't work. The only reliable way to sync the phone is to manually do "desktop overwrites device", which means I can't actually edit contacts or calendars on the phone, ever.

  2. Peformance is a joke.

    Seriously, it's comically bad. The speed of this phone is truly pathological. It's horrible across the board, but some of the most egregious examples:

    • If the Calendar app is not running, it takes 10-15 seconds to get from "I clicked on the Calendar icon" to "I can see today's events". And then, switching from the display of one day to the next takes 2+ seconds (and it doesn't buffer swipes, so you have to keep trying). It's embarassing when I'm talking to someone and they ask me about availability and I have to say, "I'll tell you in a little while, once my phone wakes up."

    • If a call comes in, the phone starts ringing, and I can answer and talk to the caller, but most of the time it takes another 10 seconds before the Phone application's UI comes up! So if it's from the front door and I have to press a button to buzz someone in, I have to either hope the app starts responding before the caller hangs up; or I have to slide out the physical keypad and pray that it buffers the keystroke. Trying to answer the door feels like a game of whack-a-mole.

    • If I want to take a photo (for example, of the license plate of a hit-and-run) getting from "I clicked on the Camera button" to "I have taken a photo" takes almost 20 seconds. If I want to get all the way to "I have reviewed the photo, and can tell that it came out ok", that takes more like 40 seconds.

It seems to me that the only way this phone is going to be usable is for it to get literally 10× faster across the board. There was a speed improvement of maybe 10% between WebOS 1.0 and 1.2.1, so I think it's safe to assume that they've already picked the low-hanging fruit. I don't expect the performance of this phone to be even remotely suitable for every day use for at least a year. I figure it's going to either take a substantial amount of work on the lower levels of the OS, or they're going to have to throw Moore's law and new hardware at it... and the recently-announced Pixi is clearly not the hardware that's going to be 10× faster.

So even though I hate Apple's developer-hostility, and even though I hate that now I'm giving money to AT&T, and even though AT&T's network is way less reliable in San Francisco than Sprint's, and even though I absolutely despise the iPhone's on-screen keyboard... at least now I have a phone whose software actually works.

I thought about trying out an Android phone, but the reality is that the most positive review I've ever heard about Android was damning with faint praise along the lines of, "it sure does show the potential to someday be an iPhone competitor." Also, you have to surrender all your data to the Hivemind to use one. At least an iPhone will actually sync with the computer on my desk.

Sorry, Palm. I tried to root for the underdog, I really did.

link148 comments   ·   post comment

Palm's App Catalog, part 2 [Tue, 6-Oct-2009 5:29 PM]
[Tags|, , , ]
[music |Gang of Four -- What We All Want]

Palm made some announcements yesterday, so I suppose I ought to post a follow-up to my post about the nightmare of dealing with their App Catalog submission process.

After I posted that, it really made the rounds. I was surprised at how much press it got so quickly. So, with a PR disaster like that, you'd think the first thing Palm would do would be to finally post my apps, right? Well, they still haven't. Even though they stated their intention of posting my two applications in their app catalog way back in early July, neither the intervening months, nor the recent bad press, has caused them to actually post them.

Obviously I'm more concerned about the bigger picture: I want Palm to make it easy for all developers to get their software into the hands of anyone who wants it, without Palm being a roadblock between them.

But still, if you were Palm, wouldn't your first step be to actually resolve the problem for the guy who brought your broken system to the attention of the press? I guess they don't see it that way.

One of the new guys at Palm twitted at me that he wanted to talk on the phone about this stuff, and I replied, "What more is there to say? Just post my apps already." Apparently the peanut gallery thinks that was "rude", but after having spent three months, thirty-ish emails, and the aforementioned 160-line blog post explaining my position, I don't think they really require clarification on where I'm coming from. Seriously, have I been unclear?

The only conversation I'm really interested in having about this at this point is one that ends with them saying, "Hey, your apps are in the app catalog now." And you know, a one-line email saying that would do just fine. We don't have to do that on the phone.

Anyway, yesterday they made an announcement. Here's their press release and here's their attempt to explain what the press release says in English.

I found even the second link somewhat confusing, but as far as I can decipher, what it says is this: starting in December, developers will have these three options:

  1. Sell or give away your app through Palm's App Catalog, after Palm has reviewed, nitpicked and finally approved your app, and after you have paid $99 per year and $50 per application. Palm keeps 30% of every sale.

  2. Sell or give away your app through some kind of "second-class-citizen" app catalog that Palm intends to create, without Palm reviewing your app first. You still have to pay $99, and Palm still keeps 30% of every sale, but you don't have to pay $50 per app.

  3. If your app uses one of the recognized open source licenses (BSD, GPL, etc.) then Palm will let you give away your app in that "second-class-citizen" app catalog without paying for the privilege.

We still really have no idea what this second-class-citizen app catalog will look like, since they say it won't exist for two to three months. That means it doesn't help those of us who have working apps today that we would like to get into the hands of our users today, but it's a step in the right direction, assuming that getting things into the second-class-citizen catalog is a whole lot easier than getting it into the "real" catalog has been so far. (It won't surprise you to learn that based on their past behavior, I don't think that's a particularly likely assumption. But we'll see.)

But this is all needlessly complicated.

Here's what I want:

  1. A developer makes the executable of their application available on their own web site.
  2. A user visits the developer's web site via the web browser on their phone, and clicks on the link.
  3. A dialog box asks, "Are you sure you want to do this crazy thing?"
  4. The application installs. Done.

That's how it worked on PalmOS. That's how it works on desktop computers! Anything more complicated than that is just stupid.

link114 comments   ·   post comment

Exclusively at Tape Barn [Tue, 29-Sep-2009 1:54 PM]
[Tags|, , ]
[music |ClockDVA -- Final Program]

link12 comments   ·   post comment

that "duct tape" silliness [Mon, 28-Sep-2009 3:59 PM]
[Tags|, , , , ]
[music |LCD Soundsystem -- Watch the Tapes]

So, Peter Seibel interviewed me for his book. Then Joel Spolsky wrote this weird article about me based on that interview where he called me a "Duct Tape programmer". Peter asked me what I thought about it. I responded:

It's such a strange article, in that it's mostly favorable to my point of view but with such a breathless amazement to it, like he's just discovered an actual unicorn or something. "Look, everybody! Here's a hacker who actually accomplished things and yet he doesn't fetishize the latest fads that I and all of my friends make our living writing about!" There's this tone to the thing like he just can't imagine that someone like me can exist. He's impressed but he doesn't really believe in it, this mythological creature he's discovered. And of course the whole "duct tape" thing is vaguely insulting, and a perfect example of what we call "damning with faint praise".

So I guess to the extent that he puts me up on a pedestal for merely being practical, that's a pretty sad indictment of the state of the industry.

In a lot of the commentary surrounding his article elsewhere, I saw all the usual chestnuts being trotted out by people misunderstanding the context of our discussions: A) the incredible time pressure we were under and B) that it was 1994. People always want to get in fights over the specifics like "what's wrong with templates?" without realizing the historical context. Guess what, you young punks, templates didn't work in 1994. They also like to throw stones at Mozilla, and how much 4.0 sucked and how mozilla.org decided they needed to rewrite it all in 1999, so that jwz code must not have been any good, right? The peanut gallery always fails to understand that I was talking about an entirely different code base that pretty much ceased to exist by early 1996, thanks to the (at the time completely unwarranted) Collabra rewrite, and that has never been seen by the outside world.

Around 1998 I pushed for Netscape to open source both the 3.0 and 4.0 code bases, since the 3.0 code base was the one that included a mail reader that actually worked, but they wouldn't let me do it.

Peter wrote his own response to Joel's article that goes into more detail with some more excerpts from the book.

I really enjoyed reading Peter's book, by the way. (The parts that I'm not in, I mean.) You should buy it.

link36 comments   ·   post comment

My ongoing Kafka-esque nightmare of dealing with Palm and their App Catalog submission process. [Mon, 28-Sep-2009 2:57 PM]
[Tags|, , , ]
[music |Cansei de Ser Sexy -- Off the Hook]

A few days after the Palm Pre was released, I wrote a couple of programs for it: a restaurant Tip Calculator, and a port of Dali Clock. These were, as far as I'm aware, the 2nd and 3rd third-party applications for Palm WebOS that were ever available. I got on this boat early.

So why are they still not available in Palm's App Catalog? That's a very good question. This is my story about attempting to simply distribute this free software that I have written, and how Palm has so far completely prevented me from doing so.

The main problem here is that the only reasonable way that exists to distribute software for the Palm Pre is to get it into the App Catalog. On Palm's previous operating system, PalmOS, you could download and install applications from anywhere. There was a thriving software ecosystem of third-party applications for the Palm Treo, Centro, and their decade-long history of PDAs before that. You could (and I did) buy third-party software that ran on PalmOS on random web sites, or buy it in physical stores on CD-ROMs.

But taking a page from Apple's play-book, Palm has now decided that they have to be the one and only gate-keeper for all the software on your Palm Pre, in a way they never did on the Treo, Centro, or any of the earlier PDAs.

So if you, a developer, want to get your software into the hands of your customers, you have to beg and plead and wheedle Palm to distribute it for you.

Shortly after I wrote those applications in June, I mailed a few people inside Palm trying to figure out how to get them into the App Catalog, so that normal people could actually run them. In July, Palm publically asked for submissions for the App Catalog. I submitted my apps, signed up for their application-submission web site in July, printed out ten pages of PDF legal documents, signed them and scanned them back, then signed up for their web site again when they threw away the previous web site and created a whole new one in August, and basically jumped through dozens of hoops -- literally dozens of email exchanges -- from July through September.

They had all kinds of ridiculous requests and requirements, like, "It's a corporate policy that all of the applications use a version number less than 1.0.0", even though Dali Clock is already at version 2.31. But whatever. I jumped through all their hoops.

Finally, in mid-August they found a hoop I would not jump through. They said:

Required: You can only distribute your app via the Palm App Catalog. Do not make your app available on your website or anywhere other than the App Catalog.

They were objecting to the existence of the source code and binary executables on my Tip Calculator and Dali Clock web sites! I responded:

This is absolutely unacceptable, and frankly I find it offensive that you would ask for this.

This is open source software, and I will distribute both source and binaries any way I see fit, and give permission to anyone else to do the same.

If this is a requirement for inclusion in your app catalog, then I will stop developing for your platform at all.

Look, I'm on your side. I've been rooting for Palm for years, primarily because of the openness of the old PalmOS platform. But if this is your new direction, forget it. I use the Pre every day, and believe me when I tell you that you have exactly two advantages over the iPhone. First, a physical keboard. Second, a more open development environment and the goodwill of your developers. Apple has been shooting itself in the foot over its app store policies lately, and their idiocy has been your gain. Don't screw this up. If you try to maintain as much control as they do over the applications available, you are going to be a footnote. Did the vast numbers of applications available for PalmOS teach you nothing?

A few weeks later, I got a response asking to have a conversation about my objections after signing a non-disclosure agreement! I said no, obviously.

Finally, in September, I got a reply from Joe Hayashi (I don't know what his position is, but apparently he's somewhat higher up in the food chain than the folks I had been arguing with before) who said, "We aren't asking that you remove the binaries or source of your apps from your web site, and we aren't restricting anyone from distributing their source code, open source license or otherwise." Well, actually, that's exactly what they had asked for, but I was willing to assume that what he was trying to say was "we have now changed our crazy policy." Great. Problem solved, right?

I said, "Thank you for changing your policy. When can I expect to see my applications in the app catalog?"

Now, they have apparently changed the rules again, and won't post my applications until I give them a PayPal "Verified" account, and (possibly?) pay them $99/year in order to give away my software for free. My last exchange with Palm, on Sep 14:

I wrote:

Can you tell me what the status is of my apps? Will Tip Calculator and Dali Clock be showing up in the app catalog soon?

Liz Benson wrote:

I'll check status on these and see if we can't expedite. I know we sent you a review on Tip Calculator a while back and that you had feedback on our feedback. I'll ask for a re-review and see where we are.
I wrote:
Thanks.

I replied to the last review email I got (and then it was all de-railed because of the "you must take the source code off your web site" demand, which has since been rescinded.) The other small code changes you asked for, I don't agree with, and I'm not going to do.

I consider both Tip Calculator and Dali Clock to be complete.

I would be happy if you would post them both as-is to your app catalog.

If you think the minor changes that you asked for that I'm not interested in making are deal breakers, then please just tell me that, and I'll give up.

Is this a PayPal "Verified" account? That is what is needed to get you set up on the new portal.

No, it's not, because I don't trust Paypal to have my checking account number. I'm happy with them only having my credit card number.

Please understand: these programs are free. I am not, and will never, be charging money for them.

If you're not going to post them without me giving Paypal my checking account number, then, forget it. I will just stop trying to get my code into your app catalog, because that's just one ridiculous roadblock too many.

I have written free software that I am trying to give away and so far this has involved 27 emails and ten pages of signed documents.

I understand that you're still trying to work the bugs out of your submission process, but seriously, this is downright Kafka-esque.

Please, just post the programs already. Or tell me you're never going to, so I can stop trying.

I am so frustrated by this.

It's been two weeks, and I have received no reply. In the months since this process began, other third-party developers seem to have managed to get their applications into the App Catalog. Apparently these people are better at jumping through ridiculous hoops than I am.

So at this point I think it's safe to say that I won't be developing any more software for the Palm Pre.

Maybe it's time to look into getting an Android phone again.


Update, Sep 29:

    Despite Joe Hayashi's claim that "We aren't asking that you remove the binaries or source of your apps from your web site, and we aren't restricting anyone from distributing their source code, open source license or otherwise", [info]gregv points out that the license agreement that comes with the 1.2 Palm SDK that was released yesterday still contains the restriction that applications may only be distributed through the Palm App Catalog. Let's hope that this is just an oversight: that the company has, in fact, changed this policy, but that the paperwork just hasn't yet caught up to reality. An official statement from Palm to clear up these contradictory statements would be appreciated by everybody, I'm sure.

Update, Oct 6:

link190 comments   ·   post comment

my computah has a toomah [Mon, 28-Sep-2009 12:50 PM]
[Tags|, , , , ]
[music |Fad Gadget -- Love Parasite]

Mechanical tumor:

Mio I-zawa's "mechanical tumor" is a quivering hunk of fleshy, organic-looking material that expands and contracts depending on the amount of stress your computer is experiencing. Equipped with a series of motors and pneumatic actuators, the mechanical tumor pulsates gently when the CPU load is low. When the CPU load is high, the tumor's air compressor is activated, causing the lump of flesh to inflate.

Other biologically inspired interactive devices by Mio I-zawa include "external heart," a squishy latex heart on wheels that beats and rolls around in sync with the user's pulse... ...and "elastic cell," a system of 46 soft pulsating cells that react to human touch in a complex, lifelike way.

Previously, previously, previously.

link1 comment   ·   post comment

I'm on a boat^H^H^H^H^H^H^H^H^H in a book [Tue, 15-Sep-2009 2:29 AM]
[Tags|, , ]
[music |ClockDVA -- The Connection Machine]

Last year Peter Seibel spent a couple of days interviewing me about the time when dinosaurs roamed the earth, and this turned into a chapter in his new book, Coders at Work: Reflections on the Craft of Programming. It was a fun interview, since we talked about a bunch of non-Netscape-related hacking, and nobody ever asks about that any more.

I haven't read the rest of the book yet, but it's a safe bet that the other folks were more coherent than I was. The other interviewees are Brad Fitzpatrick, Douglas Crockford, Brendan Eich, Joshua Bloch, Joe Armstrong, Simon Peyton Jones, Peter Norvig, Guy Steele, Dan Ingalls, L Peter Deutsch, Ken Thompson, Fran Allen, Bernie Cosell, and Donald Knuth.

(If you're wondering what I'm doing in the same book as Knuth, try thinking of me as the comic relief.)

link18 comments   ·   post comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]