Exporters From Japan
Wholesale exporters from Japan   Company Established 1983
CARVIEW
Select Language

June 2002 Archives

David Sims

AddThis Social Bookmark Button

Related link: https://www.nytimes.com/2002/07/01/technology/01WIFI.html

The New York Times reports that Time Warner Cable has sent a few (less than a dozen, supposedly) letters to customers it suspects of setting up open wireless networks. President of Time Warner Cable, Barry Rosenblum, says: “We’re trying to keep people from redistributing the service we sell them … Our concern is when people specifically bolster the signal to share with others outside.”

Daniel H. Steinberg

AddThis Social Bookmark Button

Cory Docktorow has been documenting his on-going dialog with NPR about their policy of having other people link to their site. Actually, Cory’s campaign has led to NPR’s reconsidering and updating their Terms of Use . In Cory’s response he explains why the revised policy still doesn’t meet his objections. In particular, he says “I don’t need your permission to link to your site… There is not intellectual property interest in controlling the contexts in which your work may be referenced… A link is a public fact … authors [are not legally granted] control over the contexts in which the existence of their work may be noted.” You can find more discussion and content on boingboing.net

In a related story, the online magazine 2600 has won an interesting linking victory in it’s battle with Ford. 2600 registered the domain which I’ll refer to as f***GeneralMotors.com and had it link to Ford’s site. Ford was concerned that visitors would think that Ford had commissioned the site and tried to legally stop the link. Check out the stories on 2600’s page as well as in The Register .

What rights should you have in controlling who links to you and how?

Daniel H. Steinberg

AddThis Social Bookmark Button

Related link: https://bugzilla.mozilla.org/show_bug.cgi?id=74821

MathML is an XML dialect used for representing Mathematics (with both content markup and presentation markup). Mozilla 1.0 and Netscape 7 display MathML beautifully. Complex math equations render impressively — but not on the Mac. To see the potential, check out the test suite at https://www.w3c.org/Math. The reason that this doesn’t work on Mac OS X has been recorded in the bug you’ll find by following the bugzilla link. Check out the page and see if there’s anything you might be able to do to help.

AddThis Social Bookmark Button


Will Bill Gates be Apple’s next “Switcher”?

Apple’s Switcher campaign has garnered a lot of attention. But what would happen if Bill Gates switched? Would he do a “Switcher” commercial for Apple, and if so what would it look like?

Go to MacBoy.com and find out what that might look like. This one’s a classic!

Scot Hacker

AddThis Social Bookmark Button

When I wrote the MP3 book for O’Reilly two years ago, I incorrectly predicted that the mainstream electronics market would soon be flooded with all manner of MP3 home stereo components. While a few semi-commercial units have been released, almost everything out there is still coming from 2nd-tier vendors, or consists of bodged-up home computers stuffed into smaller cases, running some form of Linux hacked every which way to Sunday.

Very cool, but as much as I want to be listening to my MP3 collection on the home stereo, I had a different idea about how to do it right. I’ve already got a meticulously organized collection on the hard drive of my always-on G4, and I don’t want to have to be sync’ing it with the stereo all the time. I will not tolerate fan noise in the system, and I want something low-profile. The perfect solution, as far as I could see, would be a small unit consisting of nothing but an ethernet port, an MP3-decoding DSP, and an LCD or LED display. The collection would be controlled from any of the browser-based PHP or perl packages out there.

Slim Devices built exactly the device I was looking for with their SliMP3. A friend bought one and fell immediately in love with it.

My only real hesitation with the device is its lack of digital outputs (I have an outboard DAC that I hate to see go to waste). So while I wait for another rev of the SliMP3 to arrive with digital out (not that the company has promised, but it is a highly requested feature, and seems inevitable), I decided to monkey around with another - and much cheaper - solution. Plunked down $30 for an iRock - a tiny FM transmitter that takes whatever is coming out of your computer’s audio-out jack and broadcasts it to the tuner in your home stereo. Cheap, and seemingly elegant.

The iRock arrived yesterday, and turned out not to be a panacea at all. Living in the SF Bay Area, the low end of my FM radio dial is full of signal, but I chose 88.1, where the existing signal was weakest of the four options. Got 90% static, 10% signal. Put the iRock on an extension cord and hoisted it up to line of sight with the stereo, which is 25 feet away in the living room. Better, but still static-y. Pulled out the tuner’s FM attena and spread it all over the room. Finally, I was getting 95% signal and 5% noise. But that’s 5% noise too much, and at the expense of spreading wires all over two rooms. Kind of defeats the point. I’d get better results running audio cable under the floor, and wouldn’t need to mess with batteries. The iRock went into a drawer. Maybe it will come in handy when we take a trip and want to listen to the iPod in the car.

For now, I’ll keep listening to MP3s on computer speakers, biding my time until Slim Devices takes their near-perfect unit the final mile to MP3 nirvana.

Have good experiences with other MP3 home stereo devices?

James Duncan Davidson

AddThis Social Bookmark Button

John C Dvorak is paid to make controversal statements. And this time he’s made a big one. In fact, I think he’s gone over the line. In his latest PCMag editorial he takes random personal potshots at the people Apple’s Switch campaign. At one point he says, “If these people are the examples, then I fear for the future of Apple. Seriously.”

