.::output >> /dev/null::.

where otherwise good ideas go to waste

New Powerbook G4?

Posted by Nicholas Chen Sat, 22 Oct 2005 23:57:01 GMT

Mac vs. PC System Shootouts - Processor Comparison Chart:

"[Reports that a 1.67 GHz G4 is about the same speed as a 2.2 GHz Pentium 4 or about as fast as a Pentium M 725 1.6 GHz]"

(Via Digg.)

In other words, even if I were to buy the most powerful configuration for the new powerbook (greatest innovation: increased display resolution), it would not be able to compete with what the Pentium M's are capable of. I have had my current powerbook for more than 2 years and its 3 year warranty is going to run out soon. So far, it has perform excellently after 3 OS upgrades: Jaguar, Panther and Tiger. Everything else is working fine too except for the modem which I will not bother replacing. However, its performance is beginning to feel a bit sluggish. After all, it is a 867 Mhz with 512 MB of PC133 RAM. Sometimes when I switch between major applications (i.e. Safari, iTunes, iPhoto) the spinning beach ball comes out.

Even with $3000, I will not be able to get a machine that is on par with the latest Pentium in terms of processor speed. So, the question remains, should I go ahead and get one? Right now, all serious development such as Photran has to be done on my $250 Windows machine. I would really like to be able do more development work on my powerbook.

Posted in | no comments |

Photran: Fortran plug-in for Eclipse IDE

Posted by Nicholas Chen Sat, 22 Oct 2005 06:42:04 GMT

I cannot believe that I did not mention anything about this project. I have been working on it since Summer 2005 and we have made significant progress. Of course, most sane people would be wondering why in the world are we encouraging Fortran programmers to continue programming in that obsolete and obscure language. Well, academic issues aside, there is still some reason to support the Fortran language: the sheer number of projects that were previously written in it. Fortran, I believe is the oldest programming language. Lisp came after it.

So what have we accomplished? By we, I mean my Pair Programming partner and myself. Well, we are in-charge of the editor. There is a list of tasks that we have to do to support Fixed Form Editing. Briefly, Fixed Form editing is a reminiscence of the days of punch cards where you had to carefully write your code starting at designated columns. Here is a picture of what it looks like:
Fortran punch card

So, even though those columns do not really make any sense in a text editor, some of the code has to been maintained just for backwards compatibility. And according to Prof. Johnson and Brian Foote, a fixed form source code should be able to compile as valid modern day Fortran code! This makes the task interesting since we have to make it as convenient as possible for the users to edit fixed form code. And, unsurprisingly, most hard core Fortran coders turn to Emacs to help them. So right now, high on our task list is to emulate how Emacs handles fixed form editing. I will confess right now that I am a VIM user and I am not proficient in the Emacs way of things at all, so this is quite a challenge.

What we managed to come up with so far include a horizontal ruler and vertical lines to indicate important columns. We have also implemented tabbing and auto-indenting to make it easier to code. Additionally, we have also worked on syntax coloring. Fortunately Jeff, has done a good job by providing us with the proper lexer for this. Here is an explanation why we needed our own lexer:

	if ( if .gt. if ) then
	...
Notice that if is being used as a conditional operator as well as identifiers (the if .gt. if)! This is perfectly legal Fortran code. The compiler will infer what is meant based on the context. This will definitely shock some of you. When I first say this, I was really shocked as well. And I am really glad that modern languages are sane enough not to let keywords be used as identifiers. This lexer will also be important once we try to incorporate refactoring facilities into the plug-in.

Here is a screenshot of what the program looks like currently. This is still a development version so you cannot grab it yet. You may, however, grab the latest beta version from Eclipse: Photran.

Photran

So right now, we have also created an installer for Windows that has Photran, MingW with gdb, g77, g95 and make. This convenient installer should make setting up a Fortran development environment as simple as possible. Everything seems to be working now except for g77. After a few more tests, we should be able to release a beta version.

Posted in , , | no comments |

Artificial Intelligence Class

Posted by Nicholas Chen Sat, 22 Oct 2005 04:18:59 GMT

My professor showed some everyday instances that we take for granted and convincingly show why it is hard to get a machine to behave like a human being. Naturally, he showed some rather interesting optical illusions. Since they are optical illusions, is there any need to replicated this behavior in an intelligent and rational agent? After all, are they any benefits for seeing these illusions? Does seeing these illusions make humans more intelligent? Or does it suggest a deeper understanding of how the human mind really works? Well, before this gets too philosophical, it would be wise to get back to the point and show you some of the examples that I find interesting.

