Blogging on an iPhone

One of the first apps I wanted to get on an iPhone was one to let me post into my blog. And the first one I have installed and took for the spin was BlogWriter. It is a decent application but I have very soon discovered that it is too basic.

This may be a function of my Blogger setup — I have disabled automatic formating — but creating a longer post has proven to be a challenge.

But more importantly it allows one to post to one blog only.

My next stop was iBlogger. The app does have a more polished and overall nicer touch and feel, supports multiple blogging platforms (except LiveJournal). Unlike BlogWriter it does insert a few tags on its own (line breaks, mostly), but it cannot save drafts on a server and does not allow to edit published posts.

The next (and last) application I took for a spin was It supports only LJ for publishing, but where it shines is in quasi-rich editing capabilities that do not require constant switching between letters and symbols to insert HTML tags.

Mobile Blogging from here.

[Posted with iBlogger from my iPhone]


There’s something charming in a good non-Disney sense of a word about being in Vienna. Measured, balanced living. Beautiful streets with lots of green (or as the case was for me this time — covered in gold, red and brown colors of fall), buildings that each looks like it has just stepped down from the pages of fairy tales or is a materialization of Mozart’s tunes. The smells of the city — bratwurst here, Wiener mellange there. Sound of horse hoofs on cobble stones and bells of Straßbahn. There’s no rush on the streets, but none of the laid-back Miditerrainian laziness you’d see in the south of Europe. Just enough of ordnung to keep things nitly organized, but not too much for any diversity to be seen a danger to stability of boredom.

iPhone me

I have not held myself back for too long after the official launch of iPhone in Russia. No more than a few days, in fact. As I promised to myself, I went to a shop and played with the 3G model for 15-20 minutes. The plan was either that, or Nokia E71. I liked my iPhone experience, hence the decision was made.

It has now been a bit over a month that I have been using the device. There are things I like, and things I hate.

I like overall package. iPhone feels very nice both in your pocket and in the hand, it is ideal size for the purpose — any smaller, and the screen would be too small (something that would have bothered me on E71). Any bigger and the device would feel awkward when talking.

Having almost a desktop-quality experience always with you is also very nice. Your email, web browsing, news coverage, calendar always just a finger swipe away. A sad omission from this are notes an to-dos that one might manage within Mail or Outlook (if you don’t own a Mac).

There’s lots that can be picked up at the AppStore to further enhance the experience. From a multitude of calendar and to-do apps, to financial mamagement, astrological maps, and games. In fact, AppStore is one thing that quite a few of my jailbroken friends envy me for.

That said, there are things I can’t get used to. In no particular order.

  1. Copy/paste. Yes, everybody’s darling. One could get it to work by jail-breaking the phone and installing apps from Cydia,something I am still not planning on doing. So, for now my copy buffer (one of the things original Macintosh was so much praised for) resides either in my head or on a scrap of paper.
  2. Inability to send contact details. As a long-time Nokia user I am used to how easy it is to share contact details with your friends. Browse names, choose one you need, open it and choose “send business card” option. iPhone offers nothing like that by default and the apps I have seen in AppStore only email contact details, you can’t SMS or beam them over Bluetooth.
  3. Battery. Yes, another gripe of many. Last thing I want is to ever get stranded with my nice XXI century toy full of bells and wistles lacking juice to make a simple call. I am almost onto the routine of daily charging, but there still were a couple of cases I was on red, looking for anything else I can shut off to conserve power.
  4. Editing text. Besides copy/paste debacle, it would be nice to be able to select large area of text to delete. Blackberry can do that, iPhone should as well.
  5. Crash, baby. Even Apple’s own apps get shut down quite a bit. The most frequent offender is Safari (but it’s also most used one). Either it leaks memory or OS is not doing a good job of garbage-collecting after it. Either at, it is annoying. I sure hope 2.2 firmware would improve on it.
  6. SMS limitations. Again, coming from Nokia background its taken as given that I should be able to check all details of messages I send and receive. I can’t (or I don’t know how) on iPhone.
  7. Photos. Can I please have a way, not on my Mac, on my iPhone to check when and where the photo was taken? And while we’re there, maybe the basic set of editing functions (like color balance, crop, rotate, contrast and brightness adjustments) would be very cool.
  8. One last thing. Pun is intended. My old Nokia N80 supported task switching. It could also shut some apps down when memory was scarce, but I could still switch from a web browser to my contacts or a calculator without closing the browser.

Fixing iPod/iPhone/AppleTV syncing issue for iPhoto albums

If you ever come across a situation when iTunes refuses to sync your iPhoto library to your iPod, iPhone or AppleTV, and a very important symptom is that you cannot choose “Selected Albums” option in iTunes syncing preferences, chances are you have an issue inside the AlbumData.xml file within the iPhoto Library.