He’s taking pot shots at those real people for having real problems and looking for a solution that works for them. Somebody slap him with a clue stick. Attacking the campaign because you don’t like it is one thing. Dissing on real people like Mike, Liza, Dave, Aron, and Sarah is just plain uncalled for. Sure, they’ve had gel slathed in their hair for the TV and a bit of makeup applied, and their stories have been edited for effect, but they are real people with real experiences. And I’ve run into zillions of people just like them all over the world. Liza the DJ reminds me of several people that I’ve hung out with in SF and just want a better experience with their computer.

Computers aren’t for elitists. They are for everyone to use to make their lives better.

At a recent conference, I was asked what I thought the future of software was. My answer: Make it work for the real people out there, not just computer whizes like myself and the other developers in the audience. Those people are like the people in the ads. And even though I want to see more ads targeted to people like me (I want more full spread ads in magazines talking about the Unix underpinnings of OS X), I’m glad that Apple is out there working on a campaign to bring more real users to the platform. Those users are the ones that pay all of our salaries.

What do you think? Is John out of line?

Scot Hacker

AddThis Social Bookmark Button

Perhaps it’s just coincidence, but I’ve noticed the names of both Tim Berners-Lee (inventor of the World Wide Web) and Vincent Cerf (co-inventor of TCP/IP) in the news over the past week. What struck me was the fact that references to both of these “spiritual fathers” were in the context of looking out on creation, and not liking what they saw.

The first spotted reference was in the San Jose Mercury News, in a piece in which Cerf warned that the openness that makes the Internet what it is is being threatened both by overly controlling governments and excessive corporate profit motives. Too much control and too much too many proprietary solutions threaten to undermine the very things that make the Internet strong, according to Cerf and others.

Separately, I’ve been watching the ongoing debate over so-called “deep linking” with interest (I use quotes here because I don’t think there is such a thing as a “deep link” — there are simply links — whether they point to home pages or not is immaterial).

Most recently, NPR — that bastion of open and unfettered speech — has put their foot in it by asking webmasters to fill out a form before linking to any of their pages — in other words, to ask permission before linking to them.

I was happy to find at BoingBoing a reference to Tim Berners-Lee’s Links and Law: Myths which, among other things, makes the following points:

Myth: “A normal link is an incitement to copy the linked document in a way
which infringes copyright”.

This is a serious misunderstanding. The ability to refer to a document (or a
person or any thing else) is in general a fundamental right of free speech
to the same extent that speech is free. Making the reference with a
hypertext link is more efficient but changes nothing else.

When the “speech” itself is illegal, whether or not it contains hypertext
links, then its illegality should not be affected by the fact that it is in
electronic form.

Users and information providers and lawyers have to share this convention.
If they do not, people will be frightened to make links for fear of legal
implications. I received a mail message asking for “permission” to link to
our site. I refused as I insisted that permission was not needed.

There is no reason to have to ask before making a link to another site.

It is natural and good that the Internet should grow and evolve. But we must take care not to subvert its most fundamental attributes. Open = strong. Corporations and governments must be continually reminded of these basic tenets, or we risk damaging that which makes the Internet great.

AddThis Social Bookmark Button


As I mentioned in an earlier post to my blog, I was sitting behind a father and his two sons during Tim O’Reilly’s keynote presentation here at MacHack. I finally managed to catch up with this “Yoot,” and thought I’d post a little background info.

Meet Dylan. Dylan’s a 12-year-old boy from New Hampshire who likes to program in Java, Python, and Objective-C. When I saw him at the keynote, he was hacking code on a lime green iBook with a copy of Jython Essentials by his side. At the time, I was thinking, “Man, this is cool!”

When I was his age, my friends and I were whacking away on BASIC on my friend Bob’s Vic-20, and when I got my Commodore 64, I was the envy of the block. Now Yoots are programming on the latest and greatest hardware, using languages that many adults struggle with — myself included.

Dylan first started programming in Logo when he was in First grade, but admits that he didn’t start getting serious about programming until he hit Fourth grade. Of course it helps to have a father who’s a programmer, but he said that he started learning C++ with the aid of CodeWarriorU.

His language of choice is Java, as he prefers its memory management capability. “There’s a lot more powerful frameworks for C and C++,” he said, “but I would like to have things like garbage collection and better memory management.” If that were better, he’d “consider using Objective-C more.” For now, he’ll continue to build Java Swing applications.

When I asked “Why the Mac?”, he responded: “It scares me to work on Windows. I just prefer the Mac so much more.”

In school, Dylan says he tends to accelerate in math and gets asked lots of quetions about comptuers. Outside of school, he’s like any other kid. He likes to ski (downhill not snowboarding), and has been studying the cello for a little over a year. Surprisingly, he tends to read plays and boasts that he’s “an Arthur Miller” fan. He’s also reading Stephen Hawking’s, A Brief History of Time. While he doesn’t aspire to be an actor, he said that he does enjoy watching movies. Two films he recommended seeing are My Big Fat Greek Wedding, and About a Boy.

When I asked Dylan what his aspirations were, he said “I’m not looking to be the next Bill Joy. That would be cool, but it probably won’t happen.” Instead, he wants to “create some cool web or desktop apps with Java.”

His dream job, is to live the life of Rob Malda (a.k.a. Commander Taco). He’d like to spend his time, “sitting on the couch, posting things to the Internet, watching reruns of his favorite shows while commanding a team of killer lesbians in The Sims.”