Because I am afraid that the links might actually go missing, I have uploaded the pictures to my flickr account and gave proper credits to the authors. Most of these are also available from the Mind Hacks book which I have been trying hopelessly to finish. Whenever possible, the images link back to the original image on their respective websites. If anyone feels that I have violated their copyright, I will gladly remove these pictures.

  • Watch the moving face!
    Why does it appear correct when viewed upside down but totally wrong when viewed the right side up?
  • Adelson Checker Shadow Effect
    A and B have the same color and shade! Don't believe me? Click here. This is called the Adelson Checker Shadow Illusion.
  • Rotating Snake
    You have to click on it to see the BIG version for the illusion to work.

Another interesting thing I have learned are Garden Path Sentences. Here are some of the more interesting ones that are hard to decipher.

  • Fat people eat accumulates.
    The fat (animal fat, vegetable fat, etc) that people eat accumulates in their bodies.
  • The prime number few.
    The prime (or the prime numbers e.g. 2, 3, 7, 11) amount to only a few.
  • The player kicked the ball kicked the ball.
    The player was given the ball by someone who kicked it to him. The player then kicked the ball back.

Well, that was an interesting first lecture for that class. Maybe there are more illusions worth sharing later as well.

Posted in , , | no comments |

You know that iTunes is ubiquitous when...

Posted by Nicholas Chen Tue, 23 Aug 2005 01:33:03 GMT

every other corporation out there is using it to promote their stuff, including the National Guard.

Obviously, Napster is not doing that well (yet?)

Posted in , | no comments |

It's hard getting a cell phone...

Posted by Nicholas Chen Tue, 23 Aug 2005 01:28:52 GMT

Attention: What you are about to read will probably not be of too much interest to you.

I said that I wanted to buy the Nokia N90. But then up till today, it has still not made its debut. Then I decided on the Nokia 6670, one of the better phones that are available from Nokia USA. After deciding on the phone, I needed to check with a carrier. My only choices were Cingular and T-Mobile due to some special reasons. And none of these carriers have the Nokia 6670 on offer. The cheapest I could find was about $340 with shipping and handling.

Then comes how much I wanted to spend a month. According to my friends, Cingular provides better connectivity. However, I am confident that I can live with some connection inconveniences every now and then especially if it means that I could save about $20 a month. Cingular's web browsing costs $19.99 a month for unlimited access whereas t-mobile's cost $5.99 a month.

And it is really hard to find information about cell phones here. For instance, I stopped by at the mall to enquire about the Motorola Razr. The sales person not only provided wrong information (I verified this by going to another T-Mobile kiosk nearby) but tried to seal the deal by lying that buying the phone from T-Mobile.com does not come with free shipping and that we would have to wait about 7 days! Actually, there is indeed free shipping for 3-5 day delivery.

Then there is the question of what phone to get. Some phones are available for ridiculously cheap prices whereas the better ones are also priced exorbitantly. There was a Samsung D415 that retails for about $299.99 but is available for free from T-Mobile.com. However, after wasting 3 days researching the pros and cons of that phone, the deal ended and we were not able to get the phone for free anymore. In fact, T-Mobile discontinued that phone from its line. Well, damage was partially done. Why? After reading up on the Samsung D415, our hopes for our new phones were high. We wanted something that could browse the web using WAP, take some photos and also sync with the computer. What other phone fits that description? None other than the Motorola Razr.

So, now we decided on the Razr. Or did we? The Razr retails for $199.99 online. With that amount, you could also get the Treo 600 or the Blackberry 7100t. So technology lust tempts us again. With the Treo 600 you get a Palm OS powered phone so I could load all my previous Palm applications. And it syncs nicely with my computer.Hmmm.... if a Palm is so great, then why is my Tungsten T sitting on my desk now and serving only as a $400 dollar alarm clock? What about the Blackberry? Wow, a real web browser. And QWERTY keys. I wonder if I will ever use all the features. To utilize all those features would require me to purchase additional services. Also, the Blackberry is bulky phone. The debate goes on. Finally, I just had to convince myself: You are getting a phone to call people. Having a wap browser, a camera and other stuff is nice but remember that you are going to carry this piece of metal around with you everyday. So get something really light.

If you thin the ordeal is over, think again. Now, I have to spend time thinking whether the cell phone will sync nicely with my powerbook. Apple says so on its iSync page but someone on O'Reilly has a different experience. Why is the ability to sync correctly really important? Besides the fact that it is really easier to enter your contacts info on your computer, I find it essential that my address book on my computer contains everything in case I lose my phone. Also, I have having duplicates of contacts. Changing the information in the phone would require that I perform the same changes on my computer. Oh, did I mention that iSync does not sync Adress Book Pictures and To-do lists with the Razr? I wonder how Windows users are faring.

