(Finally) Some Good Use for the Camera Phone

Posted by Nicholas Chen Sun, 06 Apr 2008 00:56:00 GMT

Evernote

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.

Old Intel Logo
It recognizes some non-standard letters like Intel's old logo on this mouse pad.

Vertical Intel Logo
It does not recognize vertical text well.

Is there an 'i' there?
In fact, for vertical text, its recognition seems to be pretty off; recognizing things that are not there.

DTrace Event Poster in Evernote
It probably only recognizes words in the English dictionary since it can't recognize "DTrace".

DTrace Event Poster in Evernote
It recognizes most words but might have some trouble pinpointing their exact location.

Symbol recognition in Evernote
I don't think it recognizes symbols well; it's probably optimized for numbers and letters.

Multicolored Word in Evernote
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.

External Monitor Setup

Posted by Nicholas Chen Fri, 21 Mar 2008 20:42:00 GMT

After spending about a year with two huge and bulky CRT's in my office, I decided to spend about $700 to get a new 24 inch widescreen display from DELL. It wasn't only the physical size of the CRT but also its blurriness that annoyed me. Here's a picture to show what my desk looked like before:

Old Setup
Both CRTs are Dell M993s. Surprisingly those monitors could display 1600x1200 pixels! However, that comes at the expense of blurriness and eye-ache after a couple of hours.

Here's a picture to show what my desk looks like with the new monitor:

New Setup
The Dell 2408WFP monitor connects to my MacBook Pro. The other smaller monitor connects to my Windows machine. I share the mouse and keyboard using Synergy.
The smaller monitor is borrowed from my colleague's table since he won't be around until Fall 2008.

Using a large monitor is not without its challenges and problems. The main problem on the Mac (and possibly Windows and Linux) is that it becomes rather troublesome to resize the windows. Here's why: all windows manager that I know have three buttons on each window: close, maximize(expand) and minimize. On a small monitor, clicking the maximize button expands the window to fill your small screen -- usually a desired behavior so you can see more of the contents in the window. On a large monitor, clicking the maximize button, expands the window to fill your large screen -- usually an undesired behavior since you are wasting screen space.

Unfortunately, I have not found a nice way to resize the windows yet. I do have a trick though. Since my external display is powered by a MacBook Pro, I can always move the window over to the MacBook Pro's smaller screen, maximize it and then move it back to the external display! It's cumbersome but it works. And I get uniformly sized windows -- I am rather particular about having my windows be about the same size.

Fortunately things are better with my browser since I can just rely on javascript bookmarklets:

Pimp My Safari: bookmarklets:

"Resize to 1024x768"
javascript:void(window.resizeTo(1024,768))

Updated to Typo5

Posted by Nicholas Chen Fri, 21 Mar 2008 00:37:00 GMT

So I discovered that my web host just upgraded to Rails 2. How did I make the discovery? Well, both my blogs were malfunctioning. And when a rails web application malfunctions, it is usually a good idea to check if they had upgraded it. Previous experience with Typo should have taught me that but sometimes I forget such things.

I should definitely freeze the rails version right now so that I don't encounter such problems in the future.

Anyway, I grabbed the latest version of Typo and installed it. I must say the latest version really looks slick. I chose to use the same Scribbish theme for this blog but there are two new themes that are pretty nice too.

One caveat is that some of the plug-ins have been removed from the base Typo installation. This caused me some problems as I migrated my blog over. I could have just installed the old plug-ins following the instructions from here but I decided to stay fresh. I am not sure whether there is an easier way to do this, but I basically went into the database and remove the sidebars table:
DELETE from sidebars;

I am going to upgrade the softwareengineering.vazexqi.com blog in the next few hours so it should be back up by tonight.

vazexqi.com updated

Posted by Nicholas Chen Mon, 17 Mar 2008 04:36:35 GMT

vazexqi.com updated!

