Antony Blakey's Efforts on VisualWorks
The end of LLVM/WebKit VW integration and layout improvements.:
"Over the last 18 months or so I've put a lot of work into enhancing VisualWorks with WebKit integration, GCCXML, and later LLVM integration, as well as improving the GUI layout system. I've stopped development on these projects, primarily because there seems to be no external interest in these projects."
I am really sad that Antony Blakey is going to stop work on the GUI layout improvements for VisualWorks. His work actually made the VisualWorks UI pleasant and usable. Here's a screenshot to illustrate what I mean.
On the left is the version enhanced with Antony's packages. And on the right is the original UI look of VisualWorks for the Mac. Notice how the tabs, find menu bar and the fonts look so out-of-place for the version on the right. And notice how they look more native for the version on the left. If you just glanced at this you might not find them to be much different but if you had to use the layout everyday, which would you actually prefer?
I am glad that he has pushed his GUI layout work onto the Cincom public repository so we could actually look at it and modify them as necessary. A cursory glance reviews that all of the code is written in Smalltalk without the need for calling C code. So there is the possibility that I can actually decipher the code and make changes if necessary. I am not an expert on VisualWorks so this might still prove to be rather challenging.
On the other hand, while I am definitely impressed by his work on LLVM/WebKit integration, I am not sure if I have the right level of knowledge to hop on board and contribute. I definitely would like to and perhaps after a year of using VisualWorks I would be able to. But right now, I wouldn't be of much help. Moreover, if I read his blog entries on these subjects correctly, the LLVM/WebKit integration involves diving into the VM source code and actually changing the internals of the system. I think it even requires a custom version of the VM. Also, he hasn't pushed all of his work on LLVM/WebKit integration onto the store (he has an interesting article on why the Cincom public store is not really suitable for collaborative development)
Most people might argue that the VisualWorks UI is actually much better than the one for Squeak with all its colorful windows and non-standard layout. But here's a quote that exemplifies what UI design (taken literally as a quote like I would from Shakespeare with none of all the mumbo jumbo of religion):
"So, because you are lukewarm – neither hot nor cold – I am about to spit you out of my mouth. – Revelation 3:16"
So the Squeak UI isn't all that bad. It's different enough that your mind just accepts it as being different. On the other hand, the standard VisualWorks UI for OS X tries to blend in but does it in a way that is just lukewarm... This isn't to say that the Squeak UI or the VisualWorks UI can't be improved on....
In short, I am really impressed by Antony Blakey's efforts. He definitely has some radical ideas for improving (modernizing?) Smalltalk, hence, the title of his blog: "The creation of a new order of things". I will definitely continue to monitor his future work on Smalltalk.
Drag and Drop on Mail Dock Icon 1
Programming Quotes, Sayings about Programmers, Software Developers, Application Development:
"The only way for errors to occur in a program is by being put there by the author. No other mechanisms are known. Programs can't acquire bugs by sitting around with other buggy programs. ~Harlan Mills"
The last time I updated to OS X 10.5.2, some developer inserted this this extremely annoying bug into Mail-- dragging any file onto its dock icon would crash it! This is particularly annoying because I already had it wired onto my reflexes to perform a drag and drop every time I want to send an attachment to someone.
Eventually I was able to find the solution: change Mail's composing preference to RTF instead of plain text. Well that isn't really a solution since that means that I will have to compose all my e-mails as RTF which is something that I don't agree on. E-mail messages should be plain text whenever possible! RTF might be better than HTML but it is still egregious compared to plain text.
Anyway, I found an alternative solution. Instead of dragging the file to the dock icon, create a new empty message first and then drag the file onto the body of the message. This involves the extra step of creating a new empty message but at least it does not crash Mail nor force me to use RTF. Being able to drag the attachment into the mail message body without crashing it (even with the plain text setting) just illustrates that this is a bug that could have been avoided/fixed since there is nothing inherently wrong underneath with Mail. Instead it's probably just the drag and drop component that needs some reworking.
Yesterday I upgraded to OS X 10.5.3 because I wanted to install the latest iPhone Beta SDK. The README specifically said that OS X 10.5.3 is required.
And I was rather disappointed (but not really surprised) to discover that this Mail bug has not been fixed yet. Fortunately I could use the alternative solution which will suffice until this bug gets fixed (if ever). I'd rather have less features (for instance remove the useless Stationary/Template feature from Mail) than to have a program crashed on the most rudimentary of tasks.
(Finally) Some Good Use for the Camera Phone
I've been reading some mentions/reviews of Evernote on various sites so I decided to try it out for myself. Right now, the latest beta version is by-invitation only. I tried my luck at their invitation-only beta registration and was lucky enough to get an invite the next day. Since then I have sent out 5 (of the 10 invites) to my friends.
The coolest feature of Evernote is its ability to recognize text within images (see this demo video). The ability to recognize text in images is not something new but this is the first time I have seen it offered in a consumer application. Because of this, I finally found a good use for the built-in camera of my iPhone.
Text recognition is not built-in to the application itself. Instead anything that you store in Evernote is synchronized with the Evernote's servers (this allows you access your notes from the web). The text detection/processing is done at the servers and the metadata is sent back to your application. That means that unless you sync with the servers, you can't actually get text recognition. I think this is a good idea since it lets Evernote change its recognition algorithm without bothering the user with some software update.
So how good is the text recognition? I decided to do some experiments and come up with the following observations. These are merely observations so they are not rigorously tested. Also, expect the recognition capabilities to increase over time.
It recognizes some non-standard letters like Intel's old logo on this mouse pad.
It does not recognize vertical text well.
In fact, for vertical text, its recognition seems to be pretty off; recognizing things that are not there.
It probably only recognizes words in the English dictionary since it can't recognize "DTrace".
It recognizes most words but might have some trouble pinpointing their exact location.
I don't think it recognizes symbols well; it's probably optimized for numbers and letters.
It seems to have trouble with multi-colored words like the Google logo.
So for better results, the text should be horizontally written, unicolored and contain only alphabets and numbers. But it works pretty well for most cases. It certainly beats having to enter information by hand.
So, will I continue using Evernote after its beta period? I am expecting that it will require a paid subscription for the ability to sync and recognize text within images but if the price is reasonable, I might continue using it. Moreover, if they decide to create a native iPhone app (an offer it for free for paid subscribers), the likelihood of using it is even higher for me. After all, there isn't a convenient way to sync notes between my iPhone and my computer. I'll definitely keep Yojimbo around though since it handles PDF and has some nice predefined containers for storing image, serial numbers, etc.
Thoughts on the iPhone SDK 1
So, I downloaded the free version of the iPhone SDK. It comes in at a whopping 2.1 GB so it took about 20 minutes to download.
After extracting it, the README has this to say:
- It requires about 5.3 GB for installation.
- It requires OS X 10.5.2 on intel machines (some claim that it can work on powerpc as well).
There is the option to keep Xcode 3.0 and Xcode 3.1 Beta that comes with the iPhone SDK on the same machine. I did not choose this option so it replaced my original developers tools (meaning that I did not need to sacrifice extra disk space at the expense of a possibly buggy beta version Xcode 3.1).
I tried some of the sample apps from the iPhone developer site (it uses a generic URL of http://developer.apple.com/iphone/samples/index.action which checks to see if you are authenticated).
Here are the ones that I tried:
- Kalimba - Supposed to be a replica of an African thumb piano. We should be able to strike each bar and have a musical note sound. It failed miserably on the iPhone simulator -- sound will not play and the piano refused to rotate to landscape mode. See this thread. Here's a picture to show what I mean:
- Jigsaw - Just a simple jigsaw puzzle. Works fine.
- TheElements - Shows the periodic table with the possibility to view each element's page on wikipedia. When I clicked on the link to wikipedia, the simulator crashed gloriously -- no warnings, no output to console. It just crashed. After some playing around, I discovered that it crashes when you run it immediately after it opens up in the emulator. Instead, if you go to the home screen and then activate TheElements application, then opening a link would work!
- GLGravity - Draws the canonical OpenGL teapot and allows you to rotate it by rotating and tilting your iPhone. This refused to run on the simulator -- claiming that it needs to run on an iPhone.
This is one of the examples for the iPhone SDK. Unfortunately, it does not seem to work properly on the simulator – sound doesn't work and it refuses to rotate into landscape mode.
I have to agree that the iPhone SDK has a lot to offer. If you don't believe me, just watch the video. The demo comes on at about 30 minutes through. It's akin to writing for a mini version of OS X with the addition of an impressive user interface, multi-touch control and internal accelerometers. Games will definitely benefit from this. So it should be easy for most developers to get started once they familiarize themselves with the new human interface guidelines.
Spore on the iPhone. It uses the accelerometer on the iPhone for controls.
However, as impressive as the SDK is, it also has some shortcomings which can't be ignored. Here's why (some of these might change when iPhone 2.0 debuts but I doubt it):
- No garbage collection.
Creating an iPhone Application:Note: iPhone OS does not support memory management using the garbage collection feature that is in Mac OS X v10.5 and later.
Maybe most Objective-C developers love doing manual reference counting but this seems like something that should be addressed. After all, Google's Android platform supports this. Moreover, Objective-C 2.0 already supports it so garbage collection could have been enabled from the beginning.
Some might argue that garbage collection adds extra performance overhead. But consider what happens when your app starts leaking memory all over the place. And with all the rich history that garbage collection has, it's really amazing that companies don't really start to take it seriously.
In fact, during the video, they showcased several different developers creating fantastic prototypes for the iPhone in two weeks. I suspect that development and debugging time could have been reduced more if only garbage collection was enabled. =) -
Crippled simulator
Not sure if this will change in the future but the current simulator is rather dumb and featureless. You cannot even trigger the hard buttons (like the volume UP/DOWN, silencer, top button). The only button you can activate is the home button -- the one at the bottom of the screen. And no, you can't simulate the features of the accelerometer.
It does however support the two-finger gesture if you hold on the OPTION key on your keyboard.
I suspect that this is a ploy by Apple to get people to i) buy iPhones to test on b) subscribe to the $99/year developer deal to get your app on to the iPhone. After all, how are you going to test your next greatest app that relies on the accelerometer if the simulator cannot even handle it. However, of my three criticisms, this might be the easiest one to fix.
Google's Android emulator is currently better but that could be because there isn't an actual phone to run it on yet! -
$99/year (yes, it's PER YEAR!)
Apple Announces iPhone 2.0 Software BetaDuring the beta iPhone SDK program, a limited number of developers will be accepted into Apple’s new iPhone Developer Program and offered the ability to get code onto iPhones for testing. The Standard Program costs $99 (US) per year and gives members an iPhone SDK and development tools; access to pre-release iPhone software; technical support; the ability to get code onto iPhones for testing; and distribution of applications via the new App Store. The Enterprise Program costs $299 (US) per year.
To even get your app for testing onto the iPhone you need the special version of the SDK or a special license. This is weird since that means that I cannot even write an app for MYSELF and install it on my phone just for my own PERSONAL use.
Plus, right now no one can install your app unless you list it on iTunes (which minimally also requires the $99/year contract).
You can argue that this annual fee is not really a problem with the SDK but I think it is. After all, without paying the fee, your SDK basically allows you only to experiment and not actually get anything onto your iPhone.
I think the $99/year (or $299 for Enterprise) fee is somehow used to do code signing which I think is a weird way to guarantee that your program is non-malicious. I could be wrong.
Also, after having to pay $99 would anyone release your app for free??!! I look forward to seeing how many free apps there will be. My prediction is that apps that are somehow tied to a desktop app that costs money (for instance, Transmit, NetNewswire, etc) might be free since the cost is absorbed by the desktop app.
It would be interesting to see how it would compete with Android in terms of interested developers. I am not sure if it is a good idea to actually get developers to pay to actually use the development tools.
I do like the idea of paying the yearly fee to have Apple list your product for you on iTunes but it would be good to offer developers the choice of distributing their own applications if they want. In fact, just being able to install your own app on your own phone would be fantastic!
So while the SDK definitely has a lot to offer, it also has some serious shortcomings that might discourage some developers. But with all things Apple, they certainly won't mind ostracizing some developers in favor of others....
Alan Kay's Talk at TED 2
Alan Kay recently gave at talk at TED. You can view his video from here. Like all TED talks, it's about 20 minutes long so it's short and straight to the point. The rest of my post will make references to the video, so reading it without watching the video might not make much sense.
Unsurprisingly, in the video, Kay demonstrated the canonical moving car example for Etoys. The moving car demo is something that most people familiar with Squeak would have seen. It's really simple but it lets kids experience programming in a fun interactive way. Unfortunately, this is something that most modern languages have failed to enable. After all, which is more fun: printing text to the screen or watching your creation actually move on screen?
However, the second part of Kay's demo was even more interesting. He shows what you can do to help illustrate some simple math and physics properties in an insightful manner. It uses all the features of Etoys (or maybe the full Squeak implementation) to let students experiment by themselves.
Experimenting with this would have been so much cleaner than using a tape meter. It's actually even cooler when you watch the animation or code it up yourself in Etoys.
For instance (and this was something that impressed me), you could design a simple car that drop dots along as it moved. So, a car that is accelerating will be dropping dots further and further apart from one another. This is basically the same idea as using a tape meter. However, the animation of the car moving and dropping dots seem so much cleaner to me. You can easily illustrate the concept of velocity and acceleration without having to talk about friction, etc. Something that is unavoidable with a real experiment. This helps especially when you are teaching a younger audience about the basic principles of motion.
Toward the end of the talk Kay showed an example running on the OLPC. So I was curious whether all courseware on the OLPC will be interactive or whether they will be like normal textbooks only in digital format. Either way, it's already hard enough to actually get good content onto the OLPC. As far as I know, there is no group dedicated to creating content for the OLPC yet.
However, I was able to find a couple of interactive learning environments at OLPC Courseware Review but, from the list, it seems that Dr. Geo II is the only one that has been ported to run on the OLPC. It would be interesting to see if there is a Google Summer of Code project for creating/porting an existing interactive learning environment to the OLPC.
Incidentally I was reading "A Mathematician's Lament" by Paul Lockhart which also talks about how to revamp the current K-12 mathematics education. The paper is available from here. Basically, Lockhart says that there is not enough experimentation with math going on in the class rooms. And that most of math is rote memorization with little appreciation for the beauty of math.
The math education back in Malaysia is not much better either. In school, the teachers are more interested in finishing the syllabus. So students either get-it in school or have to rely on paid tutors to teach it to them. There's very little appreciation on the derivation of the proofs of math. Either the derivation is skipped entirely while teaching or it follows the route of the boring derivation on the board that doesn't engage students.
Why tools can make it a pleasure to learn a new framework
I was reading the book Spring In Action in my attempt to learn about Spring. More importantly, I needed to know enough to be able to incorporate refactoring support for it as part of my project.
Unfortunately, the book had some typos which were actually technical errors. And this was just in Chapter 1! If you are trying to learn something for the first time and there are typos, you might not be able to detect it. And this can lead to hours of frustration....
Fortunately, IntelliJ has support Spring. And it detects the errors for you! So even if the technical reviewers did not detect the error, at least your IDE (a good one) can do it for you and save you time.
IntelliJ 7 has support for Spring. In this case, it detected that something was wrong with the xml configuration file.
It even offers the ability to correct the error!
I wonder if the error in the book could have been detected had the reviewers use a better tool. Or at least attempt to run it using some automated tool.
Searching Menu Items in OS X Leopard 1
A few months ago, I posted an entry about being able to search your menu items and how it can be useful. Well, it seems that OS X Leopard actually has this feature now.
Searching Safari menu items in Leopard.
So, by going to the Help menu you can actually search for a phrase and if that phrase appears in the menu items, it highlights it for you. And the blue arrow actually animates by moving slightly.
Of course, this would be more useful with a keyboard shortcut. And the keyboard shortcut that you are looking for is ⇧ ⌘ /. In case those symbols did not show up properly, they're Shift + Command + /.
Searching Menu Items in OS X Leopard 1
A few months ago, I posted an entry about being able to search your menu items and how it can be useful. Well, it seems that OS X Leopard actually has this feature now.
Searching Safari menu items in Leopard.
So, by going to the Help menu you can actually search for a phrase and if that phrase appears in the menu items, it highlights it for you. And the blue arrow actually animates by moving slightly.
Of course, this would be more useful with a keyboard shortcut. And the keyboard shortcut that you are looking for is ⇧ ⌘ /. In case those symbols did not show up properly, they're Shift + Command + /.
Thoughts on Mac OS X Leopard
When Panther was first announced, I remember pre-ordering it and waiting eagerly to install it. I had the same excitement when Tiger was announced and I pre-ordered it too. However, when Leopard was announced, I was not that excited about it. I am not really sure why. It could be a combination of things. For me there wasn't anything really enticing about Leopard that warranted a head-first jump into installing it. When Panther came, there was Expose and I could really see myself using something like that. In fact, I use Expose daily and I cannot imaging working without it. And when Tiger came, there was Spotlight which I thought was going to be really useful until I realized how slow it was. But there were other redeeming features of Tiger that made the upgrade worthwhile.
When Leopard came out, there were a plethora of new features like Time Machine, Spaces, Coverflow, Stacks and Quick Look. Time Machine by itself was not really compelling since I did regular backups often; however, Time Machine is an excellent way to showcase the underlying technologies built-in OS X to support it. But, I was actually rather disappointed with the cheesy space interface. Spaces is not something that I was eagerly anticipating. I was never a real fan of virtual desktops since every implementation that I had tried seemed to have some annoying feature that just drives me nuts. Instead I prefer to use the "Hide Application" command to keep things tidy. Coverflow is something that I don't think is useful at all. Period. In fact, of the 4 browsing interfaces available in Leopard, I only utilize the Icon View and List View. Fortunately, Stacks and Quick Look are actually pretty useful. In fact, I was using a poor man's version of it in the Preview View of an older version of Cocoatech's PathFinder. The Preview View allows you to quickly view PDF and Images in the file manager itself.
Moreover, some of the other 300 features of Leopard such as the new functionalities of Mail and iChat are just plain ridiculous. For instance, how frequently would you want to send a fancy HTML message from Mail? How many times do you want to use a fancy background for your iChat sessions? Nonetheless, Leopard seems to be the best selling version of Mac OS X to date with 2 million copies sold during the opening weekend. So, there must be people out there who really do care about those features (not including developers who are probably interested in the new development tools that Leopard offers).
Those rather non-compelling features of Leopard and the fact that I was using software that might break on it prompted me to wait three weeks before installing Leopard. So I installed it yesterday and was pleasantly surprised to see the 10.5.1 update released today. Surprisingly, despite all the rants from the early adopters about how hideous the Leopard user interface is, it did not really bother me. The translucent menubar and the 3D dock complement the new theme of Leopard pretty well. What I did notice was that Apple Mail gets more hideous with each incarnation. Naturally, the first thing I did after installing Leopard was change the tacky wallpaper of the galaxy. Also, as usual with every OS upgrade, I did a clean install of Leopard so I don't run into any weird problems caused by my previous configuration. Regardless of what other people might tell you, doing a clean install is always beneficial. The slight inconvenience caused by having to migrate your data manually from your backup is easily alleviated by the peace of mind that you wouldn't suffer from all the cruft that has accumulated from your previous OS.
I have read about some rather compelling features that Leopard has to offer for developers. The Objective-C 2.0 language now supports garbage collection and that is really nice. Xcode is also supposed to have refactoring support built-in. And there is better support now for Ruby, Rails and RubyCocoa which I use extensively. So these are the features that are really appealing for me as a developer. I look forward to playing around with those next week during Thanksgiving break. So for me, Leopard seems to be an OS that is mostly catered for Developers and they had to throw some of those features on top of it to attract the normal users. And it is in this area that Apple still has the last say. If you are a developer who wants to use the latest tools, you have no choice but to upgrade. And hopefully convince enough of your customers to upgrade with you.
Here are some of the tools that I use on a daily basis and how they fare on Leopard:
- Application that broke: MailAppetizer does not work! I feel unproductive with my e-mails without this little tool. To replace it, I will be looking for GrowlMail once it has been updated to work properly with Leopard.
- Applications which I expected to break but are working: Quicksilver, Growl, Perian, smcFanControl, SynergyKM. There is a problem with mouse triggers in QuickSilver and Spaces though but overall it is working fine enough. Some people are having issues with some videos with Perian but it has been working fine for me so far. SynergyKM is working fine and I can still control the Windows machine in my office with it.
- Applications that I knew were not going to break but could behave weirdly: I was really worried about how Java would work on Leopard. Fortunately my fears were alleviated when both Eclipse and IntelliJ IDEA ran fine. However, I did experience a couple of crashes with Eclipse which was rather unusual since it has rarely crashed on Tiger. There was a lot of uproar about Leopard not having the latest Java 6 packaged but that was not really an issue for me since I only used features in Java 5.
- Applications that I am glad still work: Adium, Textmate, VLC, Transmit, Unison, GraphicConverter, Yojimbo, Path Finder. I could easily find replacements for these tools but I have been using them so frequently that I am glad that I don't need to.
- Application that I am glad to remove completely: Logitech Control Center. I have replaced it and its sneaky idea of installing APE with the much superior SteerMouse. In fact my Revolution MX mouse never felt as responsive.
After a few more months, more people will be using Leopard and probably all the tools will be updated by then. However, the fact remains (as with Vista) that it is getting harder and harder to actually make compelling features for the OS. Most features can easily be implemented by developers given the right API. So what new features should actually be part of the OS? And would those features be compelling enough to get people to upgrade?
Apple Mail and plain text e-mail 1
Apple Mail - Again? - The Technological:
"Now to add insult to injury it's become known Tiger's Apple Mail stores plain text mail as good old HTML cruft - even if you the user explicitly request to deal solely in plain text.
It's easy to demonstrate. Fire up a Panther system, start a new message within Apple Mail, type in something trivial, save the message as a draft, and then hit [OPT+COMMAND+U] to see the raw code."
This is as bad as Microsoft Outlook (Express?) trying to be smart and sending two copies of the same message: one in plain text and one in HTML. I have received a couple of those over the past few days and I really hate how they display.
But I really hate the behavior of Apple Mail because it's a pernicious bug. As long as you type out your e-mail and send it without saving it as a draft then it will obey your preferences to send it as plain text. The problem happens unsuspectingly after you choose to save the message as a draft.
This is an important issue because it makes me feel like a hypocrite. I always tell people to send me plain text e-mail and here I am sending them HTML e-mail. In my defense, it's all Apple Mail's fault.
Update: In general, I think the acceptance for HTML e-mail has risen somewhat over the past few years. I don't mind receiving them once in a while but I generally do not send them for fear of them being filtered out by a recipient who detests HTML format. So the fact that my mail client silently sends them is still an issue to me.