And now I begin to wonder whether getting the Razr was such a good idea. It runs Motorola's own OS that had been reputed to be fairly clunky and retarded.Would the Nokia Series 60 be a better choice? The cycle continues.

While I can easily determine what I need in a computer, finding the right cell phone has been really mind boggling.

And we have not even bought the phone yet!


Bought the phone in the end. Sales person gave us a nice deal: buy 2 get the third free. Also bought a leather pouch for it since sales person was offering it at a discounted price.

Impressively the phone works really well with my powerbook. There was no need to purchase or download any additional software. Syncing with Address Book and iCal went smoothly, though I wished that it would sync contact pictures as well. And it charges via the USB cable too. Windows does not support charging via USB unless you are able to find and download the latest drivers.

Windows user on the other hand had to get something called Motorola Phonetools. And the last time I heard, version 2 does not support the Razr yet.

T-Mobile Web was a nice addition to. Now, I can check my e-mail on the Razr and also visit some WML sites. Typing using iTap can be a pain sometimes but then it suffices for quick messages once in a while. Some might complain that T-Mobile crippled the phone by installing their own ROM onto the device but I am completely happy with this. It would be a pain to have to set up the phone myself to get it to work with my carrier.

Posted in | no comments |

VitalSource...hmmm

Posted by Nicholas Chen Wed, 17 Aug 2005 14:54:12 GMT

VitalSource Technologies, Inc. - Download VitalSource Bookshelf:

Buy your books like you buy music

VitalSource launches digital bookstore | MacMinute News:

"The Store offers more than 1,000 titles in the VitalBook digital format, starting from US$0.99 to 60 percent off list price of hardcopy versions. The growing inventory of VitalBooks includes classics such as Shakespeare, reference materials, and textbooks in subjects ranging from law to philosophy to medicine."


By the way, the last time I checked there was about 64 books available for purchase from the bookshelf. So maybe those 1 000 titles are distributed internally at educational institutions.

I think that VitalSource has a bright idea here. By making the books available in electronic format, they are able to bring the prices down. Also, it gives educators an easy channel to distribute their teaching and learning material--though I am still uncertain how easy it is to convert materials to the VitalSource format. Anyway, I am extremely glad that they did not promote their technology as pushing for the digital revolution. For a more thorough discussion of the mythical paperless society, please read Malcolm Gladwell's excellent article published in the New Yorker.

However, VitalSource seems to be distributing their books in some in-house proprietary format. This might or might not have been avoidable given how easy it is to pirate e-books. So, VitalSource's decision is justified.

Nonetheless, using their own format instead of something more commonplace such as PDF severely limits what the readers can do with the book. So far, most of the books available only have lots and lots of text in them (no pictures) so this might not matter much. Nevertheless, I like to be able to annotate my e-books. And sometimes I do not wish to be limited to highlighting, even if it is with different colors. I need to be able to include links to pages, maybe even pictures. And I would like to share my annotations with other people. Vitalsource Bookshelf does not seem to allow me to do those things. There might be good reasons for this since younger children are actually using the program, so there is no need to make things too complicated.

Also, other operating systems are not supported. I know that almost 90% of the computer users use Windows or Mac OS X. But most computer science geeks use Linux. And they do not fancy having to read their books in some beautiful GUI window. At most, they would settle for postscript or pdf but not some funky new format. This really hinders VitalSource from being adopted in most universities. Well, maybe VitalSource never intended for this service to be used everywhere. Anyway, VitalSource definitely does not appeal to everyone. Since they are giving the VitalSource Bookshelf application free, their sole revenue depends on the sales of books. So, either they have a large consumer market, or they are maybe going to roll out a more powerful version of their application that would enable readers to do more with their e-books.

Here are some comments on their tagline: "Buy your books like you buy your music". Buying books and listening to music are too different things. When I listen to music, I do not need to take annotations! When I read books which I deem important, annotations are a must. And I can bring my music with me, be it in a CD or iPod. With VitalSource, I need to have the VitalSource Bookshelf program. And unlike, PDF or Word documents, I cannot even put it into my Palm or cell phone. Furthermore, there is still some solace in being able to curl up with a good book in bed. Sometimes, bringing my laptop to bed does not seems like such a good idea. So you would never buy books like you do music.