Seems like he’s got his priorities straight.

Are you a Yoot? If so, let us know what your background is, and how you got started in programming.

AddThis Social Bookmark Button


The nerves are frayed and everyone’s on the edge of their seats, waiting for the results of the Hack contest here at MacHack.

As Friday came to a close, the night didn’t kick into high gear at MacHack 17 until shortly after midnight (so that would be Saturday morning, right?) when the attendees queued up to present their hacks — hardware and software — before the masses.

Mind you, there were 65 Hacks and the showing of said Hacks didn’t start until around 12:30 a.m. What better way to spend your evening? Well, okay, you could be in bed, sleeping, dreaming of fluffy bunnies floating in the sky, but then you’d miss all the fun.

Amid a flury of flying Twinkies and Little Debbie Snacks, odd video snippets, retro Apple ads and commercials, and a heavy dose of sarcastic remarks, the night was quite entertaining.

Some of my favorite Hacks of the night included, but not limited to:

  • Dock Invaders, by Travis Hicks and Paul Scandariato. This Yoot-developed game takes the icons from your Dock and puts them in alien formation, similar to the classic arcade game, Space Invaders. Rather than having a goofy space station to shoot from, Moof shoots bones at the icons to knock them out of the air. Very cool.
  • Airport Extender Blender, by Troy Benjegerdes and Tom Zerucha combines an iBook, some Lego MINDSTORMS, an alluminum can rigged as a wireless extender, and a blender to make you a frothy drink. The wiring was a little scary, but this was a pretty cool hardware hack.
  • Apple Video Saver, by Justin Bakse and Joshua Walton (sp?) takes a live video feed (via FireWire) and converts the image into colored Apple icons. (I have to say, this was my favorite.)

Two crowd pleasers were a redo of Monty Python’s Dead Parrot sketch, as a final send-off for Mac OS 9 (take note, Steve, you should invite these guys to redo this at Macworld New York), and the “Hack Park” animation (ala, South Park) by John Ardussi. Both were pretty damned funny. (Mostly because one of the characters in “Hack Park” gets squashed by an O’Reilly bookshelf.) ;^)

When all the Hacks had been presented, and all the Twinkies tossed, I looked at my watch with my “crack eyes” (thanks, John), and came to the realization that it was now 4:30 a.m.-ish, and I had a 20-30 minute commute back to the folks’ place ahead of me.

The drive home was pretty easy, probably because there’s hardly anyone on the road at that time of the morning. I managed to get home around 5 a.m., got three hours sleep, and dragged myself back in. Sure, I’ve had about seven hours sleep in three days, but this has been a lot of fun.

I know how I’ve voted, but what would Brian Boytano do? ;^) Can’t wait for the results of the Hack contest to be announced at tonight’s final banquet.

Where you there? If so, comment on what you thought were some of the best Hacks here at MacHack.

Brian Jepson

AddThis Social Bookmark Button

Related link: https://www.clrgeeks.com/Papers/HostingASPNET/HostingASPNET.html

Various weblogs are abuzz with word that O’Reilly author Ted Neward has written a neato paper about hosting ASP.NET in an all-managed HTTP Server.

AddThis Social Bookmark Button

Related link: https://kerneltrap.org/node.php?id=278

KernelTrap spends some time with Jordan Hubbard of the Apple Darwin team. Jordan reflects on his 386BSD and FreeBSD efforts, the relationship between Darwin and FreeBSD, and the wonders of Mac OS X’s blending of a no-compromises desktop with powerful Unix underpinnings.
“I think the coolest thing is being able to work on a really NICE desktop OS which doesn’t make a bunch of horrible compromises to achieve user friendliness.”

Jordan Hubbard with be keynoting at The O’Reilly Mac OS X Conference, September 30 through October 3, 2002 in Santa Clara, CA.

AddThis Social Bookmark Button

Related link: https://www.macfixit.com/extras/machack2002kn1.shtml?MFI_Session=b675597860c85149…

Tim O’Reilly delivered a midnight keynote at the 17th annual MacHack conference in Dearborn, Michigan. “After his introduction, Tim entered the room and was led onto the stage with the full fanfare of a bagpipe player. … The keynote ended with a question and answer session and finally wrapped up around 3:00 am.” MacFixit has more.

AddThis Social Bookmark Button


Robin Williams, the comedian, once said: “Reality. What a concept.” After having attended many “adult” conferences (like the WWDC), it’s refreshing to see “Yoots” at MacHack.

For those of you who are not familiar with the term “Yoots,” I highly recommend that you go out and rent “My Cousin Vinny,” starring Joe Pesci. It’s not a great movie, but it goes something like this…

  • Two young adults go on a road trip and get accused of a crime, thus finding themselves in a southern jail.
  • They need a lawyer, and one of them calls upon his cousin, aptly named “Vinny,” to help them out of their legal bind.
  • During the trial, Joe Pesci refers to the two young adults as “yoots,” obviously trying to say “youths,” but that somehow got mangled with his New York accent (or is it Jersey?).

Yoots. What a concept.

Throughout yesterday afternoon, I saw many dads coming in to the conference with kids in tow. Not that there’s anything wrong with it, but these “kids” — or yoots — weren’t just tagging along with dad for a weekend conference. They’re little hackers.

