11.17.06

Slow network connections and how software lets you down

Posted in Apple, Tech/Geek at 11:49 am by Craig

As broadband connections become increasingly commonplace, at least amongst the set of folks who write software apps, and in particular open source apps where there’s no sales and marketing people reminded the engineers that there’s still lots of narrowband out there, applications have started sprouting a mass of features whcih automatically kick off data communications whenever a network connection appears. This is horrible when your “normal” connection is fast, but when you take your laptop somewhere and are connecting by EDGE, or what passes for broadband at a seaside hotel in Barbados, you end up having your very narrow pipe filled with all this somewhat useless “junk” data. This problem is especially nasty when you’re on a fleky link which loses a substantial percentage of the packets sent over it, when your DNS service is flakey, or when your connection tends to get disconnected (and requires reconnection) generally within a few minutes of the original connection. The disconnection/reconnection thing will often lead to this situation:
  1. Connect
  2. All your apps (firefox, IM client, dashboard widgets, software update, each individual app’s update-checker, etc, etc) suddenly kick off their HTTP requests (first of course sending a DNS lookup request for their relevant hostname)
  3. Pipe is clogged for a minute or two with all this junk flowing back and forth (it’s all TCP of course, no UDP here except maybe for DNS, where ironically you probably do actually want the packets to get through more reliably so these apps don’t all hang while waiting for DNS to maybe timeout, or maybe succeed on the 4th retry with 3 timeout delays before it works)
  4. Pipe has now been up for too long, so Cingular drops your EDGE connection
  5. Go back to step one, repeating step 2 as well for the new pipe.
Result: you can not actually use your link for “real” data flows. Even if all you wanted to do is, say, connect to your webmail and scan subject lines for urgent items, or maybe do the same via IMAP. So here’s my proposal to software folks: implement a system-wide “Operate in crappy link mode”, and then have all applications check for crappy link status before firing off their junk data trawls. Heck, I’m so bugged about this after a week of suspended productivity that I think I’ll learn enough Cocoa to actually write a Mac control panel or something to implement this flag. Then, when you go on vacation, you just go to the control panel and turn on crappy link mode. For that week, your software updates and background RSS polling and Plaze updating anbd whatnot is just put on hold so that you can actually get shit done. [update] reformatted now that I’m back in decent-connection land

06.15.05

Just picked up a dashboard widget for blogging

Posted in Apple at 7:43 pm by Craig

So I just installed a dashboard widget which lets me easily post to the blog. Hopefully this will mean I post more stuff, more often.

05.02.05

How to be a retarded software engineer (part 1)

Posted in Apple at 6:03 pm by Craig

This post will be a short one, but is just a teaser taster for my longer Tiger observations to come. To understand this post, know that Azazel is the machine which hosts my uncompressed Maildir-like email server. Pookah is my freshly-tigered powerbook. Summary: azazel craig # du -sh /var/spool/imap/user/craig/ 3.7G /var/spool/imap/user/craig/ [craig@pookah:~/Library]$ du -sh /Users/craig/Library/Mail 6.2G /Users/craig/Library/Mail Slightly shorter summary: Retards.

02.23.05

Quicksilver Vonage Dialer

Posted in Apple at 6:07 pm by Craig

I finally figured out (with some help) how to get Quicksilver to dial a phone number using my Vonage account and click2call. Implementation is as an applescript which gets passed the phone number to call as a text string, which it then munges into the URL which it invokes using curl. Script available for download here.

12.06.04

Safari DNS failures

Posted in Apple at 5:43 pm by Craig

Safari has been failing to load pages from newly visited domains for a little while now. It’s been increasingly irritating. And I’ve noticed a number of people complaining about it in a range of mac forums, so it clearly is a pretty widespread problem which has cropped up recently. It looks like it’s due to some relationship between IPv6 and certain DNS servers — I haven’t tracked down exactly what the issue is yet. But I have found a work-around solution which works for me. Namely, to bypass my LAN DNS server if it’s failing to respond by adding my ISP’s DNS servers to the list of DNS servers advertised by my DHCP server. I’ve left my own DNS server at the head of the list, because for my LAN hosts I want to be able to resolve those names to their LAN addresses, which aren’t in the public DNS. So my /etc/dhcpd.conf now includes the line: option domain-name-servers 10.0.240.200,216.38.128.2,216.38.128.3; Of course, you should use your IP addresses, and not mine.

10.10.03

Odd listening combinations

Posted in Apple at 5:32 pm by Craig

Not sure exactly what’s going on at the Apple Music Store: But then if you click the Walter Cronkite link, you get to a page where it says they don’t actually have any Walter Cronkite recordings for sale…. So is this a database bug, or an easter egg? Update: So if you *search* for Cronkite, you do actually get 1 album listed: “I can hear it now the sixties”. Plus a few albums which are Walter plus others. But the link from the Public Enemy page isn’t live for some reason — it just takes you to an empty page. And even if there is a Cronkite recording for sale, it does not explain in any way how it could be linked to Public Enemy by purchases, especially since there doesn’t seem to be enough data on the Cronkite recordings to be able to link him back to anyone else… I suspect it must be either DB corruption or an easter egg. Update 2: The Baconizer to the rescue (sort of). As expected, it’s a pretty long path. The connection no longer seems to exist on the Apple Music Store any more though, so it looks like whatever the issue was, it’s gone now.

08.27.03

Issues I have with Applescript

Posted in Apple at 4:12 am by Craig

