<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-16654167</id><updated>2012-02-16T16:51:49.645+05:30</updated><category term='UI Design'/><title type='text'>Kartick's Log</title><subtitle type='html'>Thoughts on programming, languages, software and computing.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>97</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-16654167.post-4943859826967848073</id><published>2012-02-16T16:16:00.002+05:30</published><updated>2012-02-16T16:51:49.657+05:30</updated><title type='text'>Thoughts on the Android Design Guide</title><content type='html'>Google (full disclosure: my employer) put out a design guide for Android, on the lines of Apple's Human Interface Guidelines. Here's what struck me about it. A + is for things that are good, and a -, well, for things that are not.&lt;br /&gt;&lt;br /&gt;- I'm surprised at the guideline that actions be placed at the top of the screen, because they are hard to reach, which is all the more important on oversized screens like the Galaxy Nexus.&lt;br /&gt;&lt;br /&gt;- In addition to the global back button Android has always had, there's now an Up button like on iOS and (surprise) both can behave differently. To me the global back button is &lt;a href="http://kartik-log.blogspot.com/2011/11/is-android-back-button-good-idea.html" target="_blank"&gt;confusing and just broken&lt;/a&gt;. Even worse is having both. Just get rid of it and let apps control navigation.&lt;br /&gt;&lt;br /&gt;- Some of the feedback to gestures isn't right. For example, when you scroll past the end of a list, it glows, rather than bouncing as on iOS. I can guess why the Android team chose that, but it doesn't change the fact that it is the wrong kind of feedback. The whole point of direct manipulation touch interfaces is that they present an illusion of touching the content directly, and a physical action (moving the content) warrants a physical reaction like bouncing, not a reaction of a dissimilar kind, like glowing or beeping. Another example is that the tilting animation when there are no more pages, which is a total non-sequitor:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-6ykSO6BTf3A/Tzzb9cRdwfI/AAAAAAAAwEQ/U-enIBcXvVI/s1600/touch_feedback_communication.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-6ykSO6BTf3A/Tzzb9cRdwfI/AAAAAAAAwEQ/U-enIBcXvVI/s320/touch_feedback_communication.png" width="241" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;- It's good that Android moved to an iOS-like home screen that pages rather than scrolls. Paging is better for the usual reasons — it gives you information in increments, rather than forcing you to keep track of what you already saw vs. what you didn't. When you scroll, you have to keep track of the last read item as it moves. Keeping track of a moving object is tedious by itself, but you also have to scroll till it just goes off the screen, while taking care not to let unread stuff go offscreen. Paging is a more automatic version of scrolling that relieves you of this tedium. Further, with paging, you can form a memory like "Twitter is on the 3rd home screen, at the top-right" which is harder with scrolling because things don't have fixed vertical positions on the screen.&lt;br /&gt;&lt;br /&gt;But Android still retains its drawback of alphabetical organization, which means that the icons all rearrange themselves when you install an app. You lose your memory of where something is, both consciously and muscle memory. The Gallery app was the last icon on the first home screen, but when I installed Facebook, it no longer is. Things that you know where to find become lost and you have to keep searching for them again and again.&lt;br /&gt;&lt;br /&gt;On the other hand, the alphabetic system helps you find any app, even infrequently used ones, which get lost all the time on iOS because you don't know where they are. Spotlight helps you find an app only if you know a good part of its name, while with an alphabetic system, you can find an app by knowing only its first letter. For example, I installed Seesmic, a Twitter app, but later forgot the name, except that it starts with S. Spotlight won't work for that, but Android's alphabetical system does.&lt;br /&gt;&lt;br /&gt;But finding frequently used apps is more important than finding infrequently used apps, since you use the former more often, by definition. So the iOS system is better than Android's alphabetical one.&lt;br /&gt;&lt;br /&gt;In addition, Android's two-level home screen is unnecessarily complex, with some icons on the home screen and others in an applications menu. A single list as in iOS is simpler and better. That doesn't prevent you from creating shortcuts to websites, contacts, etc and putting them on the first home screen. iOS already allows that for web pages, and it could trivially be extended for other kinds of shortcuts like contacts.&lt;br /&gt;&lt;br /&gt;Besides, Android's two-level hone screen precludes use of folders. Folders on the Android home screen don't make sense, since the home screen is supposed to hold shortcuts, and putting shortcuts in folders defeats the point of shortcuts. Folders make sense for the apps list, but are not available there.&lt;br /&gt;&lt;br /&gt;+ I like the recommendation to "use non-neutral colors sparingly and with purpose. " The focus nowadays seems to be on the content rather than the UI of the app itself.&lt;br /&gt;&lt;br /&gt;+ It's good that Android lets me set a font size globally. I set my desktop browsers to use a minimum font size of 16, though I'm in my twenties and can see perfectly well, just because it's more comfortable to read (try it!). With the move to native apps, we sorely need something like that, and Android finally delivers. I don't know what the impact on UI layouts will be, when everything is dynamic. Maybe it's not much, since developers can't assume a specific screen size (unlike on iOS) and so the layout has to be dynamic anyway. Web pages with a minimum font size of 16 mostly work fine, so the cost can't be high, and I'm happy to impose that cost on apps, because comfortably readable text is more important.&lt;br /&gt;&lt;br /&gt;+ I was skeptical about the onscreen home button controlled by the OS rather than the hardware home buttons that iOS and Windows Phone 7 use, because there's no tactile feedback. But I was surprised to find that it actually works better way, and that there's three kinds of feedback: it glows, and the phone vibrates, which you can both feel and hear. It's less effort to press this on-screen button than the iPhone home button. And it's a smoother, more consistent system where you do everything on-screen. iOS is jarring in that way, requiring you to move between the screen and the hardware home button. Physical buttons are the way of the past.&lt;br /&gt;&lt;br /&gt;- The multitasking button lets me jump effortlessly between apps. Partly this is because it's visible, whereas the task switch gesture on iOS is a &lt;i&gt;gesture&lt;/i&gt; -- there's nothing on screen to indicate it. But more importantly, it's one tap instead of two, and tapping on the screen is less effort physically. The result is that on Android it feels like I'm moving directly from one app to another, whereas on iOS it feels like switching from one app to the "system" (even if it's the double-tap switcher) and from there to the other app.&lt;br /&gt;&lt;br /&gt;But I think the Android multitasking button is too much of an intrusion into the current app. On a small screen, you want to dedicate as much space as possible to the app at hand rather than providing buttons for switching apps. Besides, it's&amp;nbsp;confusing (even for a geek) to have an app switcher along with an in-app tab switcher, both visible at once.&lt;br /&gt;&lt;br /&gt;If you get rid of the multitasking button and the back button (see above), you're left with just a home button, and that doesn't justify a whole horizontal bar, not on phones and certainly not on tablets, where it wastes a lot of space and looks ugly. Maybe the home button can reside in a corner of the screen, perhaps next to the time, signal strength and other indicators and notifications, and leave the rest of the space for apps. In other words, move the status bar to the bottom of the screen (like it is on Android tablets), put the home button at the left, at 48 x 48, and keep the rest of the status bar at its current height (25 pixels). You can disagree with this specific solution, but the more important point is: the global bar that Android puts at the bottom of the screen doesn't make sense.&lt;br /&gt;&lt;br /&gt;- I don't know why they redefined long press to enter a data selection mode.&lt;br /&gt;&amp;nbsp; &amp;nbsp; 1. I want to act on one item, like marking an email spam, more often than entering a selection mode where I can act on many items.&lt;br /&gt;&amp;nbsp; &amp;nbsp; 2. Modes are confusing because, by definition, things behave differently. If you can act directly on one item, you shouldn't have to enter a different mode. Long-press on iOS and pre-ICS Android fits the bill perfectly (as does swipe to delete a row in an iOS table view).&lt;br /&gt;&amp;nbsp; &amp;nbsp; 3. What do you do when you're done selecting? You want to perform some action, which the guide says should appear at the action bar at the top of the screen. Why not near the item(s) selected, where it really belongs? That way, it's clear which email will be marked as spam, and it works better on tablets, where users may not notice something change far away from the thing they are interacting with.&lt;br /&gt;&amp;nbsp; &amp;nbsp; 4. If you want to enter an edit mode that lets you select and act on multiple items, since a mode is global (it affects the whole UI and not just the item you long-pressed), it's logical that the trigger to enter the edit mode also be a global action not associated with any particular item. That is, you should enter edit mode by pressing a global control, like the edit button on iOS table views, and not by long-pressing one item. In fact, since iOS table views are a standard view and are therefore used across tons of applications, users know how to edit items in any table view. Android should also come up with a standard OS-wide multi-select mechanism.&lt;br /&gt;&lt;br /&gt;+ They've fixed a problem that developers had where notification icons were not visible on some phones because the status bar color was, ahem, "enhanced" by the OEM and turned out to be mostly the same as the icon. The guide has a solution: "Notification icons must be entirely white. Also, the system may scale down and/or darken the icons."&lt;br /&gt;&lt;br /&gt;+ The design calls for a minimum tap area of 48 pixels, more than the 44 the iOS HIG does. I guess this is because some Android devices have fewer pixels per inch than even the 320x480 iPhones.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ultimately, all this is secondary. I would like Android to be as beautiful as iOS, and I don't see this design guide achieving that goal without, for example, even better first-party apps, a culture of high user experience standards, moving away from too much configurability, etc.&lt;br /&gt;&lt;br /&gt;While I find the Galaxy Nexus to be on par with the iPhone (finally!), Android isn't yet as good as iOS, purely in terms of software. I'll be much more interested in going through the design guide when that changes, since I ultimately care about the results, as a user and a developer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-4943859826967848073?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/4943859826967848073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=4943859826967848073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4943859826967848073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4943859826967848073'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2012/02/thoughts-on-android-design-guide.html' title='Thoughts on the Android Design Guide'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-6ykSO6BTf3A/Tzzb9cRdwfI/AAAAAAAAwEQ/U-enIBcXvVI/s72-c/touch_feedback_communication.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1590398290517257257</id><published>2011-12-22T10:21:00.002+05:30</published><updated>2011-12-22T10:25:01.385+05:30</updated><title type='text'>Examining the integrated model</title><content type='html'>I've heard for almost a decade that the fact that Mac OS X runs only on Apple hardware makes for a better user experience. I hadn't really understood why or stopped to think about it, so I did that now, and here are some ways it helps.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lion's fullscreen mode is amazing. The three-finger swipe makes it easier to switch between fullscreen apps (or spaces, for that matter) than to switch between windows. This is a tremendous achievement, since the traditional full-screen mode makes it harder to switch between apps, and so full-screen is not used much, except for movies and presentations. Besides, Lion's full-screen mode makes the Mac more of a distraction-free device like the iPad, making it pleasanter and more relaxing to use. It also makes better use of screen space, which I never have enough of on my 15-inch Macbook, let alone on 13- or 11-inch Macbooks. In fact, one could say that Lion's full-screen mode lets us have these small laptops in the first place, without severely trading off comfort or productivity. Finally, smaller laptops are lighter, more portable and cheaper. All this is made possible because of Lion's full-screen mode, which is practical to use only because of the three-finger swipe.&lt;/li&gt;&lt;/ul&gt;&lt;blockquote class="tr_bq"&gt;This requires a trackpad that supports three-point touch, is sensitive enough, and big enough that you can comfortably swipe with three fingers. There are other multitouch gestures in Lion; three-finger swipe is just an example. The point is that it doesn't make sense to build multitouch gestures into the OS without hardware that makes it convenient enough to be useful or vice-versa. Otherwise, you just get a meaningless item on a checklist. Windows PCs suffer from this perennial chicken-and-egg problem.&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Apple can add dedicated hardware buttons for things like Mission Control. Again, how easy it is to use something often determines whether it makes sense in the first place.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Macs don't need you to install drivers for things like the webcam, extra keys on the keyboard, the infrared remote control, etc. Drivers on Windows are not well integrated into the OS and feel like a kludge, they don't show up in Control Panel, they need to be separately installed and updated, they make the system slower, clutter up the system tray (I don't need an icon for my webcam any more than I need one for my hard disc), come with bundled crapware apps, and generally don't work anywhere as well as on the Mac. I remember when I switched to the Mac a few years ago that everything worked without all this detritus. It was a "less is more" moment for me.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Apple can add hardware capabilities like WiFi Direct to enable features like AirDrop. In retrospect, isn't it backward not to make use of physical proximity to send files more easily?&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Apple has eliminated support for obsolete hardware to simplify and improve things for users. For example, Apple has been using EFI for years, while most PC hardware is stuck with BIOS. EFI boots faster and from hard discs bigger than 2.2TB. Similarly, Lion requires a 64-bit CPU. This is easy since Apple hasn't shipped a Mac with a 32-bit CPU in years. Whereas Windows 8 still has to support 32-bit CPUs. When I read that to boot from a 3TB hard disc, you need 64-bit Windows (which of course requires a 64-bit CPU) on a system with EFI rather than BIOS, it makes me angry. Why does this stuff have to be so complex? Why should someone configuring a machine with a bigger hard disc for their movies have to get their hands dirty with all this arcane stuff? Why can't the damn thing just work? Computers are broken in many ways, and getting rid of legacy stuff, as with this example, simplifies things for users. This is much easier when you control both the hardware and the the software.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Mac USB ports provide extra power for iPhones to charge quickly (1100mA compared to the 500mA maximum under the USB 2 spec) [1]. Similarly, Macs can wake up when accessed via WiFi, not just Ethernet.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Internet recovery is built in to the firmware on recent Macs, so if you have a hard disc that's somehow been wiped clean, you can boot off Apple's servers and run the installer, rather than having to boot from a DVD (you may not have a DVD or a DVD drive). A Mac can no longer get into a state it can't recover from, and this is possible only because Apple controls the firmware.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;OS X doesn't need to handle an endless variety of hardware, including broken ASUS stuff.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The bottom line is that if you're in the business of making the best user experience, the integrated model is the way to go.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Footnotes:&lt;br /&gt;[1] For that matter, I wish Apple supplies 100W power via the Thunderbolt bolt on the Apple Thunderbolt Display, so that you can plug your Macbook or Mac Mini into your Thunderbolt Display with a single cable for charging, video and data. When your data cable supplies all the power you need, you don't need another cable.&lt;br /&gt;&lt;br /&gt;Similarly, iPads should use a Thunderbolt port so that you can plug it in to a Thunderbolt Display and have it charge while using the external monitor (and maybe even a keyboard and mouse), or plug it into a Mac and have it charge (iPads need 10W, and Apple's USB ports supply only 5.5). It doesn't make sense for Apple to have two different connectors that both support data, power and video.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1590398290517257257?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1590398290517257257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1590398290517257257' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1590398290517257257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1590398290517257257'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/12/examining-integrated-model.html' title='Examining the integrated model'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3972186346346137081</id><published>2011-11-14T22:00:00.001+05:30</published><updated>2011-11-15T13:22:09.760+05:30</updated><title type='text'>Simplifying the Mac Branding</title><content type='html'>Since the branding for Apple's current Mac line seems to have evolved organically, starting with the iMac in 1998, I wanted to see if we can overhaul and simplify it, so that it stays fresh and relevant for the future, rather than being an artifact of the past. Of course, we want to retain its distinctiveness, and minimize unnecessary change.&lt;br /&gt;&lt;br /&gt;The iPhone is an excellent brand name. It's distinctive, while fitting in to the overall Apple brand (the "i") and being minimalist, by just adding one letter. It stands for Apple's quality and esthetic, products that are simple and beautiful, without a bunch of half thought-out&amp;nbsp;&lt;a href="http://www.marco.org/2010/02/09/feature-checklist-dysfunction" target="_blank"&gt;features&lt;/a&gt; or tacked-on ornamentation.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;To begin with, let's use Mac as the backbone of the brand family. It's distinctive, and so doesn't need an "i". Come to think of, isn't it weird that Apple sells some iMacs and some plain Macs? I mean, wouldn't it be odd if Apple sold an iPhone and a plain Phone?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since more people buy Mac laptops than desktops, let's drop the "book" from the MacBook and make that the default. Let the desktops have a qualifier, instead.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So, here are the new names, on the right, with the old ones on the left:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Macbook Air &lt;b&gt;-&amp;gt;&lt;/b&gt; Mac Air&lt;/div&gt;&lt;div&gt;Macbook Pro&lt;b&gt; -&amp;gt;&lt;/b&gt; Mac Pro&lt;/div&gt;&lt;div&gt;Mac Mini &lt;b&gt;-&amp;gt;&lt;/b&gt; Mac Desktop Mini&lt;/div&gt;&lt;div&gt;iMac &lt;b&gt;-&amp;gt;&lt;/b&gt; Mac Desktop&lt;/div&gt;&lt;div&gt;Mac Pro &lt;b&gt;-&amp;gt;&lt;/b&gt; Mac Tower&lt;br /&gt;&lt;br /&gt;Notice how the laptops have clean, simple names. I cringed when I first heard of "MacBook Pro". Why did Apple throw away such a sleek and modern Powerbook name for this clumsy one? Well, this rebranding fixes that.&lt;br /&gt;&lt;br /&gt;I also like that the Mac Mini and the iMac have similar names in the new scheme, reflecting their similar nature — desktops rather than laptops or workstations. I &lt;a href="http://kartik-log.blogspot.com/2011/11/re-examining-mac-desktop-line.html" target="_blank"&gt;think&lt;/a&gt; the Mac Mini should have all iMac features and vice-versa, except for the built-in monitor.&lt;br /&gt;&lt;br /&gt;I think this cleaner, modern branding will stand Apple and the Mac community in good stead for the next several years, and reflect the attention to detail that makes the platform what it is.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3972186346346137081?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3972186346346137081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3972186346346137081' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3972186346346137081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3972186346346137081'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/11/simplifying-mac-branding.html' title='Simplifying the Mac Branding'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-2961427312545487490</id><published>2011-11-10T16:05:00.000+05:30</published><updated>2011-11-10T16:08:18.108+05:30</updated><title type='text'>Is the Android Back Button a Good Idea?</title><content type='html'>&lt;br /&gt;For some reason, the Android back button is topical again. &lt;a href="http://durietz.tumblr.com/post/12131947412/the-android-hardware-buttons-are-broken" target="_blank"&gt;Christopher Du Rietz&lt;/a&gt; and &lt;a href="http://daringfireball.net/linked/2011/10/31/android-hardware" target="_blank"&gt;John Gruber&lt;/a&gt; both say that it's a bad idea. I've &lt;a href="http://kartik-log.blogspot.com/2010/03/why-physical-buttons-suck.html" target="_blank"&gt;thought so&lt;/a&gt;, too, an year and a half back, but I wanted to see if anything changed since then, or if my thinking evolved. So, let's look at arguments for and against the back button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Arguments For the Back Button:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Consistency&lt;/b&gt;: No matter what screen you're on, there's almost always a previous screen to go back to, so it makes sense to have a standard button for it, for the same reason the browser has a back button, or iOS devices have a home button. Don't leave it to apps, because they could handle it differently.&lt;br /&gt;&lt;br /&gt;In addition to consistent in-app navigation for all apps, you also want to use the same system to navigate out of an app as you use to return to the previous screen within the app. On iOS, you navigate within an app by using the on-screen back button, but when you reach the top level of the app, you have to use the physical home button to navigate out. This feels like apps have rigid boundaries rather than things flowing together smoothly. Android back button navigation feels more natural.&lt;br /&gt;&lt;br /&gt;In addition to navigation within an app and navigation out of an app to the home screen, you also want consistent navigation &lt;i&gt;across&lt;/i&gt; apps. This is important since Android apps blend together smoothly by invoking each other. In fact, apps on Android are composed of &lt;a href="http://developer.android.com/guide/topics/fundamentals/activities.html" target="_blank"&gt;&lt;i&gt;activities&lt;/i&gt;&lt;/a&gt;, one for each screen, which can be invoked from other apps. For example, the compose screen of an email app is a different activity from the inbox.&amp;nbsp;Activities from different apps intermingle smoothly into an activity stack, to the extent that you navigate between apps without noticing it, and the back button is critical for this. When you click on a link in an email and decide to tweet it, you have an activity stack consisting of Email -&amp;gt; Browser -&amp;gt; Twitter. Pressing back from Twitter returns to the browser, and pressing back again, to email. This kind of seamless navigation requires a back button independent of a particular app.&lt;br /&gt;&lt;br /&gt;This kind of smooth navigation between apps is much better than on iOS, where each app is a world unto itself, and there's a lot of friction in moving between apps. So iOS apps have to have in-app browsers for accessing links, with different functionality and interfaces and you sometimes need to tap the Open In Safari button, whereas Android apps just launch the browser, which works better.&lt;br /&gt;&lt;br /&gt;So, to summarize, back button navigation is consistent for:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;in-app navigation, no matter which app you're using.&lt;/li&gt;&lt;li&gt;navigation out of an app to the home screen.&lt;/li&gt;&lt;li&gt;navigation across apps in an activity stack.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Tactile feedback:&lt;/b&gt; Well-implemented hardware buttons, like on the iPhone, are easier to use than on-screen buttons. Unfortunately, many Android phones squander this advantage by using capacitive buttons (like on the Nexus S) or by using OS-controlled on-screen buttons (like on Ice Cream Sandwich/Galaxy Nexus).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Arguments Against the Back Button:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;It's not labeled:&lt;/b&gt; On-screen buttons can be labeled to tell the user where he's going to go if he clicks the button. It should be obvious why that's better.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Intra vs inter app navigation:&lt;/b&gt; But there's a deeper problem — it could take you to different places depending on where you navigated from, which could even be another app. John puts it &lt;a href="http://daringfireball.net/linked/2011/11/02/defending-androids-buttons" target="_blank"&gt;well&lt;/a&gt;:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;Here’s one thing I don’t like about the Android Back button that I’ve never seen a counterargument for: it presumes that you, the user, remember the activity stack. If you turn your phone on and you’re looking at a web page in the browser, if you don’t remember what you were doing immediately before opening the web page you’re looking at, you have no idea where you’re going to go if you hit the Back button. Could be another app, could be another web page, could be the home screen. And if hitting the Back button takes you somewhere you didn’t want to go, there’s no Forward button to reverse it. It’s like leaving a breadcrumb trail in the dark — you have to remember where the breadcrumbs are because you can’t see them. Drove me nuts.&lt;/blockquote&gt;By contrast, iOS back buttons always navigate to another screen in the same app, and so are less confusing. Yes, that means that apps have rigid boundaries and some friction switching between them, but it also means that the back button is less confusing, because it never takes you to another app or to the home screen.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Back or Up? &lt;/b&gt;Forget for now that the back button can take you to another app. Assume it takes you elsewhere within the current app. But where? Most people would say that it takes you back to the previous screen within the app, the one from where you came. But that's not always true. Here's an example: from the home screen, open Evernote. It starts by showing you the last opened note. Press back. Where do you expect to go? The home screen, right? But it actually takes you to your list of notes — a screen that you've never seen before and isn't therefore in the activity stack.&lt;br /&gt;&lt;br /&gt;And no, Evernote's not doing anything wrong. They could "fix" it by always opening the list of notes and forcing you to navigate to the note, so that the back button takes you back to the previous screen, but that would make it less usable.&lt;br /&gt;&lt;br /&gt;The real problem is with the back button, which sometimes behaves like the browser's back button by taking you to the previous screen in the activity stack, and sometimes like iOS's back button by taking you one level up in the app irrespective of history. It should just make up its mind and do one thing consistently.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Doesn't work well with long press app switching:&lt;/b&gt; We've seen how the back button can take you back in the activity stack or to a brand new screen. But it gets worse than that. It can take you to &lt;i&gt;another&lt;/i&gt; activity stack. Yes, Android has multiple activity stacks. If you were to navigate from the home screen to Evernote's list of notes, and then to a specific note, then press the home button and go to Google Maps, you have two activity stacks:&lt;br /&gt;Home -&amp;gt; Evernote list of notes -&amp;gt; Evernote note&lt;br /&gt;Home -&amp;gt; Google Maps.&lt;br /&gt;&lt;br /&gt;Now, while in Maps, you can long press the home button to bring up the list of apps, and tap Evernote, and it shows you the note you were viewing. Now what do you expect the back button to do? One might expect it to take you back in the current activity stack (Evernote's list of notes) or to the screen you came from (Maps). This is confusing. But it's even worse — it does &lt;i&gt;both&lt;/i&gt;. It first takes you back in the same activity stack, to the list of notes, but when you press back again, it takes you to the previous activity stack, to Maps.&lt;br /&gt;&lt;br /&gt;[Actually Evernote has one more level of hierarchy, but I'm eliminated that for simplicity — it doesn't change anything here.]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;It makes you go in circles:&lt;/b&gt; Christopher explains:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;If I get a mention on Twitter and open up the Android Twitter app to check it out, I’m (naturally) sent directly to the tweet mentioning me. Ok, so I want to get back to the main timeline, what do I press? The answer is: you can’t. Pressing the back-button, which is the only real candidate for this action, will take you wherever you where before seeing this screen, which in this case was the home screen, exiting the app. Hmm, so how do I get to the main timeline? I have to open Twitter again, showing the same tweet I saw before and now press the back button, and it will take me to the main timeline.&lt;/blockquote&gt;Notice that the user's going around in circles: A -&amp;gt; home screen -&amp;gt; A -&amp;gt; B. I've had the same experience with other apps. Obviously, it's stupid and irritating to go around in circles. Why on earth can't I go from A to B without going elsewhere, returning to A and then going to B?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Doesn't work well with modal screens:&lt;/b&gt;&amp;nbsp;If the user's writing a review in Google Maps and presses the back button, what does it do? The user has no clue, because it's not labeled, and doesn't even make sense in a modal screen, by definition — you want explicit Post Review and Discard buttons. But you can't remove the global back button; it's always there, whether it makes sense or not.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Learning curve:&lt;/b&gt; Android back buttons have a learning curve because you have to remember that some controls are on-screen and some are off-screen.&lt;br /&gt;&lt;br /&gt;So, to summarize the problems with the Android back button:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Users don't remember the activity stack.&lt;/li&gt;&lt;li&gt;The back button can take you to another screen in the same app or to another app.&lt;/li&gt;&lt;li&gt;The back button takes you to the previous screen in the app, except when it takes you to a screen you never visited.&lt;/li&gt;&lt;li&gt;It can take you to another activity in the current activity stack, or to another activity stack, or both.&lt;/li&gt;&lt;li&gt;It makes you go around in circles.&lt;/li&gt;&lt;li&gt;It doesn't work well with modal screens.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;This is way too much complexity. I couldn't understand or predict the behavior of the app button (despite being a programmer who builds mobile apps) and resigned myself to it behaving arbitrarily, taking me where I didn't want to go, and having to find my way back to where I did want to go. iOS's back button works like a charm, in comparison. The price of rigid boundaries between apps and friction in switching between apps is small in comparison to this massive confusion.&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-2961427312545487490?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/2961427312545487490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=2961427312545487490' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2961427312545487490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2961427312545487490'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/11/is-android-back-button-good-idea.html' title='Is the Android Back Button a Good Idea?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3085145362067717021</id><published>2011-11-10T10:41:00.002+05:30</published><updated>2011-11-10T10:41:47.271+05:30</updated><title type='text'>A Comparison of Web OSs</title><content type='html'>Many web-like operating systems exist or have been announced, and I found it useful to compare and classify them, from most web-like to least, in the order below:&lt;br /&gt;&lt;br /&gt;1.&amp;nbsp;&lt;b&gt;&lt;a href="http://en.wikipedia.org/wiki/Chrome_os" target="_blank"&gt;Chrome OS&lt;/a&gt;&lt;/b&gt;: This is perhaps the most web-like operating system in that it doesn't have its own API. This is rare, and the obvious downside is that things that can't be done on the Chrome browser can't be done on Chrome OS at all. This is a big limitation because, if something can't be done on a browser running on a traditional OS like Mac OS X, you can always write a native app, but when native apps don't exist, being restricted to HTML APIs is a far more severe limitation.&lt;br /&gt;&lt;br /&gt;2. Mozilla's &lt;b&gt;&lt;a href="http://arstechnica.com/open-source/news/2011/07/mozilla-eyes-mobile-os-landscape-with-new-boot-to-gecko-project.ars" target="_blank"&gt;Boot 2 Gecko&lt;/a&gt;&lt;/b&gt;&amp;nbsp;is similar to Chrome OS, but they plan to define new APIs as needed for their use cases (like a smartphone) rather than saying, "There's no HTML API? Then you can't do whatever it is you're trying to do." In that sense, it's user-experience-driven, rather than technically-driven, and Mozilla plans to try to standardize new APIs they propose.&lt;br /&gt;&lt;br /&gt;3. Slightly more impure is &lt;b&gt;Palm webOS&lt;/b&gt;, where there's no goal to standardize their APIs. It's a proprietary system built using Javascript/HTML/CSS.&lt;br /&gt;&lt;br /&gt;4. One step further down in terms of being pure web-like is &lt;a href="http://arstechnica.com/microsoft/news/2011/06/windows-8-for-software-developers-the-longhorn-dream-reborn.ars" target="_blank"&gt;&lt;b&gt;Windows 8&lt;/b&gt;&lt;/a&gt;, which like webOS defines proprietary APIs, but accessible from multiple languages: Javascript, C#/.NET and C++. This probably means that the APIs are defined in C++, with bridges to Javascript and .NET. Does that mean APIs will be defined in the lowest-common denominator of these supported languages, rather than making use of all of Javascript's features? Will there be an impedance mismatch if you're writing an app in HTML/JS, because an API defined for Javascript is always going to be more natural to use from Javascript?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Tizen" target="_blank"&gt;Tizen&lt;/a&gt; (driven by the Linux Foundation, Intel and Samsung) falls in the same bucket as Windows 8, with APIs that can be invoked from HTML and from C++ apps.&lt;br /&gt;&lt;br /&gt;5. Finally, the least web-like OSs are the traditional ones, like iOS, Android and Mac OS X. There are third-party toolkits like PhoneGap or Appcelerator Titanium that let you write apps for these platforms in HTML, but these expose only a subset of native functionality, and define their own API rather than bridging to the native API. By which I mean: on Windows 8, a particular API is going to be essentially the same no matter which language you use it from, whereas Titanium APIs are different from the underlying iOS and Android APIs. Obviously, this is not an ideal situation.&lt;br /&gt;&lt;br /&gt;In practice, first-party support makes all the difference — if you're building an iOS app, you'd probably use Cocoa Touch rather than Appcelerator. But conceptually, they are similar to Windows 8 in that the real API is defined in C++, and then bridged to other languages in some way.&lt;br /&gt;&lt;br /&gt;So, that's the classification, from most web-like (1) to the least (5).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3085145362067717021?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3085145362067717021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3085145362067717021' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3085145362067717021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3085145362067717021'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/11/comparison-of-web-oss.html' title='A Comparison of Web OSs'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1313341633050644211</id><published>2011-11-10T06:05:00.001+05:30</published><updated>2011-11-10T12:15:32.362+05:30</updated><title type='text'>Re-examining the Mac desktop line</title><content type='html'>On the news of the Mac Pro's rumored cancellation, Marco wrote a perceptive blog post examining various changes Apple could make to the Mac Pro, &lt;a href="http://www.marco.org/2011/11/02/scaling-down-the-mac-pro"&gt;concluding&lt;/a&gt;:&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span class="Apple-style-span" style="color: #222222; font-family: Georgia, serif; font-size: 16px; line-height: 25px;"&gt;It’s impossible to significantly change the Mac Pro without removing most of its need to exist.&lt;/span&gt;&lt;/blockquote&gt;That set me thinking about the iMac, and whether it makes sense to pay a lot of money when you'd probably be&amp;nbsp;&lt;a href="http://al3x.net/2008/09/08/al3xs-rules-for-computing-happiness.html"&gt;happier&lt;/a&gt;&amp;nbsp;with&amp;nbsp;a laptop and an external monitor for not much more money. To make this concrete, I configured a few machines on the online Apple store, so that we can compare prices.&lt;br /&gt;&lt;br /&gt;(This is a subjective exercise, and if you disagree with some of my choices, I'd encourage you to try it out yourself to see what conclusion you'll reach. Please post it in the comments.)&lt;br /&gt;&lt;br /&gt;For the iMac, I wanted the biggest possible hard disc (2TB), since you can can never have enough disk space. The cheapest iMac with that disc cost $1649, but then there was only a $200 increment for the 27-inch, and given the huge difference the extra screen space makes, I chose the 27-incher, for a price of $1849.&lt;br /&gt;&lt;br /&gt;I then tried to configure a Mac laptop with an external monitor. For the monitor, I chose a 1920x1080 monitor with an LED backlight, DisplayPort input, and height, pivot, tilt and swivel adjustments, for &lt;a href="http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&amp;amp;N=100007617+600012673+600060968+600050982+600029936&amp;amp;QksAutoSuggestion=&amp;amp;ShowDeactivatedMark=False&amp;amp;Configurator=&amp;amp;IsNodeId=1&amp;amp;Subcategory=20&amp;amp;description=&amp;amp;hisInDesc=&amp;amp;Ntk=&amp;amp;CFG=&amp;amp;SpeTabStoreType=&amp;amp;AdvancedSearch=1&amp;amp;srchInDesc="&gt;$200 -300&lt;/a&gt;, conservatively rounded up to $300. These monitors have sizes between 21.5 and 23 inches and are not made by Apple (I don't consider that important). I didn't choose a larger monitor, like 27 or 30 inches, since those are very expensive (the price difference is much more than the $200 difference between the 21.5- and the 27-inch iMacs above).&lt;br /&gt;&lt;br /&gt;For the laptop itself, I chose a 15-inch Macbook Pro, since I'm told you need dedicated graphics for animations (like Expose) to run at high frame rates on big external monitors. I chose the biggest possible hard disc (750GB) and the high-res screen. The cheapest Macbook Pro with these specs costs $2049, or $2349 with the monitor.&lt;br /&gt;&lt;br /&gt;I also wanted to see how the Mac Mini compares. I chose the cheapest one (2.3Ghz), bumped the RAM to 4GB and chose the biggest hard disc (750GB) for $849, or $1149 with the same monitor. Of course, you get only a dual-core CPU on the Mini unlike the quad-cores in both the iMac and the Macbook Pro.&lt;br /&gt;&lt;br /&gt;So, this is the bottom line:&lt;br /&gt;iMac: $1849&lt;br /&gt;Macbook Pro + monitor: $2349&lt;br /&gt;Mini + monitor: $1149.&lt;br /&gt;&lt;br /&gt;Notice that the Macbook Pro with the external monitor costs only $500 more than the iMac. If I'm ready to spend $1849, I'd rather spend $500 more for the enormous convenience of a laptop. I mean, $1849 is very expensive for a desktop. For that much money, I'd expect a laptop, and I can have one, for only $500 more (including an external monitor). Or I'll save a lot of money by going for the Mac Mini with a monitor for $1149.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;I don't see what purpose the iMac serves. Apple should get rid of it.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Otherwise, they should eliminate the differences between the Mac Mini and the iMac, so that an iMac is just a Mac Mini with an Apple Thunderbolt Display in one box. Specifically, both the Mac Mini and the iMac should have&lt;br /&gt;&lt;ul&gt;&lt;li&gt;an option for a six-core CPU, specifically the &lt;a href="http://en.wikipedia.org/wiki/List_of_future_Intel_microprocessors#.22Gulftown.22_.2832_nm.2C_six-core.29"&gt;Core i7-3930K&lt;/a&gt;, so that you can have six cores without paying a lot for a Xeon/Mac Pro. This is all the more important if the Mac Pro is cancelled.&lt;/li&gt;&lt;li&gt;a 4 or at least 3 TB hard disc, by default, with an option to downgrade. You can never have enough hard disc space. Use a desktop-class hard disc for increased space, lower cost and better performance. Who cares if it's an inch bigger? It's a desktop, after all. (Similarly, I'd like an option for a 1TB disc in the Macbook Pros.)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are also other changes I'd like to see across the entire Mac line, both laptop and desktop:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;At least 8 USB ports on all machines, so that you can connect a keyboard, mouse, phone, iPad, external disk, flash drive, dual-link DVI adapter (which requires a USB port for power), etc. It's 2011. Why should you have to hunt for USB ports? If there isn't enough room on the Air, add microUSB ports. While we're at it, make all the ports USB3 ports.&lt;/li&gt;&lt;li&gt;An option for a 140ppi display across their entire range, and specifically, a 1080p display on the 15-inch Macbook Pro. Eventually, of course, I want retina displays everywhere.&lt;/li&gt;&lt;li&gt;You should be able to configure any Mac (except the Air) to have both flash memory and a hard disc, so that you never again have to choose between performance and capacity. The flash memory could be used as a boot volume, or as a cache for frequently accessed &lt;a href="http://en.wikipedia.org/wiki/Readyboost"&gt;files&lt;/a&gt;, or as swap space (in which case, can we decrease the amount of memory without significantly impacting performance?). A small amount of flash is cheap — the Apple TV comes with 8 GB for $99, so that flash itself must be significantly cheaper.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Get rid of the DVD drives, or at least make them optional.&lt;/li&gt;&lt;li&gt;Two Thunderbolt ports, so that you can use two 24-inch monitors without daisy-chaining. Two 24-inch monitors are much cheaper than a 30- or 27- inch monitor.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1313341633050644211?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1313341633050644211/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1313341633050644211' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1313341633050644211'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1313341633050644211'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/11/re-examining-mac-desktop-line.html' title='Re-examining the Mac desktop line'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-5878319505947766438</id><published>2011-10-02T19:01:00.000+05:30</published><updated>2011-10-02T19:01:03.774+05:30</updated><title type='text'>Summary of the talk on the Metro UI in Windows 8</title><content type='html'>&lt;br /&gt;This is a summary of Microsoft's excellent &lt;a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/BPS-1004"&gt;talk&lt;/a&gt; on the Metro UI in Windows 8.&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Metro-style Design:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Metro is all about content, not chrome, and an immersive. Every pixel on screen is for content, and none for chrome, whether the app's or the OS's. Metro apps are full-screen all the time (except when the user snaps two apps together).&lt;/li&gt;&lt;li&gt;In particular, the touch version of IE 10 shows web pages full-screen. Microsoft expects this to provide a better browsing experience than the non-touch skin of IE 10, even when you're using a mouse and keyboard.&lt;/li&gt;&lt;li&gt;Text occupies a primary role in the Metro UI. It provides the structure of the app, rather than just being content poured within a structure created by other visual elements.&lt;/li&gt;&lt;li&gt;Whitespace is important -- it provides room for the UI to breathe, rather than having it all squeezed together.&lt;/li&gt;&lt;li&gt;Metro apps are highly consistent and use the same typographic grid. It's not jarring to switch from one app to another. The title is in the same place, with the same font, with the same padding on its side, etc.&lt;/li&gt;&lt;li&gt;Users swipe from the edges of the screen to reveal hidden UI.&lt;/li&gt;&lt;li&gt;The left and right edges are reserved by the OS. The left edge is to switch apps, and the right one is for "charms", like Start, Search, Share, etc. Your app can use these to search, share, etc.&lt;/li&gt;&lt;li&gt;The top and bottom edges do the same thing — reveal the app bar's hidden UI (called the app bar), overlaying the content. The edges of the screen are most convenient for users to reach with their fingers.&lt;/li&gt;&lt;li&gt;Put only the most commonly used controls on the canvas, like play in a music app. Put the others in the app bar. Don't worry that users are not going to discover these. They are, since it's consistent between apps.&lt;/li&gt;&lt;li&gt;Be great at doing only some things, rather than mediocre at doing many.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Fast and fluid:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Make the UI fast and fluid. No jerky movements. A fluid interface is one where everything comes from somewhere and goes somewhere.&lt;/li&gt;&lt;li&gt;Don't map touch gestures to mouse gestures, like press and hold -&amp;gt; right click. Design for the medium. To drag an icon from one screen to another, current touch systems behave as if you were dragging and dropping stuff using a mouse, by having the content scroll when you reach the edge of the screen. But if really design for touch, you expect to use another finger to scroll the content underneath.&lt;/li&gt;&lt;li&gt;Microsoft tried to reduce modes in the UI. To drag something, you don't have to enter a special drag mode, like with iOS — you just drag.&lt;/li&gt;&lt;li&gt;Zoom should not just magnify the same content -- it should show content at a summary or detail view suitable for the zoom level. For example, zoom out on the home screen, and the tiles become icons. Zoom out on a calendar and you see a month view. In other words, zoom should be semantic rather than optical. Users should also be able to act on the content differently at the new zoom level. For example, move whole home screens around rather than tiles within them.&lt;/li&gt;&lt;li&gt;You can slide a tile slightly downwards to select it. Again, you don't need to enter a mode to be able to select things.&lt;/li&gt;&lt;li&gt;Don't create a separate UI for mouse-and-keyboard — the same UI should work well in both modes. Standard controls do.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Snap &amp;amp; scale beautifully:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Apps can specify that they support only certain form factors, like 11.6 inches and above.&lt;/li&gt;&lt;li&gt;Windows 8 supports screens with different DPIs -- so should apps. In particular, you should provide vector art or, not as ideal, assets at three sizes: 1024 x 768 (the minimum Windows 8 supports), 1366x768+ (widescreen), a snapped view and, optionally, a portrait view.&lt;/li&gt;&lt;li&gt;Windows 8 is landscape-first (unlike the iPad, which requires apps to support both orientations). After all, landscape is required for laptop and desktop screens.&lt;/li&gt;&lt;li&gt;A snapped view should be the whole app and not a gadget kind of thing.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Use the right contracts:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&amp;nbsp;Similar to Intents in Android.&amp;nbsp;Let two apps work together without each knowing the other.&lt;/li&gt;&lt;li&gt;The three important contracts are share, search and pick.&lt;/li&gt;&lt;li&gt;Share:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;opens the chosen app in a side pane that disappears once the sharing is done, so you don't lose your context.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;Apps can identify themselves as being able to be the target of a share action for certain formats of data -- text, photos, etc.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;It's not just for social networks/email type apps -- meant for also a translator app, a notes app, a Read It later kind of app. It's not just sharing with people, but also with an app, like an image editor.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Search:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;Searches opens its UI in the right pane and searches data from the current app, with suggestions (with photos). When the user taps a suggestion, that item appears in the main pane, in the app.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;In the right pane, the user can switch to another app to see results from that app. That way, you can search for something in multiple apps while moving fluidly between them.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;Not meant for "find in doc" -- use your own UI.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Picker:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;lets you pick, say, a photo from a cloud service (or another computer on the LAN) just as conveniently as a local file. No more downloading a file to attach it to an email, and no more cluttered filesystem.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;similarly, if your app has content, you can implement the source part of the picker contract to let other apps use that content.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;bottom-line for all contracts: Don't create an in-app UI to do what contracts can do.&lt;/li&gt;&lt;li&gt;The settings charm has a section at the bottom for system settings, and the area at the top is for app settings. Also put Help and About there. Don't build your own settings UI.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Invest in a great tile:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A tile is not an icon -- show content from the app.&lt;/li&gt;&lt;li&gt;Tiles create an emotional connection by showing the user their kids' photos, for example.&lt;/li&gt;&lt;li&gt;In some cases, users don't need to open the app to see the weather, for example.&lt;/li&gt;&lt;li&gt;Tiles have a single touch target -- no controls&lt;/li&gt;&lt;li&gt;You can choose from one of multiple templates -- not fully customizable. But there are almost 20 templates, so there's lots of flexibility.&lt;/li&gt;&lt;li&gt;Pick a template, and supply text and images, and the system handles the rest.&lt;/li&gt;&lt;li&gt;Tiles come in two sizes: small and an optional large tile.&lt;/li&gt;&lt;li&gt;You can pin a specific item from an app to the home screen, resulting in a deep link to that content within the app. Examples: a specific person from a social network app, a city from a weather app, a particular feed from a feed reader&lt;/li&gt;&lt;li&gt;In practice, as a user, you end up finning your favorite content from each of many apps -- the start screen becomes a kind of global dashboard for the things you care, across apps. Once you use this, everything else will feel antiquated.&lt;/li&gt;&lt;li&gt;It makes the start screen more personal, and lets people jump to the part of your app they care about, in addition to getting at-a-glance information from the start screen without opening your app.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Alive with activity:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Live tiles let you have a news app that actually shows the news on the start screen.&lt;/li&gt;&lt;li&gt;The idea is to make the OS alive with activity, the way the web is always changing, and unlike a desktop with static icons.&lt;/li&gt;&lt;li&gt;The start screen lets you put borders between groups of tiles. Like a folder, but it doesn't hide stuff in the hierarchy. You can name groups if you want to (we sometimes find it hard to come up with appropriate names for folders).&lt;/li&gt;&lt;li&gt;Tiles can show a number or glyph at the bottom-right corner, say to indicate the number of unread mails.&lt;/li&gt;&lt;li&gt;Tiles can also animate between two states, like a text and an image.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Notifications:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;An app can put up a notification for urgent stuff, like calendar. Notifications slide in from the bottom-right of the screen.&lt;/li&gt;&lt;li&gt;Notifications appear no matter where the user is -- start screen or other apps.&lt;/li&gt;&lt;li&gt;There's no junk drawer for missed notifications. If it's important, update your tile.&lt;/li&gt;&lt;li&gt;Notifications remain on screen for only a short time. The user can throw them off screen, or turn off notifications per-app or globally.&lt;/li&gt;&lt;li&gt;Notifications also have templates, like tiles.&lt;/li&gt;&lt;li&gt;Require the user to opt-in before displaying notifications.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;Live tiles and notifications can be updated:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;when your app is running&lt;/li&gt;&lt;li&gt;at a scheduled time (alarm)&lt;/li&gt;&lt;li&gt;via push notifications. This is how apps like weather, news, Twitter update themselves constantly.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Roam to the cloud:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Your app is running only when it's visible on screen, and gets about 5 seconds to save its state before its process is suspended. Auto-save, don't prompt the user.&lt;/li&gt;&lt;li&gt;Most users login to Windows with a Windows Live ID. Doesn't have to mean Hotmail; could be Gmail via OpenID.&lt;/li&gt;&lt;li&gt;Every app gets space in the cloud for state, settings and a small amount of user data.&lt;/li&gt;&lt;li&gt;Use these to make it seamless for the user to move between devices. Sync the last listened to track, the last read page, or the level completed in a game.&lt;/li&gt;&lt;li&gt;OS settings are also synced.&lt;/li&gt;&lt;li&gt;If you want to sync more user data, you need to build your own service (easily) using Azure.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Metro Style Design Principles:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Pride in craftsmanship&lt;/li&gt;&lt;li&gt;Be fast and fluid&lt;/li&gt;&lt;li&gt;Authentically Digital&lt;/li&gt;&lt;li&gt;Do more with less&lt;/li&gt;&lt;li&gt;Win as one&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Other:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Windows 8 natively supports multiple languages as first-class citizens: HTML/JS/CSS, C#, Visual Basic, and C++/C. You get tool support for all these languages.&lt;/li&gt;&lt;li&gt;The Visual Studio templates make it really easy to build a top-quality Metro app. Just configure a few properties and hook up the template to a data source.&lt;/li&gt;&lt;li&gt;The only way to kill apps is to go to the classic UI and open Task Manager.&lt;/li&gt;&lt;li&gt;Windows ships with a touch Dvorak keyboard&lt;/li&gt;&lt;li&gt;You can make more money making Windows apps than iOS apps, because of the reach of Windows.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-5878319505947766438?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/5878319505947766438/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=5878319505947766438' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5878319505947766438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5878319505947766438'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/10/summary-of-talk-on-metro-ui-in-windows.html' title='Summary of the talk on the Metro UI in Windows 8'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-661336695484628693</id><published>2011-08-14T12:04:00.000+05:30</published><updated>2011-08-14T17:01:56.483+05:30</updated><title type='text'>File Coordination in Mac OS Lion</title><content type='html'>With Lion, Apple again did what it does best — solving problems that we've gotten used to working around for so long that we forget are problems.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;But before that, it's interesting to quickly trace the evolution of file access. Initially, files were held captive to the machine they were stored on. Then came the cloud, as web apps, but it was a separate world by itself, so you had to choose between the cloud on one hand, and the convenience, power, and complexity of the filesystem on the other. Dropbox and its ilk unified the two to some extent, providing a filesystem and a web interface to the same data (and mobile apps, too).&lt;br /&gt;&lt;br /&gt;Now Lion builds this into the system, and provides an API for apps to use, as opposed to Dropbox, which has to work with apps that don't use its API. That was necessary for Dropbox's success, for sure, but the more interesting question is: can do you better if you can get apps to use your sync APIs? Enter &lt;a href="http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSFileCoordinator_class/Reference/Reference.html#//apple_ref/doc/uid/TP40010585"&gt;File Coordination&lt;/a&gt;, Autosave and Versions, new APIs in Lion. Here's how they provide a better user experience than Dropbox:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Documents are automatically saved to iCloud, and when iCloud changes are synced down, the document on screen automatically updates.&lt;/li&gt;&lt;li&gt;Files are autosaved periodically and when another app wants to access them. For example, when you drag a document to Mail, it's autosaved just before being attached.&lt;/li&gt;&lt;li&gt;Writes are atomic -- other apps don't see inconsistent state, as long as they use file coordination. This works for packages, too. (Packages are directories that are presented to the user as a single file, like a .app.)&lt;/li&gt;&lt;li&gt;Operations on giant directories are atomic as well, provided again that all apps accessing the directory use the file coordination API. If an app tries to move a directory that contains a file another app is reading or writing, it will wait for that app to finish whatever it's doing. Similarly, an app that wants to read or write something deep in a directory that's being deleted is asked to wait till the deletion finishes, so that it doesn't do a partial read, or write into a file that will be subsequently deleted.&lt;/li&gt;&lt;li&gt;When one app has a document open, other apps aren't allowed to write to it and overwrite the first app's changes. If the other app goes ahead and writes to it, because it's running on a different device, or because it doesn't use the file co-ordination APIs, the UI updates immediately. The latter is currently possible, with &lt;a href="http://en.wikipedia.org/wiki/FSEvents"&gt;FSEvents&lt;/a&gt;, but far simpler with file coordination.&lt;/li&gt;&lt;li&gt;Apps handle open documents being renamed or moved. This is currently possible with file reference URLs, but many apps don't use them correctly. File coordination may make it easier for apps to do the right thing.&lt;/li&gt;&lt;li&gt;Versions snapshots files periodically so the user can easily go back in time.&lt;/li&gt;&lt;li&gt;When you have a conflict, the system informs your app of the conflict and lets it resolve it. After all, the app is in the best position to do so, because it understands its document format best. This is not possible in the Dropbox world.&lt;/li&gt;&lt;li&gt;When an app wants to resolve the conflict, that file access is prioritized below other writes, so the app merges the most up-to-date version.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;It's interesting to see how much better you can do when you control the stack and can get apps to adopt your APIs.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-661336695484628693?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/661336695484628693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=661336695484628693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/661336695484628693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/661336695484628693'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/08/file-coordination-in-mac-os-lion.html' title='File Coordination in Mac OS Lion'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-4298424151343858355</id><published>2011-08-13T18:53:00.007+05:30</published><updated>2011-08-13T19:01:04.521+05:30</updated><title type='text'>Dynamic Layout in UIKit</title><content type='html'>UI elements can be laid out in two different ways:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Top-down, where parent views determine child views' size. This works well for fixed-size interface elements like toolbars. Cocoa supports this kind of layout well, both at the framework level and as nibs that can be laid out graphically.&lt;/li&gt;&lt;li&gt;Bottom-up, where child views' size affects parent views' size. This is needed for dynamic layout, where you don't know the content ahead of time, or how much space it needs on screen. For instance, think of a news article — the headline can take one or two lines, and the article text needs to be positioned based on where the headline ends. Dynamic layout requires that a view's size is determined by its content, and superviews' size by their children's. HTML supports this natively, but not Cocoa.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As an aside, it's interesting that Android supports both — a view's size can be defined to be small enough to just fit its content, or expand to take up all available space.&lt;br /&gt;&lt;br /&gt;So here's how we do dynamic layout in Cocoa. These took me a month to figure out, so you'll hopefully save that time.&lt;br /&gt;&lt;br /&gt;1. Avoid changing your size in layoutSubviews. Since doing so triggers another call to layoutSubviews, that’s an easy way to produce a layout cycle, where layout happens over and over again. Sometimes it’s infinite, and sometimes it converges and stops eventually, but that kills performance, making the app slow to respond to user actions, making the scrolling jittery, etc. Instead of changing your size in layoutSubviews, override setBounds and setFrame to set it to the right value to begin with.&lt;br /&gt;&lt;br /&gt;This is a special case of a more general rule — you never want a case where multiple objects all directly set a given view’s size. Because then the size of the object will be unpredictable, and you can easily have layout cycles. Only one object in the entire app should be able to set a given view's size. And it's best to have that object be the view itself. If a view’s size depends on factors that are not known to it, pass that information in (or define a delegate) and let the view compute its size, in setBounds/setFrame, and override the passed-in size, rather than some other object doing the math and setting the size on the view.&lt;br /&gt;&lt;br /&gt;Then anyone can invoke [view sizeToFit] on the subview and let it compute its size. Or invoke view.bounds = CGRectMake(view.bounds.origin.x, view.bounds.origin.y, randomSize.width, randomSize.height). randomSize can be any size, which is ignored by your view’s setBounds, as discussed above. But sizeToFit is a cleaner way of doing this.&lt;br /&gt;&lt;br /&gt;2. If you have constraints on the parent (like maxWidth), make sure you propagate them down the hierarchy automatically. We had a bad bug where setting the maxWidth on the parent would behave differently from setting it on the children -- one of the two caused an infinite layout loop.&lt;br /&gt;&lt;br /&gt;3. Another consequence of UIKit being designed for static layouts is that that parent views’ layoutSubviews methods are called before children’s. If your parent view’s depends on the child view’s layout, you want the child’s layoutSubviews to run first (just in case it changes its size). To do this, you define a CALayer subclass, override layoutSublayers, and invoke UIView’s layoutSubviews bottom-up.&lt;br /&gt;&lt;br /&gt;4. Trick to catch layout cycles: If a view’s layout depends on its children, you want to assert that the converse is not true, because that can cause a layout cycle. Have a rule that says that such a class’s layoutSubviews cannot change the frame or bounds of subviews. In addition to manually doing this, you can automate this check, by creating a list of children that need layout, before and after the parent is laid out, and assert that the “after” list does not have any additional views. This catches a finite layout cycle, too.&lt;br /&gt;&lt;br /&gt;5. Override sizeThatFits on your dynamically laid out container class to invoke sizeThatFits on subclasses and sum it up. You should define this to conform to the UIView API, just in case some class you don’t control decides to invoke this function. But don’t depend on it yourself. In other words, make sure that the parent view’s layoutSubviews does not depend on the child view’s sizeThatFits, because then you’re exposing yourself to a bug where the child view has a bug that causes sizeThatFits to return a different value than is actually enforced by the class in layoutSubviews or setBounds/setFrame.&lt;br /&gt;&lt;br /&gt;Instead, the parent should ask the child to lay itself out (see point 3 above) and then measure its actual size.&lt;br /&gt;&lt;br /&gt;6. sizeThatFits is broken in some standard classes. We used a category that defines saneSizeThatFits in UIView that just calls sizeThatFits, and we override saneSizeThatFits in specific UIView classes that are known to be broken. Our code never invokes sizeThatFits; it always invokes saneSizeThatFits.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-4298424151343858355?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/4298424151343858355/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=4298424151343858355' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4298424151343858355'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4298424151343858355'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/08/dynamic-layout-in-uikit.html' title='Dynamic Layout in UIKit'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8228228190130446259</id><published>2011-07-24T18:39:00.001+05:30</published><updated>2011-07-24T18:40:31.171+05:30</updated><title type='text'>Resolution-independence on iOS and Mac OS X</title><content type='html'>As we wait for an iPad and a MacBook with a high-res display, &lt;a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars/14#hi-dpi"&gt;indications&lt;/a&gt; are that Apple will go with a resolution that's twice (actually, four times) the existing one. The argument is backward-compatibility — apps built for the iPad will look no worse on the iPad 3, since the new resolution is a multiple of the old. Otherwise, graphics will have to be resized and will look worse.&lt;br /&gt;&lt;br /&gt;Note that the basic UI — fonts, view sizes and positions, etc — is unaffected, thanks to the &lt;a href="http://developer.apple.com/library/ios/#documentation/2DDrawing/Conceptual/DrawingPrintingiOS/GraphicsDrawingOverview/GraphicsDrawingOverview.html#//apple_ref/doc/uid/TP40010156-CH14-SW7"&gt;virtual, hardware-independent co-ordinate system&lt;/a&gt; used by UIKit, and that positions are specified using floats. So apps see a 320 x 480 pixel grid even on the iPhone 4, which has a 640 x 960 screen. If your app draws a rectangle of width 100, it doesn't need to be updated to draw a rectangle of width 200 to maintain its size [1]. Fonts and system views are automatically drawn at the higher resolution.&lt;br /&gt;&lt;br /&gt;The only problem is artwork. Low-resolution artwork is drawn on the iPhone 4 by mapping each pixel in the image to four pixels on screen. This way, it looks no worse than on the iPhone 3GS. Whereas if the iPad 3's resolution were not an integral multiple of the iPad 2's, you'd have to interpolate the image, causing blurriness, which means that apps built for the iPad 3 will look worse than on the iPad 2, rather than identical or better.&lt;br /&gt;&lt;br /&gt;I think this a bad decision. I want the iPad 3 to have a 300ppi display, so that I can't distinguish the pixels and it looks almost as good as paper. I don't want to print stuff any more, just to make it easy to read, and that won't happen if the iPad is stuck with a 2048 x 1536 display.&lt;br /&gt;&lt;br /&gt;Instead, Apple should build a 300ppi display, and pay the price of slightly blurry apps for now. And Apple can show iPad 3-optimized apps above existing iPad apps in the app store, so that users are more likely to use those, and developers are more likely to upgrade their apps.&lt;br /&gt;&lt;br /&gt;I don't want to sacrifice the future for the past.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[1] Assuming you use UIKit rather than the lower-level Quartz or Core Animation APIs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8228228190130446259?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8228228190130446259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8228228190130446259' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8228228190130446259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8228228190130446259'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/07/resolution-independence-on-ios-and-mac.html' title='Resolution-independence on iOS and Mac OS X'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8223230062643407016</id><published>2011-07-22T08:39:00.005+05:30</published><updated>2011-07-22T08:42:16.192+05:30</updated><title type='text'>Understanding and Optimizing UIKit Rendering</title><content type='html'>&lt;div style="background-color: transparent;"&gt;&lt;div dir="ltr" id="internal-source-marker_0.8800973505713046" style="margin-bottom: 0pt; margin-top: 0pt; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: large;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This is from the WWDC 2011 and 2010 talks, API documentation, a bit of experience, advice from others, etc. I’m not an experienced iOS engineer by any stretch of imagination, so if you find any mistakes, please add comments. Thanks. I made these notes for myself, and I then figured that others may find it useful, so I’ve shared them.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Each view has a backing layer, which contains an image of the view, excluding subviews. The view's contents are rendered onto the layer when the view is added on screen. Whenever the view needs to be drawn, the system tries to use the GPU to composite the layer onto the screen rather than asking the view to render its contents again, which requires the CPU.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Offscreen Rendering&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The biggest bottlenecks to graphics performance are offscreen rendering and blending -- they happen for every frame of the animation, and can cause choppy scrolling.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Note that the layer itself is effectively an offscreen buffer, but that's not what we're referring to here. Sometimes two or more layers needs to be composited into an offscreen buffer, which is then composited onto the screen, as opposed to the normal flow of compositing layers directly onto the screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;For example, this happens when you set a mask for a view. The entire view hierarchy needs to be rendered onto an offscreen buffer or, in other words, the layers for all these views need to be composited into the buffer, on which the mask is applied. Then the buffer is composited on screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The Core Animation Instrument has an option to detect offscreen rendering, as well as blended views. If an offscreen buffer is going to be needed, see if you can at least cache it between frames of the animation, by calling [layer setShouldRasterize:YES].&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Make sure that you don't enable rasterization of a view without a good reason, because you might force offscreen rendering (slow) when it's not needed.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Other optimization techniques&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Flatten your hierarchy: &amp;nbsp;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;See if you can flatten your view hierarchy. If your view has subviews A and B, and B has subviews B1 and B2, see if you can eliminate B and add B1 and B2 directly as subviews. Flattening your view hierarchy means that there are fewer backing stores, so you save both space and time, including on the GPU.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Consider drawRect: &lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;If you can't flatten your view hierarchy, Apple recommends that you use subviews to create your layout rather than drawing each item individually in drawRect. &lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;However, there are cases when you should go the drawRect route and draw stuff manually, using Core Graphics, NSString’s drawInRect, etc.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;One trick is to create subviews but not actually add them to the superview. For example, if your view needs two labels and images, create the UILabel and UIImage objects without adding them to the superview and, in your drawRect, invoke UILabel's drawLabelInRect and UIIimage’s drawInRect (never invoke drawRect).&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Or create your view hierarchy, invoke [view.layer renderInContext:context] on the root view, and throw away the view hierarchy.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Whichever of these three techniques you use, you have a backing store that effectively holds the view and all its subviews together instead of having separate backing stores for each view, or, worse, having a separate backing store for each view *and* one for the view hierarchy (if you call setShouldRasterize). This saves memory and time, both on the CPU and GPU. In particular, your view hierarchy is composited together before animations, rather than for each frame.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Create an image directly: &amp;nbsp;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Create a UIImage or CGLayer (which is cached better on GPU), and draw whatever you want into it.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;The downside of this technique over the drawRect one (above) is that you're eagerly creating your backing store, whereas drawRect is invoked only when the view is added to a window. But if that’s not a consideration, this is simpler than the drawRect solution because instead of defining a UIView subclass, defining drawRect, and have the system invoke it to render your view into a layer, you create an image directly.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;Scroll view callbacks: &amp;nbsp;&lt;/span&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;UIScrollView works by updating the contentOffset every 1/60th of a second. If your UIScrollViewDelegate takes longer than 1/60th of a second, you’re guaranteed to drop frames.&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"&gt;This is different from Core Animation, which runs smoothly on GPU even if the CPU is busy.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8223230062643407016?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8223230062643407016/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8223230062643407016' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8223230062643407016'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8223230062643407016'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/07/understanding-and-optimizing-uikit.html' title='Understanding and Optimizing UIKit Rendering'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-4646116495564328194</id><published>2011-06-12T08:49:00.014+05:30</published><updated>2011-06-12T09:10:14.462+05:30</updated><title type='text'>iCloud, Google and Lock-in</title><content type='html'>&lt;span style="font-size: small;"&gt;Disclosure: I work for&amp;nbsp;&lt;/span&gt;Google.&lt;br /&gt;&lt;br /&gt;So&lt;span style="font-size: small;"&gt; far I've heard the term cloud used to mean web apps, but Apple redefined it to mean storing your data on the internet but accessing it through native apps. That vision is indeed compelling. Native apps have a far better &lt;a href="http://kartik-log.blogspot.com/2010/12/why-i-prefer-native-apps-on-iphone.html"&gt;user experience&lt;/a&gt; than web apps. In particular, the app is always available locally, as is all your data, and you can edit it without waiting for the network. Sync happens behind the scenes, as it should. This also means that they work &lt;/span&gt;offline.&lt;br /&gt;&lt;br /&gt;And &lt;span style="font-size: small;"&gt;then there's Apple's penchant for exceedingly high-quality and emotionally satisfying interfaces. Just look at the &lt;a href="https://auth.me.com/authenticate"&gt;MobileMe Sign In page&lt;/a&gt;, with the cloud slowly emitting small, delicate white puffs of data that get absorbed gently into the iPhones and iPads in the background. Steve Jobs overuses the term, but this really is magical (watch it in HD, by clicking on the Youtube logo):&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/6IBn-JT66iI/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/6IBn-JT66iI?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" height="266" src="http://www.youtube.com/v/6IBn-JT66iI?f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;But there's a fly in the ointment. Just visit &lt;a href="http://me.com/"&gt;me.com&lt;/a&gt; on your Android phone and you'll see this:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://2.bp.blogspot.com/-YeF_8RIgWqM/TfQa-wgqWAI/AAAAAAAAtAs/c9WnLHIA_lU/s1600/me.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-YeF_8RIgWqM/TfQa-wgqWAI/AAAAAAAAtAs/c9WnLHIA_lU/s320/me.png" width="308" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Notice that it tells you how to set it up on your &lt;i&gt;iPhone&lt;/i&gt;, when you've visited it on your Android? I'm having trouble deciding whether this is arrogance on Apple's part or just gross negligence. They should have at least put up a screen saying, "Sorry, MobileMe doesn't work on your device."&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Maybe it's Apple preference for building something absolutely great for 90% of their users rather than something merely good that everyone can use, as John Gruber puts it (he phrases it better, but I can't find the reference now). That works great for hardware and software. If 10% of mobile phone users find the iPhone too limited in some way, that's not a problem at all — they can buy other phones. Better to thoroughly delight 90% of your users. But this strategy totally fails for cloud &lt;/span&gt;services.&lt;br /&gt;&lt;br /&gt;I &lt;span style="font-size: small;"&gt;won't use an email service that I can access from only some of my devices. The same applies to other kinds of data like calendar, contacts, notes, documents and photos, for that matter. If iCloud continues in MobileMe's footsteps, it'll be as interesting to me as Ping. Which is to say, not interesting at all. Except perhaps as a demonstration that Apple still doesn't understand how to build an internet service, despite the superficial UI delight.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;At another level, none of this is surprising. Apple makes its money from hardware, so I wouldn't be surprised if they look at iCloud just as a way to keep iOS compelling in the cloud department. Whereas Google makes nothing from sales of Android or Chrome OS devices, and in fact gives the OSs away to drive traffic to their internet services, where they make all their money. So it's not surprising if Google cares deeply about giving you access to your data from all your devices, whereas Apple doesn't.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;I do think Apple's strategy, if this is it, is narrow-minded — that most Apple users have non-Apple devices, and letting them use iCloud on these devices makes iCloud and therefore iOS more useful to users, not less. But I don't know if Apple's focus on building a wonderful product for the majority of users rather than a good one for everyone prevents them from seeing that. Maybe it's the innovator's&amp;nbsp;&lt;/span&gt;dilemma.&lt;br /&gt;&lt;br /&gt;So&lt;span style="font-size: small;"&gt;, if I have to choose between an elegant interface and access to my data from all devices, I'll choose universal access. Which  means using services that, at a minimum, have web apps that work on all platforms. Even a desktop web app works on phones running Android, webOS, &lt;/span&gt;etc.&lt;br /&gt;&lt;br /&gt;One &lt;span style="font-size: small;"&gt;step better is an internet service that provides a native app for at least some platforms, in addition to the desktop web app. Simplenote is an &lt;/span&gt;example.&lt;br /&gt;&lt;br /&gt;But I'd like  to not have to choose between a top-quality interface and being able to access my data everywhere. T&lt;span style="font-size: small;"&gt;he gold standard is probably Evernote, with native apps for all the popular platforms — iOS, Android, webOS and even Mac OS X.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;[1] Third-party apps are not good enough. I won't use iCloud if I can access it from Android or webOS only via a third-party app.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-4646116495564328194?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/4646116495564328194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=4646116495564328194' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4646116495564328194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4646116495564328194'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/06/icloud-google-and-lock-in.html' title='iCloud, Google and Lock-in'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-YeF_8RIgWqM/TfQa-wgqWAI/AAAAAAAAtAs/c9WnLHIA_lU/s72-c/me.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1132725102746114136</id><published>2011-06-06T16:21:00.001+05:30</published><updated>2011-06-12T06:44:39.316+05:30</updated><title type='text'>The Grand Unified Theory of Computers</title><content type='html'>Disclosure: I work for Google.&lt;br /&gt;&lt;br /&gt;It didn't take long after we learnt of Microsoft's &lt;a href="http://www.youtube.com/watch?v=p92QfWOw88I"&gt;ambitious Windows 8&lt;/a&gt; plans — to unify tablets and computers — for the &lt;a href="http://www.macworld.com/article/160248/2011/06/windows_8_tablet_fails_ipad.html"&gt;Mac&lt;/a&gt; &lt;a href="http://daringfireball.net/2011/06/windows_8_fundamentally_flawed"&gt;blogs&lt;/a&gt;  to declare that it won't work. Tablets are so different from PCs in many  ways, the thinking went, that you can't build an OS that provides a good  user experience on tablets while retaining backward compatibility with  desktop Windows apps. As John Gruber puts it, the iPad has succeeded because it has eliminated complexity; not because it has hidden it.&lt;br /&gt;&lt;br /&gt;Except that that's not true. The iPad hasn't eliminated complexity; it has just moved it elsewhere, onto the PC. Since a Windows 8 tablet is intended to replace both the iPad and the PC, the question is not whether a Windows 8 tablet is more complex than the iPad, but:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;whether a Windows 8 tablet is more complex than the combined complexity of the iPad &lt;i&gt;and&lt;/i&gt; the PC, and the sync between them, which it most likely isn't, and,&lt;/li&gt;&lt;li&gt;whether the extra complexity of the Windows 8 tablet stays out of the way when you don't want to deal with it.&lt;/li&gt;&lt;/ul&gt;For example, John points out that Excel running on the Windows 8 tablet does not autosave new documents and exposes the user to the filesystem. The fact that the Windows 8 tablet can run Excel doesn't increase complexity because, if it couldn't, what would you do when you need the full power of Office? You'd use Office on your PC, and deal with the filesystem anyway. How does it hurt to do so on the tablet? It's just a different box into which you plug in your mouse, keyboard and monitor. In fact, it's simpler, because you don't have to synchronize your documents between the devices.&lt;br /&gt;&lt;br /&gt;This is the fatal flaw in John's argument — he's confusing moving complexity around for reducing it. And when you don't need the complexity of desktop Office, nothing prevents you from using a simpler app that does not expose the filesystem. Microsoft, or someone else, could make such an app, just like Apple did with iWork for the iPad.&lt;br /&gt;&lt;br /&gt;My Android phone hasn't become more complex  just because I installed a file manager app. It doesn't come in my way when I don't use it. And the same argument holds for the filesystem on the Windows 8 tablet. John is confusing being freed from having to manage the filesystem with being prevented from doing so even when you want to.&lt;br /&gt;&lt;br /&gt;Then there's touch. Sure, apps designed for the Windows 8 tablet will be used in both touch and non-touch modes. But that's no worse than the status quo, where apps have to built twice — once for the tablet and once for the desktop. (I'm ignoring phones in this entire discussion.)&lt;br /&gt;&lt;br /&gt;Another big factor is that legacy Windows apps are not designed to quit when the OS asks them to, when the system is low on resources, while apps built using the new Windows 8 APIs can presumably do so. Again, the OS can work around this, by reserving say 90% of the CPU for foreground apps, so that background apps don't slow down foreground apps, but they are not starved for CPU, either, so your music continues playing as you work. Similarly, legacy apps can be limited to consuming some fraction of the system memory, say 2 GB out of 3, so that they can't break the tablet experience by hoarding all the memory. If you open too many legacy apps, they might end up paging to disk, but it won't affect tablet apps built using the new Windows API because they have their own region of memory and are never paged out to flash.&lt;br /&gt;&lt;br /&gt;Again, that's no worse than a PC. It doesn't make sense to fault a device that gives you the simplicity of a tablet and the power of a PC, for giving you the power of a PC, so long as it doesn't come in your way when you don't want it to.&lt;br /&gt;&lt;br /&gt;If all this has a cost, and the Windows 8 tablet lasts only 6 hours on a charge rather than the 10 the iPad does, that's again a good compromise if you end up buying and managing one less device.&lt;br /&gt;&lt;br /&gt;I see no reason why the Windows 8 tablet can't be the best of both worlds while continuing to run legacy apps. But even if you disagree with the legacy apps bit, even if you believe that apps have to be all rewritten for Windows 8 tablet, the weaker form of the above argument — that a single device can function both as a tablet and a PC, or a phone and a PC — is compelling. It means that we have one less device to buy and manage.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1132725102746114136?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1132725102746114136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1132725102746114136' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1132725102746114136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1132725102746114136'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/06/grand-unified-theory-of-computers.html' title='The Grand Unified Theory of Computers'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7329970039404156341</id><published>2011-05-29T22:32:00.004+05:30</published><updated>2011-05-30T08:21:00.286+05:30</updated><title type='text'>Where Apple's 30% policy went wrong</title><content type='html'>&lt;div&gt;Disclosure: I work for Google.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Is it fair for Apple to demand 30% of all subscriptions on iOS? They obviously deserve &lt;i&gt;something&lt;/i&gt;, because they've built a low-overhead purchasing platform, which increases the number of transactions. In other words, some (many?) of these transactions wouldn't have happened were it not for Apple, so they arguably deserve a cut.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On the other hand, if I've made up my mind that The Economist is worth reading, and paying for, Apple can't claim credit for that. If I were to subscribe using my Chromebook rather than my iPad, does it mean that Google deserves a cut?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Apple's policy is fair if the increase in volume of transactions compensates for the 30% cut. Unfortunately, we don't have numbers for this. I doubt even Apple does.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Besides, there isn't a single number. It varies based on the type of content (I'll pay for music videos, but not for news), the format (I'll pay for a newsmagazine over a newspaper, because the former usually gives me the big picture), the quality of the content (I'll pay for The Economist over a tabloid), the user experience of the app (I'm inclined to pay for in-app content if the app is stable and fast and the user experience is frictionless, unlike, say, the New York Times app) and a lot of other factors. So there isn't a single answer that applies to everyone.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Given this lack of certainty, if Apple wants 30% of all money made in my app, the onus is on them to demonstrate unambiguously that the frictionlessness of in-app purchase brings in enough money to compensate for their cut. Since they haven't, and given the obvious conflict of interest Apple has here, one can't fault developers for concluding that Apple is putting its own interests above that of the iOS ecosystem as a whole, and concluding that the 30% cut is a land grab, almost like a car manufacturer demanding 30% of your salary for driving to a job interview in their brand of car.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Of course, Apple is free to do whatever they want, but that's like saying Volkswagen is free to put giant "Fuck You!" signs in their showrooms. If Apple is appropriating revenue generated by third-party apps, those people have less of an incentive to work on their platform. For example, I'm considering whether to move out of iOS development. This hurts everyone — Apple, developers and users.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Instead they should have done one of two things:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Reduce their cut to less than 10% for "content" rather than app features, like sync functionality in a notes app or a level in a game. Content is what you can consume on non-mobile devices — a traditional computer, TV, paper, etc. Of course, there'll be some gray areas, but it's better for Apple to give a fair deal in obvious cases than not to, at all. The less the cut, the easier it is to convince people that the increase in transactions compensates for it, and so, less the controversy.&lt;/li&gt;&lt;li&gt;Allow apps to use their own purchasing systems. Sure, Apple's system has the better user experience, but it would be hypocritical of Apple to force people into using it for that reason. If Apple cares so much for user experience, they should enable in-app purchase at no charge for apps. Otherwise let apps use whatever payment systems they want to.&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;One thing that should not change is the policy that publishers can't charge iOS users any more than what they charge for the same content elsewhere. Or that they shouldn't automatically be given users' personal information to sell.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7329970039404156341?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7329970039404156341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7329970039404156341' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7329970039404156341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7329970039404156341'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/05/where-apples-30-policy-went-wrong.html' title='Where Apple&apos;s 30% policy went wrong'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-6478381449231520017</id><published>2011-05-16T15:00:00.002+05:30</published><updated>2011-05-16T15:06:47.483+05:30</updated><title type='text'>iPhone 5 Wish List</title><content type='html'>Here's what I'd like in the iPhone 5:&lt;div&gt;&lt;ul&gt;&lt;li&gt;a 4.5-inch screen at 300+ ppi.&lt;/li&gt;&lt;li&gt;It should sync and stream media from multiple devices without the user having to bother about the difference.&lt;/li&gt;&lt;li&gt;It should work as a PC with an existing Bluetooth keyboard and mouse, and an existing monitor, maybe with an adapter that costs $99 or less. After all, the iPhone has more than enough power to run a browser on a big screen.&lt;/li&gt;&lt;li&gt;A sane version of iTunes that periodically rescans your media directories and automatically keeps its library in sync, and has a one-click transcode function.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-6478381449231520017?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/6478381449231520017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=6478381449231520017' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6478381449231520017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6478381449231520017'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/05/iphone-5-wish-list.html' title='iPhone 5 Wish List'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-2285509894259666177</id><published>2011-05-16T14:29:00.003+05:30</published><updated>2011-05-16T14:44:00.988+05:30</updated><title type='text'>Windows Phone 7 — Promising Yet Frustrating</title><content type='html'>&lt;div&gt;I used a Windows Phone 7 phone (HTC HD7) for a week as my only phone, and here are some thoughts. The UI, called &lt;a href="http://en.wikipedia.org/wiki/Metro_Design_Language"&gt;Metro&lt;/a&gt;, is a tremendous accomplishment — nothing like iOS or Android. It's so smooth and airy and almost organic. In contrast, the iPhone feels rigid and sterile. Animations, for example, are even smoother than on the iPhone. There's an extreme emphasis on reducing all unnecessary UI elements, and lavish use of whitespace. If you think iOS is minimalist, prepare to be pleasantly surprised.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Text occupies a primary role in the Metro interface. You'd never think that text can be so beautiful and that it can structure a UI so delightfully rather than just being content placed within a framework formed by other elements. Then there's the full bleed, where content goes to the edge and past it, as if you were looking at a just one part of a UI that's bigger than the screen.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's authentically digital. I'm sure the Metro designers had the iPhone in mind when they say, "don't try to be what it's NOT". Another great principle is that transitions between screens are as important as the screens themselves. It feels so responsive and alive.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not that it doesn't have its rough edges. Some widgets look terrible, for example, the toggle switch, or the action buttons at the bottom of the screen. You can't quickly navigate to a contact whose name starts with S, say, in the contacts app. I also found some basic navigation and usability issues. Once I selected an album to play and browsed to other albums and artists, I couldn't return to the playing album, or find out which song was playing. I did notice that the currently playing screen seemed to be the left of the main screen in the music app, but I couldn't find it later. Another time I was able to reach it by pressing the back button from some other app (the home screen, I think).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Metro is also tremendously wasteful of screen space. Everything is unnecessarily big -- the tiles on the home screen, the contacts in your phone list, song titles in the music app... Simple tasks require navigating to multiple screens, and you see less on any single screen. The HD7 I used has a big 4.3-inch screen, but it doesn't feel any bigger than the iPhone, because the UI squanders all that real estate. This is the biggest problem with Windows Phone 7 — it sacrifices too much function in pursuit of form, as elegant as it may be.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then there are the mundane problems -- the app store wasn't available in my country (India). It's irresponsible to sell a phone for Rs. 30,000 ($660) without enabling the app store. If I can't use apps, I have to use the browser, which is terrible. It's not even touch-optimized in the most basic way -- the combined address/search bar (yay) is too small to hit. I often have to try several times. The browser sucks technically too, with hardly any HTML5 support. And the default search engine, Bing, can't be changed. Which would be okay for me (though I work at Google) if Bing worked well. Unfortunately it doesn't, at least not in India. I used Bing as my default search engine on my desktop for a couple of months, and I almost lost the ability to find things on the internet. I wouldn't buy a phone with such a broken search experience.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Upgrading the phone is also a pain. The sync app is not available outside of the Mac App store, and it's bad and keeps crashing or eating up 100% CPU without doing anything useful for a long time. Then it didn't let me upgrade the OS, telling me that there weren't any updates. After wasting a lot of time on phone with the semi-informed HTC support, the solution turned to be reinstalling the sync app. This is almost like the old and buggy Windows days. If I have to call customer support to figure out how to upgrade my phone, there's a good chance I wouldn't want to buy a Windows Phone 7 device the next time.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Then there are most elementary and frustrating hardware issues that remind us that HTC is not Apple. You need to use the physical button to take a photo, but you need to press it so hard to get it to take the photo that the phone shakes and most of my pictures are blurry. This is so frustrating on such a high-end phone. It reminds us of a major drawback with the non-integrated Windows Phone 7 and Android strategies -- the hardware vendors continue to surprise us in finding new ways to screw up up basic functionality. I can't imagine this problem occurring on an iPhone, which is what I'm returning to, from the elegant yet semi-functional Windows Phone 7 world.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-2285509894259666177?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/2285509894259666177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=2285509894259666177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2285509894259666177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2285509894259666177'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2011/05/windows-phone-7-promising-yet.html' title='Windows Phone 7 — Promising Yet Frustrating'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-4674908451143052421</id><published>2010-12-30T20:21:00.028+05:30</published><updated>2011-06-05T19:38:50.522+05:30</updated><title type='text'>Why I Prefer Native Apps on iPhone</title><content type='html'>&lt;div&gt;&lt;div style="background-color: transparent; font-family: Times; font-size: medium; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;I often use the iPhone task switcher to move between apps — the one that you get by double-tapping the home button. I found yesterday that the first three screens of apps on that list were all native apps. I find myself using more native apps on my iPhone as time goes by. I stopped to think why, and it turned to be interesting.&lt;br /&gt;If I want to use a great web app on iOS, where do I find it? There's no&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;Mobile Webapp Store, no place where I can find web apps specifically built for the iPhone or the iPad. &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;I&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; often end up using desktop sites — sites that are built for a big screen and are not touch-optimized. These are utterly crappy to use on the iPhone. I'm not saying that there are no great mobile web apps. But when there's no way to discover them, the end result is the same. And that sets up a vicious cycle — it doesn't pay to build a web app, since most users wouldn't use it, going instead to the (native) app store.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;Then there's the iOS convention of having a clean, clutter-free UI with only the most commonly used features, rather than the overload of interface junk that you see on the web. The factor that matters the most in the apps vs. web apps discussion may not be a technical matter at all.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;Finally, native apps are fast because they don't have to be loaded across the network. And they store your data on the device, too, in addition to the app itself, so they load instantly. Saying that web apps can be offline-enabled is missing the point. They're often not. Maybe it's because if you're building a native app, you get offline functionality by default whereas, for a web app, you have to figure out how to enable offline and get it to work. Whatever the reasons, the existence of the API means nothing if apps don't use it.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;OPENGL&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;The conventional wisdom is that it's technically possible to build a native-quality HTML5 app. Apple has certainly built &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;a href="http://help.apple.com/iphone/3/mobile/"&gt;one&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;. But think of all the thoughtful little things that go into a great UI, like icons that may look small but have a bigger touch area, icons that glow when touched, or the rubber band-like bounce effect that tells you you’ve scrolled to the end of a list. Or the intricately choreographed and non-linear animations for something as simple as a &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;a href="http://watchingapple.com/2009/11/a-closer-look-at-iphone-transition-animations/"&gt;page transition&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;Are these even technically possible in web apps? WebGL isn’t yet supported in iOS or Android. Sure, it will be, but I’ve been hearing for years that web apps will soon be competitive with native apps. I’m not holding my breath.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;FRAMEWORK&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; white-space: pre-wrap;"&gt;So if many of the iOS interface effects require OpenGL, there are surely some that don't? How many web apps implement these, at least? Zero?&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;As Faruk Ateş astutely &lt;a href="http://farukat.es/journal/2009/11/347-iphone-developers-arent-stupid-ppk"&gt;points out&lt;/a&gt;, when you're building an iOS app, you're not starting from scratch. You're starting with the Cocoa Touch framework, which is built to enable the top-notch user experience of iOS. For example, if you want to make an icon glow when touched, to give the user feedback, all it takes is one line of code:&lt;br /&gt;button.showsTouchWhenHighlighted = YES;&lt;br /&gt;How many web app frameworks are designed to build this kind of top-quality interface, and that too so easily?&lt;br /&gt;To use web apps on iOS is to discount everything that makes the platform wonderful.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;CONSISTENCY&lt;br /&gt;Native apps also have a look-and-feel consistent with the platform. Not just the widgets, but also the UI design patterns. For example, when there are too many tabs to display on screen, the others collapse into a More tab that you tap to see the hidden tabs. There’s also an edit control that you can tap to customize tabs, by dragging frequently used tabs out of the More tab, so that they are visible all the time. Another convention, in certain situations, is to put settings behind the main screen, and put an i icon at a corner to flip the screen.&lt;br /&gt;The cross-platform nature of web apps works against being consistent with a particular platform. A mobile web app tries to provide the best user experience not just to iPhone users, but also to users using Android and maybe Windows Phone 7 and their ilk. And when you try to do that, how is it possible to be consistent with each platform? Put differently, if you were to create a great iPhone web app, wouldn’t you want to open it up to Android users?&lt;br /&gt;It’s possible, of course, to build a web app specifically for iPhone, but if you’re doing that, you're losing out on the main advantage of web apps, which is cross-platform compatibility. Why not instead build a native app?&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;INCENTIVES&lt;br /&gt;Native app developers also have an incentive to sweat the details, not just because they can charge money, but also because they attract more users, since the App Store lets users easily discover, rate and compare apps.&lt;br /&gt;Finally, native apps are first-class citizens on iOS. Even if you create a home screen icon for a web app, tapping on that icon when the web app is already running will reload it, whereas you can instantly switch back and forth between native apps. Further, native apps also have their own entry in the task list (that you get when you double-tap the home button), so you can instantly switch back and forth.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span class="Apple-style-span" style="white-space: pre-wrap;"&gt;(Disclaimer: I work for Google.)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-4674908451143052421?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/4674908451143052421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=4674908451143052421' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4674908451143052421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4674908451143052421'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2010/12/why-i-prefer-native-apps-on-iphone.html' title='Why I Prefer Native Apps on iPhone'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7637282386811943151</id><published>2010-03-06T12:46:00.005+05:30</published><updated>2010-03-07T09:05:31.435+05:30</updated><title type='text'>Why Physical Buttons Suck</title><content type='html'>I was thinking about hardware buttons on Android phones and iPhone, and I realized that most of them sound good initially but actually worsen the user experience.&lt;br /&gt;&lt;br /&gt;The biggest user experience failure is the menu button:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It takes more actions to do frequently performed tasks. For instance, whenever I open Maps, I have to press the menu button followed by search rather than directly tapping on a search button. Searching is the main reason I use  Maps, and it's objectively worse to move it one click away. The same goes for &lt;span style="font-style: italic;"&gt;compose&lt;/span&gt; in Gmail. Cramming a little more content on screen while moving these extremely frequent actions one click away is plain stupid.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It moves actions offscreen, which is bad in the same way that command-line interfaces are worse than GUIs, for most people. Show the user what he can do right there on the screen. And since every screen has different actions on it, you never know what capabilities are present.&lt;/li&gt;&lt;li&gt;It's harder for new users to learn, when there are so many buttons to press. I was initially confused and slightly stressed out, being a geek and all, and my mom was more stressed out when I ask her to use my Android phone — what button do I press?  Why should anyone put up with this?&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Then there's the back button, which, as it's name says, takes you to the previous screen. iPhone, of course, uses an on-screen button for this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_CDB69BylceM/S5IIdCpVb2I/AAAAAAAAFZc/AVu8PA-_tE8/s1600-h/navigation_interface.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 190px; height: 282px;" src="http://2.bp.blogspot.com/_CDB69BylceM/S5IIdCpVb2I/AAAAAAAAFZc/AVu8PA-_tE8/s400/navigation_interface.jpg" alt="" id="BLOGGER_PHOTO_ID_5445424194463821666" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;There are several problems with a physical button:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It's a proxy for a screen in the UI, and requires the user to remember what the last screen was. For example, if I'm reading a mail on my Android, pressing back takes me to the inbox unless, for instance, I reached this mail by a search. Instead of requiring the user to remember this context, show it on-screen. I want to go to my inbox, not back, forward, or sideways.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It's not clear, at least to me, whether it's a back or an up button&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;. &lt;/span&gt;&lt;/span&gt;Does it take you the previous screen, or one level up in the information hierarchy of the application, without regard to history? Windows Explorer's &lt;span style="font-style: italic;"&gt;up&lt;/span&gt; toolbar button comes to mind. For instance, if I go from my friend list to a friend X, and from there to a mutual friend Y, &lt;span style="font-style: italic;"&gt;back&lt;/span&gt; takes you X, whereas &lt;span style="font-style: italic;"&gt;up&lt;/span&gt; takes you to your friend list. If the button were labeled, like on the iPhone, this ambiguity disappears.&lt;/li&gt;&lt;li&gt;There are some screens where it's not clear what the back button does. When you enter something into a text field, does a back button press save it, or prompt the user what to do? It may make sense for gmail, where the user may expect autosave from having used gmail on the desktop. Whereas I was surprised when the SMS app autosaved, which I was not used to on my previous phone. So, it's not clear to the user what the button does, since it's not labeled, and worse, potentially inconsistent from app to app.&lt;/li&gt;&lt;li&gt;Android lets you move from one app to another without going through the home screen, by long pressing the home button. In that case, should the back button take you to the previous screen in the current app, or the globally previous screen? I find that it does the latter, but it's confusing. For example, I switched from Calendar to SMS via long press on the home button. I had an unread SMS, so it took me to that message, and I pressed back to go to my list of SMSs ("inbox"), but it took me to Calendar. Whereas if I had navigated to the SMS app from the home screen rather than by long press, back would have taken me to my message list. So this inconsistency is another argument against a back button.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Once again, it has a learning curve. The first hour of my Android experience was frustrating, since I seemed to be getting stuck all the time with no way to navigate out of the current screen.&lt;/li&gt;&lt;li&gt;You have to move back and forth between the screen and physical buttons, which breaks the flow and does not lead to as &lt;a href="http://daringfireball.net/linked/2010/02/08/rose-carr"&gt;fluid&lt;/a&gt; an interaction as on the iPhone.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;I haven't used the search button much, but I wonder if it's a global search or app-specific search. If it's the former, it's jarring since you don't want to perform global actions from within an app. If it's the latter, what about apps that don't support it, like perhaps games? Will users come to know of this as the button that sometimes works and sometimes doesn't?&lt;br /&gt;&lt;br /&gt;Hopefully at some point Android will catch up with the iPhone's ease of use, convenience and fluid interaction.&lt;br /&gt;&lt;br /&gt;Update: Added another reason why back is inconsistent when you switch apps using long press.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Disclaimer: I work for Google.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-style: italic;"&gt;Image credit: Apple.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7637282386811943151?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7637282386811943151/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7637282386811943151' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7637282386811943151'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7637282386811943151'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2010/03/why-physical-buttons-suck.html' title='Why Physical Buttons Suck'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_CDB69BylceM/S5IIdCpVb2I/AAAAAAAAFZc/AVu8PA-_tE8/s72-c/navigation_interface.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3246074242124254513</id><published>2010-03-01T16:09:00.003+05:30</published><updated>2010-03-01T16:52:54.881+05:30</updated><title type='text'>The "all you can do is send a message" model isn't enough</title><content type='html'>I came across a &lt;a href="http://www.eros-os.org/pipermail/e-lang/2001-October/005852.html"&gt;post&lt;/a&gt; by Jonathan Rees that I couldn't understand, but after several re-readings, it made sense, and it's an interesting point — the "all you can do is send a message" model, a.k.a the actor model, isn't enough.&lt;br /&gt;&lt;br /&gt;First, some background, if you're not a programming language geek: many languages support message passing, which is like calling a method but different in that the receiver can define a catch all method that traps all unresolved method calls. Ruby, for example, calls this &lt;a href="http://ruby-doc.org/core/classes/Kernel.html#M005925"&gt;method_missing&lt;/a&gt;. This is different from Java where a class has to specify at compile time what methods it defines. Message passing is obviously more powerful, since it lets you implement things like proxies for RPC, access control or object persistence that can transparently decorate any object without knowing its interface.&lt;br /&gt;&lt;br /&gt;The "all you can do is send a message" model rules out any other way of interacting with an object -- instanceof, object identity (that is, comparing pointers) and, of course, fields, which anyway can be looked at as synactic sugar for methods.&lt;br /&gt;&lt;br /&gt;With that background, the aforementioned post says that this model, despite seeming to be more powerful since it lets objects control and customize all interaction with them, is actually less powerful since you can't deal with unknown objects in a safe way. For instance, if you're building an OS or runtime and implementing file I/O, you can't check paths against an ACL in a safe way. You can access the string object, but who knows if it's a nefarious imposter that returns one value when you check its value, and another when you actually access the path? You could store individual characters in the string in an array of your own, but who knows if the character objects are themselves safe? To generalize, you can't have any scenario in which you load untrusted or partially trusted code into the same process and attempt to enforce a reasonable security policy. Examples of these being a Javascript interpreter in a browser that allows script to access the same domain but not others, or an &lt;a href="http://en.wikipedia.org/wiki/Singularity_%28operating_system%29"&gt;OS&lt;/a&gt; that uses sandboxing rather than hardware-supported processes.&lt;br /&gt;&lt;br /&gt;The only way out is to have an instrinsic notion type of an object as something visible to clients, independent of the behavior (methods). There must be a builtin instanceof operator or function as part of the language itself, and a way to compare pointers to see if they point to the same object.&lt;br /&gt;&lt;br /&gt;Once you have this notion of the type of an object independent of its behavior (methods), methods don't need to be defined as part of the object; instead they can be defined as independent entities and hang off the object type. That is, an object is merely a map of key-value pairs, with an associated tag or type. Methods can be defined outside the object, and found based on the types of the arguments (&lt;a href="http://en.wikipedia.org/wiki/Multiple_dispatch"&gt;multimethod dispatch&lt;/a&gt;). And you can build the language all the way up from that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3246074242124254513?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3246074242124254513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3246074242124254513' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3246074242124254513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3246074242124254513'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2010/03/all-you-can-do-is-send-message-model.html' title='The &quot;all you can do is send a message&quot; model isn&apos;t enough'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3748625441995836424</id><published>2010-03-01T12:49:00.000+05:30</published><updated>2010-03-01T12:36:15.385+05:30</updated><title type='text'>Thoughts on the Go programming language</title><content type='html'>Some random thoughts on &lt;a href="http://arstechnica.com/open-source/news/2009/11/go-new-open-source-programming-language-from-google.ars"&gt;Go&lt;/a&gt;, the language from Google.&lt;br /&gt;&lt;br /&gt;Why does it require mandatory type declarations, rather than inferencing types like Haskell and C#? A type system that precludes higher-order functions sucks.&lt;br /&gt;&lt;br /&gt;Untyped constants are good, but an option for dynamically typed variables would also be good. I'm all for detecting errors as early as possible, and having variables be statically typed (with type inferencing) as a default is not something I'm going to argue with here, but not providing an option for dynamic typing just amounts to curtailing flexibility and resulting in programs that require 200 lines to do what better languages let you do in 20. Once again, prioritizing safety over expressiveness is fine as a default, but only as a default. Only an omnipotent designer can say that there's no situation in which dynamic typing is useful. Or if you're designing for idiots. Paul Graham puts it much better when he talks of the &lt;a href="http://www.paulgraham.com/ilc03.html"&gt;three reasons&lt;/a&gt; languages have restrictions.&lt;br /&gt;&lt;br /&gt;While we're still taking about types, why not have infinite-precision math? Why do you want to bother about the size of an integer except in hotspots?&lt;br /&gt;&lt;br /&gt;The distinction between statements and expressions is also traditional, but doesn't buy you anything but verbose code.&lt;br /&gt;&lt;br /&gt;The language  uses things that we are forbidden from using, as mere programmers. This is a bad attitude for a language to take, because if the language needs something, chances are programmers would find it useful, too.&lt;br /&gt;&lt;br /&gt;The notion that some types are passed by value and others by reference is also incredibly clunky. Simpler is to pass everything by reference, and as an optimization, say that object identity is not preserved for certain types.&lt;br /&gt;&lt;br /&gt;In summary, Go is not clean. There's no central philosophy, no single metaphor or abstraction (everything is an &lt;a href="http://en.wikipedia.org/wiki/Smalltalk"&gt;object&lt;/a&gt;, or a &lt;a href="http://en.wikipedia.org/wiki/Lisp_%28programming_language%29"&gt;list&lt;/a&gt;, or a &lt;a href="http://en.wikipedia.org/wiki/Erlang_%28programming_language%29"&gt;process&lt;/a&gt;, or that things are evaluated only when &lt;a href="http://en.wikipedia.org/wiki/Haskell_%28programming_language%29"&gt;needed&lt;/a&gt;). This is just a hogde-podge of C++ and Java with various random ideas thrown in. It ends up being better than C++ and maybe Java, but that's a low bar for language design.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3748625441995836424?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3748625441995836424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3748625441995836424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3748625441995836424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3748625441995836424'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2009/11/thoughts-on-go-programming-language.html' title='Thoughts on the Go programming language'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1418645278118759895</id><published>2010-03-01T12:01:00.005+05:30</published><updated>2010-03-01T15:29:40.278+05:30</updated><title type='text'>The Ideal Taskbar</title><content type='html'>&lt;div&gt;Reading about Windows  7's taskbar changes, and an &lt;a target="_blank" href="http://arstechnica.com/software/news/2009/01/dock-and-windows-7-taskbar.ars"&gt;insightful  article&lt;/a&gt; on window and app switchers in general, I noted down what I would want from such a thing, which I refer to as "taskbar" for lack of a better name. Think of it as the dock if you prefer.&lt;br /&gt;&lt;p&gt;To start with, the taskbar  should unify:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Apps that have some windows&lt;/li&gt;&lt;li&gt;Apps that  have no windows open&lt;/li&gt;&lt;li&gt;Apps that are not running but are important  to the user&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;All these apps should be displayed  identically, rather than having some squirreled away in a quick launch  area, and others in a notification area (and yet others having to  display empty windows). The user shouldn't have to deal with the  difference between starting an app and switching to it.&lt;/p&gt;&lt;p&gt;Further,&lt;/p&gt;&lt;ul&gt;&lt;li&gt;If  an app has multiple windows, each window should have its own entry in  the taskbar, so that the user can switch directly between windows  without going through a two-step process of first selecting an app and  then a window. This makes the app a combined  app/window switcher. It's not "pure", but more practical — if the user is working on two documents at once,  each of them is  important enough to be shown as a first-class entity. It's simpler, too. The first few days of using the Mac were frustrating when I had two Firefox windows open, but no visible and obvious way to reach the second one.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;What about  tabs? They are somewhat similar to an app with multiple windows. That  is, it's inconsistent that if I open a new window in Chrome, it gets its  own taskbar entry, but not if I open a new tab. I can easily imagine  Word opening multiple documents in tabs rather than windows. The taskbar should list the things the user is working on without regard to the details of how they're presented. And if each  tab gets its own taskbar entry, with a label and even a spinner for a  browser, what need do we have for tabs within windows, since we in  effect have a tab bar in the taskbar?&lt;/li&gt;&lt;li&gt;Each taskbar entry should  be labeled. An icon isn't always enough to disambiguate apps or windows.&lt;/li&gt;&lt;li&gt;Alt-Tab  should just cycle between the entries of the taskbar, which are both  apps and windows. Why define some other semantics? Keep the shortcut's behavior consistent with the visual representation. Gone are the Mac's Command-Tab vs. Command-` distinction.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If the OS launches apps when needed,  shouldn't it shut them down when they're no longer needed, like Android  does? Why should users have to bother with the idea of quitting  background apps, any more than they bother with context switching or  virtual address spaces?&lt;/p&gt;&lt;p&gt;In fact, my Dock isn't a list of  apps I'm working with; it's merely a list of apps some of which I  haven't used for weeks and haven't bothered to quit. In other words,  it's an arbitrary list. Instead, show a list of the most recently used N  apps, as Android does (when you long press on home). And if an app has  multiple windows, show multiple entries.&lt;span class="__wave_paste" annotations="65,83,link%2Fmanual,http%3A%2F%2Farstechnica.com%2Fsoftware%2Fnews%2F2009%2F01%2Fdock-and-windows-7-taskbar.ars:" xml=""&gt;&lt;line&gt;&lt;/line&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic;"&gt;Update&lt;/span&gt;: Linux, as usual, lags behind. I'm sure they will copy this by 2015.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1418645278118759895?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1418645278118759895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1418645278118759895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1418645278118759895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1418645278118759895'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2010/03/ideal-taskbar.html' title='The Ideal Taskbar'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7026042593457258718</id><published>2010-01-29T15:48:00.013+05:30</published><updated>2010-01-30T19:28:17.875+05:30</updated><title type='text'>iPad: computing re-imagined, and openness</title><content type='html'>After I watched the iPad keynote and the Reality Distortion Field wore off, I was a little underwhelmed. It wasn't clear that the iPad lived up to Jobs's claim of being significantly better in a few key areas. It just seemed like a giant iPod Touch or a computer with a small screen and without a keyboard.&lt;br /&gt;&lt;br /&gt;But then I realized I was looking at it all wrong. Being used to laptops on one hand and phones on the other, I was comparing the iPad to these two, and  so obviously all I could see were limitations. That makes as much sense as dismissing the iPhone as an underpowered computer. Rather than look at the iPad from the perspective of a laptop, I decided to look at its advantages:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It's more portable — smaller, thinner and lighter.&lt;/li&gt;&lt;li&gt;The form factor is beautiful. It's just an elegant piece of glass. Even my Macbook Pro seems clunky by comparison. Why shouldn't computers be so beautifully designed rather than merely utilitarian?&lt;/li&gt;&lt;li&gt;It has a very long battery life. Even taking the 10 hours claim with a grain of salt, it's much better than laptops. I'm sure it will be an incredible relief from devices that need to be plugged in practically all the time. And in countries like India, with frequent 8-hour power cuts, a long battery life makes all the difference.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;3G: Having an internet connection of its own rather than relying on an external source like WiFi is great, because you are connected on the go, and at home when you have a power outage. I thought that the iPad will be carrier-locked, given Apple's history with the iPhone, even in markets like India where few phones are locked. But when Apple is establishing a new kind of computing device, it only hurts them to restrict it that way, and set a precedent that's bad for everyone except the carriers.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Multi-touch: I haven't used the iPad yet, but I'm sure it's very satisfying to directly touch objects rather than going through an intermediary like a mouse. Plus who knows what advantages multi-touch has? For example, zooming and panning in maps seemed much better than on a computer, with a keyboard and mouse. There will be a gold rush of user interface advancements in the new paradigm.&lt;/li&gt;&lt;li&gt;It has a high-resolution screen (132 pixels per inch).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It's cheaper than most laptops.&lt;/li&gt;&lt;/ul&gt;But the interesting things are not what it has, but what it doesn't. To start with, you are free from malware of all kinds — virii, worms, spyware, keyloggers, trojan horses and bots. The existence of so many terms is itself a sad state of affairs for the computer industry. Any technology that doesn't just work by itself and requires users to learn and carefully follow a big list of dos and don'ts is broken. Apple just fixed computing. The iPad is a safe computer for everyone.&lt;br /&gt;&lt;br /&gt;In addition to being malware-free, it doesn't become slow over time, you can't corrupt it say, by deleting files you're not supposed to delete, and so forth.&lt;br /&gt;&lt;br /&gt;And it's simpler — no overlapping windows. One thing at a time. You never have many windows on screen at once, you don't position them, there's no notion of which window is focused, and so forth. One thing at a time. No menu bar, either. Let the app decide how to present its UI, rather than forcing a hierarchical menu layout on everyone. There's no notion of running vs. closed apps, and so no dock or taskbar to switch between running apps. And no notion of running apps without a visible window that you reach from the system tray or status bar.&lt;br /&gt;&lt;br /&gt;I'm exhilarated at the idea of not dealing with windows, menus, a dock or taskbar, and a system tray that apps can hide in, and the idea of manually quitting apps. Very simple. One thing at a time.&lt;br /&gt;&lt;br /&gt;You don't spend your time positioning windows. There aren't zillions of options to twiddle. In addition to being simple, the iPad is an &lt;a href="http://mrgan.tumblr.com/post/357323170/free"&gt;administrivia-free &lt;/a&gt;computing experience.&lt;br /&gt;&lt;br /&gt;This is the &lt;a href="http://stevenf.tumblr.com/post/359224392"&gt;New World&lt;/a&gt; of computers.&lt;br /&gt;&lt;br /&gt;The iPad runs the same apps as your iPhone. If you think about it, why shouldn't your computer  run the same apps as your phone? Just because it has a bigger screen?&lt;br /&gt;&lt;br /&gt;Some people wish that it ran Mac OS X rather than iPhone OS. But the latter is more lightweight and so is faster and results in a longer battery life. It's also more secure and simpler, doing away with the overlapping windows paradigm. And it does away with cruft that accumulated in Mac OS X.&lt;br /&gt;&lt;br /&gt;The final, and most serious, concern is that the iPhone/iPad platform is not open. As Alex puts it eloquently:&lt;br /&gt;&lt;blockquote style="font-family: arial;"&gt;The thing that bothers me most about the iPad is this: if I had an iPad rather than a real computer as a kid, I’d never be a programmer today. I’d never have had the ability to run whatever stupid, potentially harmful, hugely educational programs I could download or write. I wouldn’t have been able to fire up ResEdit and edit out the Mac startup sound so I could tinker on the computer at all hours without waking my parents. The iPad may be a boon to traditional eduction, insofar as it allows for multimedia textbooks and such, but in its current form, it’s a detriment to the sort of hacker culture that has propelled the digital economy.&lt;br /&gt;&lt;/blockquote&gt;But the proof of the pudding is in the eating. If openness and tinkering and being able to do what you want without permission are important, that will ultimately reflect in the apps. Competing platforms should have better apps. And this is already happening. When I read that the best mobile Gmail experience is on Nexus One (Disclaimer: I work for Google), and Google Maps navigation and Google Voice are not available or not as good on the iPhone, I think that's the end result of the mismanaging the platform.  If I were Apple, reading that the Nexus One is a better phone than the iPhone for people who heavily use Google apps would have scared the hell out of me. Mac OS X isn't any worse an OS to access Google services, and Chrome  lets you access Bing as well as it does google.com.&lt;br /&gt;&lt;br /&gt;So, if openness is important, and the iPad isn't open, good old-fashioned capitalism should sort it out, giving us competing tablets based on Android, Chrome OS or some other OS that are better in ways that matter to users, while building on top of all the genuine advances iPad makes. I don't think that the future is &lt;a href="http://www.youtube.com/watch?v=tdVzboF2E2Q"&gt;dystopian&lt;/a&gt; at all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7026042593457258718?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7026042593457258718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7026042593457258718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7026042593457258718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7026042593457258718'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2010/01/ipad-computing-re-imagined-and-openness.html' title='iPad: computing re-imagined, and openness'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8299509621790909742</id><published>2009-07-05T12:17:00.003+05:30</published><updated>2009-07-05T12:29:07.591+05:30</updated><title type='text'>Why the GPL turns away many contributors</title><content type='html'>Interesting &lt;a href="http://www.red-sweater.com/blog/825/getting-pretty-lonely"&gt;article&lt;/a&gt; that points out how the GPL turns away many contributors, since people are more likely to contribute to a project if they can reuse their work in any project of their choice.&lt;br /&gt;&lt;blockquote&gt;The popular &lt;a href="http://subversion.tigris.org/"&gt;Subversion&lt;/a&gt; source control system’s liberal license enabled &lt;a href="http://www.madebysofa.com/"&gt;Sofa&lt;/a&gt;, a commercial software business to contribute value to the community with its extremely polished, &lt;a href="http://versionsapp.com/"&gt;award-winning client application&lt;/a&gt;. Meanwhile, the newly popular distributed source control systems presents three major choices: &lt;a href="http://git-scm.com/"&gt;git&lt;/a&gt;, &lt;a href="http://mercurial.selenic.com/wiki/"&gt;Mercurial&lt;/a&gt;, and &lt;a href="http://bazaar-vcs.org/"&gt;Bazaar&lt;/a&gt;. All are restricted by the GPL-license, and therefore none is likely to inspire development of a Versions-caliber client. &lt;/blockquote&gt;GPL is for people who are either ideologues or don't want commercial vendors to profit by building on their work, while failing to realize that they add value in areas that may be important to users but where the open-source community sucks, like &lt;a href="http://daringfireball.net/2004/04/spray_on_usability"&gt;UI design&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8299509621790909742?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8299509621790909742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8299509621790909742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8299509621790909742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8299509621790909742'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2009/07/why-gpl-turns-away-many-contributors.html' title='Why the GPL turns away many contributors'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-5144634718636965185</id><published>2009-07-05T11:41:00.004+05:30</published><updated>2009-07-06T10:51:05.729+05:30</updated><title type='text'>How many buttons should a phone have?</title><content type='html'>Apple's genius of simplicity gave us a phone with just one physical button. Whereas the Android phones have many more:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_CDB69BylceM/SlBFXGDhQ7I/AAAAAAAABzs/9vNOOao9DF4/s1600-h/magic"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 219px;" src="http://4.bp.blogspot.com/_CDB69BylceM/SlBFXGDhQ7I/AAAAAAAABzs/9vNOOao9DF4/s400/magic" alt="" id="BLOGGER_PHOTO_ID_5354856220008203186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This set me thinking -- what's the right number of buttons for a touch-screen phone to have?&lt;br /&gt;&lt;br /&gt;We obviously need a home button, for multiple reasons: returning to the home screen is something we do all the time, and you want to do it at one shot rather than backing out from a deep hierarchy step by step. Also, you need at least one button controlled by the OS, to move out of a hung app.&lt;br /&gt;&lt;br /&gt;The back button that Android phones have is also useful, because that's also a frequently performed action, for which a hardware button helps, and you wouldn't want each app to express the same idea in slightly different ways. And, importantly, Android lets you move from one screen to another without regard to what apps they are part of. For instance, from Email, you can click on Attach to launch Gallery, then click on an image or video to see it full-screen. Pressing back takes to the gallery view, and pressing back again takes you back to email. Since each app controls the screen entirely without regard to the context in which it's invoked, you need a physical back button to transition between screens without regard to which apps they are from. I always find it jarring that on the iPhone, if you're deep within an app, you can progressively come out of the hierarchy by tapping the button at the top-left, but only till you reach the app's main screen. The system should not enforce such a strong separation between apps -- going back is a general action that makes sense from the main screen of an app, and between apps as in the Android example above.&lt;br /&gt;&lt;br /&gt;I hate the menu key on Android phones. Better to put the actions right there on the screen where the user can see it. The first hour or so of using Android was very frustrating to me, since I seemed stuck, with no way to navigate out of the current screen. In addition to having a smoother learning curve, or rather none at all, putting the actions on screen saves one button press — the set of available actions isn't hidden from you till then.&lt;br /&gt;&lt;br /&gt;Some actions are so frequently used that putting them one level of indirection away is plain wrong, in that it takes the user more clicks to do the same task. If there are too many actions to show on screen at once, take the user to a second screen. Which is what the menu is, to some extent — you see only content on screen, till you press the menu button, at which point you see navigation. It would be more intelligent to mix and match content and navigation, showing the most important ones from each, and take the user to a second screen with additional content and actions.&lt;br /&gt;&lt;br /&gt;Unfortunately, it looks like most Android phones will be stuck with a menu button, for compatibility and other reasons.&lt;br /&gt;&lt;br /&gt;Then, Android has the green and red buttons, to make a call and to end it. Not being a heavy phone user, I would prefer on-screen keys for these. Having fewer buttons reduces the cognitive load and makes the phone easier to use as a data device.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Update:&lt;/span&gt; The same goes for the trackball. It's just not needed. I have fat fingers, and I click on links in web pages without trouble. The trackball makes it slightly harder for developers because widgets should now handle a touch mode (where there's no focus) and a non-touch mode.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-5144634718636965185?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/5144634718636965185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=5144634718636965185' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5144634718636965185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5144634718636965185'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2009/07/how-many-buttons-should-phone-have.html' title='How many buttons should a phone have?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_CDB69BylceM/SlBFXGDhQ7I/AAAAAAAABzs/9vNOOao9DF4/s72-c/magic' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1725338737282305944</id><published>2009-07-01T15:34:00.003+05:30</published><updated>2009-07-01T15:39:52.962+05:30</updated><title type='text'>JSON is beautiful</title><content type='html'>It's human-readable rather than binary, is concise and doesn't make you blind like XML does, and maps cleanly into programming language data structures like arrays and dictionaries. In fact, it's defined as a subset of one (Javascript) and is code as well as data.&lt;br /&gt;&lt;br /&gt;XML is a depressing example of the momentum of standardization, when a second-rate choice is made.&lt;br /&gt;&lt;br /&gt;Hope it becomes a universal communication and data interchange format.&lt;br /&gt;&lt;br /&gt;Once binary JSON is defined, the performance issue goes away, too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1725338737282305944?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1725338737282305944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1725338737282305944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1725338737282305944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1725338737282305944'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2009/07/json-is-beautiful.html' title='JSON is beautiful'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1270128185394046260</id><published>2009-02-04T12:25:00.002+05:30</published><updated>2009-02-04T12:30:11.771+05:30</updated><title type='text'>Year of Linux on the Desktop</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_CDB69BylceM/SYk806sAX5I/AAAAAAAAA_I/UtTRy6OcHPE/s1600-h/year.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 252px;" src="http://3.bp.blogspot.com/_CDB69BylceM/SYk806sAX5I/AAAAAAAAA_I/UtTRy6OcHPE/s400/year.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5298833316382793618" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;2020 will definitely be the year of Linux on the desktop.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1270128185394046260?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1270128185394046260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1270128185394046260' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1270128185394046260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1270128185394046260'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2009/02/year-of-linux-on-desktop.html' title='Year of Linux on the Desktop'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_CDB69BylceM/SYk806sAX5I/AAAAAAAAA_I/UtTRy6OcHPE/s72-c/year.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8382414668753537955</id><published>2008-10-30T20:03:00.002+05:30</published><updated>2008-10-30T20:20:55.808+05:30</updated><title type='text'>Debit and Credit Card Security</title><content type='html'>Some random thoughts on how you might design more secure Debit or Credit cards, some of them obvious:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Support alphanumeric passphrases rather than pathetic PINs. Force this on the banks by passing a law that does not hold the account owner liable for PIN misuse for a month when a card is stolen.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Require a PIN for every transaction . Yes, a shopkeeper can have a malicious card reader that stores the password, but this at least guards against casual pick-pockets.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Use one PIN for purchases made on the card, and another at the ATM. That way, a malicious card reader at a shop enables the shopkeeper to make purchases on my behalf, but not withdraw cash directly.&lt;/li&gt;&lt;li&gt;Have an option for the bank to send me an SMS and email for every transaction so that in the event of a fraud, I'm notified in seconds.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Allow me to use ATMs without physically carrying the card. Instead I can enter a password. If I don't carry my debit card all the time, that's less of a risk.&lt;/li&gt;&lt;li&gt;Many people use a credit card in addition to a debit card because it's safer, in that you can dispute a fradulent transaction more easily and, even if it's resolved to your favor, you don't have to pay the money first and get it back later, like with a debit card. Because of this, people carry a debit and a credit card, which is less secure than carrying only one card. Eliminate this by saying that if the bank gives X days to report a fradulent credit card transaction, it should give at least the same time for the owner to report a fradulent debit card transaction. And, as soon as you dispute a transaction, the bank must immediately and automatically refund the money while it resolves the dispute, after which it might withdraw the money again. With this, many people won't have to carry their credit cards every day.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8382414668753537955?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8382414668753537955/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8382414668753537955' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8382414668753537955'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8382414668753537955'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/10/debit-and-credit-card-security.html' title='Debit and Credit Card Security'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1048638509603596677</id><published>2008-10-30T19:54:00.002+05:30</published><updated>2008-10-30T20:02:03.353+05:30</updated><title type='text'>Function Argument Passing</title><content type='html'>Javascript's function argument passing is nice. Every function has an implicit variable named arguments that holds all the arguments, and the function declaration is only a shorthand. To look at it differently, with varargs and optional parameters, a function in effect takes a single argument which is a hashtable (or list, if keyword arguments are not supported). If every function takes the same single argument, why make the programmer declare it? Define an implicit variable named arguments. Then what do you put in the space traditionally used for function arguments? That can become a shortcut, so that you can access an argument by its name rather than as arguments.name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1048638509603596677?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1048638509603596677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1048638509603596677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1048638509603596677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1048638509603596677'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/10/function-argument-passing.html' title='Function Argument Passing'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-5177412638723593946</id><published>2008-09-22T10:22:00.002+05:30</published><updated>2008-09-22T10:37:24.448+05:30</updated><title type='text'>iPhone: The Dream Ends</title><content type='html'>Apple rejects &lt;a href="http://daringfireball.net/linked/2008/09/21/mailwrangler"&gt;another app&lt;/a&gt;, this time a Gmail client for "duplicating functionality". Never mind that it offers a better Gmail experience than the bulitin mail client -- conversations, archiving, starring, etc. Previously, Apple rejected a podcast download app, and the tethering application &lt;a href="http://www.nullriver.com/"&gt;NetShare&lt;/a&gt; that lets you use your iPhone as a modem. As Harry McCracken &lt;a href="http://technologizer.com/2008/09/13/apple-to-iphone-developers-dont-compete-with-us/"&gt;put it&lt;/a&gt;, "Way back when, if software distribution for the Mac had been handled via a Mac App Store with a don’t-duplicate-Apple-products policy, Photoshop might have been refused distribution on the grounds that it was too similar to MacPaint."&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Looks like my open-source friends were right -- in a world where everybody is either incompetent or untrustworthy, having a single gatekeeper is crippling. The iPhone isn't a platform but Apple's playground where you play on Apple's terms. It's the perfect example of &lt;a href="http://www.gnu.org/philosophy/can-you-trust.html"&gt;Treacherous Computing&lt;/a&gt;, where your computing device is controlled not by you but by others for their own ends.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I no longer see any point in buying an iPhone, let alone programming it. Android's openness should provide a refreshing alternative to the iPoliceState.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Disclaimer: I work for Google.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-5177412638723593946?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/5177412638723593946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=5177412638723593946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5177412638723593946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5177412638723593946'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/09/iphone-dream-ends.html' title='iPhone: The Dream Ends'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8335402276539760861</id><published>2008-09-18T10:27:00.003+05:30</published><updated>2008-09-18T10:31:16.861+05:30</updated><title type='text'>WiFi Stupidity in India</title><content type='html'>So the imbeclies running the show in India want to &lt;a href="http://economictimes.indiatimes.com/News_by_Industry/Trai_plans_to_prevent_WiFi_abuse/articleshow/3491302.cms"&gt;outlaw &lt;/a&gt;open Wi-Fi. This ignores the view that open WiFi may be a good way to get internet access to a large number of people in a poor country. And why should every user get his own DSL line? It's just a waste of resources.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Not to mention that this does nothing to stop terrorist attacks. Meanwhile, the terrorists will just use a phone booth or a postal mailbox. Why is it that every political system seems to be controlled by jackasses?&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8335402276539760861?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8335402276539760861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8335402276539760861' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8335402276539760861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8335402276539760861'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/09/wifi-stupidity-in-india.html' title='WiFi Stupidity in India'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7436380025574564204</id><published>2008-09-17T23:23:00.002+05:30</published><updated>2008-09-17T23:49:05.287+05:30</updated><title type='text'>Fuck You, Big Content</title><content type='html'>So our elected thugs are &lt;a href="http://arstechnica.com/news.ars/post/20080916-100-groups-demand-to-see-secret-anticounterfeiting-treaty.html"&gt;enacting&lt;/a&gt; a draconian legislation that, depending on whom you ask, mandates ISP filtering, turning off internet access for pirates, interfere with fair use, further erode privacy on the internet, and so forth. And all this is being done in secret, with no draft of the proposed legislation till it's signed by the various countries. As if the existing anti-circumvention laws - that effectively say that you're not the owner of a device that you paid for - are not enough. Here's a big Fuck You from my side, Big Content. Your obselete business models won't last long, even if you bribe the goons holding public office. The internet is basically a mechanism to move bits from one place to another, and enacting laws to stop this will be as useful as commanding the river to stop flowing.&lt;br /&gt;&lt;br /&gt;Perhaps we'll end up with a repeat of the Prohibition where people will show the finger to the government and do what they want. As Larry Lessig so&lt;a href="http://www.ted.com/index.php/talks/larry_lessig_says_the_law_is_strangling_creativity.html"&gt; eloquently puts it&lt;/a&gt;, we can't kill the instinct the technology produces, we can only criminalize it, and there's a whole generation that rejects the very notion of copyright, and believes the law is nothing more than an ass to be ignored. No law that goes against what a large number of people want to do has a chance. Copyright is doomed in the medium to long term.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7436380025574564204?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7436380025574564204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7436380025574564204' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7436380025574564204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7436380025574564204'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/09/fuck-you-big-content.html' title='Fuck You, Big Content'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8737329661989208483</id><published>2008-09-13T10:39:00.003+05:30</published><updated>2008-09-14T08:26:55.404+05:30</updated><title type='text'>iPhone: Think Again</title><content type='html'>The worst-case scenario plays out with the iPhone: Apple rejects an application because it competes with the &lt;span style="font-style: italic;"&gt;desktop&lt;/span&gt; version of iTunes. John Gruber writes:&lt;br /&gt;&lt;blockquote&gt;If you only find out at the end of the development process that your app has been rejected — not for a technical problem that you can address but because Apple deems the entire concept to be out of bounds — then who is going to put serious time and talent into an iPhone app?&lt;br /&gt;...&lt;br /&gt;Let’s be clear: forbidding “duplication of functionality” is forbidding competition. The point of competition is to do the same thing, but better.&lt;br /&gt;&lt;/blockquote&gt;Fraser Speirs, developer of Exposure, the highly regarded Flickr client for the iPhone, writes:&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote&gt;I will never write another iPhone application for the App Store as currently constituted.&lt;br /&gt;...&lt;br /&gt;You have to wonder if Apple wants the App Store to be a museum of poorly-designed nibware written by dilettante Mac OS X/iPhone OS switcher-developers and hobbyist students.&lt;br /&gt;&lt;/blockquote&gt;The whole point of the iPhone is that, in addition to having a first-rate browser, it's the first serious application platform. Earlier phones were just phones, but the iPhone is a computer that lets you install applications to do whatever you want to do. An iPhone with a crippled application market is far less useful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8737329661989208483?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8737329661989208483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8737329661989208483' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8737329661989208483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8737329661989208483'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/09/iphone-think-again.html' title='iPhone: Think Again'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-6327321596231212374</id><published>2008-09-03T14:50:00.004+05:30</published><updated>2008-09-13T11:16:58.854+05:30</updated><title type='text'>Democratizing Moviemaking</title><content type='html'>Fascinating &lt;a href="http://www.wired.com/entertainment/hollywood/magazine/16-09/ff_redcamera?currentPage=all"&gt;Wired&lt;/a&gt; article on the Red movie camera:&lt;br /&gt;&lt;blockquote&gt;It delivers all the dazzle of analog, but it's easier to use and cheaper—by orders of magnitude—than a film camera. In other words, Jannard's creation threatens to make 35-mm movie film obsolete.&lt;br /&gt;&lt;/blockquote&gt;Just as with the computer revolution, making the means of production affordable enough for a wide audience could spark a revolution. When it costs less to make a movie, you can afford to make films that appeal to a narrow market. We'll have a fascinating &lt;a href="http://www.wired.com/wired/archive/12.10/tail.html"&gt;long tail&lt;/a&gt; of films of various kinds, from intellectual to artistic to political, rather than the current insipid fare.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-6327321596231212374?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/6327321596231212374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=6327321596231212374' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6327321596231212374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6327321596231212374'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/09/democratising-moviemaking.html' title='Democratizing Moviemaking'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-6725034405161335991</id><published>2008-08-15T12:10:00.005+05:30</published><updated>2008-08-18T12:04:37.621+05:30</updated><title type='text'>Scalable Language Design</title><content type='html'>Let's say one wanted to design a powerful language that would be widely used, from servers to the desktop to mobiles. How would one go about this? The exact set of &lt;a href="http://kartik-log.blogspot.com/2007/06/ideal-language.html"&gt;abstractions&lt;/a&gt; doesn't matter -- most programmers are stuck with Java or C++, especially on the client, so any decent language will be a step up for them. So if one wanted to design a language for wide use from servers to the desktop to mobiles, how would one go about it?&lt;br /&gt;&lt;br /&gt;First, don't insist on a VM. VMs may be useful in some circumstances, but there's no reason all execution must happen in a VM. Moreover, VMs don't work well on resource-constrained devices like mobile phones. Also there's a &lt;a href="http://www.archub.org/javamemo.txt"&gt;versioning dependency&lt;/a&gt; on the VM which can change incompatibly from release to release, breaking software. And the huge size of VMs has its cost as well. So any language that aims for wide use should compile to native code. If you come up with a &lt;a href="http://www.strongtalk.org/documents.html"&gt;first-rate VM&lt;/a&gt;, great. But don't insist everyone use it. Support both native and virtualized execution.&lt;br /&gt;&lt;br /&gt;Second, the language should be open-source. And I mean, the canonical implementation should be open-source. In 2008, I doubt there's room for a not fully open language that wants to be widely used.&lt;br /&gt;&lt;br /&gt;Finally, by default prioritize power, or programmer productivity. As Paul Graham puts it, "In language design, we should be consciously seeking out situations where we can trade efficiency for even the smallest increase in convenience." But if you just do that you'll end up with a language that's unacceptably slow for many applications. Would you like your web browser written purely in Ruby? I wouldn't. The solution is not to remove powerful but slow language featuers, resulting in a &lt;a href="http://en.wikipedia.org/wiki/Java_%28programming_language%29"&gt;crippled&lt;/a&gt; language -- that's a false dichotomy. The 80/20 rule shows us the way  -- the customary mechanisms of the language must prioritize power over speed, but you should have more optimized and less convenient mechanisms available for the hotspots. So by default, the language should be dynamically typed, but if you want you should be able to declare either the interface of a type (as in a Java interface or an Objective-C protocol) or the implementation type (subclass of Foo) or even the exact class. By default everything is passed by reference (and basic types are objects) but as an optimization you'll be able to declare that for certain types, object identity doesn't have to be preserved, in which case the compiler can do a pass-by-value optimization. Objects are just &lt;a href="http://kartik-log.blogspot.com/2007/05/object-oriented-languages-considered.html"&gt;syntactic sugar&lt;/a&gt; for closures, but if you use the standard object mechanism, the compiler may be able to eliminate the dynamic binding and inline the call. Array lookups are by default bounds-checked, but there will also be an unchecked access mechanism that you can use in critical inner loops. By default, objects are garbage-collected and memory integrity is guaranteed, but you can use a different memory pool with manual release, and pointers to muck around with memory. Arrays are resizable (and dynamically typed), but the language also has a fixed-size fixed-type array. And so forth.&lt;br /&gt;&lt;br /&gt;I disagree with the idea that it's not possible to design a language that's a joy to program in and is simultaneously fast enough.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-6725034405161335991?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/6725034405161335991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=6725034405161335991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6725034405161335991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6725034405161335991'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/08/scalable-language-design.html' title='Scalable Language Design'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-9035467971526661622</id><published>2008-08-01T23:22:00.002+05:30</published><updated>2008-08-01T23:42:40.793+05:30</updated><title type='text'>Where the heck is my flying car?</title><content type='html'>If you're a programming language aficionado, life is hard. You learn powerful languages like Ruby, Python, Haskell, etc, but many times you have to use C++ for "real" work, like it or not. From one point of view, it's depressing.&lt;br /&gt;&lt;br /&gt;But if you step back and look through a long enough timeframe, there's been significant progress. When I was in high school, the default language was C++. By the time I graduated from college, the default moved to Java, which was a big improvement. Java is even the native API for Android. And iPhone and Mac OS X use Objective C, which is a dynamically typed language!&lt;br /&gt;&lt;br /&gt;The thesis seems to be that the mainstream is not doomed to second-rate languages. It evolves, though perhaps not as fast as some of us would like. And since the high end of programming languages hasn't moved much in the past couple of decades, if not longer, if this trend continues, one day the average programmer will be using a very powerful language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-9035467971526661622?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/9035467971526661622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=9035467971526661622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/9035467971526661622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/9035467971526661622'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/08/where-heck-is-my-flying-car.html' title='Where the heck is my flying car?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7712255646091576937</id><published>2008-08-01T22:29:00.003+05:30</published><updated>2008-08-01T23:21:59.226+05:30</updated><title type='text'>Java is the new C</title><content type='html'>Till recently I thought of JVM programming languages as a bad idea — that the JVM didn't really offer much for a dynamic language implementor. That may be true technically. But if technical factors were all that mattered, we'd all be programming in Lisp, Haskell or Ruby. While a lucky &lt;a href="http://paulgraham.com"&gt;few&lt;/a&gt; may get to use the powerful languages, most of us can't, for valid reasons. Because the software we have to &lt;a href="http://en.wikipedia.org/wiki/Cocoa_%28API%29"&gt;interact with&lt;/a&gt; is in a different language, or because the company has a ton of internal libraries that have to rewritten for each new language, and maintained. This is the case at Google, for instance.&lt;br /&gt;&lt;br /&gt;Programmers fall into three levels here. At the top are the lucky few who can use whatever language they want, and at the bottom are the unwashed masses who'll use whatever language the other guy is using, but in the middle are those who want to move up the ladder but can't. Anything we can do to decrease the barrier of adoption helps the second group, and eventually everyone. And it's not as if having a lot of users hurts the language.&lt;br /&gt;&lt;br /&gt;Currently, moving to a new language means learning the language itself, and then its libraries. What if we remove the second component by leveraging, say, the JVM standard libraries? Java, like it or not, has become something of a de-facto language, which means there a lot of people who are comfortable with JVM libraries, so if we offer the prospect of a better language without having to learn brand new libraries, maybe that will be more widely successful than a blank slate approach?&lt;br /&gt;&lt;br /&gt;There are also other advantages, like more easily being able to invoke other components written in Java or writing performance-sensitive parts of the program in Java. One of the complaints against dynamic languages is performance, and instead of writing performance-sensitive pieces in C, one can write them in a much higher-level but still reasonably fast language. Besides, the interface between the dynamic language implemented on the JVM and the Java language (say, the Jython-Java interface) will most probably be orders of magnitude cleaner than the equivalent C interface, like the Python/C interface.&lt;br /&gt;&lt;br /&gt;Java not only has a lot of users, but it could serve as the substrate for other, higher-level languages. In that sense, Java may well end up being the new C.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7712255646091576937?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7712255646091576937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7712255646091576937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7712255646091576937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7712255646091576937'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/08/java-is-new-c.html' title='Java is the new C'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-2019090602021321875</id><published>2008-07-28T13:13:00.004+05:30</published><updated>2008-07-28T13:52:18.812+05:30</updated><title type='text'>Busting the Macs-are-now-as-cheap-as-PCs Myth</title><content type='html'>We've been repeatedly reading on Mac users' blogs about how Macs are now as cheap as PCs, but most of them make the mistake of configuring a PC to be as identical to the chosen Mac as possible. That's just stupid. You should configure both systems to be as close to your needs as possible. Who cares if the Mac has Firewire 800 if you're not going to use it?&lt;br /&gt;&lt;br /&gt;So here's my list of requirements:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Laptop.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;CPU powerful enough to play 1080p video, which &lt;a href="http://www.adobe.com/products/hdvideo/systemreqs.html"&gt;means&lt;/a&gt; a Core 2 Duo at 1.8GHz.&lt;/li&gt;&lt;li&gt;2 GB RAM.&lt;/li&gt;&lt;li&gt;7200 RPM hard disc if possible, otherwise a big 5400 RPM disk (where there's no concrete requirement of bigness).&lt;/li&gt;&lt;li&gt;If possible, the system should be able to drive a 30-inch monitor at 2560 x 1600.&lt;/li&gt;&lt;/ul&gt;So I head to Dell India site (I live in India) and end up with a VOSTRO 1510 Laptop (n-Series) with a 1.8 GHz Core 2 Duo, 2 GB memory, 15.4" widescreen 1440x900 display, 160 GB 7200 RPM disc, a combo drive, a 256 RM Nvidia GeForce 8400M GS, an intergrated 1.3 megapixel webcam, Wireless-N, and no bluetooth for about Rs. 38,000 (Indian rupees).&lt;br /&gt;&lt;br /&gt;The Apple India store doesn't let me configure a machine online; I have to pick one. The cheapest Macbook costs me Rs. 50,000, and it has only 1 GB RAM. The guys at the local Apple store told me I could bump the memory to 2 GB for approx Rs. 1000, and the disc space to 250 GB for another thousand or two rupees. So I end up with a Macbook with a 2.1 Ghz Core 2 Duo, 2 GB memory, a 5400 RPM 250 disc for something like Rs. 52,000. Note that the disc runs at only 5400 RPM as opposed to the Dell's 7200 RPM. If I were to configure the Dell with a 5400 RPM 320 GB disc (bigger than the Macbook's), its price would actually drop by a couple thousand rupees. Also the Macbok can't drive a 30-inch monitor at full resolution. So let's compromise with a 1920x1200 video output. Still it's Rs. 52,000 for the Macbook vs. Rs. 38,000 for the Dell.&lt;br /&gt;&lt;br /&gt;How does the Macbook compare to the Dell? A slightly faster CPU (2.1 Ghz vs. 1.8 GHz) (which I don't need), a slower (5400RPM vs. 7200 RPM) disc or a smaller one (250GB vs. 320 GB), ability to drive only a 24-inch monitor at full resolution instead of a 30-incher (this is important to me), Firewire (which I never used), Bluetooth (did you try transferrring a hundred MB over bluetooth?) Or for the sake of comparison let's add Bluetooth to the Dell for less than a thousand rupees. Still it's Rs. 52000 for the Macbook vs. Rs.39,000 for the Dell. I'm sure that among the amazing skills Mac users have is the ability to compare two numbers. So tell me, isn't that a significant difference? Or if I insist on the ability to drive a 30-inch monitor at full resolution, I'll end up with a Macbook Pro at Rs. 89,000 as opposed to Rs.39,000 for the Dell -- more than twice the price.&lt;br /&gt;&lt;br /&gt;OS X may actually be worth the money, but let's say that outright. Don't make stupid claims that a similarly configured PC costs as much as a Mac because for many people the Mac will have things you don't care about.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-2019090602021321875?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/2019090602021321875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=2019090602021321875' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2019090602021321875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2019090602021321875'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/busting-macs-are-now-as-cheap-as-pcs.html' title='Busting the Macs-are-now-as-cheap-as-PCs Myth'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3746249835730166804</id><published>2008-07-28T09:32:00.002+05:30</published><updated>2008-07-28T10:15:54.975+05:30</updated><title type='text'>The Fallacy of Choice</title><content type='html'>Interesting piece from the &lt;a href="http://linuxhaters.blogspot.com/2008/07/fallacy-of-choice.html"&gt;Linux Hater's Blog&lt;/a&gt;, via &lt;a href="http://daringfireball.net/linked/2008/07/21/fallacy-of-choice"&gt;DF&lt;/a&gt;:&lt;span style="text-decoration: underline;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;blockquote&gt;[The vast majority of users] don't care about a particular choice, and actively do &lt;span style="font-style: italic; font-weight: bold;"&gt;not&lt;/span&gt; want to have to make a choice. They just want things to work. They will take "working" over "choice" in an instant. &lt;/blockquote&gt;Spot on. The Linux community seems to look at choice as a mantra that will fix everything wrong with the OS, but choice is no good when all the options are broken. The basic problem with the Linux community is that they are incompetent at UI Design, and no amount of choice will fix that.&lt;br /&gt;&lt;blockquote&gt;Furthermore, any developer will tell you that each time a new layer of "choice" is added, the possible number of configurations multiplies. This means more untested configurations, more bugs, and more brokenness.&lt;/blockquote&gt;Linux still has a long way to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3746249835730166804?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3746249835730166804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3746249835730166804' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3746249835730166804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3746249835730166804'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/fallacy-of-choice.html' title='The Fallacy of Choice'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-603855447850557992</id><published>2008-07-25T20:25:00.003+05:30</published><updated>2008-07-26T18:25:59.213+05:30</updated><title type='text'>Case-Sensitive Filesystems</title><content type='html'>I've never been able to understand why the Linux filesystems are case-sensitive. Assuming you don't want to create files whose names differ only in case, the only result of a case-sensitive filesystem is error messages saying essentially that you used the wrong case. And that's just irritating, with no plus side. A well-designed interface minimizes errors. Maybe it's not a coincidence that both OS X and Windows use case-insensitive filesystems.&lt;br /&gt;&lt;br /&gt;Yes, I know that NTFS is case-sensitive, but since the only documented way to access it is through win32, it's practically case-insensitive, unless you use you use your computer as a Unix server using Services for Unix. By practically case-insensitive I mean that you can open a file by typing in the filename with the wrong case from, say, the console.&lt;br /&gt;&lt;br /&gt;This madness extends to web servers like a virus. Web servers should not return 404s for URLs with the wrong case. That's sheer madness.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-603855447850557992?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/603855447850557992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=603855447850557992' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/603855447850557992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/603855447850557992'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/case-sensitive-filesystems.html' title='Case-Sensitive Filesystems'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-211690925270548088</id><published>2008-07-21T11:05:00.003+05:30</published><updated>2008-07-21T11:07:22.479+05:30</updated><title type='text'>The Autoupdate Sin</title><content type='html'>It pisses me off when applications, and even frameworks like Growl, put up dialog boxes saying a new version is available. Well, what are you telling me for? If the new version has some security fixes, update silently! If not, do whatever the hell you want to! Don't keep nagging me with this trash. Software should take care of itself rather than whining.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-211690925270548088?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/211690925270548088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=211690925270548088' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/211690925270548088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/211690925270548088'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/autoupdate-sin.html' title='The Autoupdate Sin'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-2514384893867793550</id><published>2008-07-21T10:47:00.003+05:30</published><updated>2008-07-21T10:53:51.417+05:30</updated><title type='text'>Content Protection Scumbags</title><content type='html'>The PC industry is committed to providing content protection on the PC      —ATI.&lt;br /&gt;&lt;br /&gt;Translation: The PC industry will screw its paying customers by denying them the right to play content they paid for on a device and using software of their choice.&lt;br /&gt;&lt;br /&gt;There are other instances of the industry working against users. For instance, when the Sony rootkit came out, Symantec Antivirus wouldn't classify it as malware because it's from Sony. PC Magazine didn't run an article about it for quite some time, if ever.&lt;br /&gt;&lt;br /&gt;Just like the world at large, the PC industry is a bunch of scumbags who will kill their grandmothers if it adds to the bottom line.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-2514384893867793550?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/2514384893867793550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=2514384893867793550' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2514384893867793550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2514384893867793550'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/content-protection-scumbags.html' title='Content Protection Scumbags'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3162397008522606505</id><published>2008-07-20T17:15:00.002+05:30</published><updated>2008-07-20T17:20:14.007+05:30</updated><title type='text'>The Ideal ISP</title><content type='html'>Many ISPs in India make you choose between a slow unlimited connection and a faster one with a data limit of a few gigs. The ideal would be that, no matter what your plan, traffic on port 80 is not subject to any speed limit until, say, 1 GB of data has been transferred. Also, the user should have an option where P2P traffic is given a lower priority than other traffic throughout the ISP's network, but it doesn't count towards the data transfer limit.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3162397008522606505?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3162397008522606505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3162397008522606505' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3162397008522606505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3162397008522606505'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/ideal-isp.html' title='The Ideal ISP'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-2991154087646959380</id><published>2008-07-20T17:05:00.002+05:30</published><updated>2008-07-20T17:09:06.820+05:30</updated><title type='text'>Hiding the Program Lifecycle</title><content type='html'>One idea from Android that I wish desktop OSs implement -- automatically shut down applications as needed. Why deal with something when the OS can? Mac OS X already does this to some extent, where most apps don't shut down when the last window is closed. Why not take this one step further and close them when the system runs low on memory? And the user mostly needn't know when this happens, since it's done only when the app has no windows open.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-2991154087646959380?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/2991154087646959380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=2991154087646959380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2991154087646959380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/2991154087646959380'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/hiding-program-lifecycle.html' title='Hiding the Program Lifecycle'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-6258010085727924046</id><published>2008-07-20T08:13:00.003+05:30</published><updated>2008-07-21T21:44:41.683+05:30</updated><title type='text'>The OpenMoko Train Wreck</title><content type='html'>Hilarious  demoing the &lt;a href="http://www.vimeo.com/1366923"&gt;OpenMoko&lt;/a&gt;, which the FSF claims is iPhone-class. I wish it were. Open-source contributed a lot to the world, but some of its more &lt;a href="http://fsf.org"&gt;extreme&lt;/a&gt; proponents discredit the whole movement when they go too far.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-6258010085727924046?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/6258010085727924046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=6258010085727924046' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6258010085727924046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6258010085727924046'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/openmoko-train-wreck.html' title='The OpenMoko Train Wreck'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-5810556885666493677</id><published>2008-07-19T11:13:00.004+05:30</published><updated>2008-07-21T22:03:00.802+05:30</updated><title type='text'>Freetard Propaganda against the iPhone</title><content type='html'>&lt;span style="font-style: italic;"&gt;Clarification: I use and love a lot of open-source software, and even work on one full-time (Google Gears). "Freetard" is meant to refer only to the more extreme elements in the community, not all open-source folks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;From &lt;a href="http://www.fsf.org/blogs/community/5-reasons-to-avoid-iphone-3g"&gt;FSF&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;iPhone completely blocks free software. Developers must pay a tax to Apple, who becomes the sole authority over what can and can't be on everyone's phones.&lt;/blockquote&gt;It can actually help to have a central gatekeeper, for security. The root cause of the Windows malware pandemic is that, well, people can write malware and there's nobody to check. Anti-malware is not the solution — the best antivirus software in one test let through &lt;a href="http://arstechnica.com/news.ars/post/20071223-report-antivirus-applications-getting-weaker-over-time.html"&gt;32%&lt;/a&gt; of virii. Warnings about software installation don't help, since people are conditioned to click Yes to any prompts, and that's our fault, as an industry  — by writing software that puts up unnecessary dialog boxes, we have trained people to click Yes blindly. And "educating" users is fundamentally a bad idea. Why force users to become security experts when you can outsource that to a central gatekeeper, in this case, Apple? Any technology that doesn't work by itself and forces users to learn a complex set of dos and don'ts ("or you will be sorry later") is totally broken.&lt;br /&gt;&lt;br /&gt;Apple's approach is obviously not perfect, but for most people it's an &lt;a href="http://kartik-log.blogspot.com/2008/04/secure-platform-at-last.html"&gt;improvement&lt;/a&gt; over the current "leave the users to their fate" system.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;iPhone exposes your whereabouts and provides ways for others to track you without your knowledge.&lt;/blockquote&gt;I thought the iPhone prompts you when an app wants to use geolocation. And that is actually useful — I'd like to know if a friend is within a few hundred meters, for example. In fact, if you use a cell phone at all, the network has to know where you are so that it can route your calls to you. Maybe you should stay home and communicate using carrier pigeon?&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;iPhone endorses and supports [...] DRM, and won't play patent- and DRM-free formats like Ogg Vorbis and Theora.&lt;/blockquote&gt;I actually like my media in patent-encumbered formats like MP3 or AAC, since they work on my existing mobile phone and on my mp3 player, and on all my computers, without installing additional software, and I can email them to friends.&lt;br /&gt;&lt;blockquote&gt;&lt;p&gt;iPhone is not the only option. There are better alternatives on the horizon that respect your freedom, don’t spy on you, play free media formats, and let you use free software — like the &lt;a title="Utter shit" href="http://www.openmoko.com/" target="_blank"&gt;FreeRunner&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt; The Angry Drunk &lt;a href="http://www.theangrydrunk.com/2008/07/16/how-did-i-miss-this-tripe/"&gt;put it&lt;/a&gt; best: HAHAHAHAHAHA!. Wait, let me catch my breath. HAHAHAHAHAHAHAHA!.&lt;br /&gt;&lt;br /&gt;The whole problem with "free software" advocates is that they don't understand (or refuse to recognize) that there are many dimensions to the issue. Not just "free" or "non-free", but things like, say, user experience. Does the software let users get things done in a timely manner and have a happy time doing so? Lots of open-source software is &lt;a href="http://daringfireball.net/2004/04/spray_on_usability"&gt;broken&lt;/a&gt;. The last time I installed Linux for a friend [1], I had to edit /etc/X11/xorg.conf just to get the GUI working. By comparison, Mac OS X is a joy to use. It's so smooth and fluid an environment it appeals to you at a very deep level and you're just happy and grateful to use such a work of art. OS X is &lt;span style="font-style: italic;"&gt;joy&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Whereas a lot of "free software" is free as in syphilis.&lt;br /&gt;&lt;br /&gt;How can anybody have such a narrow one-dimensional worldview where it doesn't matter whether something works for its users or not; it only matters whether it adheres to some ideology? This is amazing. I just can't understand how some people are wired.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[1] Actually he was my enemy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-5810556885666493677?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/5810556885666493677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=5810556885666493677' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5810556885666493677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5810556885666493677'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/freetard-propaganda-against-iphone.html' title='Freetard Propaganda against the iPhone'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1844505125639998176</id><published>2008-07-18T12:58:00.002+05:30</published><updated>2008-07-18T13:20:47.123+05:30</updated><title type='text'>TrainWreck++</title><content type='html'>Some things in life are so strange that you wonder if it's some kind of Lynchian &lt;a href="http://en.wikipedia.org/wiki/Mulholland_Drive_%28film%29"&gt;alternate reality &lt;/a&gt;or a bizarre joke. Case in point: C++0x. Go ahead; read the wikipedia &lt;a href="http://en.wikipedia.org/wiki/C%2B%2B0x"&gt;article&lt;/a&gt;. No programmer ever woke up and said, "C++ is such a simple language. We need to add more stuff." Honestly, what is wrong with these people? How can any sane person graft even &lt;span style="font-style: italic;"&gt;more&lt;/span&gt; language machinery into C++? The mind boggles! Some things in life are beyond understanding.&lt;br /&gt;&lt;br /&gt;Here are some quotes to commemorate this occasion:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;C++ is an octopus made by nailing extra legs onto a dog.   —smalltalk.org&lt;/li&gt;&lt;li&gt;Programming in C++ is premature optimization.&lt;/li&gt;&lt;li&gt;Think of C++ as an object-oriented assembly language.   —guile   mailing list&lt;/li&gt;&lt;li&gt;Life is too long to be an expert at harmful things, including such   evilness as C++ and Perl.  -&lt;i&gt;Eric Naggum&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1844505125639998176?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1844505125639998176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1844505125639998176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1844505125639998176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1844505125639998176'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/trainwreck.html' title='TrainWreck++'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-9102934737770986218</id><published>2008-07-17T14:04:00.003+05:30</published><updated>2008-08-06T10:21:57.520+05:30</updated><title type='text'>Non-JavaSchools</title><content type='html'>Reading Joel Spolsky's &lt;a href="http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html"&gt;JavaSchools&lt;/a&gt; reminded me of the discussions I sometimes used to have with professors in college -- that they should teach Java (when they were teaching C++), and that they should teach Python (when they were teaching Java). Some of us have higher expectations of college than merely learning the fad of the day -- you should learn the best, and for programming languages the best is a language that allows you to be more productive, which you will use one day as languages slowly evolve. So what languages would a real CS education teach you? Here's my list:&lt;div&gt;&lt;ul&gt;&lt;li&gt;Javascript/Scheme -- for closure-based programming (No, not the ES4 monster, but core Javascript, as in ES3). Or perhaps Smalltalk.&lt;/li&gt;&lt;li&gt;Haskell -- for lazy evaluation.&lt;/li&gt;&lt;li&gt;Erlang -- failure containment. Divide the program into modules, with no shared memory, and have them communicate using message passing. That way, a failure in one module is contained there.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Most definitely there should be nothing about C++ or Java.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-9102934737770986218?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/9102934737770986218/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=9102934737770986218' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/9102934737770986218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/9102934737770986218'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/non-javaschools.html' title='Non-JavaSchools'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-3308494330688241983</id><published>2008-07-14T18:25:00.007+05:30</published><updated>2008-07-14T19:47:54.596+05:30</updated><title type='text'>Open Source and Innovation</title><content type='html'>A long time back I used Fedora Linux 1.0 for almost an year. It was a terribly, terribly broken OS, but that was not the worst part — it was the community. How could anybody not spit at that steaming pile of dung they call an OS? How could anybody have such abysmally low standards that they tolerate and worse, happily use a piece of technology that's so broken? I was quick to conclude that, bad as the OS is, with such a “community” , Linux is doomed. John Gruber's &lt;a href="http://daringfireball.net/2004/04/spray_on_usability"&gt;Spray-On Usability&lt;/a&gt; resonated deeply with me, and as long as I was forced to use Linux, I would read this post every month or two and avoid breaking into tears as I wrestled with the OS. Finally, when I got my own computer, I installed Windows on it and it was a breath of fresh air.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fast-forward several years. Linux improved a lot, and now I work at a &lt;a href="http://www.google.co.in/intl/en/jobs/"&gt;company&lt;/a&gt; where Linux is our backbone. I'm a multi-platform citizen, equally comfortable with Linux as with Windows, and can get around OS X. As I re-read Spray-On Usability for the umpteenth time, one idea leapt out at me: "There’s an old engineering adage: “Fast, good, cheap: pick two.” (Where “fast” regards development time, not performance.)" If you solely consider user experience, Linux can't hold a candle to OS X. But, if you don't want to or cannot pay a thousand dollars for a laptop, Linux could offer a fairly serviceable, though not spectacular user experience, more or less in the same league as Windows. They could do this merely by &lt;a href="http://en.wikipedia.org/wiki/Image:Dolphin-KDE4.jpg"&gt;copying&lt;/a&gt; OS X and Windows, as they have been doing all along. In fact, till recently I was thinking open-source is all about copying, not innovation [1]. In a way that's true, if you consider the usual meaning of innovation as building something that works better for the user. But remember, a Macbook is a month's salary for a huge number of people in the world. I thought of saying developing world, but then I stopped myself -- it's the world at large. Not yet a "market" in the narrow sense of a bunch of people you can milk for money, but users. Apple, for all its beauty, is a profit-driven company. It doesn't care about you unless you have a thousand dollars [2]. Whereas open-source principles, like the ideals behind any great revolution, are truly grand. Judging by the rate at which Linux is improving, one day it could be a fairly decent OS for a large number of people. Whole societies could use affordable technology to become more productive and escape poverty [3]. So far the revolution hasn't happened, but it may, some day. Operating systems don't exist in a vacuum. As John points out, on the continuum between free and wonderful, OS X occupies the high end and is slowly becoming &lt;a href="http://en.wikipedia.org/wiki/Mac_mini"&gt;cheaper&lt;/a&gt;. Linux is free, and is slowly becoming good. As that happens, it could mean a lot to a huge number of people. Open-source's innovation is not that it's better, but that one day it could be a more economical way to bring good enough technology to a large number of people. And that is noble.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[1] I'm referring to user-level open-source projects, not developer-level ones like, say, Ruby or Python or gcc.&lt;/div&gt;&lt;div&gt;[2] Yes, the Mac Mini is cheaper, but after using a laptop, who would want to go back to a desktop?&lt;/div&gt;&lt;div&gt;[3] Affordable technology also includes pirated copies of Windows.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-3308494330688241983?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/3308494330688241983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=3308494330688241983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3308494330688241983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/3308494330688241983'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/open-source-and-innovation.html' title='Open Source and Innovation'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-5746952798892792670</id><published>2008-07-14T18:21:00.002+05:30</published><updated>2008-07-14T18:23:47.463+05:30</updated><title type='text'>Undock Madness</title><content type='html'>Before I remove my Thinkpad from its docking station, Windows requires me to click on Start-&gt;Undock or press a button on the dock that does the same thing. As far as I'm concerned, undocking is equivalent to unplugging the power adapter, ethernet cable, USB keyboard and mouse and external monitor. None of these steps by itself requires an advance notification to the OS. Why should the combination require me to tell the OS what I'm going to do?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-5746952798892792670?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/5746952798892792670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=5746952798892792670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5746952798892792670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5746952798892792670'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/undock-madness.html' title='Undock Madness'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-6051540593469089760</id><published>2008-07-10T12:21:00.005+05:30</published><updated>2008-07-14T10:35:05.100+05:30</updated><title type='text'>Constructors are a bad idea</title><content type='html'>&lt;span class="Apple-style-span" style="font-style: italic;"&gt;Effective Java&lt;/span&gt; begins by talking about the drawbacks of constructors: they do not have names to distinguish each other, they have to create an instance of the object (and not use a cached object), they have to create an instance of the class (and not a subclass or a proxy for remote calls, access control, etc). Instead of making programmers work around the deficiency of the language, it will be good if the language has no notion of constructors or a &lt;span class="Apple-style-span" style="font-family: arial;"&gt;new &lt;/span&gt;operator; instead classes should have a static method named new (or something else if it's more appropriate for a particular class) that returns an object. Perhaps an &lt;span class="Apple-style-span" style="font-family: arial;"&gt;allocate &lt;/span&gt;operator can be added (in place of &lt;span class="Apple-style-span" style="font-family: arial;"&gt;new&lt;/span&gt;) that returns an unitialized object, and which can be invoked only from within the class.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So you have static factory methods as the default, with the flexibility they entail. And if you want full factory objects, as long as they have a new function with the same signature, it will be easier to retrofit them into an existing program. Moreover, if you have dynamic scope, it can get even better, because the factory instance doesn't have to get passed around everywhere.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-6051540593469089760?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/6051540593469089760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=6051540593469089760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6051540593469089760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/6051540593469089760'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/07/constructors-are-bad-idea.html' title='Constructors are a bad idea'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-5718015734028160217</id><published>2008-06-24T16:15:00.008+05:30</published><updated>2008-07-20T17:13:53.940+05:30</updated><title type='text'>The Ideal Language</title><content type='html'>This is the language I would design today. I haven't used Lisp, Joy, Forth or APL, so I may miss something there. But here's an ideal language that's reasonably close to the mainstream:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;No compulsory type declarations, with type inference for early error detection.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Everything passed by reference. A type can specify that object identity doesn't have to be preserved, in which case pass-by-value optimization can be done. But that's just an optimization; the conceptual model is that everything is passed by reference.&lt;/li&gt;&lt;li&gt;Closures (functions that can access the enclosing lexical environment)&lt;/li&gt;&lt;li&gt;Anonymous functions (functions that don't have a name)&lt;/li&gt;&lt;li&gt;If objects are supported, they should be just be &lt;a style="border-bottom-style: groove;" href="http://kartik-log.blogspot.com/2007/05/object-oriented-languages-considered.html"&gt;syntactic sugar&lt;/a&gt; for closures.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Varargs and &lt;span class="Apple-style-span"  style="font-family:arial;"&gt;apply&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Pattern-matching for function calls and variable assignment. This proves incredibly convenient in Haskell.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Everything is an expression.&lt;/li&gt;&lt;li&gt;Optional dynamic scoping to set global-like variables for a call (and subcalls).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Finding functions in a correct module based on the arguments a la OO.&lt;/li&gt;&lt;li&gt;Modules as objects that can be passed around.&lt;/li&gt;&lt;li&gt;Definitions (of functions, variables, etc) are &lt;i&gt;executed&lt;/i&gt;. A file consists of statements of code, not definitions. Some of these statements when executed may end up defining functions in the current module.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;eval&lt;br /&gt;&lt;/li&gt;&lt;li&gt;No braces; use indentation to control nesting.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Garbage-collection.&lt;/li&gt;&lt;li&gt;Tailcall optimization.&lt;/li&gt;&lt;li&gt;Threading: In addition to kernel threads (to exploit multiple cores), the language should support co-operative threads hosted within a single kernel thread, because sometimes you want multiple flows of execution without the non-determinism of arbitrary preemption. These are preempted only when they make a blocking call, like I/O or sleep() or an external call (to C or the hosting language) or by an explicit yield(). Since these don't run in parallel and are not preempted, they should be implemented purely in userspace with very fast switches. They can be used as a substitute for generators. The language also has a inter-thread messaging-passing system, like Erlang.&lt;/li&gt;&lt;li&gt;Modules (or packages or namespaces): what would a module's interface consist of? A bunch of exported functions, since a function is the only true abstraction we have. (Everything else is on top of functions.)&lt;/li&gt;&lt;li&gt;Lightweight build system -- no need to "compile" code before running it. Compilation really is optimization (in addition to linting), and so it should not be forced.&lt;/li&gt;&lt;li&gt;Optimization philosophy: The language should aim to maximize programmer productivity. If you have a performance problem, you should be able to use sacrifice productivity for performance, as an explicit decision and incrementally. The core language should not be designed for performance.  Some optimization techniques might be type declarations, non-garbage-collected allocation pools, pointers within an &lt;span class="Apple-style-span"  style="font-family:arial;"&gt;unsafe&lt;/span&gt; block (as in C#), etc. Similarly, while the usual list should support resizing, insertions and deletion, like Python's list, there should be a fixed-size typed array that you can use when performance matters. The language should also have a Strongtalk-like VM that gives maximum performance with minimum effort, for dynamic code. But it should also compile to machine code if desired.&lt;/li&gt;&lt;li&gt;No silent arithmetic overflows. Integers are either infinite-size, like in Python, or you get an OverflowException.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-5718015734028160217?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/5718015734028160217/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=5718015734028160217' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5718015734028160217'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/5718015734028160217'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2007/06/ideal-language.html' title='The Ideal Language'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8532498189721631009</id><published>2008-05-15T17:05:00.004+05:30</published><updated>2008-07-10T20:33:40.147+05:30</updated><title type='text'>Windows is a Ghetto</title><content type='html'>Switching back to Windows after a half year of significant OS X use, it struck me how backward Windows is compared to OS X. There are many points one can make: Windows boots slower. Application installation and management is a &lt;a href="http://kartik-log.blogspot.com/2008/02/application-installation-101.html"&gt;mess&lt;/a&gt;, and the start menu used to organize applications is unneccesary. The UI is merely serviceable, instead of &lt;a href="http://en.wikipedia.org/wiki/Aqua_%28user_interface%29"&gt;delicious&lt;/a&gt;. The latest version of the OS is a &lt;a style="border-bottom-style: groove;" href="http://arstechnica.com/articles/culture/microsoft-learn-from-apple-II.ars/4"&gt;step back&lt;/a&gt;. There are hardly any good applications bundled with the OS. There are zillions of settings, and most defaults are wrong. The APIs are badly &lt;a style="border-bottom-style: groove;" href="http://arstechnica.com/articles/culture/what-microsoft-could-learn-from-apple.ars/3"&gt;broken&lt;/a&gt;. Integration between the OS and hardware is bad (example: when I use the hardware switch on my Thinkpad to turn off WiFi, Windows tells me it can't connect to my preferred wireless network). Mandatory file locking gets in your way all the time. The third-party application community is a huge wasteland.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Perhaps the worst thing about Windows is not that it's broken, but the realization that you're living in a mindless system where the overlords don't care. &lt;span style="font-style: italic;"&gt;That&lt;/span&gt; is incredibly soul-killing. Windows is a ghetto. &lt;a href="http://www.apple.com/macosx/"&gt;Leave&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8532498189721631009?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8532498189721631009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8532498189721631009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8532498189721631009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8532498189721631009'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/05/windows-is-ghetto.html' title='Windows is a Ghetto'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-4212812948088583783</id><published>2008-04-23T15:47:00.003+05:30</published><updated>2008-04-23T15:54:45.645+05:30</updated><title type='text'>Where Windows Shell is Better Than Linux</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;blockquote&gt;&lt;/blockquote&gt;You can launch a document directly from the shell, like this:&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'lucida grande';"&gt;C:\data&gt;test.html&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;Linux forces you to decide the appropriate program yourself: &lt;span class="Apple-style-span" style="font-family: 'lucida grande';"&gt;firefox test.html&lt;/span&gt;. OS X is midway between these: &lt;span class="Apple-style-span" style="font-family: 'lucida grande';"&gt;open test.html&lt;/span&gt;.&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;When you launch a GUI program, you don't have to suffix an &amp;amp; to let the shell continue executing.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Both these choices make it a better shell for normal use. Frequent tasks should be easy to do.&lt;/div&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-4212812948088583783?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/4212812948088583783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=4212812948088583783' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4212812948088583783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/4212812948088583783'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/04/where-windows-shell-is-better-than.html' title='Where Windows Shell is Better Than Linux'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7011233696380813391</id><published>2008-04-23T13:37:00.003+05:30</published><updated>2008-04-23T14:48:22.104+05:30</updated><title type='text'>Cream for Windows -- Broken</title><content type='html'>I tried the Cream text editor for Windows for a few days. If you're not familiar with it, Cream is a configuration of Vim that uses the standard shortcuts like Ctrl-S rather than the brain-damaged :wq. I thought this would be the best of both worlds -- a good Windows text editor that also works on Linux, so that expertise I build up on Windows will be useful on Linux. Unfortunately, Cream is broken. Here's what bugged me in the last few days, in no particular order:&lt;div&gt;&lt;ul&gt;&lt;li&gt;Litters directories with .swp files, and they are frequently left behind when Cream quits. This makes it bug me the next time I open these files. Also the "&lt;span class="Apple-style-span" style="font-style: italic;"&gt;OMG swap files are leftover!"&lt;/span&gt; message requires me to scroll down to read text before the dialog box pops up. Lame.&lt;/li&gt;&lt;li&gt;How do I tell Cream to put the swp files somewhere else? Why, by editing some stupid config file, in the grand Unix tradition. A half-assed Windows port.&lt;/li&gt;&lt;li&gt;When you search for something, the find dialog box loses focus so you can't dismiss it by hitting Esc.&lt;/li&gt;&lt;li&gt;When a search fails, the status line says: Pattern not found: \v\Cfoo. What the hell is the \v\C. Don't give me any vim nonsense.&lt;/li&gt;&lt;li&gt;I haven't figured out how to right-click a file and open with Cream. The launcher (vimrun) is a batch file that doesn't take arguments or something.&lt;/li&gt;&lt;li&gt;When I drag and drop a file onto the Cream window, either on the tab bar or above, it sometimes replaces an existing tab, with no obvious way to disable it.&lt;/li&gt;&lt;li&gt;Ctrl-W doesn't close tab.&lt;/li&gt;&lt;li&gt;Broken copy-paste: Selecting text implicitly copies it to the clipboard. I have no problem with being able to middle-click to paste selected text, and in fact I like this, but breaking the standard behavior of Ctrl-C and Ctrl-V is inexcusable.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Conclusion: a half-assed Windows editor. Uninstall.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7011233696380813391?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7011233696380813391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7011233696380813391' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7011233696380813391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7011233696380813391'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/04/cream-for-windows-broken.html' title='Cream for Windows -- Broken'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-8642228156389981183</id><published>2008-04-06T13:31:00.001+05:30</published><updated>2008-04-06T14:03:29.885+05:30</updated><title type='text'>Worms, please use HTTP</title><content type='html'>I sometimes wish all worms and malware communicated through HTTP. Then, once firewalls no longer have to block non-http traffic for security, programmers might break free of the tyranny of HTTP. Server-initiated communication without polling. In-browser chat clients that use SIP. Support for arbitrary application-layer protocols implemented in Javascript...&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And, once that happens, it will be a little easier to move to something like SCTP that overcomes TCP's limitations -- have multiple logical channels within one connection without head-of-line blocking. Unordered message delivery. Multihoming, so that downloads are not broken when you switch from a wired to a wireless network connection...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-8642228156389981183?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/8642228156389981183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=8642228156389981183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8642228156389981183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/8642228156389981183'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/04/worms-please-use-http.html' title='Worms, please use HTTP'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7623585513550135089</id><published>2008-04-06T12:06:00.002+05:30</published><updated>2008-04-06T13:31:16.501+05:30</updated><title type='text'>A secure platform at last?</title><content type='html'>The iPhone has an interesting approach to software installation -- you can install only apps that Apple certifies. At one shot, this eliminates malware of various kinds -- viruses/worms, trojan horses, spyware, adware/nagware, rootkits...&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The PC approach is to detect malware on your PC. Even if you did not have to do your research and install anti-virus and anti-spyware and rootkit detectors and what-have-you -- that is, even if first-rate anti-malware came with the OS and worked invisibly without bothering you, it's a costly arms race that we're &lt;a href="http://arstechnica.com/news.ars/post/20071223-report-antivirus-applications-getting-weaker-over-time.html"&gt;losing&lt;/a&gt;. When tested with new viruses, the best antivirus software let through 32% of them. Not to mention that anti-malware constantly consumes resources, an especially serious problem for &lt;a href="http://en.wikipedia.org/wiki/Android_%28mobile_device_platform%29"&gt;mobile phones&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we can't reliably detect malware on the PC, can we prevent it from getting installed in the first place? Hence the usual exhortations about not downloading or installing stuff. But that doesn't work. People will click on anything that looks interesting, partly because bad software has conditioned them to click Yes to any prompt that appears, and partly because "given a choice between dancing pigs and security, users will pick dancing pigs every time". But why should users have to become security experts, in the first place? Any technology that doesn't just work by itself and requires you to learn and follow a set of dos and don'ts is broken.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So if we can't reliably detect malware once it's installed, and if we can't and shouldn't require users to decide what's harmful, the alternative is to outsource this decision-making to people who are actually capable and interested in doing it. The iPhone is one model, where Apple decides what's good for you and what's not. The problem with this is that power corrupts -- the gatekeeper decides what's good for them, instead of what's good for you. Apple doesn't allow anti-DRM tools on the iPhone, even for fair use -- the right to play media that you paid for on a device of your choice.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How about we allow the user to decide whom to trust? Have multiple certification authorities --services that tell you if a given application is harmful. The user gets to decide which one to use. Have the OS speak an open protocol to the certification authority, so that anyone can roll his own. When you install an app, the OS contacts the service of your choice, sends it a hash of the application package and asks if it's safe. That way, you have security &lt;span class="Apple-style-span" style="font-style: italic;"&gt;and&lt;/span&gt; control.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A certification authority can use many ways to detect malware. For instance, they can run the app through the top 20 antivirus tools. They can run the submitted app in a virtual machine and run the antivirus software from the host OS. They can have a list of all syscalls the app makes and look for suspicious disk or network activity... Basically why do the dangerous job of malware detection on your desktop?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Certification services can go one step further than security. For example, insist that the app follows Human Interface Guidelines for consistent, decent user interfaces (the iPhone SDK license agreement mentions this). Weed out multiple me-too softwares that do nothing different. One of the nice things about the Mac software market is that there are fewer apps for a given task, but they are high-quality. What if you could check a &lt;span class="Apple-style-span" style="font-style: italic;"&gt;High-quality Apps Only&lt;/span&gt; option in your system preferences and have it weed out the &lt;a href="http://www.gimp.org/"&gt;train wrecks&lt;/a&gt;?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Imagine how much better things could be if malware of various kinds were gone. That would also eliminate &lt;a href="http://en.wikipedia.org/wiki/Zombie_computer"&gt;spam&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7623585513550135089?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7623585513550135089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7623585513550135089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7623585513550135089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7623585513550135089'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/04/secure-platform-at-last.html' title='A secure platform at last?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-223886286858321855</id><published>2008-02-22T12:28:00.002+05:30</published><updated>2008-02-22T13:39:23.465+05:30</updated><title type='text'>Application Installation 101</title><content type='html'>Just having switched back from OS X to Windows, or rather unswitched, as I installed a couple dozen applications it struck me how much more streamlined the process is on OS X. More often than not, you just drag a .app file to a folder on the hard disc, and you're done. All dependencies are in the package itself. The best installation procedure is one that doesn't exist at all.  Would you like it if you download a PDF file and you're about to view it, but, no, wait a minute, you can't -- you have to go through an involved "installation" process before you can open it. Same is the case -- you want to run an application, and the OS should get out of the way and let you do it right away without further ado.  Anything else is Bad Design.&lt;br /&gt;&lt;br /&gt;On Windows many installers ask you whether to put an entry in the start menu, and where. And I have to go back and move the start menu folders outside the Programs folder. In OS X, there's no need for a start menu to manage -- your applications folder is so clutter-free that you can use it as a menu of applications. This is because apps appear as individual files (bundles) that launch when clicked. After all, what's the most common thing to do to an app other than to launch it? [1]   Since the applications folder is so clean, you don't need a separate hierarchy of shortcuts to applications. Which also means there's no start menu to manage or questions to answer about where you want shortcuts created. And if you want to organize applications, because they're self-contained, generally you can just drag the .app file to a  different folder without breaking the app.&lt;br /&gt;&lt;br /&gt;As Paul Graham &lt;a href="http://www.paulgraham.com/gap.html"&gt;put it&lt;/a&gt;:&lt;br /&gt;&lt;blockquote&gt;What would Apple's next product look like if you replaced Steve Jobs with a committee of 100 random people? Windows.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;The Linux people blow it, as well -- I don't want to deal with a package manager. There's already a way to organize files, and it's called the filesystem. I want to "install" an application the same way I "install" a PDF file -- copy it to the filesystem. Don't make me go through a different process. And what if the app you want to install doesn't exist in your distro's repository? That has happened to me more than once. Or it exists but is called something else because of some idealogical or political &lt;a href="http://en.wikipedia.org/wiki/Iceweasel"&gt;storm in a teacup&lt;/a&gt; that you care nothing about? Besides, package managers sometime get into an inconsistent state where they demand you repair them before you do anything else. And sometimes the repair doesn't work. Not to mention that in the grand Linux tradition of fragmentation, different distros have different package managers, which means knowledge you pick up on one distro doesn't serve you on another. This is a problem with the whole idea of multiple distributions, but if application installation did not use package managers, you wouldn't have to deal with differences between them.&lt;br /&gt;&lt;br /&gt;The open-source Unix argument here seems to be to eliminate duplication of files, but I'd much rather solve the problem with more memory and marginally more disk space. In fact, that may be part of the reason the Linux approach is bad -- they optimize for the wrong thing -- system resources instead of user experience. [2] But then, since when is Linux known for a &lt;a href="http://fakesteve.blogspot.com/2008/01/jaron-lanier-takes-on-freetards.html"&gt;solid&lt;/a&gt; &lt;a href="http://daringfireball.net/2004/04/spray_on_usability"&gt;user experience&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;On OS X things work so smoothly that you don't realize how much better it is till you start using Windows or Linux.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[1] There's also a Show Contents option when you need it.&lt;br /&gt;[2] Maybe that's an artificial tradeoff to some extent -- with ZFS, since files are checksummed, duplicate copies of libraries in different applications can be merged on disk, and the OS can use the checksum to load only one copy into memory. But even otherwise, I'd much rather install more memory than "install" applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-223886286858321855?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/223886286858321855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=223886286858321855' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/223886286858321855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/223886286858321855'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/02/application-installation-101.html' title='Application Installation 101'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-7930267402192833559</id><published>2008-02-22T11:35:00.002+05:30</published><updated>2008-02-22T12:28:13.864+05:30</updated><title type='text'>SIP Dreams</title><content type='html'>One day, in an ideal world, the phone networks will implement SIP gateways so that from any computer you can make a SIP call to 9903949391@airtel.com to reach me, and it won't cost you anything more than it does today to make a call on Google Talk or Skype (read: free), and it won't cost me any more than it does to receive a call today, which is nothing. Or there will be no such thing as the "phone network" -- only a data network that carries SIP sessions between &lt;a href="http://openhandsetalliance.com/"&gt;computers&lt;/a&gt; of &lt;a href="http://www.apple.com/ipodtouch/features.html#wireless"&gt;different&lt;/a&gt; kinds... And, in an ideal world, Microsoft would make its specifications &lt;a href="http://microsoft.com/interop/osp"&gt;open&lt;/a&gt;, too :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-7930267402192833559?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/7930267402192833559/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=7930267402192833559' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7930267402192833559'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/7930267402192833559'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2008/02/sip-dreams.html' title='SIP Dreams'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-1671696536462065963</id><published>2007-05-27T19:46:00.000+05:30</published><updated>2007-06-06T17:37:48.003+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='UI Design'/><title type='text'>Horizontal Interfaces</title><content type='html'>Do you scroll vertically much more often than horizontally? If so, you need more vertical space. And widescreen monitors make the problem worse. To make efficient use of vertical space, move the taskbar or dock to the side of the screen. Ditto for toolbars when possible. I put my website's navigation bar on the &lt;a href="http://www.cse.iitb.ac.in/%7Ekart"&gt;side&lt;/a&gt; rather than across the top for the same reason.&lt;br /&gt;&lt;br /&gt;Unfortunately, many applications won't let you put toolbars on the side of the screen. I wish that changes. And I want a window system that puts window decorations -- the title bar, close, resize and minimize buttons -- and menus, toolbars, the tab bar, and the status bar  on the side of the window or desktop rather than the top. The top and bottom of windows and the desktop should contain &lt;span style="font-style: italic;"&gt;nothing&lt;/span&gt;, except perhaps the window border. I wish someone implemented this...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-1671696536462065963?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/1671696536462065963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=1671696536462065963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1671696536462065963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/1671696536462065963'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2007/05/horizontal-interfaces.html' title='Horizontal Interfaces'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-115134589576945465</id><published>2007-05-08T22:28:00.000+05:30</published><updated>2007-05-08T12:04:05.217+05:30</updated><title type='text'>Crystallization of a Style</title><content type='html'>Alan Kay makes a fundamental categorization of languages -- some are the &lt;a href="http://patricklogan.blogspot.com/2005/03/alan-kay-again-on-software-engineering.html"&gt;&lt;span style="font-style: italic;"&gt;crystallization of a style&lt;/span&gt;&lt;/a&gt;, with a core principle that describes them intellectually and around which everything else is built, and others are the &lt;span style="font-style: italic;"&gt;agglutination of features&lt;/span&gt;, made by sticking together features from different paradigms -- the secondary colors of programming. This prompted me to make a list of the crystallization-of-a-style languages I know of, with the definining characteristic:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Lisp: everything is a list&lt;/li&gt;&lt;li&gt;Smalltalk: everything is an object&lt;/li&gt;&lt;li&gt;Haskell: be lazy&lt;/li&gt;&lt;li&gt;Joy: organize the program as a composition of functions; we don't need parameters&lt;/li&gt;&lt;li&gt;Forth: manipulate the stack explicitly rather than using local variables&lt;br /&gt;&lt;/li&gt;&lt;li&gt;APL: apply operations on arrays&lt;/li&gt;&lt;li&gt;Erlang (at a higher level): organize the system as a set of loosely-coupled tasks that communicate only by message-passing&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(I haven't used most of these languages, so I could be wrong.)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-115134589576945465?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/115134589576945465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=115134589576945465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/115134589576945465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/115134589576945465'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/06/crystallization-of-style.html' title='Crystallization of a Style'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-115864762516555762</id><published>2006-09-19T12:02:00.000+05:30</published><updated>2006-09-19T12:04:59.120+05:30</updated><title type='text'>newlisp - a breath of fresh air?</title><content type='html'>&lt;p&gt;&lt;span style="font-style: italic;"&gt;I originally posted this on infogami, but since infogami seems abandoned, I'm reposting it here.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Newlisp is an exciting new Lisp dialect. Here's what I find interesting about it:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;Reasonable library - networking (HTTP, TCP, UDP), XML-RPC, database, regex, HTML, XML, Unicode, OpenGL... (I don't know how other dialects compare here).&lt;/li&gt;&lt;li&gt;Portable - the download page lists binaries for Windows, OS X (PPC), Linux and other OSs.&lt;/li&gt;&lt;li&gt;Good documentation.&lt;/li&gt;&lt;li&gt;It "puts the fun back in Lisp".&lt;/li&gt;&lt;li&gt;Seems more accessible.&lt;/li&gt;&lt;li&gt;newlisp seems to undergo "very active development. newlisp quickly closes the gap from the other Lisp dialects. Its code is open (GPL) and looks well managed, the documentation is detailed and tidy, and the implementor is open minded for new ideas and improvements.&lt;a href="http://eli.thegreenplace.net/2006/04/20/newlisp-an-intriguing-dialect-of-lisp/"&gt;"&lt;/a&gt;&lt;/li&gt;&lt;li&gt;A Lisp-1 (one namespace for functions and variables; no need to #`)&lt;/li&gt;&lt;li&gt;Conservative Memory Requirements.&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;I don't like it that undefined symbols are treated as &lt;code&gt;nil&lt;/code&gt;.&lt;/p&gt;  &lt;p&gt;There's a &lt;a href="http://newlisp.org/index.cgi?page=FAQ"&gt;FAQ&lt;/a&gt; and a &lt;a href="http://newlisp.org/index.cgi?page=Differences_to_Other_LISPs"&gt;comparison with other dialects&lt;/a&gt; (among others) on the &lt;a href="http://newlisp.org/"&gt;newlisp site&lt;/a&gt; (which runs newlisp).&lt;/p&gt;  &lt;p&gt;I'd previously wanted to learn Lisp but was put off by the lack of libraries and the platform-dependency. I'll try out newlisp sometime. It might well end up bringing Lisp to a broader audience.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-115864762516555762?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/115864762516555762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=115864762516555762' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/115864762516555762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/115864762516555762'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/09/newlisp-breath-of-fresh-air.html' title='newlisp - a breath of fresh air?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114995933788547634</id><published>2006-06-10T22:37:00.001+05:30</published><updated>2006-06-10T22:49:53.823+05:30</updated><title type='text'>Use WebDAV, not FTP</title><content type='html'>&lt;table border="1"&gt; &lt;!-- MSTableType="nolayout" --&gt; &lt;tbody&gt;&lt;tr&gt;&lt;th bg="" height="40"&gt; &lt;p align="center"&gt;&lt;span style="font-weight: 700;font-size:14;" &gt;WebDAV&lt;/span&gt;&lt;/p&gt;&lt;/th&gt;  &lt;th bg="" height="40"&gt;  &lt;span style="font-weight: 700;font-size:14;" &gt;FTP&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td&gt;+ simpler, better performance: no need to open and close TCP connections for each transfer, one request is enough to start transfer, pipelining, no need to login, stateless&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt; &lt;td&gt;+ based on HTTP (more widely used, no need to install separate FTP server, no separate port)&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt; &lt;td&gt;- transmits passwds in clear&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;+ update notifications (spec in progress)&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt;&lt;br /&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;+ locking&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;+ versioning&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt;   &lt;td&gt;+ file properties&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td&gt;+ ACLs&lt;/td&gt; &lt;td&gt;&lt;br /&gt;&lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt;   &lt;td&gt;+ partial writes&lt;/td&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;   &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;td&gt;+ FXP&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114995933788547634?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114995933788547634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114995933788547634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114995933788547634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114995933788547634'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/06/use-webdav-not-ftp_10.html' title='Use WebDAV, not FTP'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114330754964969901</id><published>2006-05-13T15:32:00.000+05:30</published><updated>2006-05-13T15:30:04.756+05:30</updated><title type='text'>My Definition of Functional Programming</title><content type='html'>Functional programming is a style that uses:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cse.iitb.ac.in/%7Ekart/writings/Pattern%20Matching.html"&gt;Pattern-matching&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Variants&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Enforced immutable state&lt;/li&gt;&lt;li&gt;Lazy evaluation&lt;/li&gt;&lt;/ul&gt;Of course, not every language may support all of these.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114330754964969901?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114330754964969901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114330754964969901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114330754964969901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114330754964969901'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/05/my-definition-of-functional.html' title='My Definition of Functional Programming'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114613211139230905</id><published>2006-05-13T12:46:00.000+05:30</published><updated>2006-05-18T00:37:25.293+05:30</updated><title type='text'>Healing the Object/Map Divide</title><content type='html'>An object (or, more precisely, its state) is just a map where the keys are strings from a certain grammar. Many languages allow attributes to be dynamically added and removed. Consider removing the restriction on the keys - allow any object, not just a string [1]. Then we don't need the object/map divide! [2]&lt;br /&gt;&lt;br /&gt;Ideally a language should define the '.' operator in terms of []: obj.attrib = obj['attrib']. That is, every object is a map, and attribute access is just a special case of map lookup with a different syntax, where you specify the attribute name as an identifier rather than an arbitrary experssion that could be computed at runtime [3].&lt;br /&gt;&lt;br /&gt;Yes, with this generalization, the '.' operator won't be able to access all attributes (but only what it can access otherwise - where the keys are strings that are valid identifiers). But this is a reasonable state of affairs.&lt;br /&gt;&lt;br /&gt;This would be beautiful. We'd be getting rid of one whole language feature - attributes, as different from entries in a map.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;[1] Python accepts only strings for the keys, but any string will do - not just valid identifiers.&lt;br /&gt;[2] There may be a need for different implementations optimized for different cases, but we don't need different abstractions.&lt;br /&gt;[3] Javascript has this equivalence.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Updated: 18 May 2006&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114613211139230905?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114613211139230905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114613211139230905' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114613211139230905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114613211139230905'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/05/healing-objectmap-divide.html' title='Healing the Object/Map Divide'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114124280883373923</id><published>2006-05-13T12:16:00.000+05:30</published><updated>2006-05-13T12:15:11.900+05:30</updated><title type='text'>Cloaked Methods</title><content type='html'>In a dynamically typed language, a method invocation can result in a NoSuchMethodException (or whatever it's called). One can define a method that throws the same exception. Then the object will appear to callers to have no such method at all (unless reflection is used). Is there any use for an explicitly thrown &lt;span style="font-family:arial;"&gt;NoSuchMethodException&lt;/span&gt;? Surprisingly, yes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;method_missing, of course, has to throw this exception when forwarding fails.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Undefining inherited methods that aren't appropriate for the derived class. This will allow inheritance to be used in situations where the derived class is not a subtype of the base. (Yes, for this to work, clients should not assume that inheritance implies subtyping.) Such a thing can't be done in statically typed languages because calls to non-existent methods don't result in an exception; violations are caught at compile-time.&lt;br /&gt;An example use would be a hierarchy where only cloneable classes (appear to) define a clone method, irrespective of the parent's cloneability.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114124280883373923?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114124280883373923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114124280883373923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114124280883373923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114124280883373923'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/05/cloaked-methods.html' title='Cloaked Methods'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114590323114910147</id><published>2006-04-24T23:52:00.000+05:30</published><updated>2006-11-01T12:01:47.753+05:30</updated><title type='text'>Explicit self is a good idea</title><content type='html'>In Python, a method must declare the self argument explicitly, and all attribute accesses must use the &lt;span style="font-family:arial;"&gt;self.&lt;/span&gt; prefix. I think this is a good idea:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A method is basically a function that takes a reference to an object. I'd like the syntax to reflect that. Explicit is better than implicit.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;An explicit self scales better to the no-distinguished-object style (where the self argument is syntactically treated similar to other arguments). This would be useful for multimethods.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;It distinguishes between &lt;a href="http://kartik-log.blogspot.com/2006/01/local-variable-creation-and-scoping.html"&gt;local and instance variables&lt;/a&gt;. So do instance variable declarations, but at the cost of not allowing instance variables to be dynamically created or deleted.&lt;/li&gt;&lt;/ul&gt;&lt;font&gt;Yes, this does make refactoring harder, but I think it's worth it.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Updated: 01 Nov 2006.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114590323114910147?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114590323114910147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114590323114910147' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114590323114910147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114590323114910147'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/04/explicit-self-is-good-idea.html' title='Explicit self is a good idea'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114287044448399345</id><published>2006-03-20T21:20:00.000+05:30</published><updated>2006-03-20T21:31:55.793+05:30</updated><title type='text'>Proprietary Software</title><content type='html'>An &lt;a href="http://www.economist.com/business/displaystory.cfm?story_id=5624944"&gt;article&lt;/a&gt; on open-source software had this delightful statement:&lt;br /&gt;&lt;blockquote&gt;For decades software was “proprietary”...&lt;/blockquote&gt;&lt;br /&gt;Makes you smile... open-source seems to have finally arrived :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114287044448399345?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114287044448399345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114287044448399345' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114287044448399345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114287044448399345'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/03/proprietary-software_20.html' title='Proprietary Software'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-114111914604791305</id><published>2006-02-28T14:48:00.000+05:30</published><updated>2006-02-28T15:02:26.086+05:30</updated><title type='text'>Serves them right!</title><content type='html'>See the connection between Vodafone &lt;a href="http://www.connectedinternet.co.uk/blog/_archives/2005/7/22/1062598.html"&gt;blocking Skype&lt;/a&gt;, and taking a &lt;a href="http://www.theregister.co.uk/2006/02/27/vodafone_impairment/"&gt;£28b hit&lt;/a&gt;? The assholes deserve it!&lt;br /&gt;&lt;br /&gt;I hope the &lt;a href="http://weblogs.java.net/blog/scottschram/archive/2006/01/bellsouth_tiere.html"&gt;other&lt;/a&gt; &lt;a href="http://arstechnica.com/news.ars/post/20060112-5965.html"&gt;clowns&lt;/a&gt; learn before they kill themselves, inconveniencing many people in the process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-114111914604791305?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/114111914604791305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=114111914604791305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114111914604791305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/114111914604791305'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/02/serves-them-right.html' title='Serves them right!'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113843074707213605</id><published>2006-01-28T12:07:00.000+05:30</published><updated>2006-02-17T20:01:08.396+05:30</updated><title type='text'>Interesting Languages</title><content type='html'>Here are some interesting languages:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Joy - A language where functions have &lt;a href="http://en.wikipedia.org/wiki/Joy_%28programming_language%29"&gt;no formal parameters&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Forth - where there are &lt;a href="http://en.wikipedia.org/wiki/Forth_programming_language"&gt;no local variables&lt;/a&gt; (?)&lt;/li&gt;&lt;li&gt;Icon - which has a notion of &lt;a href="http://en.wikipedia.org/wiki/Icon_programming_language"&gt;failure &lt;/a&gt;of any part of computation&lt;/li&gt;&lt;li&gt;APL - in which you can write a   program to simulate shuffling a deck of cards and then dealing them out to several players in four characters  -&lt;i&gt;David Given&lt;/i&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-style: italic;"&gt;Last Updated: 17 Feb 2006&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113843074707213605?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113843074707213605/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113843074707213605' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113843074707213605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113843074707213605'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/interesting-languages.html' title='Interesting Languages'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113826518085252254</id><published>2006-01-26T14:15:00.000+05:30</published><updated>2006-01-26T14:16:20.866+05:30</updated><title type='text'>Boo vs. C#</title><content type='html'>&lt;a href="http://www.cse.iitb.ac.in/%7Ekart/writings/Boo%20vs.%20Csharp.html"&gt;Here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113826518085252254?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113826518085252254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113826518085252254' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113826518085252254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113826518085252254'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/boo-vs-c.html' title='Boo vs. C#'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113757493738592275</id><published>2006-01-18T14:30:00.000+05:30</published><updated>2006-01-24T00:43:27.666+05:30</updated><title type='text'>The Joy of Continuous Testing</title><content type='html'>I did a project last semester that consisted of building a small object database in C#. We had testcases for every aspect of externally observable behavior. This was the first project for which I used unit tests, and the payoff was tremendous. The most remarkable advantage is the incredible confidence I had in my code; I could make any change and know instantly whether it broke something. Moreover, when things broke that shouldn't have, it alerted me to the presence of bugs I might not have discovered otherwise because I wouldn't have tested for them. Another nice result is that the tests define what it means to have a working program. (We finally ended up with almost a 50-50 distribution of code between tests and the main system.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113757493738592275?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113757493738592275/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113757493738592275' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113757493738592275'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113757493738592275'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/joy-of-continuous-testing.html' title='The Joy of Continuous Testing'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113753240864010853</id><published>2006-01-18T02:04:00.000+05:30</published><updated>2006-06-17T13:17:55.596+05:30</updated><title type='text'>Function Invocations</title><content type='html'>&lt;span style="font-style: italic;"&gt;This post was originally intended to be about syntax, but turned out to cover far more ground. Perhaps this is because syntax matters a lot!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Ruby allows you to remove the parenthesis around function arguments; you can invoke a function like this:&lt;br /&gt;&lt;pre&gt;copy file1, file2&lt;/pre&gt;Surpisingly, this turns out to have far-reaching effects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;cleaner, simpler syntax (fewer tokens). (In particular, enclosing within parentheses a block that's a function argument is ugly. Groovy had to make an exception to the syntax for this case, which Ruby doesn't have to.)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;a very clean model for &lt;a href="http://kartik-log.blogspot.com/2006/01/properties-built-on-methods-or-vice.html"&gt;properties&lt;/a&gt; (without need for Python-ish descriptors)&lt;/li&gt;&lt;li&gt;a clean model for &lt;a href="http://kartik-log.blogspot.com/2006/01/operator-overloading-in-ruby.html"&gt;operator overloading&lt;/a&gt;&lt;/li&gt;&lt;li&gt;unification of statements and functions ( &lt;span style="font-family:arial;"&gt;print&lt;/span&gt;, &lt;span style="font-family:arial;"&gt;loop&lt;/span&gt;, &lt;span style="font-family:arial;"&gt;throw&lt;/span&gt; and &lt;span style="font-family:arial;"&gt;catch&lt;/span&gt; are functions)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;higher-order operations are more convenient. In particular, this matters for domain-specific languages, like Rails.&lt;br /&gt;&lt;br /&gt;For instance:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;attr_accessor :age&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;scaffold :committee&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In Python, the syntax &lt;span style="font-family:arial;"&gt;dog.bark&lt;/span&gt; returns a bound method; I prefer the simpler syntax to be an invocation because, as I see it, inovcation is a more basic part of the notion of a function (or method) than binding it to an object. To get a bound method in Ruby, you say:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;barker = dog.method :bark&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;But once you get the function, inovking it requires:&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;barker.call&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;rather than Python's:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;barker()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I don't like it that Ruby doesn't allow me to do:&lt;br /&gt;&lt;span style="font-family:arial;"&gt;barker()&lt;/span&gt;&lt;br /&gt;or even just:&lt;br /&gt;&lt;span style="font-family:arial;"&gt;barker&lt;/span&gt;&lt;br /&gt;I think this aspect of Ruby could be improved. On the whole, though, I prefer the optional-parentheses model.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A further change in syntax is to remove the comma, too. After all, why type characters that aren't necessary? And &lt;span style="font-style: italic;"&gt;presto!&lt;/span&gt; we're in the S-expression-land of Lisp (and the somewhat similar syntax Haskell has). Which brings all the power of macros. It seems true that &lt;a href="http://blogs.msdn.com/sriram/archive/2006/01/15/lisp_is_sin.aspx"&gt;all roads&lt;/a&gt; &lt;a href="http://paulgraham.com/avg.html"&gt;lead to Lisp&lt;/a&gt;. (You may not travel all the way, and that's a different matter, but be clear where the power lies.)&lt;br /&gt;&lt;br /&gt;This is as far as I've come to accepting Lisp's syntax, which has been the biggest reason for me not to use the language.  Have I invalidated my excuse?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Updated: 17 Jun 2006&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113753240864010853?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113753240864010853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113753240864010853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113753240864010853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113753240864010853'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/function-invocations.html' title='Function Invocations'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113716265640269517</id><published>2006-01-13T19:18:00.001+05:30</published><updated>2008-10-30T19:39:40.453+05:30</updated><title type='text'>Operator Overloading in Ruby</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;Update: Looks like I was wrong. See the second last comment.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The best implementation of operator overloading I've seen (next to Lisp's ;) is &lt;a href="http://onestepback.org/articles/10things/page037.html"&gt;Ruby's&lt;/a&gt; - you just define methods named ==, &lt;, etc. The C++ mechanism is really ugly - they just go for more syntax, like the &lt;span style="font-family:arial;"&gt;operator&lt;/span&gt; keyword. Python's is better, but still ugly - you define methods named __eq__, etc.&lt;br /&gt;&lt;br /&gt;The beauty of Ruby's system is that there is very little language support for it. In Ruby,&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Characters like ==, = and ? are allowed in method names and other identifiers&lt;/li&gt;&lt;li&gt;Methods can be called without () at the end; simply give the arguments after the method name&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So you can do this:&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family:arial;"&gt;if dog.hungry?&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    dog.eat biscuit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;end&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;Since + is a valid method name (and numbers are objects), you can say:&lt;br /&gt;&lt;span style="font-family:arial;"&gt;puts 3.+7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The only support Ruby gives for operator overloading is to allow the dot to be removed. The rest of it follows automatically from the power and flexibility that's already there.&lt;br /&gt;&lt;br /&gt;I find a model that says, "the operator + maps to the method +" to be more straightforward than one that says, "the operator + maps to the method __add__". So + and .+ is just the operator/method duality - when you look at it as an operator, it's +, and when you look at it as a method, it's .+ .&lt;br /&gt;&lt;br /&gt;Incidentally, the very same power &lt;a href="http://kartik-log.blogspot.com/2006/01/properties-built-on-methods-or-vice.html"&gt;simplifies properties&lt;/a&gt; (things that look like instance variables but are backed by methods) - a read of a property &lt;span style="font-family:arial;"&gt;dog.age&lt;/span&gt; is just a call to the method &lt;span style="font-family:arial;"&gt;age &lt;/span&gt;with the parentheses removed, and a write is a call to the method &lt;span style="font-family:arial;"&gt;age=&lt;/span&gt;. How elegant!&lt;br /&gt;&lt;br /&gt;With a no-distinguished-object style (where the &lt;span style="font-family:arial;"&gt;self &lt;/span&gt;argument is syntactically treated similar to the other arguments), unless you have prefix syntax, mapping &lt;span style="font-family:arial;"&gt;a+b&lt;/span&gt; to &lt;span style="font-family:arial;"&gt;+(a, b)&lt;/span&gt; is little more of a syntax transformation than mapping it to &lt;span style="font-family:arial;"&gt;a.+(b)&lt;/span&gt;. But there's a transformation going on in both cases, so I suppose there isn't much difference. And I would still prefer overloading + by definining a function named + rather than &lt;span style="font-family:arial;"&gt;__add__&lt;/span&gt; (or another name).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Modified: 13 Jun 2006&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113716265640269517?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113716265640269517/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113716265640269517' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113716265640269517'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113716265640269517'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/operator-overloading-in-ruby.html' title='Operator Overloading in Ruby'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113707556042197701</id><published>2006-01-12T19:34:00.000+05:30</published><updated>2006-01-12T19:53:31.136+05:30</updated><title type='text'>Safety in Dynamic Languages</title><content type='html'>A very interesting post:&lt;br /&gt;&lt;blockquote&gt;&lt;div class="post-body"&gt;   &lt;p&gt;&lt;a href="http://blogs.sun.com/roller/page/jag?entry=safety_is_freedom"&gt;James Gosling&lt;/a&gt; has recently been putting &lt;a href="http://blogs.sun.com/roller/page/jag?entry=radlab_scripting_and_scale"&gt;his foot in his mouth&lt;/a&gt; when it comes to dynamic lanaguages.&lt;/p&gt;    &lt;p&gt;The arguments are nothing new, and ones that have been proven false time and again . What strikes me as amazing though, is that even at the very top of the ladder, they still think that the compiler is a safety net. &lt;/p&gt;    &lt;pre&gt;&lt;code&gt;"the truth is actually that safety&lt;br /&gt;is freedom (eg. a good safety harness&lt;br /&gt;and rope give you the freedom to climb&lt;br /&gt;a mountain"&lt;/code&gt;&lt;/pre&gt;    &lt;p&gt;If you aren’t unit testing, then the only thing the rope is going to be good for is hanging yourself. If you really think the compiler is going to be your safety net, then please don’t join me on my next project.&lt;/p&gt;    &lt;p&gt;Freedom has nothing to do with the false sense of security that the compiler gives you.&lt;/p&gt; &lt;/div&gt;&lt;/blockquote&gt;I quoted it verbatim here because the &lt;a href="http://blog.objo.com/articles/2005/12/20/safety-in-dynamic-languages"&gt;link&lt;/a&gt; doesn't seem to be working.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113707556042197701?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113707556042197701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113707556042197701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113707556042197701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113707556042197701'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/safety-in-dynamic-languages.html' title='Safety in Dynamic Languages'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113689052232761472</id><published>2006-01-10T19:35:00.000+05:30</published><updated>2006-01-10T19:28:25.893+05:30</updated><title type='text'>WEBrick as a WebDAV server</title><content type='html'>I wanted a WebDAV server and since I'm interested in Ruby, I installed WEBrick. There's a gem for this server that's a WebDAV server, so I installed it. One absolutely beautiful thing about this server is the paradigm of mounting servlets at specific points in the URL namespace. Wow!&lt;br /&gt;&lt;br /&gt;When I tried to connect, I got 403 Forbidden errors and after some time realized I needed to enable directory listings. That's counter-intuitive for a WebDAV server. Anyway, I figured out I had to pass a FancyIndexing option to the server, so I did that. So I ended up with a browseable server.&lt;br /&gt;&lt;br /&gt;I was pleasantly surprised to learn that this server worked with IE's Web Folders (Tomcat didn't.)&lt;br /&gt;&lt;br /&gt;After some time I realized with a shock that my files were world-writable! What an unsafe default! Anyway, I looked for an option to make it read-only and was even more surprised to find that one didn't exist. So I hacked into the source and after spending quite some time understanding it and deciding how to change it, I put &lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;raise HTTPStatus::Forbidden&lt;/span&gt;&lt;/span&gt; statements in the "dangerous" methods.&lt;br /&gt;&lt;br /&gt;For a while I was happy, till I found the server very slow to respond at certain times and from certain systems on the LAN. I don't know whether this is a problem with Webrick or not.&lt;br /&gt;&lt;br /&gt;And the server gave up on files with certain characters ('&amp;' being one of them) in the filename, spewing exception stack traces on the console. This would cause Windows Explorer (with the first-rate NetDrive tool) to abort the entire copy, and Nautilus to copy whatever files it encountered till that point. Not acceptable.&lt;br /&gt;&lt;br /&gt;So I'll have to switch away from Webrick as a WebDAV server, though I'll continue to use it as a HTTP server.&lt;br /&gt;&lt;br /&gt;In fact, I'll switch from the WebDAV protocol to FTP; it's extremely inconvenient that there's no way to switch from a HTML UI to a WebDAV tree UI. This is more important to me than whatever features WebDAV has over FTP.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113689052232761472?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113689052232761472/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113689052232761472' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113689052232761472'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113689052232761472'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/webrick-as-webdav-server.html' title='WEBrick as a WebDAV server'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113689051948363103</id><published>2006-01-10T18:26:00.000+05:30</published><updated>2006-01-10T18:32:32.683+05:30</updated><title type='text'>Mounting in NTFS 101</title><content type='html'>It seems to be a little known fact that NTFS supports mounting like Unix - a directory can be mounted at another directory within an NTFS volume (called a &lt;span style="font-style: italic;"&gt;junction point&lt;/span&gt;). But the tools to do this are not available in the base install of Win XP and require an external tool, like Junction Link Magic. Keep in mind that the mount point must be on an NTFS volume; the mounted directory can be on FAT32.&lt;br /&gt;&lt;br /&gt;If you want to refer to a file rather than a folder, create a &lt;span style="font-style: italic;"&gt;hard link&lt;/span&gt;. (If Microsoft had the design sense to follow the &lt;span style="font-style: italic;"&gt;Directories Are Also Files &lt;/span&gt;principle, we'd be able to create a hard link to a directory and wouldn't need junction points. This was partly pointed out to me by my &lt;a href="http://www.cse.iitb.ac.in/%7Eadarsh"&gt;friend&lt;/a&gt;.)&lt;br /&gt;&lt;br /&gt;If you want to mount an entire volume rather than a directory, use Computer Management. The mounted volume then doesn't need a drive letter.&lt;br /&gt;&lt;br /&gt;In the reverse direction, you can create a drive letter that refers to a folder, using the SUBST command.&lt;br /&gt;&lt;br /&gt;Phew! I really wish Windows used the single-filesystem model of Unix!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113689051948363103?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113689051948363103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113689051948363103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113689051948363103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113689051948363103'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/mounting-in-ntfs-101.html' title='Mounting in NTFS 101'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113689620265133790</id><published>2006-01-10T17:22:00.000+05:30</published><updated>2006-02-12T12:19:08.886+05:30</updated><title type='text'>We need a webdav:// URL scheme!</title><content type='html'>When browsing a remote filesystem, it's more convenient to use a filesystem browser UI rather than an HTML directory listing. Unfortunately, if the protocol used is WebDAV, there's no way to effect a switchover from a HTML UI. This is because URLs that point to WebDAV shares use the same http scheme and are therefore indistinguishable from HTTP URLs. Neither can you follow the URL to see what's on the other side (in fact, the method (pun intended) of following the URL is itself different based on whether you want to use the WebDAV protocol; you do a PROPFIND instead of a GET). So if a particular resource has to be opened as a WebDAV resource, the browser must be explicitly told.&lt;br /&gt;&lt;br /&gt;To this end, the IETF wants to introduce a new MIME type, &lt;span style="font-family:courier new;"&gt;application/davmount+xml&lt;/span&gt;, that instructs the web browser to open a (specified) resource in a WebDAV filesystem browser. So a webpage that wants to link to a WebDAV resource must link to this mount request document which in turn specifies the location of the resource.&lt;br /&gt;&lt;br /&gt;The alternative is to use a &lt;span style="font-family:courier new;"&gt;webdav://&lt;/span&gt; URL.&lt;br /&gt;&lt;br /&gt;Here are the problems I see with the proposed spec:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Webmasters must create these mount request documents, and every point in the WebDAV filesystem hierarchy needs its own mount request files. So the webmasters may have to create a lot of these files used just for redirection. Or dynamically generate them. Neither is appropriate for a task that can be done using something as simple as a URL with a different scheme.&lt;/li&gt;&lt;li&gt;A new scheme would be useful when a user types a URL into a client program. Presently, clients use ad hoc solutions. For instance, Internet Explorer's Open box has an &lt;span style="font-style: italic;"&gt;Open as Web Folder &lt;/span&gt;option that you must check to use WebDAV. A webdav:// URL would be more straightforward.&lt;/li&gt;&lt;li&gt;The proposed spec requires another round-trip to the server.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;You can use a data URI (thanks &lt;span class="anon-comment-author"&gt;Julian Reschke for pointing this out) and that will handle problems 1 and 3. &lt;/span&gt; But it will still be unwieldy; would you prefer a URL that encodes:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Courier;"&gt;Content-Type: application/davmount+xml&lt;br /&gt;&lt;br /&gt;&amp;lt;dm:mount xmlns:dm="http://purl.org/NET/webdav/mount"&amp;gt;&lt;br /&gt;&amp;lt;dm:url&amp;gt;http://www.example.com/user42/&amp;lt;/dm:url&amp;gt;&lt;br /&gt;&amp;lt;dm:open&amp;gt;inbox/&amp;lt;/dm:open&amp;gt;&lt;br /&gt;&amp;lt;/dm:mount&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;or this:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;http://www.example.com/user42/&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;True, you don't &lt;span style="font-style: italic;"&gt;need &lt;/span&gt;a new scheme, but that doesn't mean you shouldn't have one, given that the alternative suffers from the above problems. WebDAV is a different protocol from "plain" HTTP (it introduces new HTTP methods), and if we don't use URL schemes to identify protocols, what are the schemes there for? Why needlessly complicate things?&lt;br /&gt;&lt;br /&gt;Nautilus did the right thing and went for a dav:// scheme. Konqueror uses webdav://&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Updated: 12 Feb 2006&lt;/span&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113689620265133790?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113689620265133790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113689620265133790' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113689620265133790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113689620265133790'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/we-need-webdav-url-scheme.html' title='We need a webdav:// URL scheme!'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113661394555091331</id><published>2006-01-07T10:42:00.000+05:30</published><updated>2006-04-15T22:11:34.130+05:30</updated><title type='text'>Wow!</title><content type='html'>I found a couple of articles yesterday that made me all excited. The first is about &lt;a href="http://www.mindpixel.com/chris/2005/06/brainpixels-extracting-video-from-cat.html"&gt;extracting video from brains&lt;/a&gt;! Scientists apparently showed videos to cats and extracted them from their brains. You can see the extracted images below the orginal ones from the video. How much has science progressed...&lt;br /&gt;&lt;br /&gt;The second is actually far more interesting - the US govt. is investigating a &lt;a href="http://news.scotsman.com/scitech.cfm?id=16902006"&gt;hyperspace engine&lt;/a&gt;! Wow!!! I didn't think this would happen in my lifetime... But even the theory it's based on is controversial, so it's far from certain it will work out. But if it does, it would be truly revolutionary... Welcome to the &lt;a href="http://www.cse.iitb.ac.in/%7Ekart/Star%20Trek/target1.html"&gt;24th century&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113661394555091331?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113661394555091331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113661394555091331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113661394555091331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113661394555091331'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/wow.html' title='Wow!'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113600942795384597</id><published>2006-01-06T00:30:00.000+05:30</published><updated>2006-01-06T00:23:47.203+05:30</updated><title type='text'>Keyboard Shortcut Hints</title><content type='html'>Yesterday my friend was using my system and I noticed him closing tabs in Firefox by middle-clicking. That immediately reminded me of this shortcut, which I was actually using an year ago and somehow forgot. I was clicking on the tab followed by clicking on the close button (no, I don't like Tab X). And then I realized that almost all of us use keyboard shortcuts less often than it benefits us. Why don't the apps give hints when the user frequently performs a gesture, especially a multi-step one? If the user was interacting with an app using the keyboard, then switches to the mouse and back to the keyboard, that can be a good time to give a shortcut hint (a balloon that says, for instance, &lt;span style="font-style: italic;"&gt;press Ctrl+R to reply&lt;/span&gt;). Of course, the hint should not be given everytime...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113600942795384597?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113600942795384597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113600942795384597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113600942795384597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113600942795384597'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2006/01/keyboard-shortcut-hints.html' title='Keyboard Shortcut Hints'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113548715032633794</id><published>2005-12-26T23:28:00.000+05:30</published><updated>2006-03-18T11:58:13.410+05:30</updated><title type='text'>Remote Desktop and SSH</title><content type='html'>I use Remote Desktop to connect to my new Windows box over the network, and it's a very pleasant experience. For starters, it's very fast - whether the client is on Windows and Linux - to the point where it feels like a local session. X/SSH, on the other hand has an irritating lag for each click (but maybe it's a problem with my X server on Windows). Remote Desktop gives you your start menu &amp; desktop icons, you can optionally export local drives to the remote system so that you can directly open and save files (as opposed to saving them on one system and moving them using sftp/scp - and having to re-authenticate yourself), sound played remotely comes to the local system, and printers can be exported. Remote Desktop preserves your earlier login sesssion rather than creating a new one.&lt;br /&gt;&lt;br /&gt;It may be de rigueur (at least in some circles) to diss Microsoft, but there's no denying that they create more usable solutions that the open-source bigots.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Updated: 18 Mar 2006&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113548715032633794?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113548715032633794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113548715032633794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113548715032633794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113548715032633794'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/remote-desktop-and-ssh.html' title='Remote Desktop and SSH'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113489046476383841</id><published>2005-12-26T23:14:00.000+05:30</published><updated>2005-12-26T23:07:44.046+05:30</updated><title type='text'>Could the Web Go Paid?</title><content type='html'>Quite a bit of content on the web today is available at no charge, but is ad-supported. With many people installing ad-blockers (or their admins doing it centrally), this revenue stream is bound to take a hit. Will that drive a shift to micropayments?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113489046476383841?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113489046476383841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113489046476383841' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113489046476383841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113489046476383841'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/could-web-go-paid.html' title='Could the Web Go Paid?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113561701466063177</id><published>2005-12-26T19:40:00.000+05:30</published><updated>2005-12-26T22:40:14.700+05:30</updated><title type='text'>Runtime-checked Exceptions</title><content type='html'>Checked exceptions in Java are a big pain in the ass. Partly as a result, no other major language (C#, Ruby) supports checked exceptions the way Java does. But this checking actually has a use - it ensures that the set of exceptions thrown by a method is well-specified and enforced. Otherwise, if a method throws exceptions its callers are not prepared to handle, they'll break.&lt;br /&gt;&lt;br /&gt;Is there a way to check exceptions that doesn't suck? Consider a language where by default a method is allowed to throw any exception and checking is done at runtime. This will ensure (respectively) that the checking doesn't become a pain when you don't want to use it, and you won't need try/catches for exceptions you know (or think) won't be thrown. That way the complaints against Java-style checked exceptions are handled. If an exception specification violation does occur at runtime, the only reasonable way to handle it (as far as I can see) would be to throw a specific exception meant for this purpose (something like &lt;span style="font-style: italic;"&gt;UnexpectedThrowableException&lt;/span&gt;) that wraps the original exception.&lt;br /&gt;&lt;br /&gt;So the real question is: is this wrapping useful? I think so - it's important to have an explicit contract (of what exceptions can be thrown) and enforce it. A module breaking its contract seems very different from expected exceptions (file not found, etc).&lt;br /&gt;&lt;br /&gt;The only major language that implements something like this is, surprisingly, C++ (except that an unexpected throw causes program termination by default).&lt;br /&gt;&lt;br /&gt;More surprisingly, this has a close parallel with type checking - Java's compile-time exception checking is like static typing (all potential violations caught at compile-time, but at a huge cost), having no checking is like weak typing (violations go undetected), and C++'s runtime exception checking corresponds to dynamic typing (violations are detected at runtime and cause an exception). To the extent this comparison holds, there should be exception checking, assuming there should be type checking. Static exception checking, like static typing, seems to be more trouble that it's worth. So should we go for dynamic exception checking?&lt;br /&gt;&lt;br /&gt;Is this useful enough in practice to warrant language support?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113561701466063177?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113561701466063177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113561701466063177' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113561701466063177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113561701466063177'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/runtime-checked-exceptions.html' title='Runtime-checked Exceptions'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113549754603034747</id><published>2005-12-25T13:23:00.000+05:30</published><updated>2005-12-26T19:39:01.736+05:30</updated><title type='text'>Java Web Start - the forgotten option?</title><content type='html'>All the buzz nowadays is about web applications. Accompanied by criticism of the browser as a lame UI. Projects are underway to remedy this - Mozilla's XUL (but it doesn't use the OS's native widgets), Microsoft's XAML, etc.&lt;br /&gt;&lt;br /&gt;But there is another option available today - Java Web Start, which allows applications to be launched from the browser. Yes, it's different - the apps run on the client. But they have the same advantage as a web app - installation isn't needed - and several more:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Apps run outside the browser window, which may sometimes be better (from a UI design standpoint).&lt;/li&gt;&lt;li&gt;Apps can be configured (by the developer) to launch from a local cache while doing a background check for an updated version (which runs the next time onwards).&lt;/li&gt;&lt;li&gt;They can run in an offline mode.&lt;/li&gt;&lt;li&gt;They can have access to the local filesystem (if they're signed and the user trusts the signer).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;They can optionally be launched from a desktop shortcut.&lt;/li&gt;&lt;li&gt;You can code in Python (Jython), Groovy, Nice, Java, or any of the other languages that run on the JVM. Whether this is an advantage depends on the people and the task at hand.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The Java libraries are far more extensive than those of Javascript.&lt;/li&gt;&lt;li&gt;The load on the server could be reduced, and some of the client's resources can be used (which would otherwise probably go unused).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Did you notice that this pretty much describes a traditional desktop application?! But with the advantage of a web-based one! Web Start blurs the distinction between a local app and a remote one. It would be very interesting to see (Java) apps being distributed this way.&lt;br /&gt;&lt;br /&gt;Web Start is certainly not a replacement for AJAX, XUL, XAML, etc, but it seems to be a valuable tool to have in your toolbox.&lt;br /&gt;&lt;br /&gt;With Javascript supporting canvases, you can probably have a rich UI within a web page, by drawing custom controls. That's an interesting idea; I wonder if it's workable and worthwile... but the other advantages of Web Start remain.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113549754603034747?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113549754603034747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113549754603034747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113549754603034747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113549754603034747'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/java-web-start-forgotten-option.html' title='Java Web Start - the forgotten option?'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113466484010048863</id><published>2005-12-15T22:10:00.000+05:30</published><updated>2005-12-15T22:10:40.133+05:30</updated><title type='text'>Blame the W3C, not GWA</title><content type='html'>So Google Web Accelerator drew &lt;a href="http://37signals.com/svn/archives2/the_google_web_accelerator_is_back_with_a_vengeance.php"&gt;flak&lt;/a&gt; again. Some people &lt;a href="http://blog.ianbicking.org/google-at-it-again.html"&gt;say&lt;/a&gt; that what matters is not the HTTP spec but what people are actually doing. In that case, what are the specs there for? I'm reminded of the Windows 95 introduction, when they found that Sim City had a bug - it used memory right after freeing it - but still &lt;em&gt;happened&lt;/em&gt; to work under DOS but crashed under Windows. "They reported this to the Windows developers, who disassembled SimCity, stepped through it in a debugger, found the bug, and &lt;em&gt;added special code&lt;/em&gt; that checked if SimCity was running, and if it did, &lt;em&gt;ran the memory allocator in a special mode in which you could still use memory after freeing it&lt;/em&gt;.&lt;a href="http://www.joelonsoftware.com/articles/APIWar.html"&gt;"&lt;/a&gt; Is this where we want to go? Not me, atleast.&lt;br /&gt;&lt;br /&gt;Then there's more flak for dropping &lt;span style="font-family:trebuchet ms;"&gt;X-Moz: prefetch.&lt;/span&gt; But once again, &lt;span style="font-family:Trebuchet MS;"&gt;X-Moz: prefetch&lt;/span&gt; is not part of the spec and Google may have had a good reason for dropping the header, so I wouldn't blame them. After all, who says you have to use what Mozilla does? Aren't standards there for precisely this reason?&lt;br /&gt;&lt;br /&gt;Granted, GWA &lt;a href="http://blog.ianbicking.org/breaking-the-web-we-have.html"&gt;breaks (part of) the web we have&lt;/a&gt;. But that doesn't mean you can blame Google for it. Agreed, there are reasons why you might want to perform destructive ("unsafe") operations through GETs - lack of POSTs in links, lack of nested forms, lack of a way to mark a URL as being "unsafe", lack of a standard prefetch header... All these are gaps in the HTTP/HTML standards.  The W3C may have been sitting on its ass for years without handling these issues. So blame the W3C. Not Google.&lt;br /&gt;&lt;br /&gt;Interestingly, the HTTP 1.1 RFC (2616) says that "the convention has been established that the GET and HEAD methods SHOULD NOT have the significance of taking an action other than retrieval". &lt;em&gt;Convention?&lt;/em&gt; Why on earth is this RFC documenting a &lt;em&gt;convention&lt;/em&gt;? Does the C++ language standard suggest that variable names be in lowercase? What is this - a convention or a requirement? Everyone seems to base their arguments on the view that the RFC forbids unsafe GETs, but if it's only a convention... Boy, we are on thin ice.&lt;br /&gt;&lt;br /&gt;In any case, I wouldn't blame Google for this mess.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113466484010048863?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113466484010048863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113466484010048863' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113466484010048863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113466484010048863'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/blame-w3c-not-gwa.html' title='Blame the W3C, not GWA'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113190801736343729</id><published>2005-12-14T18:24:00.000+05:30</published><updated>2005-12-14T18:25:42.790+05:30</updated><title type='text'>Code as Configuration</title><content type='html'>I used CherryPy sometime ago. I found that to configure the server, I had to edit the source code. I initially repelled at this idea, but then I found that the (Python) code was as transparent as a config file. Why have a config file if the source code is as easy to work with? And far more powerful, of course. For instance, I think you can change the server process priority in the "config file" (by calling Win32). This is yet another benefit you get from using a more powerful language.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113190801736343729?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113190801736343729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113190801736343729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113190801736343729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113190801736343729'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/code-as-configuration.html' title='Code as Configuration'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113156918482982380</id><published>2005-12-14T17:58:00.000+05:30</published><updated>2005-12-14T17:59:27.336+05:30</updated><title type='text'>Microsoft's HTML Marvel</title><content type='html'>I use HTML for my documents (when plain text won't do) and so I needed a good HTML editor. I used Mozilla Composer for a while but it sucked big time. There doesn't seem to be an easy way to move rows within a table; drag and drop creates a &lt;em&gt;nested table.&lt;/em&gt; (How stupid!) And what is extremely irritating is that you can't right-click a file and open with Composer. Moreover, the look-and-feel made me slightly uncomfortable. So I tried Frontpage 2003. I was wary because previous versions of Microsoft apps generated &lt;em&gt;horrid&lt;/em&gt; HTML. But I found to my surprise that Frontpage generated clean, simple HTML. (Surprisingly, Frontpage by default cleans by Word's bloated HTML.) And the user experience was a million times better.&lt;br /&gt;&lt;br /&gt;All this reinforces the view that open-source software, by and large, has terrible usability. Also, Microsoft's apps are better than they get credit for - sometimes far better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113156918482982380?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113156918482982380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113156918482982380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113156918482982380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113156918482982380'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/microsofts-html-marvel.html' title='Microsoft&apos;s HTML Marvel'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113208387720583610</id><published>2005-12-06T16:30:00.000+05:30</published><updated>2006-03-02T01:17:23.253+05:30</updated><title type='text'>Static Typing</title><content type='html'>&lt;span style="font-style: italic;"&gt;I now realize that it's possible to have dynamic typing &lt;a href="http://www.cse.iitb.ac.in/%7Ekart/writings/Mostly-Static%20Duck%20Typing.html"&gt;together&lt;/a&gt; with the early checking associated with static typing. So I no longer agree with this post.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Static typing has gotten a bad rap, and many languages don't support it. While requiring every variable to have a type declaration is certainly harmful IMO, optional type constraints can sometimes be useful. When I write Python code, I sometimes write explicit type checks (generally for debugging, but I leave them in after debugging, for the same reason I leave assertions in). I wonder if such checks are common enough that they warrant a more succinct syntax...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Last Modified: 2 Mar 2006&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113208387720583610?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113208387720583610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113208387720583610' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113208387720583610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113208387720583610'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/static-typing.html' title='Static Typing'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113206000396910521</id><published>2005-12-06T15:29:00.000+05:30</published><updated>2005-12-06T15:23:17.856+05:30</updated><title type='text'>Birds of a Feather</title><content type='html'>I noticed that &lt;a href="http://paulgraham.com/"&gt;people&lt;/a&gt;  &lt;a href="http://prescod.net/"&gt;who&lt;/a&gt;  &lt;a href="http://blog.ianbicking.org/"&gt;use&lt;/a&gt; the most powerful languages - Lisp, Ruby, Python - tend to prefer &lt;a href="http://www.apple.com/macosx/"&gt;the best OS&lt;/a&gt; (more than other people) and their &lt;a href="http://paulgraham.com/avg.html"&gt;writings&lt;/a&gt; are &lt;a href="http://www.xml.com/pub/a/2003/07/16/svg-prescod.html"&gt;more&lt;/a&gt; &lt;a href="http://www.prescod.net/python/IsPythonLisp.html"&gt;insightful&lt;/a&gt;. Is it just a coincidence?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113206000396910521?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113206000396910521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113206000396910521' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113206000396910521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113206000396910521'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/birds-of-feather.html' title='Birds of a Feather'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113177857328248964</id><published>2005-12-04T23:06:00.000+05:30</published><updated>2005-12-04T23:00:18.243+05:30</updated><title type='text'>Drowning in Abstractions</title><content type='html'>I wanted to use Zope as a WebDAV server. I spent a couple of hours wading through the shitload of abstractions that Zope is, figuring out how WebDAV serving works. No success. I'm not surprised that all the attention nowadays is with Rails, CherryPy, Django, etc.&lt;br /&gt;&lt;br /&gt;And then there's Twisted - which has powerful and complex abstractions, too, but not so complex as does Zope. It tries to do only one thing - be a framework for servers.&lt;br /&gt;&lt;br /&gt;CherryPy is even simpler - it's a framework for HTTP servers, and nothing else. Its source code is simplicitly itself - it's easier to understand than Tomcat's &lt;span style="font-style: italic;"&gt;documentation&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;See the pattern?&lt;br /&gt;&lt;br /&gt;I don't know if Zope goes overboard on abstractions. But there's another, more important issue here: a HTTP server (like CherryPy) will probably be simpler than something that's a HTTP/FTP server-cum-object-database-cum-templating-system-cum-what-have-you (like Zope). Good modular design will probably result in CherryPy + Cheetah/Kid + SQLObject rather than Zope. Not only does the latter approach increase what you have to learn before you can do something simple but you may not need the additional functionality. You can end up unravelling the mess and get little in return.&lt;br /&gt;&lt;br /&gt;There's another advantage here. A lean and mean component has a higher chance of getting &lt;a href="http://www.aminus.org/blogs/index.php/fumanchu/2005/10/06/eat_less_exercise_more"&gt;used in more&lt;/a&gt; higher level frameworks and to that extent becoming a standard for the small part does it does but does well. CherryPy, for instance, is used as the HTTP server in both Subway and TurboGears (with the other components of these frameworks coming from elesewhere.) This benefits everybody.&lt;br /&gt;&lt;br /&gt;Insist on small, powerful and orthogonal tools. Not Zope but Webrick or CherryPy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113177857328248964?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113177857328248964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113177857328248964' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113177857328248964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113177857328248964'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/12/drowning-in-abstractions.html' title='Drowning in Abstractions'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113138129194579540</id><published>2005-11-23T21:30:00.000+05:30</published><updated>2005-11-23T21:48:49.306+05:30</updated><title type='text'>Inefficient &amp; Impractical</title><content type='html'>I had to photocopy some papers for an exam and I found that out of a stack of papers I needed everything except ones titled &lt;em&gt;Efficient Blah Blah&lt;/em&gt; and &lt;em&gt;Practical Yadda Yadda&lt;/em&gt;. Hmm... everything except the efficient and practical stuff... Does that tell you something about academia?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113138129194579540?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113138129194579540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113138129194579540' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113138129194579540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113138129194579540'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/11/inefficient-impractical.html' title='Inefficient &amp; Impractical'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113276077054088985</id><published>2005-11-23T21:13:00.000+05:30</published><updated>2005-11-23T21:56:14.450+05:30</updated><title type='text'>A Formula to Create the Mona Lisa</title><content type='html'>Yesterday I was reading something on "Software Engineering" that talked about improving productivity and it struck me that a lot of academics miss one critical point about building better software: use powerful languages - Ruby, Boo, Python, Lisp, etc. Most academic writing seems to be colored by the assumption that languages are largely interchangeable... But then papers don't seem to be judged much by how useful they are.&lt;br /&gt;&lt;br /&gt;Some people hold formal methods as a potential source for improvements in productivity. But I'm skeptical. If you could describe a piece of software completely enough for the formal methods to work, it seems to me you could make it bug-free in the first place. Software is the most sophisticated creation of our civlization. And &lt;em&gt;formal&lt;/em&gt; brings to mind rules and procedures and protocols. That doesn't seem to go down well with creating sophisticated systems. Maybe I'm ignorant here and there's some breakthrough just around the corner. Possible, but I'm not holding my breath.&lt;br /&gt;&lt;br /&gt;I think that the greatest source of increase in productivitiy in the near future will be better languages. This, of course, is already happening, with the shift from C++ to Java. The most respected hackers - the most productive people - seem to be using the most powerful languages. Do they use formal methods? Doesn't seem that way to me. A better answer would be Lisp or Ruby.&lt;br /&gt;&lt;br /&gt;A lot of the material on Software Engineering makes me feel like throwing up. They talk about methodologies and processes and what have you, but do they even mention conceptual integrity? Taste? You'll probably learn more about building software by reading Paul Graham's essays than from the tomes on "Software Engineering". (Is it just a coincidence that the former is orders of magnitude more interesting than the latter?) A lot of "software engineering" seems to miss the point that building software is an art. True, it's engineering, and it's science, but it's also an art. There is certainly a place for methodologies and processes, but it's also crucial to have a masterful designer with a keen sense of taste. To have people who &lt;em&gt;care&lt;/em&gt; for the software they're building. All the comparisons of building software to erecting buildings, and the conclusion of that line of thought, I think, paint only a partial picture. Try comparing building software to painting the ceiling of the Sistine Chapel as well, and then you get a complete picture. Today's software engineering sounds like giving a formula to create the Mona Lisa.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113276077054088985?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113276077054088985/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113276077054088985' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113276077054088985'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113276077054088985'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/11/formula-to-create-mona-lisa_23.html' title='A Formula to Create the Mona Lisa'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113059871322008064</id><published>2005-10-29T19:47:00.000+05:30</published><updated>2005-10-29T20:41:53.276+05:30</updated><title type='text'>Firewalled</title><content type='html'>After using my computer all day, this evening I was fed up and went for a walk. On the way, I happened to think of the end-to-end refresh problem with transparent HTTP proxies and of &lt;a href="http://dirtsimple.org/2005/10/children-of-lesser-python.html"&gt;Children of a Lesser Python&lt;/a&gt;. And then I suddenly noticed the beautiful trees lining the road, the setting sun, the subtle yet vibrant orange sky and the cool breeze. That reminded of the extremely tender &lt;a href="http://www.imdb.com/title/tt0475591/"&gt;love story&lt;/a&gt; I'd watched a few days ago. I thought, wouldn't it totally change the quality of my life if I had a lover? There's&lt;span style="font-style: italic;"&gt; so much&lt;/span&gt; more to life than virtual machines and HTTP GET requests - relationships, love, travel, nature, friendship... How many sunsets had I missed doing programming?&lt;br /&gt;&lt;br /&gt;True, if you don't have an interest that sometimes occupies you completely, your life is not worth living. But if all you have are such interests, your life isn't worth it, either.&lt;br /&gt;&lt;br /&gt;I realized that Python VMs could be a little slower or faster and&lt;span style="font-style: italic;"&gt; guess what&lt;/span&gt;? The world will pretty much be the same.&lt;br /&gt;&lt;br /&gt;Unfortunately, I have a couple of projects due in a month, so I'll have to return to the same old word of bits and bytes. Atleast for now. Sigh.&lt;br /&gt;&lt;br /&gt;(Institutions like IIT may be highly regarded for providing first-rate education. But they go too far, making academics the only thing in your life.)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113059871322008064?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113059871322008064/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113059871322008064' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113059871322008064'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113059871322008064'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/10/firewalled.html' title='Firewalled'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-113013478848735975</id><published>2005-10-24T11:44:00.000+05:30</published><updated>2005-10-24T11:54:39.263+05:30</updated><title type='text'>First Love</title><content type='html'>I fell in love yesterday. Went to the city (Mumbai) and found a beauty there. Hailed a taxi and got her to my room comfortably. She's great - Athlon 64, 1 Gb memory, hard disc with NCQ, DVD-writer (dual-layer), 17-inch LCD, 4.1 speaker system... I run Win XP 64-bit edition.&lt;br /&gt;&lt;br /&gt;Glad to be rid of Linux after three months of hell. Windows certainly does have its problems, but it's &lt;span style="font-style: italic;"&gt;usable&lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;After so many years, I have a system to call my own. I don't have to share it with anybody and I decide what OSs and apps to run. Yesterday was one of the highlights of my life so far...&lt;br /&gt;&lt;br /&gt;I only hope my next lover is human ;-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-113013478848735975?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/113013478848735975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=113013478848735975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113013478848735975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/113013478848735975'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/10/first-love.html' title='First Love'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-112940755079695380</id><published>2005-10-16T01:09:00.000+05:30</published><updated>2005-10-16T01:53:02.970+05:30</updated><title type='text'>Modules and Singletons</title><content type='html'>I was in a design patterns class the other day, and singletons were being discussed. The instructor said that the classic example of a singleton is a window manager. That set me thinking - if you aren't going to have multiple instances of it, why should it be a class? Couldn't it be a module? Probably the answer is that you do want multiple implementations of a window manager; you just don't want them instantiated at once. I can imagine a system where you instantiate one implementation (subclass) of WindowManager at startup and use that till shutdown without being able to instantiate another. If you're using a crippled language like Java, you can't think beyond this.&lt;br /&gt;&lt;br /&gt;But if you're using Python, new avenues open up. You can represent each window manager by a module and dynamically decide which one to import. As long as the modules are interface-compatible (in the sense of the contract, not the narrow syntactic sense of the same list of methods [perhaps this is part of the reason why python does not have an explicit notion of interfaces, because what can be checked is a small part of what must hold]), everything works. You could get a module object and access members of the module using the usual dot operator. Interestingly, what makes this work is that modules &lt;span style="font-style: italic;"&gt;are&lt;/span&gt; objects (in the sense of having attributes that can be callable); they just happen to be managed automatically by the language rather than needing to be taken care of by the programmer. So the question is not exactly &lt;span style="font-style: italic;"&gt;do we use objects, &lt;/span&gt;but: &lt;span style="font-style: italic;"&gt;do we want to take care of these objects explicitly or leave it to the language?&lt;/span&gt; Obviously, leave it to the language when possible. One more case of an abstraction allowing us to forget some details and so save work.&lt;br /&gt;&lt;br /&gt;You could also do this using &lt;span style="font-style: italic;"&gt;import as&lt;/span&gt;. (Till now I didn't understand why anybody would want to import a module using a different name.)&lt;br /&gt;&lt;br /&gt;Python seems to have very powerful abstractions and a lot of hooks where you can change things.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-112940755079695380?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/112940755079695380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=112940755079695380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112940755079695380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112940755079695380'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/10/modules-and-singletons.html' title='Modules and Singletons'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-112730939502500949</id><published>2005-10-03T01:00:00.000+05:30</published><updated>2005-10-04T22:00:55.803+05:30</updated><title type='text'>OS-wide Context-sensitive Autocomplete</title><content type='html'>If the GUI toolkit keeps track of which strings were recently seen and autocompletes across apps, a lot of copying and pasting would be eliminated. This would only require change in the text box widgets' implementation and not in any apps. Apps could choose to listen for autocomplete events from the GUI toolkit, but they can remain blissfully ignorant. There should be a security restriction that ensures apps don't see all autocomplete choices, but only the selected one (once a selection is made).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-112730939502500949?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/112730939502500949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=112730939502500949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112730939502500949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112730939502500949'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/10/os-wide-context-sensitive-autocomplete.html' title='OS-wide Context-sensitive Autocomplete'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-112800614356605902</id><published>2005-09-29T18:59:00.000+05:30</published><updated>2005-10-03T01:21:19.246+05:30</updated><title type='text'>The Trouble with Latex</title><content type='html'>I had to write Latex for a class assignment, and I hated every second of it.&lt;br /&gt;&lt;br /&gt;You have to write complicated markup, and making a mistake yields unhelpful error messages. Latex seems bad at recovering from errors to process the rest of the document. Atleast worse than HTML browsers. Latex makes document preparation seem like compiling a program - and that's a lot of effort. No wonder Latex is not so popular as a general-purpose document preparation system.&lt;br /&gt;&lt;br /&gt;The problem is actually not that the markup is complicated but that the tool lacks a WYSIWYG interface. Let's approach this situation from the other direction - what if a powerful format used by a WYSIWYG word processor (think Word) were text rather than binary? Then we'd have the best of both worlds - the ease of use of a WYSIWYG editor with the power of editing the file directly when needed. Ease of use and power need not be mutually exclusive. This is similar to the config file mess with Linux - the problem is not the file format but the lack of a GUI.&lt;br /&gt;&lt;br /&gt;And Latex is print-oriented as opposed to say, HTML. To what extent does these for-print aspects make it worse for screen-oriented (or web-oriented, if you will) use? I don't know.&lt;br /&gt;&lt;br /&gt;Whether or not such an interface could be developed to expose the full power of the underlying language, it can atleast support the commonly used parts, avoiding the need to code unless you have advanced needs. Nobody wants to hand-write markup when it's avoidable.&lt;br /&gt;&lt;br /&gt;But how effectively can a WYSIWYG interface be developed to an existing file format instead of the other way round? (See &lt;a href="http://daringfireball.net/2004/04/spray_on_usability"&gt;Ronco Spray-On Usability&lt;/a&gt;) Given that most uses of the file format (if it becomes successful) will be through the GUI interface, we should optimize for the common case and design the file format based on the GUI rather than the other way around. Perhaps OpenDocument is the conclusion of this line of thought.&lt;br /&gt;&lt;br /&gt;Are there any WYSIWYG interfaces to Latex? Lyx seems to be one. (I haven't tried it yet.) I haven't found any other. (Abiword can save as tex but can't open the saved files. (And it embeds a redundant XML copy within the tex file.) KWord gives an ominous "some formatting will be lost" message on save and fails to open the saved files, too.)&lt;br /&gt;&lt;br /&gt;So what do we use for normal document preparation? I would not use Latex since it seems to have only one WYSIWYG editor. When HTML doesn't suffice, perhaps OpenDocument is the best option - it's designed for a GUI rather than the other way around, and it's manually editable (XML) (though the XML could have been clearer.) That seems to be best choice we have.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-112800614356605902?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/112800614356605902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=112800614356605902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112800614356605902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112800614356605902'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/09/trouble-with-latex.html' title='The Trouble with Latex'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-16654167.post-112705304692241890</id><published>2005-09-18T19:47:00.000+05:30</published><updated>2005-09-25T18:12:20.430+05:30</updated><title type='text'>Analog Fortress</title><content type='html'>I read Digital &lt;span id="st" name="st" class="st0"&gt;Fortress the other day&lt;/span&gt;. The story is gripping and even touching, but Dan doesn't know a thing about cryptography, and little about computers. Here are some corrections:&lt;br /&gt;&lt;br /&gt;1) Time is proportional to key length ^ 2:&lt;br /&gt;The book talks of keys 10k bits long, a million, and a billion. That's a joke. Nobody uses keys that long. At the claimed brute-forcing speed of 100 billion keys per hour, to try about all 2^10K values of a 10K bit key, it takes 2.27e+2992 millenia! By then the sun would have burnt out.&lt;br /&gt;&lt;br /&gt;2) So Brute force doesn't work. NSA-proof encryption programs are a dime a dozen.&lt;br /&gt;&lt;br /&gt;3) ZIP, AFAIK, is a compression/archiving format, not an encryption format.&lt;br /&gt;&lt;br /&gt;4)You can't beat remailers the way the novel describes. Sure you can mail the mystery recipient a program, but he wouldn't be dumb enough to run it for you.&lt;br /&gt;&lt;br /&gt;5)NSA uses Pascal? Ho ho ho! (Nobody uses it anymore, not even universities.)&lt;br /&gt;&lt;br /&gt;6)You don't "upload" firewalls. Uploading means saving a file to a server (generally a web or FTP server). You run a firewall, or launch it, or execute it, or deploy it; not upload it.&lt;br /&gt;&lt;br /&gt;7)Virus infection doesn't happen when you try to crack an encrypted file by brute force; it happens only when you run an unknown program.&lt;br /&gt;&lt;br /&gt;8)If the machine was a quantum computer, it could try all keys simultaneously, so why does it take so long?&lt;br /&gt;&lt;br /&gt;9)The trick of encrypting Digital &lt;span id="st" name="st" class="st0"&gt;Fortress&lt;/span&gt; with itself doesn't work. Sure you could do it, but nobody will be able to decrypt it even he had the key, because there's no decrypting program available. The analogy with the safe is flawed - a safe needs only a key combination to open, whereas decryption requires not only a key but also a decrypting program.&lt;br /&gt;&lt;br /&gt;If there was a decrypting program available in unencrypted form, it could be reverse-engineered and the secret algorithm would probably be revealed.&lt;br /&gt;&lt;br /&gt;Dan needs to take a CS101 course before he writes any more computing-related novels.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/16654167-112705304692241890?l=kartik-log.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kartik-log.blogspot.com/feeds/112705304692241890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=16654167&amp;postID=112705304692241890' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112705304692241890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/16654167/posts/default/112705304692241890'/><link rel='alternate' type='text/html' href='http://kartik-log.blogspot.com/2005/09/analog-fortress.html' title='Analog Fortress'/><author><name>Kartick Vaddadi</name><uri>http://www.blogger.com/profile/16007678888687165103</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