As I sat through Tim’s keynote last night/this morning, a dad and what I think are his two boys sat in front of me and Jonathan Gennick (another O’Reilly editor who made a trek down from the U.P.). Regardless of the fact these yoots were up way past their bedtime, the thing that struck me was that one of the boys was hacking code, with a copy of Jython Essentials by his side.

Cool!

I know Apple has an age restriction for ADC members, but I think they should seriously look at having another level of developer membership. Call it Yoots, or whatever you want, but if this kid can sit there and hack code at 2 a.m., and there are ~50 yoots here, Apple should sit down and take notice. These yoots aren’t just using their PowerBook G4’s to play games. They’re the next breed of developers for the Mac.

It’s time to come down to eye level with these folks.

At some point, I’m going to track down this little hacker and find out what he was working on.

More later…

Should Apple let “yoots” join the club?

James Duncan Davidson

AddThis Social Bookmark Button

So, I know this this guy who runs Mac OS X as his server and is seriously interested in running it as a desktop. Problem is that there are a couple of UI issues that keep him from picking up a TiBook and joining the fun. The first of these is the Windows Alt-Tab behavior. The second is the “focus follows mouse” behavior of X-windows.

As soon as he found a hack to let the keyboard focus follow the mouse instead of the “click to raise and focus” behavior that he doesn’t like, he moved from his aging Indy to a Windows 2000 laptop. And discovered he liked Alt-Tab. And now that he’s looking at the Mac, he has decided he doesn’t like the Command-Tab behavior that Apple has implemented with Mac OS X.

I’ve been keeping my eyes out for utilities that will fix this for him, and I’ve finally found one for the Alt-Tab behavior that might work. It’s called App Switcher and you can find it at https://www.uwm.edu/~mikeash/appswitcher/. The only thing that it doesn’t mimick from Windows is the ability to Alt-Tab between multiple windows of the same application. We’ll see how my friend likes it.

Now, if somebody just implements a “focus-follows-mouse” hack…

What UI Hacks make your OS X experience more pleasurable?

AddThis Social Bookmark Button


After driving ~800 miles from Cambridge, Mass. to Dearborn, Mich., I’ve landed in my old stomping grounds for the next best thing to attending the WWDC: MacHack.

The next conference on my summer schedule takes me back home to Michigan. Rather than flying, I decided to take some time and drive back here. After roughly 800 miles of driving, I landed in Dearborn, Michigan before noon today to attend the 17th annual MacHack conference.

The conference kicks off tonight at midnight with a keynote by none other than Tim O’Reilly, and runs through midnight on Saturday. (Tomorrow night’s midnight keynote is by Rob Malda of Slashdot fame.) MacHack is sort of like the mecca of the Midwest for Mac developers.

Over the next couple days, I’ll post infrequent updates to my blog, reporting on the events of MacHack that I attend, and about the people I meet here. I’ll also post some odd notes about the area and my daily commute. Rather than spending time holed up in a hotel room, I’ve also opted to stay with my folks during my short time here, so don’t be surprised if they get mentioned here as well.

Today’s topic: Construction.

If you’re already here for MacHack, you’ve undoubtedly had to weave your way through various construction zones. After arriving here at MacHack this morning (I spent last night in Toronto, ON, Canada with friends), I quickly noticed tons of orange construction signs. A driver’s worst nightmare. Joy!

Since MacHack didn’t start until later, I decided to head home to see the folks, take a shower, and change clothes. My parents live in Trenton, MI, about 30-40 minutes from here. Uh, that’s under “normal” circumstances. My dad warned me about some of the routes, so I decided to take the back way, but made the grave mistake of trying to take Telegraph Road in Taylor. One word instantly came to mind: “Shit!” Boy was that a mistake!

The route back was a lot quicker:

  • I-75 N to Sibley
  • Sibley to Middle Belt
  • Middle Belt to I-94 W.
  • I-94 W. to the Southfield.
  • Exit at Ford W., and poof!, you’re there!

I guess living here for ~18 years has some sort of advantage. I managed to get back here in the 30-40 minute timeframe, so I’m feeling pretty good. And then, after getting a static IP address from Steve so I could access the O’Reilly VPN, life was even better.

More tomorrow from MacHack.

Have a better route? Feeling the pain of dealing with the construction zones? Vent your frustrations and set yourself free!

Brian Jepson

AddThis Social Bookmark Button

Shaun Bangay posted an exciting message to the Dotnet-sscli Research List today. He mentioned that he’s ported Rotor to Linux, and that it passed about 94% of its tests. The Rotor research community is still working out arrangements for CVS and tarball hosting, so the O’Reilly Network jumped in with an offer to host the source code. The source code is available at https://www.oreillynet.com/rotor/linuxsscli19062002.tar.gz.

Use of Rotor is subject to the terms of the Microsoft Shared Source CLI, C#, and JScript license.

This is a large source distribution (about 13MB compressed, 100MB uncompressed), so please read Get Your Rotor Running before you download it; this should give you an idea of what to expect. Depending on your hardware, it could take a while to compile.

Shaun also wrote up some notes specific to the Linux port. Please read these before you attempt to compile it.

Kudos to Shaun for his excellent work on this port!

Scot Hacker

AddThis Social Bookmark Button

Yesterday I got to work setting up a sorely needed search engine for the jschool web site. With around 5,000 documents scattered around, it’s amazing the site has come this far without one.

