WARNING: This blog contains random thoughts on technology, software engineering, and general all-round nerdery. Read at your own risk. Nerd is contagious.

Thursday, September 20, 2007

Dying CMU Professor gives his last lecture

Saw this through digg today, excerpts from a bittersweet but inspiring lecture by a Computer Science professor at Carnegie Mellon University:


I watched the entire lecture, which is available in a few places. It is worth it if you have the time (about an hour and a half):


Download (250 MB)


Streaming Version

Sunday, September 16, 2007

Fix for long iPhone sync times in XP/Vista

Update: This problem exists in XP as well, so I've updated the post title.

So I've been having some ridiculously long sync times and I couldn't figure out why. I have a pretty fast dual-core machine with 2GB of RAM running Vista Ultimate and iTunes 7.4.1

Ok, here are the relevant sync items:
  • Lots of contacts
  • Lots of calendar events (dating back a LONG time)
  • No ringtones
  • 1GB of music (all mp3s, none from Apple Store)
  • 6 pictures in 2 folders (4 and 2) in 50GB user "Pictures" folder
  • No Podcasts
  • No Videos

I went and systematically unchecked everything to sync and added everything back one by one, and the one that causes the long delay for me is syncing photos.

If i have photos unchecked, everything syncs and it's fast (7 seconds). It turns out that even iTunes will search the entire folder for sync-able items, even though you have only certain sub-folders selected.