Applescript is often very useful for doing scripting of Mac apps, and stuff like osascript makes the integration between the fun happy world of *nix and OSX more pleasurable.
But there’s some seriously annoying stuff in Applescript. For example, there’s no event notification service to let you know when something happened in a scriptable application. It seems to me like it ought to be something that Apple built into OSX. Doesn’t seem like it would have been hard, and boy oh boy would it have been useful. Yes, you can make Applescript-callable server applications, which expose functions which can be called from outside. But what I’m talking about is my being able to write a script which monitors some other application for important things, and functions in my script get called when those important things happen. For example, let’s talk about iTunes. I want to write a script which does something whenever the currently playing track in iTunes changes. Only way to do that today is for me to constantly poll the iTunes application and ask it what the currently playing track is, remember what the previous answer was, notice if the answer is now different, and then call myself to take some action. That’s really lame. What *should* happen is that any readable property that’s exposed through Applescript (or I guess through apple events) should be able to have an “onchanged” event registered against it. Then when that property changes, I should be able to get a callback. Not rocket science.
But instead, you’re forced to resort to brutishness: global latest_song set latest_song to "" on idle    tell application "iTunes"       copy name of current track to current_tracks_name       if current_tracks_name is not latest_song then          copy current_tracks_name to latest_song       else          doWhatYouReallyWantToDo       end if       return 10    end tell end idle That’s just retarded. What I want to be able to do is: tell application "SomeSystemService"    add doWhatIReallyWant as property change callback for current track of application "iTunes" end tell Then, all that’s required is the SomeSystemService app to be written (not hard), and for all apple event properties to have intelligent notification to that system service. Ideally, you’d want cooperation between the service and the apple event layer, so that no notifications bother happening if noone’s registered a callback against them. In OSX, the implementations of all these properties are subclassed from some OS-defined class anyway, so why would it not be possible to do this?
Ok, time to make dinner.

06.26.03

Reduce font-smoothing threshold

Posted in Apple at 7:36 pm by Craig

An alternate way to solve the Safari font-sizing thing is offered here. It shows how to reduce the font-smoothing option to a point size lower than the lowest option the General control panel allows. I’ve temporarily reduced the minimum font-size setting in Safari and turned on font smoothing for small fonts instead. Looks pretty decent at first glance; I’ll leave it configured this way for a while and see how I like it across a variety of sites.

06.25.03

Safari font rendering jacked in final release

Posted in Apple at 7:51 pm by Craig

I’ve updated to the final release of Safari, and it turns out that Apple has decided to change the way it renders fonts now. I used to have the default browser font set to 11-point (comes with 13 as factory default), because I like to get more text on my screen, and with my flat panel, font smoothing, and good eyesight, 11pt is extremely readable. With the setting at 11pt, even sub-normal sized text on webpages was completely readable, and looked good. Now though, with the final release, any default font setting sized lower than 13pt causes sub-normal sized fonts (eg [font size=1]) to be rendered too small, so that font smoothing is turned off for them (I guess that probably means 8pt or below, which is what I’ve got configured in the General control panel), and they become unreadable. If I set the font size to 13pt, then sub-sized text is readable again, but normal-sized text is now huge, leading to insanely more scrolling. Surely this is not the sort of thing one should be changing between a final beta and a full release? Also, since this whole Safari thing is built on Konq, how about exposing the Konq “Don’t draw any fonts smaller than x points” option? Doesn’t even seem to be there hidden in the properties file. sigh. I used to like Safari, now I’m going to have to go look at Mozilla options again. UPDATE: It looks like this says there *is* some hidden way of turning back on the minimum-render size. But carefully omits instructions on how actually to do it, or what the preference is! Re-UPDATE: Ok, I found it by hunting a lot. Looks like the name of the pref is WebKitMinimumFontSize in com.apple.Safari, so

defaults write com.apple.Safari WebKitMinimumFontSize 9
does the trick.

04.30.03

Apple Music

Posted in Apple at 7:21 pm by Craig

Revolutionary. Short Tower, go long on Apple and Amazon (who surely will implement this soon themselves). I installed iTunes 4, stuck in my .mac username (and after figuring out that I had to use username@mac.com instead of just username), and presto. $0.99 per track if you don’t want the whole album, or $10 for a whole album which is $15-20 at Tower or Amazon to get the physical media. I bought and downloaded The Eminem Show for $10 in less time than it took to subsequently burn it onto a CD-R to listen to in my car on the way home.

Songs are shipped as DRM-controlled AAC, but the DRM is quite lax enough for it all to make sense. I can do everything I reasonably might want to with the media once I’ve downloaded it, and it just sits alongside the rest of my digital music in iTunes. There are one or two restrictions that the AAC files have (can only install on 3 machines at a time, you have to alter a playlist if you want to burn it to CD more than 10 times) but really those are not situations you’ll often encounter, and you can always work around them if you’re really determined (you can burn a CD, then rip it back to MP3 for example). All in all, this is exactly what one needs from electronic music delivery. Not per-month fees, no ridiculous catalog limitations (200,000 track available from all the major labels — and I’m guessing anyone who might want to sign up would be able to). The record labels must be happy too — even at 1/2 the price they charge for an album on physical media, they likely get higher margins with this delivery mechanism, because their distribution costs are close to nil (apart from the presumable cut Apple is taking).

As Jeremy points out in his blog, there’s a bunch of stuff which could be done to extend this with Amazon-like recommendations (and I’m Amazon will be all over that when they roll out their version of this). But the big leap has been lept — convincing the record companies that electronic distribution of their products can and will work, and that it can be done in a way which is beneficial to both consumers and the labels/artists.

« Previous entries