I’ve built search engines for various sites that were completely database-backed, but this site is mostly straight HTML. That means I need to implement a search engine that daily hoovers our static content into a MySQL database, then delivers search results from that.

Writing basic search engines in MySQL/PHP is easy. But making sure you’ve got a fast, effective spider, a database that stores meta keywords and descriptors in separate fields, a query system that looks first at meta data and secondarily at the page text… doing all of that is a bit more complex. Not impossible, just more complex. So I decided to implement a pre-fab, open source search package.

I had thought my search for perfect search had ended when I hit on Mnogo Search. But on closer inspection, it turned out that Mnogo is only free for use on Unix. When deployed under Windows, you have to pay. And it’s not cheap. Interesting business model ;) Unfortunately, I’m stuck with a Windows web server (at least it’s Apache), so Mnogo becomes a non-option.

So I spent half of yesterday looking for the perfect, free, cross-platform search engine written in PHP/MySQL. The first few I tried all had seriously broken installation routines and very poor documentation (one was French, the other German - both had fairly poor English skills, making troubleshooting tough).

Suggestions welcome.

Suggestions welcome.

Daniel H. Steinberg

AddThis Social Bookmark Button

On the last day of the Mac Geek Cruise, Randal Schwartz entertained and alarmed those of us checking our email using a wireless connection. I looked at his machine and saw my log in and password displayed clear as day. Fortunately, Apple makes this very easy to fix if your ISP provides the support at their end. If you use the Mac OS X Mail application, just open up the preferences, edit your mail account and select the Account Options tab. Check the Use SSL checkbox.

I did this for my CoreCom account and it worked like a charm. (A very helpful email I received from them in response to an inquiry detailed the security they provide.)

I also checked the box for my Earthlink account and got the cryptic error that I was unable to connect to the remote server. This, of course, means that Earthlink doesn’t support SSL. I wrote a quick email to Earthlink. I just wanted to know what their plans were for securing my email. I received this as part of their reply:

Please note that currently we do not support SSL for POP3 email. And we
have no future plans to add SSL to our mail computers at this time.
However, we are always interested in comments from our customers and the
public regarding ways to improve our product and service. We will
certainly consider your suggestion. In the meantime, you can learn about
all of our services and pricing plans by visiting the following site:

I really like Earthlink and with one exception have had very good experiences with their technical support people. Apple really likes Earthlink. Jobs has mentioned them in the MacWorld keynote and trial Earthlink software was included on my PowerBook. In order for Apple to make security as easy as checking a box they need to push their partners to support the protocols. Of course, Earthlink is raising other security concerns. Check out this recent Wired article about which Earthlink employees have access to your password.

Brian Jepson

AddThis Social Bookmark Button

When you’re developing a web database application, you may need to build your SQL statements on the fly and send them to the database. Consider this Perl example, which queries a database using the zipcode parameter:

my $zipcode = param("zipcode");
my $sql = "SELECT * FROM PEOPLE WHERE zipcode = '$zipcode'";
my $sth = $dbh->prepare($sql);
$sth->execute();

So, you could search for all the people in the 02881 zipcode with this URL: https://webserver/cgi-bin/search?zipcode=02881. It looks simple and safe enough, but it’s easy for a remote user to subvert your intentions. Suppose a remote user sends this URL to your web server: https://webserver/cgi-bin/search?zipcode=02881'+or+'0'='0. Now, $sql looks like this:

SELECT * FROM PEOPLE
WHERE zipcode='02881' or '0' = '0'

This would return all rows from the PEOPLE table, which could be a Bad Thing. Consider this:

  • If the PEOPLE table is very large, this could be a potential denial-of-service attack.
  • If you have a database, such as a company roster, on your website, you’d want to let users query portions of it, but you’d prefer not to let someone download the entire thing.

Whether or not either of these cases apply to your application, the overriding concern should be that you want to stay in control of what code is executed on your server! Other databases, such as Microsoft SQL Server, have powerful stored procedures like xp_cmdshell, which runs command-line programs with the same credentials that the server runs under.

For a good overview of this problem, see the Open Web Application Security Project’s page on this topic. It includes examples for various database servers.

One simple solution to this problem is to use parameter binding. This lets you put placeholders in the SQL statement and bind them to a particular parameter. Here is how this example would be rewritten to use parameter binding:

my $zipcode   = param("zipcode");
my $sql = "SELECT * FROM PEOPLE WHERE zipcode = ?";
my $sth = $dbh->prepare($sql);
$sth->bind_param(1, $zipcode);
$sth->execute();

Now when a remote attacker attempts to inject SQL, all the single quotes will be properly escaped, and this is what the statement will look like:

SELECT * FROM PEOPLE
WHERE zipcode='02881'' or ''0''=''0'

In other words, the SELECT statement attempts to match the zipcode to the literal "02881'+or+'0'='0", which turns up no match.

It really gets down to one thing: if you’re going to take something the user typed and execute it dynamically (whether through SQL or eval), sanitize the input first!

How are you sanitizing your input?

James Duncan Davidson

AddThis Social Bookmark Button

Today, Microsoft released IE 5.2 for Mac OS X. This latest incarnation of the heavyweight browser introduces support for Quartz text smoothing under Mac OS X 10.1.5. Is text smoothing while browsing really a big deal? My answer is an emphatic yes.