After delaying for a very long time, I have finally updated the root vazexqi.com site and turned it into something that reflects more of what I am doing as a Ph.D. student. I was only compelled to do it because the CS department demanded a curriculum vitae from each of its students. I wanted to put a web address on my CV so that people can keep up with what I am doing and find. However, I did not feel that it was appropriate to put my blog address directly on it; after all, a website that starts with the word "blog" might not sound professional enough to some academic peers (it should be fine for a developer's blog though).

I was too lazy to actually write everything from scratch so I decided to give RapidWeaver a try. I had used it before for various tasks but I am only needed to use the demo version since I would just borrow (and credit) their templates and then code everything up by hand. But this time, I decided that since vazexqi.com was going to be mostly static content, I needed a convenient way to easily update it using some application. Also, I am not really a web designer so I would like to be able to quickly change the template without having to do too much work on my part.

Overall, I think the new look is pretty decent. There are things that still need updating but overall it's a good start. There are two things now that I must remember to do: constantly update the static pages and upload a picture of myself to the front page....

I don't really subscribe to the idea of putting yourself out there on the web for everyone (like this guy) but I do think that it is important to have a clean web page where your peers can easily find you.

Thoughts on the iPhone SDK 1

Posted by Nicholas Chen Tue, 11 Mar 2008 03:07:00 GMT

As I am writing this, I am also partly listening to the Apple March 6 Event where the iPhone SDK was first introduced. And halfway through, I cannot help but notice that Scott Forstall was practically emulating Steve Jobs. He even used phrases like "... a screamer...", "... we made it even better...", "... the iPhone is the most advanced... ", "... years ahead of any other...". He is definitely a smart guy but I think he is emulating Steve too much. It would have been nice to see his own personality. On the other hand, this also means that I probably have watched too much of Steve Jobs to know how he talks....

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:

  1. It requires about 5.3 GB for installation.
  2. 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:

  • Kalimba on the iPhone Simulator
    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.
  • 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.

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
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):

  1. 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. =)

  2. 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!

  3. $99/year (yes, it's PER YEAR!)
    Apple Announces iPhone 2.0 Software Beta
    During 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

Posted by Nicholas Chen Mon, 10 Mar 2008 16:14:00 GMT

There are certain events that are just so exciting that I feel compelled to blog about them immediately after I experience it. This is one such event.

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.

Virtual Tape Meter
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.

PhD Qualifying Exam

Posted by Nicholas Chen Fri, 07 Mar 2008 21:08:12 GMT

So every student doing a PhD at UIUC (and I think any US university) is expected to pass a qualifying exam. The qualifying exam gauges whether a student is competent enough to continue in the PhD program. However, it's much more than that. I think it's more of a test to see how well you can do a presentation and answer tough questions during the presentation; as well as trying to not sound stupid in front of a very smart audience.

Anyway, I took my exam two weeks ago. It was an oral presentation where I was assigned two papers: The jastadd Extensible Java Compiler and Automatic Test Factoring. Both papers were about tools (something that I interested in as I mentioned in my research statement to the exam committee).

It's interesting to note how the two papers are somehow connected with me. I first saw the JastAdd system while I was at OOPSLA '07. I had even talked to the authors of the paper, attended their poster session and even their demo session. Fortunately (or unfortunately) I did not attend their presentation session so my presentation was not influenced by theirs. I was already interested in studying this paper in-depth because of the system. And having it chosen as my qualifying exam paper gave me even more motivation.

The second paper was interesting because, Danny, one of my colleagues from the same research group is now working under Prof. Michael Ernst. Danny had referenced some of Ernst's work before. So I was familiar with some of the terminology in the paper and was able to use that to my advantage.

It's just interesting to see what a small world it is....

My slides for the presentations are available here: JastAdd.pdf and AutoFactoring.pdf. I am not sure how interesting they would be on their own but they are pretty to look at.

And I just found out that I passed! The committee had this to say:

"The committee were impressed with his performance and background knowledge".

So that's one crucial step toward completing my Ph.D! :)

Rubber Bands

Posted by Nicholas Chen Sat, 01 Mar 2008 02:40:31 GMT

My girlfriend and I decided to join the Innovation Tournament Video Contest. The video above is our submission. It could definitely be improved. However, considering the fact that we are only a two-person team and that the weather here is less than conducive, I think we did OK. Overall, it was an interesting experience -- something that I normally would not have done.

Update: Well, turns out that we won! We get to have breakfast with Henry Petroski, an author whose books I enjoy and a visit to IDEO. I wasn't aware of this before but turns out that Henry Petroski did his Ph.D from UIUC! My advisor, Ralph Johnson and my colleague, Maurice are both fans of his writing. It is great to be able to meet Mr. Petroski in-person!

The prizes were sort of interesting because there were slightly more prizes than participants. So this means that a) everyone who participated was really a prize-winner and b) each team got to choose more than one prize. Some prizes, like the opportunity to attend breakfast with Mr. Petroski, were not limited or exclusive so multiple teams could choose the same prize.