In particular, I have about 50GB of photos in "E:\Digital Pictures" which Vista considers as "Pictures" (I moved my "Data" folders to a separate drive a while ago, like so: http://www.edbott.com/weblog/?p=1371 )

Even though I'm *only* syncing with 2 sub-folders with a total of 7 pics (435K total!), it seems that all the other folders in Pictures also get searched in the sync, even though I don't have them selected. The delay is caused if at least 1 photo is to be synced.

Example:
Solution: Don't have your iPhone Pictures sync folder in your My Pictures folder (or, I guess any folder with LOTS of pics)
I hope that helps someone else, because it is now a huge relief that I can now sync my iPhone without having to go get a cup of coffee :-D


Narrowing it down farther...
Since I don't want to to move my pictures around or mess with user data folders, these are some questions I hope people can help answer by talking about their own sync experience. Is it because...
  • there are 50GB of photos in that folder (even though we're sync 7 of them)?
  • it's the *special* Pictures folder for a user (My Pictures in XP)
  • the user data has been moved to a separate drive than the Vista install (e: instead of c:)
  • there's something in my 50GB Pictures folder that iTunes doesn't like?
(I also posted this on the excellent HowardForums)

Wednesday, September 12, 2007

iPhoney


So, long story short, I ended up buying an iPhone. I really wanted to wait for the 2nd gen phone (rumor is that the 16GB HSDPA-enabled version out in November), but I had a $125 Mall gift card burning a hole in my pocket which was about to expire, and then came the $200 drop in price, so... yeah.

As revolutionary as the iPhone is, it is a 1st gen product. Many things which we are used to on smartphones do not exist in the iPhone (although many of those "features" are not necessary). I think Apple did a great job of identifying what are the key features in a communications devices and optimized it for that. Everything is a tight and focused experience.

I am still amazed at the apparent lack of all "lag" in a device as small as this. I thought that surely the user experience has to be a little slow, right? If you've every used a Windows Mobile device, you'll know what I'm talking about. However, everything is silky smooth, transitions between apps don't stutter, scrolling is always smooth. It's almost like everything in the OS is always in L2 cache (screw RAM!)

We've all heard that AT&T's EDGE network is slow and horribly crappy. I've had a Cingular 8125 (HTC Wizard) before the iPhone, and let me tell you, browsing on that phone is about clicking a link and then finding something else to look at for 2 minutes. After viewing the same pages on the iPhone, I am surprised how much of that delay was also due to 8125 being a crapfest! I mean, I'm not giving AT&T an award here, the EDGE network is much better on the iPhone than it is on the 8125.

Anyway, call be Debbie Downer, but I like to gauge devices by what they can't do. So here's what I don't like:

I don't know what it is, but I hate iTunes.

Unlike other Apple products, it just feels slow, bulky and resource hungry in Windows. Just scrolling your library is cringeworthy. I have a fairly powerful machine too: Dual Core X2 Athlon 64 4400+ with 2GB of RAM, yet iTunes is just... slow. Like an app that's dying for a lite version.

The iPhone doesn't have disk mode like other iPods.

I don't know if it's a technical or legal limitation, but it's a big problem for me. You see, I use the excellent Winamp to manage all my music and transfer music to my iPods. This is possible if disk mode is enabled on the device. Even from iTunes, I cannot manually choose what music goes in my iPhone!! I have to "sync" my music. Thanks Apple, that's great - I'll take my 160GB of music and videos, and have you decide which of my music I should listen to in my 4GB iPhone. Oh what's that? If I have my media distributed across different machines I'm screwed unless I sync only with one computer? Hey, now we're talkin!

A common "workaround" is to make playlists for everything to get it on the iPhone. But this is exactly the type of cumbersome user experience that I thought Apple shunned. I mean, they practically invented drag & drop-style intuitive experiences!

UPDATE: I'm not the only one.

Sorry, back to iTunes for a sec: When my iPhone is syncing, one of my CPUs hits 100%.

I didn't notice until I looked up at my Winbar that one of my CPUs was crying for help. In that particular sync, I had modified 4 contacts on the phone. It takes me like 15minutes to finish one sync! Maybe it's a Vista thing, but Sheesh

Unlike other people, most of my gripes are with iTunes experience. The device itself has been excellent so far. I'm glad I replaced my 8125 for it. Now it's time to hack the thing :)

Some of the cool stuff I'm interested in are the XBMC Remote. A list of cool hacks/sites are aggregated at TUAW's iPhone Page.

Wednesday, September 05, 2007

What Flex needs: A proper HTML component

One of the upcoming features of Wimzi is (hopefully) emoticon support. Since I'm new to Flash, I didn't think much of it because the TextArea control (mx.controls.TextArea) could handle all the HTML I'd thrown at it so far. That is, until I tried to put a wee little <img> tag in there.... holy line breaks Batman!

Flex has the same issue (as it also uses mx.controls.TextArea). Some solutions I've seen vary from crazy to ingenious, but none of them seem very elegant:
  • Use a separate "layer" for emoticons over your textArea
    • This is computationally expensive, not to mention probalby a pain in the ass to do. This wold involve calculating the width of every characters and leaving enough space in the text layer to handle an emoticon, then another layer (with only emoticons) would be composited on the text, making it look like it's part of the text.
    • I can't imagine doing this for a text control that could potentially resize, not to mention dealing with scrolling.
    • I think this is what userplane's excellent WebMessenger app uses.
  • Use an Iframe from the surrounding webpage and "place" it where you need to, making it look like it's part of your Flash app.
    • You make an ExternalInterface call to the outlying JS to make you a div, and then control the position and height of that div. The absolute position has to be calculated using the localToGlobal() function in Point.
    • The problem with this is that you are now tied to the browser
    • Your flash becomes less embeddable in things like Facebook because they might prevent the creation of div tags, etc.
  • Create your own "emoticon" font!
    • Embed a custom "font" of your emoticons into your .FLA or Flex project, and then just insert into your text as just any other text.
    • Seems the most elegant, though very specific to emoticons
    • Doesn't help for any other HTML features (Buddy Expression wallpapers, etc)
    • Corey suggested this one, but I don't know yet if it will work.
All of this results in feeling like Adobe really should have provided us with a way to have bits of HTML work correctly within the Flash runtime. They have added this for the AIR runtime - those lucky guys get an "HTML" component based on the Webkit platform (what Apple's Safari browser uses), but the web world has no such luck. Perhaps in the future they can provide us with some sort of an "official" workaround or just fix it outright. I mean, we are supposed to be making RIA's, right?

Labels: , , ,