OmniWeb was the first Mac OS X web browser to support anti-aliased fonts while web browsing. Simply by being built on the Cocoa frameworks, it has had support for smooth text since before Mac OS X was released last year. It also has support for a whole host of other Cocoa enabled technologies, the most useful of which to me is that spell checking is automatically turned on in text entry fields-a real boon when writing blog entries.

Chimera, ne Mozilla wrapped up in Cocoa widgetry, was the next browser to support smooth text. And it was the first browser to come from the Mozilla project that I actually enjoyed running on my desktop and didn’t look out of place with some alien user interface. Even though it’s only at release 0.3, it has some some serious promise-especially with the tabbed browsing features.

And now IE has joined the party. To be sure, the quality of the text smoothing isn’t the same across all three browsers. OmniWeb’s consistently looks much better, while there are a few places where both IE and Chimera’s fonts (especially bold ones) aren’t quite as pleasing. But it shows that there’s still a bit of innovation happening in web browsers-and that innovation is happening on Mac OS X.

Even though the browser wars were done with long ago, could we be seeing a new battle coming on? One where we the users will benefit from the advances made by the vendors? Time will tell. But I for one am glad that there is ongoing development in the browser space and that it’s not just a one horse show.

Derrick Story

AddThis Social Bookmark Button

After reading 97 session proposals for the O’Reilly Mac OS X gathering that begins on Sept. 30, I’ve decided to refer to this event as “the fun developer conference.” And if you were in my shoes, you’d say the same thing.

Developers and power users take note. We have everything from iPod hacks to Cocoa programming, geek culture to Apache Web serving. I feel like I’ve just been told the winner of the next lottery, but I can’t share it with anyone.

Now the deadline for session proposals is today (Friday). But I’ll tell you this little secret, we’ve left the proposal site on for a few more days. So if you have something interesting to share, consider popping over there real soon and slipping it under the door.

Next week we start making our final selections. And soon after that, I can spill the beans about the show line-up. Then you’ll see why I’m smiling.

O'Reilly Mac OSX Conference.

Derrick Story

AddThis Social Bookmark Button

After reading 97 session proposals for the O’Reilly Mac OS X gathering that begins on Sept. 30, I’ve decided to refer to this event as “the fun developer conference.” And if you were in my shoes, you’d say the same thing.

Developers and power users take note. We have everything from iPod hacks to Cocoa programming, geek culture to Apache Web serving. I feel like I’ve just been told the winner of the next lottery, but I can’t share it with anyone.

Now the deadline for session proposals is today (Friday). But I’ll tell you this little secret, we’ve left the proposal site on for a few more days. So if you have something interesting to share, consider popping over there real soon and slipping it under the door.

Next week we start making our final selections. And soon after that, I can spill the beans about the show line-up. Then you’ll see why I’m smiling.

O'Reilly Mac OSX Conference.

Derrick Story

AddThis Social Bookmark Button

My boss, Dale, is a photo buff who’s considering adding a new digital camera to his life. His friend has an appealing Fuji that’s at the top of Dale’s wish list. Just to make things a little more enticing for Dale, his friend sent him a CD of hi-rez images to show off the camera’s quality.

Problem was, Dale couldn’t import the Jpegs into iPhoto. “What the heck is going on here?” he asked.

Dale tried a couple of workarounds to no avail, then brought me the CD, which I promptly opened up. Everything looked harmless enough. But darn if I couldn’t import the images either.

I opened one picture directly in Photoshop 7 and did a little snooping around. Ah Ha! His friend had unknowingly saved the Jpeg as a “progressive scan.” I saved it again as “Baseline (Standard)” Jpeg, and the new file imported into iPhoto just fine.

I’m sure someday iPhoto will import just about anything. But for the moment, keep an eye on the formats you use. And for Jpegs, stay far away from “progressive scans.”

O'Reilly Mac OSX Conference.

BTW: Both David Pogue and myself will be leading sessions on iPhoto at our upcoming Mac OS X conference.

David Sims

AddThis Social Bookmark Button

News.com’s Gwendolyn Mariano has a great little
article that updates the players in music downloads. The newspeg is that Sony and Universal Music both plan to cut prices for downloading songs, and Sony says it will now allow you to burn the songs you download onto CDs — well done, Sony. Could this be a sign that the music publishers (not necessarily the RIAA) are coming down from their Napster Wrath and relaxing a bit, learning to see listeners as customers not crooks again?

Oddly, the article reports that the new capabilities will come on third-party download sites such as Liquid Audio (which was bought Thursday by Alliance Entertainment ) and RioPort. Sony and Universal Music Group (through its parent Vivendi Universal) are partners in the Pressplay download service. Wonder if the changes take affect within Pressplay, too.

Scot Hacker

AddThis Social Bookmark Button

At UC Berkeley’s Graduate School of Journalism, we have a room called “The Greenhouse” - a studio full of Macs used for teaching multimedia skills to budding journalists. Students learn to produce stories in tools such as Final Cut Pro and iMovie, ProTools, Photoshop, Dreamweaver, BBEdit, Flash, Cleaner, Quark, and others. These students are not, by and large, geek users - these are journalism students being exposed for the first time to a lot of new software in a short period of time. Our challenge is to find just the right balance between technology and journalism skills, and to make the process as easy as possible.

