1972 Wella Balsam ad, from A Word From Our Sponsor, about mainstream advertising’s co-option of the 60s/70s counterculture.
Archive for the 'Uncategorized' Category
Unable to resist the allure of such advanced technologies as comments and a proper archiving system, I have switched my blogging software to WordPress.
Sorry for the RSS-reader hiccup I will presumably cause . I also took the opportunity to work on the stylesheet for the site a little bit. Please let me know if anything doesn’t work right…
Oh, and I must report that I have failed to keep my permalink URIs from changing. And I am suitably ashamed.
Bram Cohen (the BitTorrent guy) posted one of the programming challenges he apparently uses in job interview screenings:
What is the exponent of the largest power of two whose base seven representation doesn’t contain three zeros in a row?
It’s implied that the solution should involve some coding. Here’s the original entry; here’s my take on a solution. The comments on Bram’s entry make interesting reading (it’s not quite what you might expect), but have a go at a solution first if you’re going to .
I don’t wish to make high-handed comments about software licensing and its associated attitudes, but this makes me so glad I don’t rely on much proprietary software any more:
…I insert fake bugs just so I can publically embarass crack users. Future crack-specific “bugs” won’t be as blatant as this one – they’ll involve annoying changes to functionality, unexpected results, etc.
Oh, how shall I reverse the order of lines in a file?
(thanks, Vim manual chapter 12!)
From the shell:
tr "\n" "#" < myfile.txt |rev|tr "#" "\n"|rev
(Watch out for #s in your source file)
Update: GNU Textutils includes
cat backwards…) which reverses the lines of its input.
I just noticed that the whereis.com.au API has been opened up to developers (right after I was presented with a 1997-esque “please use one of our approved browsers” roadblock-page when trying to visit the main site). Menno says that they had an API of some sort available a year ago when he asked them about it, but they wanted money, so this is a definite improvement.
I would actually be more interested in seeing an API for the Sydney Transport Infoline. There are plenty of interesting things that could be done with the trip planner: Dynamically-updating mobile apps (“OK, you missed that bus, instead catch this one”); next-bus-home desktop/dashboard widget showing the next few departure times for your commute home; GPS data (“get me home from here”), etc.
Jeremy Zawodny’s talk proposal From Open Source to Open APIs last week got me thinking about this stuff a bit more: To me, an API is usually something that provides some kind of functionality. But the value of what’s being wrapped up in many of the popular web APIs (Google Maps, Flickr, Facebook, etc) is really the data the APIs can work over. The fact that it used to be hard to make web sites that use maps, for example, has less to do with a lack of mapping software and more to do with a lack of legally unencumbered map data.
So why have web APIs at all in these cases, instead of big lumps of free-licensed data for anyone to integrate? The most obvious answer is that most of this data changes frequently: When this happens, the main value isn’t the body of archived information, but the provider’s promise to be up-to-date (services, not intellectual property, to frame it in familiar terms). But the data encumbrance problem doesn’t go away by itself: Unless the data (static and dynamic) is available under a free license, ‘open’ APIs are a huge vendor lock-in: End-users are still essentially relying on a data monopolist at the back-end, and application developers are still ‘sharecropping‘.
It’s almost impossible to see how allowing Apple to sell DRM-free music through iTunes would make piracy worse. Music piracy is already rampant. There is not a single song on iTunes that can’t be downloaded for free from a P2P network.
Perilous to all of us are the devices of an art deeper than we ourselves possess.
– Gandalf the Grey [J.R.R. Tolkien, "Lord of the Rings"]
The first Google Techtalk made available on Google Video was a talk on ‘Zero Configuration networking’ by Stuart Cheshire in 2005 – I just got around to watching it. Here’s a summary of the most interesting bits (long and very nerdy):
Zeroconf was developed at Apple, and has been marketed as Rendezvous, and subsequently Bonjour. It’s designed to allow networked devices to be plugged in just like you can plug a lamp into the wall. It’s largely inspired by AppleTalk. Here’s how it works, roughly, for a system connected to a new network with no infrastructure (so no DHCP, etc):
- Randomly choose a 169.254.* IP address
- Do an ‘ARP who-has’ on that address, and take it if no-one responds
Now you have an IP address, but what about DNS names? First, we need a way to do DNS lookups (remember, we haven’t been told about any nameservers):
- Standard DNS requests in Zeroconf are sent out as multicast
- Zeroconf devices respond to multicast DNS lookups (the ‘mdnsresponder’ daemon you may have seen running on your machine): In the basic case, every device simply responds to lookups of its own hostname
So now we can pick a unique name:
- Choose a name ending in ‘.local’
- Perform a DNS lookup to see if this name exists, and consider it yours if no-one responds
Service Discovery (DNS-SD)
Service publishing/discovery (i.e. devices telling the network what then can do – “I’m a printer” etc) is implemented using obscure but apparently standard features of DNS, most interestingly SRV records. These are fascinating: They allow a given hostname to resolve to an IP address and a port, instead of just an IP address (for example: www.maebmij.org would point to 188.8.131.52:80). This is described as addressing an oversight in the original design of DNS – and he suggests that assuming a hard-coded port for each service is a hack resulting from it. (What are the implications here, outside of Zeroconf? You could replace webserver name-based virtualhosts with a range of ports, and corresponding DNS entries, for example. But it does increase reliance on DNS, since you could no longer (for example) ssh directly to an IP address.)
So, what steps are needed for service discovery for, say, finding IPP printers?
- First, we issue a multicast DNS query asking who talks IPP:
_ipp._tcp.local PTR ?
– in other words, please give me all PTR records (i.e. other names, or perhaps ‘aliases’ if that’s the right term) for this name
- All Zeroconf devices listen for such requests, and if they see one which describes them, they respond with a standard DNS response about themselves, again via multicast:
_ipp._tcp.local PTR My Laserjet._ipp._tcp.local _ipp._tcp.local PTR photoprinter._ipp._tcp.local _ipp._tcp.local PTR Fax printer._ipp._tcp.local
So we now have a list of the names of printers we can use.
- Let’s use ‘photoprinter’: We need to know its IP address, and the port on which it’s listening, so we look these up using SRV records, described above, and ask for any metadata available as a TXT record while we’re at it. Here’s what a response might look like:
photoprinter._ipp._tcp.local SRV 0 0 631 chewbacca.local photoprinter._ipp._tcp.local TXT pdl=application/postscript chewbacca.local A 192.168.1.60
In other words, “photoprinter is a service on port 631 of chewbacca”. Note that the last line wasn’t explicitly requested (we didn’t know about the hostname ‘chewbacca’ until after receiving the first line) but the system helpfully gave it to us anyway – again, standard DNS.
Other neat things
- To avoid ‘chattiness’ (which appletalk was accused of), responses and announcements are cached by all clients listening passively on the network – this is simple because the whole conversation occurs in multicast. One neat feature of this is that if a service goes offline, the first client trying to use it will fail to resolve its name into something useful (since it isn’t there to speak up). The client then tries to reconfirm the original PTR record. If this fails, all the other Zeroconf nodes notice and update their caches.
- He mentions that if Zeroconf had been standardised ten years ago, it could have been where USB and Bluetooth are today – a universal interface with ‘plug it in and it works’ functionality, but with an opportunity for more nodes, longer cables, diverse physical media (wireless!), and lots of existing IP-based protocols (eg file exchange). Interesting to think about… could an ethernet controller be as cheap and small as a USB one though?
- Nokia N800 linux tablet – not exactly sure what it can do, but it’s at least another attempt at improving the state of mobile computing.
- In case you’d like to see this sort of thing: Internet millionaire Anshe Chung being attacked by giant flying penises during a CNET-organised press interview in Second Life. Make what you will of this; I’ll just comment that if Harry Potter-style magic really worked in the real world, we now have some idea of what it would be used for.
- I watched Triumph of the Nerds recently – it was really good. One of the stories was about VisiCalc, the first spreadsheet (and the way the documentary tells it, the first killer app of any kind). The idea was never patented, and so once Lotus 123 came along, the inventors stopped getting any money, and are now conspicuously less wealthy than many of the other players in the early computer industry. I did some googling, and Dan Bricklin, the inventor of VisiCalc, has some interesting comments on software patents and VisiCalc on his blog.
A bit of work-related musing about natural language question answering (eg AskJeeves) for individual web sites:
Most of the time, when I search a site, I’m looking for a document, rather than an answer to a specific question – eg campus maps, unit home pages, API function lists… In this sense, the search field is like asking for directions on the street – my questions would usually be “where is the…” or “how can I find…” which aren’t actually looking for literal answers but ‘directions’ to some object.
I think there’s a parallel to surgeon-in-operating-theatre language for this kind of thing – “scalpel!” instead of “could you pass the scalpel?” – it’s obvious what is required, and it’s quicker and less ambiguous to specify exactly what you want without wrapping it up in an indirect speech act.
One of the talks at SummerFest last week mentioned a natural language interface to a PDA, where users could say things like “show me a map of this area” – the researcher said that the users in their test quickly discovered they could just say “map” and get the same response, and thereafter preferred that mode of interaction. I think this suggests the following:
- Full questions for straightforward requests are a chore which we only perform when we have a ‘theory of mind’ about the listener, and thus want to be polite.
- The AI behind QA hasn’t proved itself to be good enough that we trust it to answer complex questions, so we try to take control by giving it what we feel are specific, unambiguous commands or patterns.
A change in the latest MacOS Leopard build: “3D audio cues to indicate locations of items on the screen in the VoiceOver screen reader“.
What an awesome idea! With enormous screens, it would make more and more sense for the plinky beepy noises in the user interface to locate themselves using the system’s surround sound. If you receive a new chat message, it makes sense for the new-message sound to come from the little chat window forgotten in the corner of the screen.
It’d be interesting to consider what it should sound like when minimised applications make a sound (does it ‘come from’ the minimised app tray/dock? Does it sound muffled?), or applications sitting on other virtual desktops (distant and echoey? ‘Through a wall’?).
|Original Mozilla Phoenix (then Firebird) logo||Official Mozilla Firefox logo||Current Debian and Ubuntu Firefox logo||Proposed Iceweasel logo|
Background: To protect the Firefox brand/quality from damage, the Mozilla organisation has asked that all changes to Firefox by third-party distributors be submitted for approval, or the “Firefox” name not be used. For some time now, Debian and Ubuntu have not shipped the official Firefox logo because of copyright restrictions (again related to ‘protecting the brand’), and now they’re talking about changing the name, as well, which gives them the excuse to replace the current blue globe with something cuter.
Also, I thought I’d point my readers to James Crisp‘s new blog while I’m here . (Update 2007-07-30: Changed blog URL, since James moved away from blogspot).