Luckily, the fix is rather simple:
  1. Open Pictures directory in Finder, locate your iPhone Library and Ctrl-click (or right-click) it and choose “Show Package Content…” option.
  2. At the top of the list you will see AlbumData.xml file.
  3. Drag it over to Safari (either on your dock, or drop it onto a URL bar of an open Safari window).
  4. Safari will report an error, note what line that error on, it is likely that it’ll say that was unexpected…
  5. Open AlbimData.xml file in your favorite editor and navigate to that line.  You will see something like this:
    <string>Some comment:<key>PhotoCount</key>

    Notice that string tag is not closed.  Insert a </string> right before the <key> tag (you can also add a new line after it, for clarity):

    <string>Some comment:</string>
  6. Save the file and try again iTunes, you should all be set now.

Netbook Remix

A few days ago I have moved back from XFCE4 back to standard GNOME Ubuntu desktop, while at the same time changing my desktop shell for Netbook Remix. This setup is much more convenient than standard desktop on my tiny EeePC 4G, as on one hand I do not need to mouse around as much, but at the same time it is not as limiting functionally as Xandros. And it is stable enough (although there are a few minor quirks here and there). Ten cheers to developers!

Limits of Django or limits of db back-end?

Fiam has posted a slightly controversial piece titled The Limits of Django. It is a great read, I totally enjoyed it. However, he has come up with some very shocking stats of Django ORM approach vs. C caching daemon (93 seconds vs. 0.8 second to query a database of 500,000 votes of 1,000 users on 5,000 stories. A few have suggested that his database/data model maybe to blame, I think there’s a great degree of truth to that. To try it out, I have created a sample database called django_test and populated it with a bunch of data like so:

-- users
create table users (id integer not null primary key);
-- stories
create table stories (id integer not null primary key);
-- votes
  story_id integer not null
     constraint story_id_fk references stories,
  user_id integer not null
     constraint user_id_fk references users,
  score integer default 0);
create index user_story_idx on votes (story_id, user_id);

Populating with some random data:

PSQL="/opt/local/bin/psql8 -q"
for ((i=1;i<=50000;i+=1))
    �$PSQL -c "insert into stories (id) values ($i);" django_test
for ((i=9922;i<=10000;i+=1))
    $PSQL -c "insert into stories (id) values ($i);" django_test
for ((i=1;i<=500000;i+=1))
    let "score %= 100"
    let "userid %= 1000"
    let "storyid %= 10000"
    $PSQL -c "insert into votes (user_id,story_id,score) values ($userid,$storyid,$score)" django_test

(Yes, this is very-very crude, I know)

Here are my results on PostgreSQL 8.1.3, running on a G4 PowerBook with 2GB of RAM under Mac OS X 10.5.2:

django_test=# select count(*) from users; select count (*) from stories; select count(*) from votes;
(1 row)

(1 row)

(1 row)

I gave up waiting for population of 500K rows into votes table and run a few selects like the following one as it were (inserts were still running on background and I have not done VACUUM ANALYSE yet):

django_test=# timing
Timing is on.
django_test=# select distinct(story_id), score from votes where votes.user_id=123 order by votes.score desc;
 story_id | score 
     3391 |    95
      812 |    94
     9215 |    93
     9599 |    92
     8510 |    85
      220 |    84
     8611 |    81
      740 |    78
     9193 |    74
     2406 |    70
     2201 |    61
     2740 |    59
     4500 |    52
     5993 |    52
     5692 |    51
     2912 |    49
     6566 |    49
     2950 |    48
     3149 |    47
       36 |    45
     1193 |    43
      629 |    38
     5720 |    36
     9429 |    35
      455 |    33
     6628 |    32
     2598 |    30
     2623 |    28
     2224 |    24
     6794 |    24
     2254 |    20
      934 |     8
     6267 |     8
     3999 |     7
     5879 |     3
(35 rows)

Time: 27.376 ms

That's less than 0.03 seconds. Not bad, eh?

The day I’ve opened up my WiFi

It is today, the day I thought to myself: “If Schneier thinks it can/should be done, why don’t I do it?” And I changed my DD-WRT settings to fully open up my wireless to anyone.

I’ve made some changes to QoS and DHCP setup. DHCP addresses will only be assigned to .64-.255 range and that range has been throttled down in QoS to bulk access status. If I could figure out a way (and I might, if I am motivated to do that), I’d also disallow the DHCP’ed clients to have access to file sharing traffic (only for economical reasons, as right now I am paying for high-speed access, but with bandwidth restrictions).