As the resident OS X zealot, I was pegged to investigate the feasibility of upgrading the Greenhouse machines to OS X. Sounded great to me. In the past six months, I’ve migrated myself, my wife, my father, and my landlord over to OS X without incident and expected this job to go similarly. I started by roping off one machine and setting it up as a prototype. What quickly became apparent is the fact that an institutional upgrade has a lot more baggage attached to it than a personal upgrade.

Consider the case of DigiDesign ProTools. There is currently no carbon/cocoa version of ProTools, and DigiDesign has been maddeningly silent on the issue. To make matters worse, ProTools is one of those rare apps that won’t run in Classic mode. DigiDesign’s silence makes my job difficult, since I have no idea whether to tell my boss we can go ahead with our plans or not. If it were just me, I would switch in a hot second to one of the other OS X-native multitrack audio mixers out there, like Bias Deck. But it’s not just me - we have a curriculum built around ProTools because it’s an industry standard. To switch to another product would also mean finding a new teacher for that part of the class. There’s a domino effect here.

Meanwhile, Quark just released version 5 without OS X support - doh! If it were just me, I’d switch to InDesign. But it’s not just me - we have the responsibility of teaching the industry standard to our students. We could run Quark in Classic mode, but we’ve heard a few scary stories about Quark in Classic.

Update: A reader with more intimate Quark involvement than us wrote in with the following comment:

… i can tell you first hand that there are ABSOLUTELY NO problems with quark in classic. we are a prepress shop, and have done a great deal of investigating OS X. the only reason we cannot switch now, is proprietary software from creo/scitex.

And then there are the peripherals. Most of our goodies work - CD burners and USB floppy drives, most of our printers, iMics, etc. etc. But what about the Nikon film scanners? No joy. And HP doesn’t post drivers for the flatbed scanners we run (though their support dept did assure me that drivers are on the way).

So while everything else on our list of apps is available in Carbon/Cocoa versions, ProTools, Quark, and device support are beginning to conspire against me. Classic mode isn’t going to cut it for these three, and I’m not even sure that would be the right solution anyway. I have numerous misgivings about Classic mode — for example, a lot of student data is stored on network shares mounted over an SMB network, and the file panels in classic apps don’t even see SMB mounts. That’s a big enough problem in itself to make Classic mode a non-starter for us.

That leaves the possibility of having students boot physically back into OS 9 for some classes or tasks. OK, that works, kind of. Except for one thing: We wanted to use the security features in OS X to lock down the Preferences panels. With those locked down, students can’t reset the boot volume without an admin password. Oops. Then again, we could just forget about the preferences security. But do that, and we’re still left with the fact that students are going to end up leaving machines booted up into one OS or another, thus frustrating the next student to approach that machine.

Consider also the probability that a student working on a project will need to use ProTools in OS 9 and FinalCut in OS X, or some other mixed combination which will ultimately throw a technical obstacle into the student’s path. While booting to another OS may seem trivial to you and I, you’d be surprised how much extra hassle it can mean in an environment like this. Not to mention having to explain how to share the same data between different apps on different operating systems on the same hard drive. Conceptually, it’s confusing to non-technical users.

Short story: After much discussion with other tech staff here, we’ve decided to do a slow rollout. I’ll install OS X on the machines, but we’ll only use it on an as-desired/required basis. For example, I’ll use it to teach my database development class, and our photo teacher may boot OS X for the sake of iPhoto. But aside from that, we’re going to push forward with another semester of OS 9.

So here’s the irony: Steve Jobs stands on stage next to a coffin and tells the world that OS 9 is dead. I’ve swallowed plenty of that tasty Apple-brand Kool-Aid, and firmly believe that OS X is operating system nirvana.

And yet, because the industry at large moves so slowly, we’re hamstrung. Apple has provided transitional tools (e.g. Classic mode), but it’s not good enough. We’re dying to make the switch, but can’t. What’s good enough for the geeks is not necessarily good enough for the gander.

I’ll keep you updated on our transition as the year progresses. I wonder how many schools and businesses are in similar straits right now….

How has your organization dealt with the “missing pieces” problem?

AddThis Social Bookmark Button

Related link: https://www.malcolmadams.com/itunes/scripts/scripts02.shtml

Rip A Few My Way and Quick Convert provide the best solution yet to the problem of duplicating audio CDs using iTunes.

I posed the problem a while back in this blog and received a decent amount of feedback and ideas from other users. Bruce Stewart provided the link to Doug Adams’ Rip A Few My Way which I love.

This applet lets you import tracks from a CD using iTunes, but allows you to do so without having to change your preferences in iTunes. So if you normally rip MP3s you can use this script to import as WAV (or AIFF) files. Conveniently, Rip A Few My Way also creates a playlist of the just imported tracks, which you can then use to burn an original quality CD.

Doug recently posted a new script Quick Convert which you can then use to convert your WAVs to MP3s, eliminating the need to delete the WAV files and re-import the tracks as MP3s after you’ve finished burning the CD.

Its still a number of steps, and not as efficient as a simple disc copy would be (if that worked), but its the best solution I’ve found.

Do you have a better way to copy audio CDs? Let us know about it.

AddThis Social Bookmark Button

Related link: https://www.apple.com/switch/

Apple has a marvelous new “Switch” compaign, with
Top 10 reasons, answers to Top 10 questions,
stories — emails from folks just like you who’ve switched from PC to Mac –, a
Guide to switching, and an ad campaign featuring writers (like Mark Frauenfelder of
BoingBoing), sysadmins, DJs, PR consultants, et al.