Session restore (sort of) in Eclipse with Mylyn

Posted by Nicholas Chen Sat, 02 Feb 2008 22:59:00 GMT

This was something that I really wanted to blog about for a long time...

Last year I wanted to know a way to save sessions in Eclipse like I could for Firefox. For instance, Firefox allows you to save the open tabs and windows into a new session and restore that session in the future. That way if you ever need to recall a set of tabs for reference, they can be easily activated by restoring the saved session.

In fact, any decent, editor or IDE should the option to save sessions. Heck, Vim and Emacs have this feature out-of-the-box. Sessions are really useful when you have to work on groups of related files at the same time but don't want to have to remember which they are.

So why was there apparently no way to do this in Eclipse? Initially, I thought that Working Sets might be the solution. However, they only allowed you to group files into sets. They don't actually remember the editors that are opened and what state you were in. So Working Sets were not even a poor man's implementation of sessions.

Then epiphany struck! We could use the Mylyn plug-in to accomplish this. In fact, as you shall see, Mylyn can do even better than just saving sessions - it infers them automatically based on what you are doing! Mylyn comes installed standard now on Eclipse 3.3 and higher. In fact, the Mylyn view is even shown by default; it's not activated though.

Anyone who does not use sessions has a) an incredible memory, b) an inhumane ability to do context switching between tasks AND c) the luxury of not having to close his IDE ever. Or the developer just doesn't know that such an excellent tool exists out there...

The Mylyn View
This is Mylyn
I have readjusted my perspective a bit so that everything can fit nicely in a 800x600 window. The picture above shows the Mylyn view with some sample local tasks.

Activate a previous context
Activating a previous session
I am activating a previous session. By default, Mylyn automatically remembers the last context that you were in before closing the editor and will restore that.

The editors from a previous context are restored
Previous session restored
You can see that Mylyn remembers the files that were opened in that session and has restored them in the editors. The current active task (see the Task List view) has a blue bullet next to it. In the Package Explorer view, you can even see the other files that I might have referred to in a previous session but did not open in any editor.

Creating a new local task
Creating a new local task (context)
Mylyn allows you to create local task for your own use. With the proper server, you can also create sharable tasks in a Bugzilla or JIRA repository. That way, you can share the same session with yourself when you are working on a different machine or with your other teammates so that they can take a look at the same things that you are looking at.

Editing a local task
Editing a local task (context)
You can easily associate other metadata with each task. In fact, Mylyn was originally created to be a task-oriented system. It allows you to split your work into little tasks to help you focus.

Reveal all files or focus on active task
Deciding to show everything or just the active task
You can easily switch between showing all the files in the Package Explorer or focusing on the active task by clicking on the Mylyn button.

Mylyn has a whole bunch of other features. Some of the interesting ones include:

  • The ability to share a context with different tasks. You can clone the current context and paste it into a different task.
  • It cleverly remembers what editors and files that you have accessed and stores those into its session.
  • It intelligently forgets editors and files that you have not looked at for extended periods.
  • You are always in control - you can override the behavior easily and promote/demote certain files from sessions.
  • It records how long you spent on each task so that you can actually report that figure with certainty.
  • It's well integrated with different perspective and views in Eclipse. And it is constantly being improved upon.

Mylyn is great for helping you focus on your programming tasks. It stays out of your way for the most part but is easily accessible when you need it. Once you start using it, you really wished that every IDE out there (including the venerable IntelliJ) supported it.

Why tools can make it a pleasure to learn a new framework

Posted by Nicholas Chen Tue, 15 Jan 2008 19:23:08 GMT

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.

Error detection
IntelliJ 7 has support for Spring. In this case, it detected that something was wrong with the xml configuration file.

Error correction
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.

Older posts: 1 2 3 ... 29