Also, by tying the book to one account, I think VitalSource limits you from sharing the book with your families. While I studied in my home country, I usually pass my books to my younger brother or cousins. Since textbooks really do not change that much, we managed to save a decent amount each year. Also, my brother would benefit from the notes that I took.

Installation of VitalSource Bookshelf was via a .mpkg file. As advised by rixstep there is seriously no need to distribute applications in this manner. Anyway, the installation created a bunch of folders at places that I really would not like to have them. For instance, it created the Books folder in /Users/Shared. I can understand the rational behind this since you need to be able to share books with different users, each user having a separate account on VitalSource, I assume (or maybe a main account for the entire class). It also created a Books folder in my home directory where it stores the notes that I have made. So maybe there is indeed a way to share notes with people. Bottom line, uninstalling this program is not going to be as simple as dragging the application to the trash. Maybe there is an uninstaller for the Windows version.

Even though the VitalSource Bookshelf for Mac OS X looks polished, its functionality is still too handicapped for most people. For the time being, all you can do with an e-book is to highlight the text in it, add notes to it, or search through it. Of course, you get to use the back and forward buttons to navigate too. You can drag and copy the images that are inside the e-book into another application. On Mac OS X, dragging the picture to the desktop identifies it as a Picture Clipping. Each book appears in a separate window. One good thing is that you can backup the notes that you have made. Backups are saved as .db files which in the sqlite2.1 format.

While this might not prevent piracy, what VitalSource can do is adopt what the Pragmatic Programmers LLC does with its e-book: personalized it with your name. My PickAxe and Rails book both have the line: Prepared Exclusively for..."your name here" as the footer.

By the way, the only reason I took interest in VitalSource was not because of their catchy tagline: "Buy your books like you buy your music" but because James Duncan Davidson helped develop the web backend for it using Ruby on Rails. And he did an impressive job on the website. Still, I think that VitalSource is indeed a good idea. And the fact the VitalSource has gotten Apple and IBM to participate does give it some realistic backing. It's just that I doubt that many publishers would want to use VitalSource to deliver their contents. I cannot imagine O'Reilly doing it.

Now, on to uninstalling it!

Posted in , , | no comments |

Clever Pen Tricks

Posted by Nicholas Chen Sat, 13 Aug 2005 10:26:32 GMT

Pentix - Tricks: "Here, you will find all the secrets to the tricks that pen spinners are so proud of."

(Via LifeHacker: How to do Pen Tricks.)

Following the list at LifeHacker, I have mastered 5 of the 6 that are advertised. I did not know that they even have names for such tricks. I learned my first trick when I was 14. Someone in school taught the 360 normal to me. After I had mastered that, I learned the the Charge Normal, Sonic Normal, 360 Degree Reverse and the Sonic Reversal. And then today I stumble across the Index Spin. I spent a few minutes trying it out and it seems pretty doable for me. So I hope to master it by tomorrow. It gets easier as you master more tricks.

I am right handed, but the surprising thing is that I am able to reproduce the same tricks (albeit not as beautifully executed) on my left hand without any training at all! This seems really weird but maybe after you teach yourself how to do it, your left hand just imitates it. Seems to be that way for other games that I have tried: badminton and table tennis.

Anyway, just nice to see that someone has actually put up a website to teach people pen tricks. Unfortunately, I was not able to play the videos on my powerbook. I wonder if anyone can actually pick these tricks up by reading. Seems a lot easier when someone just shows you how and you figure out what to do yourself. Some of the instructions are very lengthy and too mechanical. Most of the time, just by practicing, your fingers can figure things out.

Posted in , | no comments |

Show your passion: get a t-shirt!

Posted by Nicholas Chen Sun, 24 Jul 2005 00:50:20 GMT

I was planning to get a Ruby t-shirt. So I made the purchase today and bought two:

Ironically, what motivated me was this post about Java and people wearing Java t-shirts! No! The Rubyist in me cannot bear to see those guys around totting their Java stuff.

Posted in , | no comments |

MCB Open house at UIUC

Posted by Nicholas Chen Sun, 10 Apr 2005 06:34:49 GMT
MCB openhouse

Last post for today: it was MCB open house today. That is all. Ok almost all. The official web site for it sucks really bad. It seems to be some template from Dreamweaver MX 2004 but it is done really bad. They should have asked a real web master to do it. Embarrassing.

Posted in | no comments |

It was my birthday...

Posted by Nicholas Chen Sat, 05 Mar 2005 06:57:24 GMT

My girl friend made me a life poster.

And also threw some surprise party for me during my programming group's weekly meeting. The only one that was surprised was just me; the rest of them were all part of the ploy.

Posted in |