More people are interested in switching from PCs to Macs than ever before. See why they made the change and how easy it was.

A New York Times article on the campaign quotes Steve Jobs on Apple’s delicate dance with Microsoft: ‘”Our relationship with Microsoft is really pretty good,” Mr. Jobs said. “What’s a few market-share points between friends? It wouldn’t matter to them, and we would be eternally grateful.”‘

Switched? Considering the switch? Why? Why not? Why now? Why not yet?

Brian Jepson

AddThis Social Bookmark Button

Related link: https://www.csharphelp.com/archives2/archive317.html

C# Help: “This article takes a brief look at Mono and explains how to install the software and start some simple programming.” This is a nice how-to article that helps you compile, install, and play around with Mono.

Scot Hacker

AddThis Social Bookmark Button

Just when you think you’ve seen every frustrating browser issue a webmaster can hope to be frustrated by… another is sure to come along.

Recently I got a call from a client that some people were having trouble logging into an alumni database I had built for them. I tested these people’s logins in every browser I had handy and they worked fine. No one else was having problems logging in. So I went to the job site (meatspace, mind you) and sure enough, I couldn’t log in as anyone from two machines, both running IE6. Javascript was enabled. Cookies were enabled. What the heck was going on?

The site uses HTML hosted on a virtual domain at earthlink and database data coming from phpwebhosting.com, all married together in a frameset. Login authentication is handled via PHP sessions.

So why weren’t any logins working from IE6? This one took quite a while to figure out.

First of all, PHP sessions are really just a simplified wrapper for a specialized form of cookie. So start with the realization that cookies aren’t getting planted even though cookies are enabled in the browser.

IE6 has a cookie tolerance slider that defaults to Medium. On the Medium setting,

“Internet Explorer prevents Web sites from storing third-party cookies that do not have a compact privacy policy or that use personally identifiable information without your explicit consent. The browser also prevents Web sites from storing first-party cookies that use personally identifiable information without your implicit consent.”

Compact Privacy Policy? That’s a new one on me. So I look it up. Ah. So now I have to find out how to implement a compact privacy policy. The spec is out there, but I decide not to read the entire thing. CNET has a good overview of what webmasters are going through since IE6 was released.

Finally, I find the deployment answer in a PHP forum. It turns out that this problem affects my site only because it pulls data from two different sources. A user at php.net writes:

“MSIE 6 has an inaccurate definition of third party cookies. If your domain is hosted on one server and your PHP stuff is on another, the IE6 P3P implementation considers any cookies sent from the second machine “third party”. Third party cookies will be blocked automatically in most privacy settings if not accompanied by what MS considers “an appropriate Compact Policy”. In order to make this new piece of tweakable garbage happy I’d suggest you’d par exemple send

header(’P3P: CP=”NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM”‘);

before sending your cookie from your second machine. This header enables your cookie to survive any privacy setting.”

So in the end I went to privacycouncil.com and filled out the wizard, which generated a CPC similar to the one above, and started spitting it back to the browser from the top of the site’s authentication code.

What a huge hassle. And I shudder to think how many sites this going to affect. Mind you, the intention behind it is good. But in practice it’s virtually useless, since you can literally make up the privacy policy - the technology doesn’t have any necessary bearing on ACTUAL company privacy policy. In most cases, the frustrated webmaster is simply going to fill out a wizard like I did and implement a pseudo-accurate privacy policy, rather than taking it to management. So what you’re left with is a lot of hassle and a lot of broken sites, but without any guarantee that user privacy is any better protected than it was.

Scot Hacker

AddThis Social Bookmark Button

Lots of talk about Apple’s beta release of QuickTime 6 with MPEG-4 support, but few people are talking about the new free broadcasting software they released alongside QT6.

If you’re not familiar with the genre, broadcast software sits between your video camera and your streaming server software (which may run on a dedicated QuickTime Streaming Server machine or on the same machine, if your webcasting needs are light). Its job is to resize/scale the incoming video, decrease the framerate, run it through a given video codec, and do similar bandwidth-reducing magic on the audio channels. More sophisticated broadcasting software accepts feeds from multiple cameras and lets you insert scrolling credits, external audio sources, audio and video stored in files, graphics, etc., directly into the live feed.

We’ve been looking for the perfect broadcasting software for our needs at the jschool, and have been looking forward to this release with curiosity. Notes on the beta:

  • Very slick, easy to use, OSX compatible. Seemed totally stable in the two hours I ran it. Worked fine with the DV audio, no need for external iMic input.
  • Does do archiving - simultaneously saves the live feed to hinted QuickTime for later (asynchronous) use on the streaming server.
  • Built in MPEG4 support worked excellently. Licensing issues could still cloud MPEG4 feasibility, but the technology is there. The stream was very high quality for the bandwidth. Sending MPEG4 streams requires people to upgrade players and plugins once again - might be best to wait a year on that for client ease of use, but we can discuss later. Sorenson also worked as expected.
  • The downside is no mixing - no ability to mix multiple camera feeds, or scrolling titles, graphics, or anything else into the feed in real time (though we could still do that with a physical in-line video switcher.

It’s not yet clear whether Apple will do a Pro version with mixing capabilities in addition to this free version. For now I recommended that we use this free version for future conferenc